diff --git a/.gitignore b/.gitignore index 7bdd2ca88cb..84899b53c43 100644 --- a/.gitignore +++ b/.gitignore @@ -107,3 +107,5 @@ release/node_modules/* # virtual environments venv/ .venv/ + +.ccache/ diff --git a/src/EnergyPlus/AirLoopHVACDOAS.cc b/src/EnergyPlus/AirLoopHVACDOAS.cc index e8a4e55bd22..4efa2ffc108 100644 --- a/src/EnergyPlus/AirLoopHVACDOAS.cc +++ b/src/EnergyPlus/AirLoopHVACDOAS.cc @@ -46,6 +46,7 @@ // POSSIBILITY OF SUCH DAMAGE. // C++ Headers +#include #include // EnergyPlus Headers @@ -751,7 +752,7 @@ namespace AirLoopHVACDOAS { errorsFound = true; } if (OutletNodeErrFlag) { - ShowSevereError(state, EnergyPlus::format("Outlet node number is not found in {} = {}", CurrentModuleObject, CompName)); + ShowSevereError(state, std::format("Outlet node number is not found in {} = {}", CurrentModuleObject, CompName)); errorsFound = true; } // Check node connection to ensure that the outlet node of the previous component is the inlet node of the current component @@ -772,17 +773,16 @@ namespace AirLoopHVACDOAS { } else { ShowSevereError( state, - EnergyPlus::format( - "getAirLoopMixer: Node Connection Error in AirLoopHVAC:DedicatedOutdoorAirSystem = {}. Inlet node " - "of {} as current component is not same as the outlet node of " - "{} as previous component", - thisDOAS.Name, - thisOutsideAirSys.ComponentName(CompNum), - thisOutsideAirSys.ComponentName(CompNum - 1))); + std::format("getAirLoopMixer: Node Connection Error in AirLoopHVAC:DedicatedOutdoorAirSystem = {}. Inlet node " + "of {} as current component is not same as the outlet node of " + "{} as previous component", + thisDOAS.Name, + thisOutsideAirSys.ComponentName(CompNum), + thisOutsideAirSys.ComponentName(CompNum - 1))); ShowContinueError(state, - EnergyPlus::format("The inlet node name = {}, and the outlet node name = {}.", - state.dataLoopNodes->NodeID(thisOutsideAirSys.InletNodeNum(CompNum)), - state.dataLoopNodes->NodeID(thisOutsideAirSys.OutletNodeNum(CompNum - 1)))); + std::format("The inlet node name = {}, and the outlet node name = {}.", + state.dataLoopNodes->NodeID(thisOutsideAirSys.InletNodeNum(CompNum)), + state.dataLoopNodes->NodeID(thisOutsideAirSys.OutletNodeNum(CompNum - 1)))); errorsFound = true; } } @@ -821,8 +821,7 @@ namespace AirLoopHVACDOAS { cFieldName = "AirLoopHVAC:Splitter Name"; ShowSevereError( state, - EnergyPlus::format( - R"({}, "{}" {} not found: {})", cCurrentModuleObject, thisDOAS.Name, cFieldName, thisDOAS.AirLoopSplitterName)); + std::format(R"({}, "{}" {} not found: {})", cCurrentModuleObject, thisDOAS.Name, cFieldName, thisDOAS.AirLoopSplitterName)); errorsFound = true; } @@ -840,7 +839,7 @@ namespace AirLoopHVACDOAS { if (thisDOAS.NumOfAirLoops < 1) { cFieldName = "Number of AirLoopHVAC"; ShowSevereError(state, - fmt::format(R"({}, "{}" {} = {})", cCurrentModuleObject, thisDOAS.Name, cFieldName, thisDOAS.NumOfAirLoops)); + std::format(R"({}, "{}" {} = {})", cCurrentModuleObject, thisDOAS.Name, cFieldName, thisDOAS.NumOfAirLoops)); ShowContinueError(state, " The minimum value should be 1."); errorsFound = true; } @@ -859,8 +858,8 @@ namespace AirLoopHVACDOAS { thisDOAS.m_AirLoopNum.push_back(LoopNum); } else { cFieldName = "AirLoopHVAC Name"; - ShowSevereError( - state, EnergyPlus::format(R"({}, "{}" {} not found: {})", cCurrentModuleObject, thisDOAS.Name, cFieldName, name)); + ShowSevereError(state, + std::format(R"({}, "{}" {} not found: {})", cCurrentModuleObject, thisDOAS.Name, cFieldName, name)); errorsFound = true; } } @@ -871,23 +870,22 @@ namespace AirLoopHVACDOAS { if (!OutAirNodeManager::CheckOutAirNodeNumber(state, thisDOAS.m_InletNodeNum)) { ShowSevereError(state, - EnergyPlus::format("Inlet node ({}) is not one of OutdoorAir:Node in {} = {}", - state.dataLoopNodes->NodeID(thisDOAS.m_InletNodeNum), - CurrentModuleObject, - thisDOAS.Name)); + std::format("Inlet node ({}) is not one of OutdoorAir:Node in {} = {}", + state.dataLoopNodes->NodeID(thisDOAS.m_InletNodeNum), + CurrentModuleObject, + thisDOAS.Name)); errorsFound = true; } // Ensure the outlet node is the splitter inlet node, otherwise issue a severe error if (thisDOAS.m_OutletNodeNum != thisDOAS.m_CompPointerAirLoopSplitter->InletNodeNum) { - ShowSevereError(state, - EnergyPlus::format("The outlet node is not the inlet node of AirLoopHVAC:Splitter in {} = {}", - CurrentModuleObject, - thisDOAS.Name)); + ShowSevereError( + state, + std::format("The outlet node is not the inlet node of AirLoopHVAC:Splitter in {} = {}", CurrentModuleObject, thisDOAS.Name)); ShowContinueError(state, - EnergyPlus::format("The outlet node name is {}, and the inlet node name of AirLoopHVAC:Splitter is {}", - state.dataLoopNodes->NodeID(thisDOAS.m_OutletNodeNum), - state.dataLoopNodes->NodeID(thisDOAS.m_CompPointerAirLoopSplitter->InletNodeNum))); + std::format("The outlet node name is {}, and the inlet node name of AirLoopHVAC:Splitter is {}", + state.dataLoopNodes->NodeID(thisDOAS.m_OutletNodeNum), + state.dataLoopNodes->NodeID(thisDOAS.m_CompPointerAirLoopSplitter->InletNodeNum))); errorsFound = true; } } @@ -897,8 +895,8 @@ namespace AirLoopHVACDOAS { if (Util::SameString(state.dataAirLoop->OutsideAirSys(OASysNum).ControllerListName, "")) { if (state.dataAirLoop->OutsideAirSys(OASysNum).AirLoopDOASNum == -1) { ShowSevereError(state, - EnergyPlus::format(R"(AirLoopHVAC:OutdoorAirSystem = "{}" invalid Controller List Name = " not found.)", - state.dataAirLoop->OutsideAirSys(OASysNum).Name)); + std::format(R"(AirLoopHVAC:OutdoorAirSystem = "{}" invalid Controller List Name = " not found.)", + state.dataAirLoop->OutsideAirSys(OASysNum).Name)); errorsFound = true; } } @@ -1034,13 +1032,13 @@ namespace AirLoopHVACDOAS { Real64 supplyFanVolFlow = state.dataFans->fans(this->m_FanIndex)->maxAirFlowRate; if (supplyFanVolFlow != DataSizing::AutoSize) { if (std::abs((supplyFanVolFlow - sizingVolumeFlow) / sizingVolumeFlow) > 0.01) { - ShowWarningError(state, EnergyPlus::format("AirLoopHVAC:DedicatedOutdoorAirSystem = {}.", this->Name)); + ShowWarningError(state, std::format("AirLoopHVAC:DedicatedOutdoorAirSystem = {}.", this->Name)); + ShowContinueError(state, + std::format("The supply fan = {} has a volumetric air flow rate = {} m3/s.", + state.dataFans->fans(this->m_FanIndex)->Name, + supplyFanVolFlow)); ShowContinueError(state, - EnergyPlus::format("The supply fan = {} has a volumetric air flow rate = {} m3/s.", - state.dataFans->fans(this->m_FanIndex)->Name, - supplyFanVolFlow)); - ShowContinueError( - state, EnergyPlus::format("The AirLoopHVAC:DedicatedOutdoorAirSystem Design Volume Flow Rate = {} m3/s.", sizingVolumeFlow)); + std::format("The AirLoopHVAC:DedicatedOutdoorAirSystem Design Volume Flow Rate = {} m3/s.", sizingVolumeFlow)); ShowContinueError(state, "Consider autosizing the supply fan Maximum Air Flow Rate."); } } else { @@ -1060,14 +1058,13 @@ namespace AirLoopHVACDOAS { Real64 exhaustFanVolFlow = state.dataFans->fans(this->m_exhaustFanIndex)->maxAirFlowRate; if (exhaustFanVolFlow != DataSizing::AutoSize) { if (std::abs((exhaustFanVolFlow - sizingVolumeFlow) / sizingVolumeFlow) > 0.01) { - ShowWarningError(state, EnergyPlus::format("AirLoopHVAC:DedicatedOutdoorAirSystem = {}.", this->Name)); + ShowWarningError(state, std::format("AirLoopHVAC:DedicatedOutdoorAirSystem = {}.", this->Name)); ShowContinueError(state, - EnergyPlus::format("The exhaust fan = {} has a volumetric air flow rate = {} m3/s.", - state.dataFans->fans(this->m_exhaustFanIndex)->Name, - exhaustFanVolFlow)); + std::format("The exhaust fan = {} has a volumetric air flow rate = {} m3/s.", + state.dataFans->fans(this->m_exhaustFanIndex)->Name, + exhaustFanVolFlow)); ShowContinueError( - state, - EnergyPlus::format("The AirLoopHVAC:DedicatedOutdoorAirSystem Design Volume Flow Rate = {} m3/s.", sizingVolumeFlow)); + state, std::format("The AirLoopHVAC:DedicatedOutdoorAirSystem Design Volume Flow Rate = {} m3/s.", sizingVolumeFlow)); ShowContinueError(state, "Consider autosizing the exhaust fan Maximum Air Flow Rate."); } } else { @@ -1159,7 +1156,7 @@ namespace AirLoopHVACDOAS { if (maxDiff > 1.0e-6) { if (loop.ConveCount == 0) { ++loop.ConveCount; - ShowWarningError(state, EnergyPlus::format("Convergence limit is above 1.0e-6 for unit={}", loop.Name)); + ShowWarningError(state, std::format("Convergence limit is above 1.0e-6 for unit={}", loop.Name)); ShowContinueErrorTimeStamp( state, EnergyPlus::format("The max difference of node temperatures between AirLoopDOAS outlet and OA mixer inlet ={:.6R}", maxDiff)); @@ -1167,7 +1164,7 @@ namespace AirLoopHVACDOAS { ++loop.ConveCount; ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format(R"("{}": The max difference of node temperatures exceeding 1.0e-6 continues...)", loop.Name), + std::format(R"("{}": The max difference of node temperatures exceeding 1.0e-6 continues...)", loop.Name), loop.ConveIndex, maxDiff, maxDiff); diff --git a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp index 4ca37916187..f04a9f25529 100644 --- a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp +++ b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp @@ -128,7 +128,7 @@ namespace AirflowNetwork { Real64 viscosity; AirState(); - explicit AirState(double const airDensity); + explicit AirState(double density); }; } // namespace AirflowNetwork diff --git a/src/EnergyPlus/AirflowNetwork/src/Elements.cpp b/src/EnergyPlus/AirflowNetwork/src/Elements.cpp index b838093a145..e3d6084340d 100644 --- a/src/EnergyPlus/AirflowNetwork/src/Elements.cpp +++ b/src/EnergyPlus/AirflowNetwork/src/Elements.cpp @@ -45,10 +45,12 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// Local Headers #include "AirflowNetwork/Elements.hpp" #include "AirflowNetwork/Properties.hpp" #include "AirflowNetwork/Solver.hpp" +// EnergyPlus Headers #include "../../Data/EnergyPlusData.hh" #include "../../DataAirLoop.hh" #include "../../DataEnvironment.hh" diff --git a/src/EnergyPlus/AirflowNetwork/src/Properties.cpp b/src/EnergyPlus/AirflowNetwork/src/Properties.cpp index a19e41ae7c4..29641f75f48 100644 --- a/src/EnergyPlus/AirflowNetwork/src/Properties.cpp +++ b/src/EnergyPlus/AirflowNetwork/src/Properties.cpp @@ -45,9 +45,12 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// Local Headers #include "AirflowNetwork/Properties.hpp" -#include + +// EnergyPlus Headers #include +#include namespace EnergyPlus { diff --git a/src/EnergyPlus/AirflowNetwork/src/Solver.cpp b/src/EnergyPlus/AirflowNetwork/src/Solver.cpp index 979bbdbda63..7cea86e24d7 100644 --- a/src/EnergyPlus/AirflowNetwork/src/Solver.cpp +++ b/src/EnergyPlus/AirflowNetwork/src/Solver.cpp @@ -45,22 +45,21 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#include "AirflowNetwork/Solver.hpp" - // C++ Headers #include #include +#include #include #include // ObjexxFCL Headers #include -#include -// #include + +// Local Headers +#include "AirflowNetwork/Elements.hpp" +#include "AirflowNetwork/Solver.hpp" // EnergyPlus Headers -#include -#include #include #include #include @@ -81,7 +80,6 @@ #include #include #include -#include #include #include #include @@ -954,12 +952,12 @@ namespace AirflowNetwork { } if (MultizoneCompDetOpeningData(i).NumFac > 2) { if (MultizoneCompDetOpeningData(i).OpenFac2 >= MultizoneCompDetOpeningData(i).OpenFac3) { - ShowSevereError(m_state, EnergyPlus::format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); + ShowSevereError(m_state, std::format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); ShowContinueError(m_state, "..The value of Opening Factor #2 >= the value of Opening Factor #3"); success = false; } if (MultizoneCompDetOpeningData(i).HeightFac3 + MultizoneCompDetOpeningData(i).StartHFac3 > 1.0) { - ShowSevereError(m_state, EnergyPlus::format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); + ShowSevereError(m_state, std::format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); ShowContinueError( m_state, "..The sum of Height Factor for Opening Factor 3 and Start Height Factor for Opening Factor 3 is greater than 1.0"); @@ -967,12 +965,12 @@ namespace AirflowNetwork { } if (MultizoneCompDetOpeningData(i).NumFac == 4) { if (MultizoneCompDetOpeningData(i).OpenFac3 >= MultizoneCompDetOpeningData(i).OpenFac4) { - ShowSevereError(m_state, EnergyPlus::format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); + ShowSevereError(m_state, std::format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); ShowContinueError(m_state, "..The value of Opening Factor #3 >= the value of Opening Factor #4"); success = false; } if (MultizoneCompDetOpeningData(i).HeightFac4 + MultizoneCompDetOpeningData(i).StartHFac4 > 1.0) { - ShowSevereError(m_state, EnergyPlus::format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); + ShowSevereError(m_state, std::format("{}: {} = {}", RoutineName, CurrentModuleObject, thisObjectName)); ShowContinueError( m_state, "..The sum of Height Factor for Opening Factor 4 and Start Height Factor for Opening Factor 4 is greater than 1.0"); @@ -987,7 +985,7 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - EnergyPlus::format( + std::format( "{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); // ShowContinueError(state, "A unique component name is required in both objects " + CompName(1) + " and " + CompName(2)); success = false; @@ -1031,7 +1029,7 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - EnergyPlus::format( + std::format( "{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); // ShowContinueError(state, "A unique component name is required in both objects " + CompName(1) + " and " + CompName(2)); success = false; @@ -1078,7 +1076,7 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - EnergyPlus::format( + std::format( "{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); // ShowContinueError(state, "A unique component name is required in both objects " + CompName(1) + " and " + CompName(2)); success = false; @@ -1131,7 +1129,7 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - EnergyPlus::format( + std::format( "{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); success = false; } @@ -1169,7 +1167,7 @@ namespace AirflowNetwork { if (elements.find(thisObjectName) != elements.end()) { ShowSevereError( m_state, - EnergyPlus::format( + std::format( "{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); success = false; } @@ -1223,7 +1221,7 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - EnergyPlus::format( + std::format( "{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); // ShowContinueError(state, "A unique component name is required in both objects " + CompName(1) + " and " + CompName(2)); success = false; @@ -1266,7 +1264,7 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - EnergyPlus::format( + std::format( "{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); // ShowContinueError(state, "A unique component name is required in both objects " + CompName(1) + " and " + CompName(2)); success = false; @@ -1343,7 +1341,7 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - EnergyPlus::format( + std::format( "{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); // ShowContinueError(state, "A unique component name is required in both objects " + CompName(1) + " and " + CompName(2)); success = false; @@ -1357,11 +1355,10 @@ namespace AirflowNetwork { CurrentModuleObject = "AirflowNetwork:Distribution:Component:Fan"; DisSysNumOfCVFs = m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, CurrentModuleObject); if (DisSysNumOfCVFs > 0 && DisSysNumOfCVFs != m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, "AirLoopHVAC")) { + ShowSevereError(m_state, std::format("The number of entered AirflowNetwork:Distribution:Component:Fan objects is {}", DisSysNumOfCVFs)); ShowSevereError(m_state, - EnergyPlus::format("The number of entered AirflowNetwork:Distribution:Component:Fan objects is {}", DisSysNumOfCVFs)); - ShowSevereError(m_state, - EnergyPlus::format("The number of entered AirLoopHVAC objects is {}", - m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, "AirLoopHVAC"))); + std::format("The number of entered AirLoopHVAC objects is {}", + m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, "AirLoopHVAC"))); ShowContinueError(m_state, "Both numbers should be equal. Please check your inputs."); success = false; } @@ -1428,7 +1425,7 @@ namespace AirflowNetwork { if (!(fanType2 == HVAC::FanType::Constant || fanType2 == HVAC::FanType::OnOff || fanType2 == HVAC::FanType::VAV)) { ShowSevereError( m_state, - EnergyPlus::format( + std::format( "{}The Supply Fan Object Type in {} = {} is not a valid fan type.", RoutineName, CurrentModuleObject, thisObjectName)); ShowContinueError(m_state, "Valid fan types are Fan:ConstantVolume, Fan:OnOff, Fan:VariableVolume, or Fan:SystemModel."); success = false; @@ -1475,9 +1472,9 @@ namespace AirflowNetwork { if (elements.find(fan_name) == elements.end()) { elements[fan_name] = &DisSysCompCVFData(i); // Yet another workaround } else { - ShowSevereError(m_state, - EnergyPlus::format( - "{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, fan_name)); + ShowSevereError( + m_state, + std::format("{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, fan_name)); // ShowContinueError(state, "A unique component name is required in both objects " + CompName(1) + " and " + CompName(2)); success = false; } @@ -1514,10 +1511,10 @@ namespace AirflowNetwork { elements[DisSysCompCoilData(i).name] = &DisSysCompCoilData(i); // Yet another workaround } else { ShowSevereError(m_state, - EnergyPlus::format("{}: {}: Duplicated airflow element names are found = \"{}\".", - RoutineName, - CurrentModuleObject, - DisSysCompCoilData(i).name)); + std::format("{}: {}: Duplicated airflow element names are found = \"{}\".", + RoutineName, + CurrentModuleObject, + DisSysCompCoilData(i).name)); // ShowContinueError(state, "A unique component name is required in both objects " + CompName(1) + " and " + CompName(2)); success = false; } @@ -1555,10 +1552,10 @@ namespace AirflowNetwork { elements[DisSysCompHXData(i).name] = &DisSysCompHXData(i); // Yet another workaround } else { ShowSevereError(m_state, - EnergyPlus::format("{}: {}: Duplicated airflow element names are found = \"{}\".", - RoutineName, - CurrentModuleObject, - DisSysCompHXData(i).name)); + std::format("{}: {}: Duplicated airflow element names are found = \"{}\".", + RoutineName, + CurrentModuleObject, + DisSysCompHXData(i).name)); // ShowContinueError(state, "A unique component name is required in both objects " + CompName(1) + " and " + CompName(2)); success = false; } @@ -1594,10 +1591,10 @@ namespace AirflowNetwork { elements[DisSysCompTermUnitData(i).name] = &DisSysCompTermUnitData(i); // Yet another workaround } else { ShowSevereError(m_state, - EnergyPlus::format("{}: {}: Duplicated airflow element names are found = \"{}\".", - RoutineName, - CurrentModuleObject, - DisSysCompTermUnitData(i).name)); + std::format("{}: {}: Duplicated airflow element names are found = \"{}\".", + RoutineName, + CurrentModuleObject, + DisSysCompTermUnitData(i).name)); // ShowContinueError(state, "A unique component name is required in both objects " + CompName(1) + " and " + CompName(2)); success = false; } @@ -1631,7 +1628,7 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - EnergyPlus::format( + std::format( "{}: {}: Duplicated airflow element names are found = \"{}\".", RoutineName, CurrentModuleObject, thisObjectName)); // ShowContinueError(state, "A unique component name is required in both objects " + CompName(1) + " and " + CompName(2)); success = false; @@ -1807,7 +1804,7 @@ namespace AirflowNetwork { OccupantVentilationControl(i).MinOpeningTime = Numbers(1); if (OccupantVentilationControl(i).MinOpeningTime < 0.0) { // Code will never be executed, validation will catch invalid input - ShowWarningError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(1) + " < 0.0"); + ShowWarningError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(1) + " < 0.0"); ShowContinueError( m_state, EnergyPlus::format("..Input value = {:.1R}, Value will be reset to 0.0", OccupantVentilationControl(i).MinOpeningTime)); @@ -1817,7 +1814,7 @@ namespace AirflowNetwork { OccupantVentilationControl(i).MinClosingTime = Numbers(2); if (OccupantVentilationControl(i).MinClosingTime < 0.0) { // Code will never be executed, validation will catch invalid input - ShowWarningError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(2) + " < 0.0"); + ShowWarningError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(2) + " < 0.0"); ShowContinueError( m_state, EnergyPlus::format("..Input value = {:.1R}, Value will be reset to 0.0", OccupantVentilationControl(i).MinClosingTime)); @@ -1833,7 +1830,7 @@ namespace AirflowNetwork { if (OccupantVentilationControl(i).ComfortLowTempCurveNum == 0) { OccupantVentilationControl(i).MinTimeControlOnly = true; ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(2) + + std::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(2) + " not found = " + OccupantVentilationControl(i).ComfortLowTempCurveName); ShowContinueError(m_state, "..for specified " + cAlphaFields(1) + " = " + Alphas(1)); ShowContinueError( @@ -1862,7 +1859,7 @@ namespace AirflowNetwork { cAlphaFields(3)); // Field Name } else { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(3) + + std::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(3) + " not found = " + OccupantVentilationControl(i).ComfortHighTempCurveName); ShowContinueError(m_state, "..for specified " + cAlphaFields(1) + " = " + Alphas(1)); ShowContinueError(m_state, "A single curve of thermal comfort low temperature is used only. Simulation continues."); @@ -1872,7 +1869,7 @@ namespace AirflowNetwork { OccupantVentilationControl(i).ComfortBouPoint = Numbers(3); if (OccupantVentilationControl(i).ComfortBouPoint < 0.0) { // Code will never be executed, validation will catch invalid input - ShowWarningError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(3) + " < 0.0"); + ShowWarningError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(3) + " < 0.0"); ShowContinueError(m_state, EnergyPlus::format("..Input value = {:.1R}, Value will be reset to 10.0 as default", OccupantVentilationControl(i).ComfortBouPoint)); @@ -1885,7 +1882,7 @@ namespace AirflowNetwork { if (std::abs(CurveValue(m_state, OccupantVentilationControl(i).ComfortLowTempCurveNum, Numbers(3)) - CurveValue(m_state, OccupantVentilationControl(i).ComfortHighTempCurveNum, Numbers(3))) > 0.1) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + + std::format(RoutineName) + CurrentModuleObject + " object: The difference of both curve values at boundary point > 0.1"); ShowContinueError(m_state, "Both curve names are = " + cAlphaFields(2) + " and " + cAlphaFields(3)); ShowContinueError( @@ -1899,8 +1896,7 @@ namespace AirflowNetwork { if (OccupantVentilationControl(i).MaxPPD < 0.0 || OccupantVentilationControl(i).MaxPPD > 100.0) { // Code will never be executed, validation will catch invalid input ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(4) + - " beyond 0.0 and 100.0"); + std::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(4) + " beyond 0.0 and 100.0"); ShowContinueError(m_state, EnergyPlus::format("..Input value = {:.1R}, Value will be reset to 10.0 as default", OccupantVentilationControl(i).MaxPPD)); @@ -1916,8 +1912,8 @@ namespace AirflowNetwork { } else { // Code will never be executed, validation will catch invalid input ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "=\"" + Alphas(1) + "\" invalid " + cAlphaFields(2) + - "=\"" + Alphas(2) + "\" illegal key."); + std::format(RoutineName) + CurrentModuleObject + "=\"" + Alphas(1) + "\" invalid " + cAlphaFields(2) + "=\"" + + Alphas(2) + "\" illegal key."); ShowContinueError(m_state, "Valid keys are: Yes or No"); ErrorsFound = true; } @@ -1927,7 +1923,7 @@ namespace AirflowNetwork { OccupantVentilationControl(i).openingProbSched = Sched::GetSchedule(m_state, OccupantVentilationControl(i).OpeningProbSchName); if (OccupantVentilationControl(i).openingProbSched == nullptr) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(5) + + std::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(5) + " not found = " + OccupantVentilationControl(i).OpeningProbSchName); ShowContinueError(m_state, "..for specified " + cAlphaFields(1) + " = " + Alphas(1)); ErrorsFound = true; @@ -1938,7 +1934,7 @@ namespace AirflowNetwork { OccupantVentilationControl(i).closingProbSched = Sched::GetSchedule(m_state, OccupantVentilationControl(i).ClosingProbSchName); if (OccupantVentilationControl(i).closingProbSched == nullptr) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(6) + + std::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(6) + " not found = " + OccupantVentilationControl(i).ClosingProbSchName); ShowContinueError(m_state, "..for specified " + cAlphaFields(1) + " = " + Alphas(1)); ErrorsFound = true; @@ -1948,7 +1944,7 @@ namespace AirflowNetwork { } if (ErrorsFound) { - ShowFatalError(m_state, EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, std::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } // *** Read AirflowNetwork simulation parameters @@ -1976,7 +1972,7 @@ namespace AirflowNetwork { simulation_control.MaxPressure = 500.0; // Maximum pressure difference by default SimAirNetworkKey = "MultizoneWithoutDistribution"; simulation_control.InitFlag = 1; - ShowWarningError(m_state, EnergyPlus::format("{}{} object is not found ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, std::format("{}{} object is not found ", RoutineName, CurrentModuleObject)); ShowContinueError(m_state, "..The default behaviour values are assigned. Please see details in Input Output Reference."); } else if (simulation_control.DuctLoss) { print(m_state.files.eio, Format_110); @@ -1989,7 +1985,7 @@ namespace AirflowNetwork { } } if (NumAirflowNetwork > 1) { - ShowFatalError(m_state, EnergyPlus::format("{}Only one (\"1\") {} object per simulation is allowed.", RoutineName, CurrentModuleObject)); + ShowFatalError(m_state, std::format("{}Only one (\"1\") {} object per simulation is allowed.", RoutineName, CurrentModuleObject)); } if (!control_defaulted && !simulation_control.DuctLoss) { @@ -2079,7 +2075,7 @@ namespace AirflowNetwork { m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, "ZoneThermalChimney") + m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, "ZoneCoolTower:Shower") == 0) { - ShowWarningError(m_state, EnergyPlus::format("{}{} = \"{}\"", RoutineName, cAlphaFields(2), SimAirNetworkKey)); + ShowWarningError(m_state, std::format("{}{} = \"{}\"", RoutineName, cAlphaFields(2), SimAirNetworkKey)); ShowContinueError( m_state, "..but there are no Infiltration, Ventilation, Mixing, Cross Mixing or ZoneAirBalance objects. The simulation continues..."); @@ -2093,50 +2089,50 @@ namespace AirflowNetwork { if (multizone_always_simulated) { if (m_state.dataHeatBal->TotInfiltration > 0) { - ShowWarningError(m_state, EnergyPlus::format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, std::format("{}{} object, ", RoutineName, CurrentModuleObject)); ShowContinueError( m_state, "..Specified " + cAlphaFields(2) + " = \"" + SimAirNetworkKey + "\" and ZoneInfiltration:* objects are present."); ShowContinueError(m_state, "..ZoneInfiltration objects will not be simulated."); } if (m_state.dataHeatBal->TotVentilation > 0) { - ShowWarningError(m_state, EnergyPlus::format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, std::format("{}{} object, ", RoutineName, CurrentModuleObject)); ShowContinueError( m_state, "..Specified " + cAlphaFields(2) + " = \"" + SimAirNetworkKey + "\" and ZoneVentilation:* objects are present."); ShowContinueError(m_state, "..ZoneVentilation objects will not be simulated."); } if (m_state.dataHeatBal->TotMixing > 0) { - ShowWarningError(m_state, EnergyPlus::format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, std::format("{}{} object, ", RoutineName, CurrentModuleObject)); ShowContinueError(m_state, "..Specified " + cAlphaFields(2) + " = \"" + SimAirNetworkKey + "\" and ZoneMixing objects are present."); ShowContinueError(m_state, "..ZoneMixing objects will not be simulated."); } if (m_state.dataHeatBal->TotCrossMixing > 0) { - ShowWarningError(m_state, EnergyPlus::format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, std::format("{}{} object, ", RoutineName, CurrentModuleObject)); ShowContinueError(m_state, "..Specified " + cAlphaFields(2) + " = \"" + SimAirNetworkKey + "\" and ZoneCrossMixing objects are present."); ShowContinueError(m_state, "..ZoneCrossMixing objects will not be simulated."); } if (m_state.dataHeatBal->TotZoneAirBalance > 0) { - ShowWarningError(m_state, EnergyPlus::format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, std::format("{}{} object, ", RoutineName, CurrentModuleObject)); ShowContinueError(m_state, "..Specified " + cAlphaFields(2) + " = \"" + SimAirNetworkKey + "\" and ZoneAirBalance:OutdoorAir objects are present."); ShowContinueError(m_state, "..ZoneAirBalance:OutdoorAir objects will not be simulated."); } if (m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, "ZoneEarthtube") > 0) { - ShowWarningError(m_state, EnergyPlus::format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, std::format("{}{} object, ", RoutineName, CurrentModuleObject)); ShowContinueError(m_state, "..Specified " + cAlphaFields(2) + " = \"" + SimAirNetworkKey + "\" and ZoneEarthtube objects are present."); ShowContinueError(m_state, "..ZoneEarthtube objects will not be simulated."); } if (m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, "ZoneThermalChimney") > 0) { - ShowWarningError(m_state, EnergyPlus::format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, std::format("{}{} object, ", RoutineName, CurrentModuleObject)); ShowContinueError( m_state, "..Specified " + cAlphaFields(2) + " = \"" + SimAirNetworkKey + "\" and ZoneThermalChimney objects are present."); ShowContinueError(m_state, "..ZoneThermalChimney objects will not be simulated."); } if (m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, "ZoneCoolTower:Shower") > 0) { - ShowWarningError(m_state, EnergyPlus::format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, std::format("{}{} object, ", RoutineName, CurrentModuleObject)); ShowContinueError( m_state, "..Specified " + cAlphaFields(2) + " = \"" + SimAirNetworkKey + "\" and ZoneCoolTower:Shower objects are present."); ShowContinueError(m_state, "..ZoneCoolTower:Shower objects will not be simulated."); @@ -2149,7 +2145,7 @@ namespace AirflowNetwork { if (Util::SameString(simulation_control.WPCCntr, "Input")) { simulation_control.iWPCCnt = iWPCCntr::Input; if (lAlphaBlanks(4)) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(3) + " = INPUT."); + ShowSevereError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(3) + " = INPUT."); ShowContinueError(m_state, ".." + cAlphaFields(4) + " was not entered."); ErrorsFound = true; SimObjectError = true; @@ -2157,8 +2153,8 @@ namespace AirflowNetwork { if (!(Util::SameString(simulation_control.HeightOption, "ExternalNode") || Util::SameString(simulation_control.HeightOption, "OpeningHeight"))) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(4) + " = " + - Alphas(4) + " is invalid."); + std::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(4) + " = " + Alphas(4) + + " is invalid."); ShowContinueError(m_state, "Valid choices are ExternalNode or OpeningHeight. " + CurrentModuleObject + ": " + cAlphaFields(1) + " = " + simulation_control.name); @@ -2170,7 +2166,7 @@ namespace AirflowNetwork { simulation_control.iWPCCnt = iWPCCntr::SurfAvg; if (!(Util::SameString(simulation_control.BldgType, "LowRise") || Util::SameString(simulation_control.BldgType, "HighRise"))) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(5) + " = " + Alphas(5) + + std::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(5) + " = " + Alphas(5) + " is invalid."); ShowContinueError(m_state, "Valid choices are LowRise or HighRise. " + CurrentModuleObject + ": " + cAlphaFields(1) + " = " + @@ -2180,7 +2176,7 @@ namespace AirflowNetwork { } for (k = 1; k <= m_state.dataLoopNodes->NumOfNodes; ++k) { if (Node(k).IsLocalNode) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "Invalid " + cAlphaFields(3) + "=" + Alphas(3)); + ShowSevereError(m_state, std::format(RoutineName) + "Invalid " + cAlphaFields(3) + "=" + Alphas(3)); ShowContinueError( m_state, "A local air node is defined to INPUT the wind pressure coefficient curve, while Wind Pressure Coefficient " @@ -2193,7 +2189,7 @@ namespace AirflowNetwork { } } else { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(3) + " = " + + std::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(3) + " = " + simulation_control.WPCCntr + " is not valid."); ShowContinueError( m_state, "Valid choices are Input or SurfaceAverageCalculation. " + CurrentModuleObject + " = " + simulation_control.name); @@ -2212,9 +2208,8 @@ namespace AirflowNetwork { simulation_control.InitFlag = 1; } else { // Code will never be executed, validation will catch invalid input - ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(6) + " = " + Alphas(6) + - " is invalid."); + ShowSevereError( + m_state, std::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(6) + " = " + Alphas(6) + " is invalid."); ShowContinueError(m_state, "Valid choices are LinearInitializationMethod or ZeroNodePressures. " + CurrentModuleObject + " = " + simulation_control.name); @@ -2234,7 +2229,7 @@ namespace AirflowNetwork { simulation_control.solver = SimulationControl::Solver::ConjugateGradient; } else { simulation_control.solver = SimulationControl::Solver::SkylineLU; - ShowWarningError(m_state, EnergyPlus::format("{}{} object, ", RoutineName, CurrentModuleObject)); + ShowWarningError(m_state, std::format("{}{} object, ", RoutineName, CurrentModuleObject)); ShowContinueError(m_state, "..Specified " + cAlphaFields(8) + " = \"" + Alphas(8) + "\" is unrecognized."); ShowContinueError(m_state, "..Default value \"SkylineLU\" will be used."); } @@ -2246,13 +2241,12 @@ namespace AirflowNetwork { simulation_control.autosize_ducts = true; if (simulation_control.type == ControlType::MultizoneWithDistribution) { if (NumAPL > 1) { - ShowWarningError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, "); + ShowWarningError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, "); ShowContinueError( m_state, - EnergyPlus::format( - "The number of AirLoopHAVC is greater than 1. The current requirement for Duct Sizing requires a " - "single AirLoopHVAC.")); - ShowContinueError(m_state, EnergyPlus::format("..Duct sizing is not performed")); + std::format("The number of AirLoopHAVC is greater than 1. The current requirement for Duct Sizing requires a " + "single AirLoopHVAC.")); + ShowContinueError(m_state, std::format("..Duct sizing is not performed")); simulation_control.autosize_ducts = false; } } @@ -2261,9 +2255,9 @@ namespace AirflowNetwork { if (SimObjectError) { ShowFatalError(m_state, - EnergyPlus::format("{}Errors found getting {} object. Previous error(s) cause program termination.", - RoutineName, - CurrentModuleObject)); + std::format("{}Errors found getting {} object. Previous error(s) cause program termination.", + RoutineName, + CurrentModuleObject)); } simulation_control.maximum_iterations = static_cast(Numbers(1)); @@ -2279,22 +2273,22 @@ namespace AirflowNetwork { CurrentModuleObject = "AirflowNetwork:Distribution:DuctSizing"; int NumDuctSizing = m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, CurrentModuleObject); if (NumDuctSizing > 1) { - ShowWarningError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, "); + ShowWarningError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, "); ShowContinueError( m_state, - EnergyPlus::format( + std::format( "The number of AirflowNetwork:Distribution:DuctSizing is greater than 1. The current requirement for Duct Sizing requires a " "single object.")); - ShowContinueError(m_state, EnergyPlus::format("..Duct sizing is not performed")); + ShowContinueError(m_state, std::format("..Duct sizing is not performed")); simulation_control.autosize_ducts = false; } else if (simulation_control.autosize_ducts && NumDuctSizing == 0) { - ShowWarningError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, "); + ShowWarningError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, "); ShowContinueError( m_state, - EnergyPlus::format( + std::format( "The number of AirflowNetwork:Distribution:DuctSizing is not available. The current requirement for Duct Sizing requires a " "single object.")); - ShowContinueError(m_state, EnergyPlus::format("..Duct sizing is not performed")); + ShowContinueError(m_state, std::format("..Duct sizing is not performed")); simulation_control.autosize_ducts = false; } if (simulation_control.autosize_ducts && NumDuctSizing == 1) { @@ -2319,24 +2313,23 @@ namespace AirflowNetwork { } else if (Util::SameString(Alphas(2), Util::makeUPPER("PressureLossWithMaximumVelocity"))) { simulation_control.ductSizing.method = DuctSizingMethod::VelocityAndLoss; } else { - ShowSevereError( - m_state, EnergyPlus::format("{} {} object, {} = {} is invalid.", RoutineName, CurrentModuleObject, cAlphaFields(2), Alphas(2))); - ShowContinueError( - m_state, - EnergyPlus::format("Valid choices are MaximumVelocity, PressureLoss, and PressureLossWithMaximumVelocity. {}: {} = {}", - CurrentModuleObject, - cAlphaFields(1), - Alphas(1))); + ShowSevereError(m_state, + std::format("{} {} object, {} = {} is invalid.", RoutineName, CurrentModuleObject, cAlphaFields(2), Alphas(2))); + ShowContinueError(m_state, + std::format("Valid choices are MaximumVelocity, PressureLoss, and PressureLossWithMaximumVelocity. {}: {} = {}", + CurrentModuleObject, + cAlphaFields(1), + Alphas(1))); ErrorsFound = true; } if (simulation_control.type != ControlType::MultizoneWithDistribution) { - ShowWarningError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, "); + ShowWarningError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, "); ShowContinueError(m_state, - EnergyPlus::format("Although {} = \"{}\" is entered, but {} is not MultizoneWithoutDistribution.", - cAlphaFields(10), - Alphas(10), - cAlphaFields(2))); - ShowContinueError(m_state, EnergyPlus::format("..Duct sizing is not performed")); + std::format("Although {} = \"{}\" is entered, but {} is not MultizoneWithoutDistribution.", + cAlphaFields(10), + Alphas(10), + cAlphaFields(2))); + ShowContinueError(m_state, std::format("..Duct sizing is not performed")); simulation_control.autosize_ducts = false; } simulation_control.ductSizing.factor = Numbers(1); @@ -2396,7 +2389,7 @@ namespace AirflowNetwork { Util::FindItemInList(MultizoneZoneData(i).OccupantVentilationControlName, OccupantVentilationControl); if (MultizoneZoneData(i).OccupantVentilationControlNum == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(6) + + std::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(6) + " not found = " + MultizoneZoneData(i).OccupantVentilationControlName); ShowContinueError(m_state, "..for specified " + cAlphaFields(1) + " = " + Alphas(1)); ErrorsFound = true; @@ -2436,11 +2429,11 @@ namespace AirflowNetwork { } } else if (!simulation_control.DuctLoss) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "For an AirflowNetwork Simulation, at least one " + CurrentModuleObject + + std::format(RoutineName) + "For an AirflowNetwork Simulation, at least one " + CurrentModuleObject + " object is required but none were found."); - ShowFatalError(m_state, - EnergyPlus::format( - "{}Errors found getting {} object. Previous error(s) cause program termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + m_state, + std::format("{}Errors found getting {} object. Previous error(s) cause program termination.", RoutineName, CurrentModuleObject)); } // ==> Zone data validation @@ -2458,7 +2451,7 @@ namespace AirflowNetwork { } if (MultizoneZoneData(i).VentCtrNum == VentControlType::None) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, invalid " + cAlphaFields(2) + " = " + + std::format(RoutineName) + CurrentModuleObject + " object, invalid " + cAlphaFields(2) + " = " + MultizoneZoneData(i).VentControl); ShowContinueError(m_state, "Valid choices are Temperature, Enthalpy, Constant, or NoVent"); ShowContinueError(m_state, ".. in " + cAlphaFields(1) + " = \"" + MultizoneZoneData(i).ZoneName + "\""); @@ -2487,8 +2480,8 @@ namespace AirflowNetwork { } if (MultizoneZoneData(i).OpenFactor > 1.0 || MultizoneZoneData(i).OpenFactor < 0.0) { // Code will never be executed, validation will catch invalid input - ShowWarningError( - m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(1) + " is out of range [0.0,1.0]"); + ShowWarningError(m_state, + std::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(1) + " is out of range [0.0,1.0]"); ShowContinueError(m_state, EnergyPlus::format("..Input value = {:.2R}, Value will be set to 1.0", MultizoneZoneData(i).OpenFactor)); MultizoneZoneData(i).OpenFactor = 1.0; } @@ -2499,7 +2492,7 @@ namespace AirflowNetwork { if (SELECT_CASE_var == "TEMPERATURE") { // checks on Temperature control if (MultizoneZoneData(i).LowValueTemp < 0.0) { // Code will never be executed, validation will catch invalid input - ShowWarningError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(2) + " < 0.0"); + ShowWarningError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(2) + " < 0.0"); ShowContinueError(m_state, EnergyPlus::format("..Input value = {:.1R}, Value will be set to 0.0", MultizoneZoneData(i).LowValueTemp)); ShowContinueError(m_state, "..for " + cAlphaFields(1) + " = \"" + MultizoneZoneData(i).ZoneName); @@ -2507,17 +2500,15 @@ namespace AirflowNetwork { } if (MultizoneZoneData(i).LowValueTemp >= 100.0) { // Code will never be executed, validation will catch invalid input - ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(2) + " >= 100.0"); + ShowWarningError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(2) + " >= 100.0"); ShowContinueError( m_state, EnergyPlus::format("..Input value = {:.1R}, Value will be reset to 0.0", MultizoneZoneData(i).LowValueTemp)); ShowContinueError(m_state, "..for " + cAlphaFields(1) + " = \"" + MultizoneZoneData(i).ZoneName); MultizoneZoneData(i).LowValueTemp = 0.0; } if (MultizoneZoneData(i).UpValueTemp <= MultizoneZoneData(i).LowValueTemp) { - ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(3) + - " <= " + cNumericFields(2)); + ShowWarningError( + m_state, std::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(3) + " <= " + cNumericFields(2)); ShowContinueError(m_state, EnergyPlus::format("..Input value for {} = {:.1R}, Value will be reset to 100.0", cNumericFields(3), @@ -2529,7 +2520,7 @@ namespace AirflowNetwork { } else if (SELECT_CASE_var == "ENTHALPY") { // checks for Enthalpy control if (MultizoneZoneData(i).LowValueEnth < 0.0) { // Code will never be executed, validation will catch invalid input - ShowWarningError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(4) + " < 0.0"); + ShowWarningError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(4) + " < 0.0"); ShowContinueError( m_state, EnergyPlus::format("..Input value = {:.1R}, Value will be reset to 0.0", MultizoneZoneData(i).LowValueEnth)); ShowContinueError(m_state, "..for " + cAlphaFields(1) + " = \"" + MultizoneZoneData(i).ZoneName); @@ -2537,8 +2528,7 @@ namespace AirflowNetwork { } if (MultizoneZoneData(i).LowValueEnth >= 300000.0) { // Code will never be executed, validation will catch invalid input - ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(4) + " >= 300000.0"); + ShowWarningError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, " + cNumericFields(4) + " >= 300000.0"); ShowContinueError( m_state, EnergyPlus::format("..Input value = {:.1R}, Value will be reset to 0.0.", MultizoneZoneData(i).LowValueEnth)); ShowContinueError(m_state, "..for " + cAlphaFields(1) + " = \"" + MultizoneZoneData(i).ZoneName); @@ -2546,8 +2536,7 @@ namespace AirflowNetwork { } if (MultizoneZoneData(i).UpValueEnth <= MultizoneZoneData(i).LowValueEnth) { ShowWarningError( - m_state, - EnergyPlus::format("{}{} object, {} <= {}", RoutineName, CurrentModuleObject, cNumericFields(5), cNumericFields(4))); + m_state, std::format("{}{} object, {} <= {}", RoutineName, CurrentModuleObject, cNumericFields(5), cNumericFields(4))); ShowContinueError(m_state, EnergyPlus::format("..Input value for {}= {:.1R}, Value will be reset to 300000.0", cNumericFields(5), @@ -2597,14 +2586,14 @@ namespace AirflowNetwork { MultizoneExternalNodeData(i).height = Numbers(1); // Nodal height if (Util::SameString(simulation_control.HeightOption, "ExternalNode") && lNumericBlanks(1)) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object =" + Alphas(1) + ". The input of " + + std::format(RoutineName) + CurrentModuleObject + " object =" + Alphas(1) + ". The input of " + cNumericFields(1) + " is required, but a blank is found."); ShowContinueError(m_state, EnergyPlus::format("The default value is assigned as {:.1R}", Numbers(1))); } MultizoneExternalNodeData(i).ExtNum = AirflowNetworkNumOfZones + i; // External node number MultizoneExternalNodeData(i).curve = Curve::GetCurveIndex(m_state, Alphas(2)); // Wind pressure curve if (MultizoneExternalNodeData(i).curve == 0) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "Invalid " + cAlphaFields(2) + "=" + Alphas(2)); + ShowSevereError(m_state, std::format(RoutineName) + "Invalid " + cAlphaFields(2) + "=" + Alphas(2)); ShowContinueError(m_state, "Entered in " + CurrentModuleObject + '=' + Alphas(1)); ErrorsFound = true; } @@ -2613,8 +2602,8 @@ namespace AirflowNetwork { MultizoneExternalNodeData(i).symmetricCurve = true; } else if (!Util::SameString(Alphas(3), "No")) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(3) + - " = " + Alphas(3)); + std::format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(3) + " = " + + Alphas(3)); ShowContinueError(m_state, "The default value is assigned as No."); } } @@ -2624,8 +2613,8 @@ namespace AirflowNetwork { } else if (!Util::SameString(Alphas(4), "Absolute")) { // Code will never be executed, validation will catch invalid input ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(4) + - " = " + Alphas(4)); + std::format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(4) + " = " + + Alphas(4)); ShowContinueError(m_state, "The default value is assigned as Absolute."); } } @@ -2651,7 +2640,7 @@ namespace AirflowNetwork { if (NumAlphas > 5 && !lAlphaBlanks(6)) { // Wind pressure curve MultizoneExternalNodeData(i).curve = GetCurveIndex(m_state, Alphas(6)); if (MultizoneExternalNodeData(i).curve == 0) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "Invalid " + cAlphaFields(6) + "=" + Alphas(6)); + ShowSevereError(m_state, std::format(RoutineName) + "Invalid " + cAlphaFields(6) + "=" + Alphas(6)); ShowContinueError(m_state, "Entered in " + CurrentModuleObject + '=' + Alphas(1)); ErrorsFound = true; } @@ -2662,7 +2651,7 @@ namespace AirflowNetwork { MultizoneExternalNodeData(i).symmetricCurve = true; } else if (!Util::SameString(Alphas(7), "No")) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(7) + + std::format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(7) + " = " + Alphas(7)); ShowContinueError(m_state, "The default value is assigned as No."); } @@ -2673,7 +2662,7 @@ namespace AirflowNetwork { MultizoneExternalNodeData(i).useRelativeAngle = true; } else if (!Util::SameString(Alphas(8), "Absolute")) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(8) + + std::format(RoutineName) + CurrentModuleObject + " object, Invalid input " + cAlphaFields(8) + " = " + Alphas(8)); ShowContinueError(m_state, "The default value is assigned as Absolute."); } @@ -2696,7 +2685,7 @@ namespace AirflowNetwork { } } else { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + + std::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found when Wind Pressure Coefficient Type = Input."); ErrorsFound = true; } @@ -2729,7 +2718,7 @@ namespace AirflowNetwork { MultizoneSurfaceData(i).ExternalNodeName = Alphas(3); // Name of external node, but not used at WPC="INPUT" if ((Util::FindItemInList(Alphas(3), MultizoneExternalNodeData) != 0) && m_state.afn->MultizoneExternalNodeData(Util::FindItemInList(Alphas(3), MultizoneExternalNodeData)).curve == 0) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "Invalid " + cAlphaFields(3) + "=" + Alphas(3)); + ShowSevereError(m_state, std::format(RoutineName) + "Invalid " + cAlphaFields(3) + "=" + Alphas(3)); ShowContinueError(m_state, "A valid wind pressure coefficient curve name is required but not found when Wind Pressure " "Coefficient Type = Input."); @@ -2738,7 +2727,7 @@ namespace AirflowNetwork { MultizoneSurfaceData(i).Factor = Numbers(1); // Crack Actual Value or Window Open Factor for Ventilation if (MultizoneSurfaceData(i).Factor > 1.0 || MultizoneSurfaceData(i).Factor <= 0.0) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object=" + MultizoneSurfaceData(i).SurfName + ", " + + std::format(RoutineName) + CurrentModuleObject + " object=" + MultizoneSurfaceData(i).SurfName + ", " + cNumericFields(1) + " is out of range (0.0,1.0]"); ShowContinueError(m_state, EnergyPlus::format("..Input value = {:.2R}, Value will be set to 1.0", MultizoneSurfaceData(i).Factor)); @@ -2787,7 +2776,7 @@ namespace AirflowNetwork { MultizoneSurfaceData(i).VentSurfCtrNum = VentControlType::AdjEnth; MultizoneSurfaceData(i).IndVentControl = true; } else { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Invalid " + cAlphaFields(4)); + ShowSevereError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, Invalid " + cAlphaFields(4)); ShowContinueError(m_state, ".." + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName + ", Specified " + cAlphaFields(4) + " = " + Alphas(4)); @@ -2815,7 +2804,7 @@ namespace AirflowNetwork { Util::FindItemInList(MultizoneSurfaceData(i).OccupantVentilationControlName, OccupantVentilationControl); if (MultizoneSurfaceData(i).OccupantVentilationControlNum == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(7) + + std::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(7) + " not found = " + MultizoneSurfaceData(i).OccupantVentilationControlName); ShowContinueError(m_state, "..for specified " + cAlphaFields(1) + " = " + Alphas(1)); ErrorsFound = true; @@ -2830,7 +2819,7 @@ namespace AirflowNetwork { } else if (Alphas(8) == "USERDEFINEDASPECTRATIO") { MultizoneSurfaceData(i).EquivRecMethod = EquivRec::UserAspectRatio; } else { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Invalid " + cAlphaFields(8)); + ShowSevereError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, Invalid " + cAlphaFields(8)); ShowContinueError(m_state, ".." + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName + ", Specified " + cAlphaFields(8) + " = " + Alphas(8)); @@ -2848,7 +2837,7 @@ namespace AirflowNetwork { } } } else if (!simulation_control.DuctLoss) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); + ShowSevereError(m_state, std::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); ErrorsFound = true; } @@ -2885,14 +2874,13 @@ namespace AirflowNetwork { MultizoneSurfaceData(i).SurfNum = Util::FindItemInList(MultizoneSurfaceData(i).SurfName, m_state.dataSurface->Surface); if (MultizoneSurfaceData(i).SurfNum == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Invalid " + cAlphaFields(1) + + std::format(RoutineName) + CurrentModuleObject + " object, Invalid " + cAlphaFields(1) + " given = " + MultizoneSurfaceData(i).SurfName); - ShowFatalError(m_state, - EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, std::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } if (!m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).HeatTransSurf && !m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).IsAirBoundarySurf) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object"); + ShowSevereError(m_state, std::format(RoutineName) + CurrentModuleObject + " object"); ShowContinueError(m_state, "..The surface specified must be a heat transfer surface. Invalid " + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName); @@ -2904,7 +2892,7 @@ namespace AirflowNetwork { // Check the surface is a subsurface or not if (m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).BaseSurf == MultizoneSurfaceData(i).SurfNum) { if (MultizoneSurfaceData(i).SurfNum == m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtBoundCond) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object"); + ShowSevereError(m_state, std::format(RoutineName) + CurrentModuleObject + " object"); ShowContinueError(m_state, "..The surface facing itself is not allowed. Invalid " + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName); @@ -2913,7 +2901,7 @@ namespace AirflowNetwork { } else { if (m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).BaseSurf == m_state.dataSurface->Surface(m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).BaseSurf).ExtBoundCond) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object"); + ShowSevereError(m_state, std::format(RoutineName) + CurrentModuleObject + " object"); ShowContinueError(m_state, "..The base surface facing itself is not allowed. Invalid " + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName); @@ -2939,13 +2927,12 @@ namespace AirflowNetwork { MultizoneSurfaceData(i).NodeNums[0] = j; } else { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(1) + " = " + + std::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName); ShowContinueError(m_state, "..Zone for inside surface must be defined in a AirflowNetwork:MultiZone:Zone object. Could not find Zone = " + Zone(m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).Zone).Name); - ShowFatalError(m_state, - EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, std::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } // Calculate equivalent width and height @@ -2962,8 +2949,8 @@ namespace AirflowNetwork { MultizoneSurfaceData(i).Height = m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).Area / MultizoneSurfaceData(i).Width; if (m_state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError( - m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object = " + MultizoneSurfaceData(i).SurfName); + ShowWarningError(m_state, + std::format(RoutineName) + CurrentModuleObject + " object = " + MultizoneSurfaceData(i).SurfName); ShowContinueError(m_state, "The entered choice of Equivalent Rectangle Method is PolygonHeight. This choice is not valid for " "a horizontal surface."); @@ -2976,8 +2963,8 @@ namespace AirflowNetwork { m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).Area / MultizoneSurfaceData(i).Width; // add warning if (m_state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError( - m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object = " + MultizoneSurfaceData(i).SurfName); + ShowWarningError(m_state, + std::format(RoutineName) + CurrentModuleObject + " object = " + MultizoneSurfaceData(i).SurfName); ShowContinueError(m_state, "The entered choice of Equivalent Rectangle Method is PolygonHeight. This choice is not valid for " "a horizontal surface with a polygonal base surface."); @@ -3030,8 +3017,8 @@ namespace AirflowNetwork { m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).Area / (maxHeight - minHeight); // add warning if (m_state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError( - m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object = " + MultizoneSurfaceData(i).SurfName); + ShowWarningError(m_state, + std::format(RoutineName) + CurrentModuleObject + " object = " + MultizoneSurfaceData(i).SurfName); ShowContinueError(m_state, "The entered choice of Equivalent Rectangle Method is BaseSurfaceAspectRatio. This choice is not " "valid for a polygonal base surface."); @@ -3044,8 +3031,8 @@ namespace AirflowNetwork { m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).Area / MultizoneSurfaceData(i).Width; // add warning if (m_state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError( - m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object = " + MultizoneSurfaceData(i).SurfName); + ShowWarningError(m_state, + std::format(RoutineName) + CurrentModuleObject + " object = " + MultizoneSurfaceData(i).SurfName); ShowContinueError(m_state, "The entered choice of Equivalent Rectangle Method is BaseSurfaceAspectRatio. This choice is not " "valid for a horizontal surface with a polygonal base surface."); @@ -3086,7 +3073,7 @@ namespace AirflowNetwork { } if (!found) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + ": Invalid " + cAlphaFields(3) + " = " + + std::format(RoutineName) + CurrentModuleObject + ": Invalid " + cAlphaFields(3) + " = " + MultizoneSurfaceData(i).ExternalNodeName); ShowContinueError(m_state, "A valid " + cAlphaFields(3) + " is required when Wind Pressure Coefficient Type = Input"); ErrorsFound = true; @@ -3101,7 +3088,7 @@ namespace AirflowNetwork { !(m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtBoundCond == OtherSideCoefNoCalcExt && m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtWind)) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + ": Invalid " + cAlphaFields(1) + " = " + + std::format(RoutineName) + CurrentModuleObject + ": Invalid " + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName); ShowContinueError(m_state, "This type of surface (has ground, etc exposure) cannot be used in the AiflowNetwork model."); ErrorsFound = true; @@ -3118,7 +3105,7 @@ namespace AirflowNetwork { MultizoneSurfaceData(i).NodeNums[1] = j; } else { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(1) + " = " + + std::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName); ShowContinueError( m_state, @@ -3141,7 +3128,7 @@ namespace AirflowNetwork { if (found) { MultizoneSurfaceData(i).NodeNums[1] = j; } else { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " = " + MultizoneSurfaceData(i).SurfName); + ShowSevereError(m_state, std::format(RoutineName) + CurrentModuleObject + " = " + MultizoneSurfaceData(i).SurfName); ShowContinueError(m_state, "An adjacent zone = " + Zone(m_state.dataSurface->Surface(n).Zone).Name + " is not described in AIRFLOWNETWORK:MULTIZONE:ZONE"); @@ -3153,7 +3140,7 @@ namespace AirflowNetwork { if (!(m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtBoundCond == -2 && m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtWind)) { if (MultizoneSurfaceData(i).NodeNums[1] == 0 && m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtBoundCond < 0) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " = " + MultizoneSurfaceData(i).SurfName); + ShowSevereError(m_state, std::format(RoutineName) + CurrentModuleObject + " = " + MultizoneSurfaceData(i).SurfName); ShowContinueError(m_state, "Outside boundary condition and object are " + cExtBoundCondition(m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtBoundCond) + " and " + @@ -3189,7 +3176,7 @@ namespace AirflowNetwork { if (MultizoneSurfaceData(i).VentSurfCtrNum == VentControlType::AdjTemp) { if (!(m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtBoundCond >= 1)) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(1) + " = " + + std::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName); ShowContinueError(m_state, "..AdjacentTemperature venting control must be defined for an interzone surface."); ErrorsFound = true; @@ -3198,7 +3185,7 @@ namespace AirflowNetwork { if (MultizoneSurfaceData(i).VentSurfCtrNum == VentControlType::AdjEnth) { if (!(m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtBoundCond >= 1)) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(1) + " = " + + std::format(RoutineName) + CurrentModuleObject + " object, " + cAlphaFields(1) + " = " + MultizoneSurfaceData(i).SurfName); ShowContinueError(m_state, "..AdjacentEnthalpy venting control must be defined for an interzone surface."); ErrorsFound = true; @@ -3210,15 +3197,15 @@ namespace AirflowNetwork { if (Util::SameString(simulation_control.HeightOption, "OpeningHeight") && simulation_control.iWPCCnt == iWPCCntr::Input) { if (AirflowNetworkNumOfExtSurfaces != AirflowNetworkNumOfExtNode) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + + std::format(RoutineName) + "When the choice of Height Selection for Local Wind Speed Calculation is OpeningHeight, the number of external " "surfaces defined in " + CurrentModuleObject + " objects "); ShowContinueError(m_state, "has to be equal to the number of AirflowNetwork:MultiZone:ExternalNode objects."); ShowContinueError(m_state, - EnergyPlus::format("The entered number of external nodes is {}. The entered number of external surfaces is {}.", - AirflowNetworkNumOfExtNode, - AirflowNetworkNumOfExtSurfaces)); + std::format("The entered number of external nodes is {}. The entered number of external surfaces is {}.", + AirflowNetworkNumOfExtNode, + AirflowNetworkNumOfExtSurfaces)); ErrorsFound = true; } } @@ -3267,8 +3254,7 @@ namespace AirflowNetwork { // Obtain schedule number and check surface shape if (has_Opening) { if (m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).Sides == 3) { - ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "=\"" + MultizoneSurfaceData(i).SurfName + "\"."); + ShowWarningError(m_state, std::format(RoutineName) + CurrentModuleObject + "=\"" + MultizoneSurfaceData(i).SurfName + "\"."); ShowContinueError(m_state, "The opening is a Triangular subsurface. A rectangular subsurface will be used with equivalent " "width and height."); @@ -3277,7 +3263,7 @@ namespace AirflowNetwork { if ((m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).IsAirBoundarySurf) && (MultizoneSurfaceData(i).VentSurfCtrNum != VentControlType::Const)) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "=\"" + MultizoneSurfaceData(i).SurfName + + std::format(RoutineName) + CurrentModuleObject + "=\"" + MultizoneSurfaceData(i).SurfName + "\" is an air boundary surface."); ShowContinueError(m_state, "Ventilation Control Mode = " + Alphas(4) + " is not valid. Resetting to Constant."); MultizoneSurfaceData(i).VentSurfCtrNum = VentControlType::Const; @@ -3310,15 +3296,15 @@ namespace AirflowNetwork { } if (MultizoneSurfaceData(i).LowValueTemp < 0.0) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Low Temperature difference value < 0.0d0"); + std::format(RoutineName) + CurrentModuleObject + " object, Low Temperature difference value < 0.0d0"); ShowContinueError( m_state, EnergyPlus::format("..Input value={:.1R}, Value will be reset to 0.0.", MultizoneSurfaceData(i).LowValueTemp)); ShowContinueError(m_state, "..for Surface = \"" + MultizoneSurfaceData(i).SurfName + "\""); MultizoneSurfaceData(i).LowValueTemp = 0.0; } if (MultizoneSurfaceData(i).LowValueTemp >= 100.0) { - ShowWarningError( - m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Low Temperature difference value >= 100.0d0"); + ShowWarningError(m_state, + std::format(RoutineName) + CurrentModuleObject + " object, Low Temperature difference value >= 100.0d0"); ShowContinueError( m_state, EnergyPlus::format("..Input value = {:.1R}, Value will be reset to 0.0", MultizoneSurfaceData(i).LowValueTemp)); ShowContinueError(m_state, "..for Surface = \"" + MultizoneSurfaceData(i).SurfName + "\""); @@ -3326,7 +3312,7 @@ namespace AirflowNetwork { } if (MultizoneSurfaceData(i).UpValueTemp <= MultizoneSurfaceData(i).LowValueTemp) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + + std::format(RoutineName) + CurrentModuleObject + " object, Upper Temperature <= Lower Temperature difference value."); ShowContinueError( m_state, EnergyPlus::format("..Input value = {:.1R}, Value will be reset to 100.0", MultizoneSurfaceData(i).UpValueTemp)); @@ -3347,25 +3333,23 @@ namespace AirflowNetwork { ErrorsFound = true; } if (MultizoneSurfaceData(i).LowValueEnth < 0.0) { - ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Low Enthalpy difference value < 0.0d0"); + ShowWarningError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, Low Enthalpy difference value < 0.0d0"); ShowContinueError( m_state, EnergyPlus::format("..Input value = {:.1R}, Value will be reset to 0.0", MultizoneSurfaceData(i).LowValueEnth)); ShowContinueError(m_state, "..for Surface = \"" + MultizoneSurfaceData(i).SurfName + "\""); MultizoneSurfaceData(i).LowValueEnth = 0.0; } if (MultizoneSurfaceData(i).LowValueEnth >= 300000.0) { - ShowWarningError( - m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, Low Enthalpy difference value >= 300000.0"); + ShowWarningError(m_state, + std::format(RoutineName) + CurrentModuleObject + " object, Low Enthalpy difference value >= 300000.0"); ShowContinueError( m_state, EnergyPlus::format("..Input value = {:.1R}, Value will be reset to 0.0", MultizoneSurfaceData(i).LowValueEnth)); ShowContinueError(m_state, "..for Surface = \"" + MultizoneSurfaceData(i).SurfName + "\""); MultizoneZoneData(i).LowValueEnth = 0.0; } if (MultizoneSurfaceData(i).UpValueEnth <= MultizoneSurfaceData(i).LowValueEnth) { - ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + - " object, Upper Enthalpy <= Lower Enthalpy difference value."); + ShowWarningError( + m_state, std::format(RoutineName) + CurrentModuleObject + " object, Upper Enthalpy <= Lower Enthalpy difference value."); ShowContinueError( m_state, EnergyPlus::format("..Input value = {:.1R}, Value will be set to 300000.0", MultizoneSurfaceData(i).UpValueEnth)); @@ -3402,9 +3386,8 @@ namespace AirflowNetwork { Solver::get_people_index(MultizoneZoneData(mzPtr).ZoneNum, VentControlType::CEN15251, ErrorsFound); } } else { - ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "No zone number was found for AFN Surface " + - MultizoneSurfaceData(i).SurfName); + ShowSevereError( + m_state, std::format(RoutineName) + "No zone number was found for AFN Surface " + MultizoneSurfaceData(i).SurfName); ShowContinueError(m_state, "Check the " + CurrentModuleObject + " and Surface objects to verify they are connected to a zone."); } @@ -3453,7 +3436,7 @@ namespace AirflowNetwork { found = true; if (m_state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + + std::format(RoutineName) + "SurfaceAverageCalculation is entered for field = Wind Pressure Coefficient Type, but no roof " "surface is defined using an AirflowNetwork:MultiZone:Surface object."); ShowContinueError(m_state, "Reconsider if this is your modeling intent. Simulation continues."); @@ -3461,15 +3444,15 @@ namespace AirflowNetwork { } } if (n < 5 && m_state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError( - m_state, EnergyPlus::format(RoutineName) + "SurfaceAverageCalculation is entered for field = Wind Pressure Coefficient Type."); + ShowWarningError(m_state, + std::format(RoutineName) + "SurfaceAverageCalculation is entered for field = Wind Pressure Coefficient Type."); ShowContinueError(m_state, "The AirflowNetwork model provides wind pressure coefficients for 4 vertical exterior orientations and " "1 horizontal roof."); ShowContinueError(m_state, - EnergyPlus::format(" There are only {} exterior surface orientations defined in this input file using " - "AirflowNetwork:MultiZone:Surface objects.", - n)); + std::format(" There are only {} exterior surface orientations defined in this input file using " + "AirflowNetwork:MultiZone:Surface objects.", + n)); ShowContinueError(m_state, "Reconsider if this is your modeling intent. Simulation continues."); } } @@ -3506,7 +3489,7 @@ namespace AirflowNetwork { } if (ErrorsFound) { - ShowFatalError(m_state, EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, std::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } // Write wind pressure coefficients in the EIO file @@ -3559,18 +3542,15 @@ namespace AirflowNetwork { // If no zone object, exit if (AirflowNetworkNumOfZones == 0) { - ShowFatalError(m_state, - EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, std::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } // If zone node number =0, exit. for (int j = 1; j <= AirflowNetworkNumOfSurfaces; ++j) { if (MultizoneSurfaceData(j).NodeNums[0] == 0 && ErrorsFound) { - ShowFatalError(m_state, - EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, std::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } if (MultizoneSurfaceData(j).NodeNums[1] == 0 && ErrorsFound) { - ShowFatalError(m_state, - EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, std::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } } } @@ -3593,13 +3573,13 @@ namespace AirflowNetwork { } for (int i = 1; i <= AirflowNetworkNumOfZones; ++i) { if (ZoneCheck(i) == 0) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "AirflowNetwork:Multizone:Zone = " + MultizoneZoneData(i).ZoneName); + ShowSevereError(m_state, std::format(RoutineName) + "AirflowNetwork:Multizone:Zone = " + MultizoneZoneData(i).ZoneName); ShowContinueError(m_state, " does not have any surfaces defined in " + CurrentModuleObject); ShowContinueError(m_state, "Each zone should have at least two surfaces defined in " + CurrentModuleObject); ErrorsFound = true; } if (ZoneCheck(i) == 1) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "AirflowNetwork:Multizone:Zone = " + MultizoneZoneData(i).ZoneName); + ShowSevereError(m_state, std::format(RoutineName) + "AirflowNetwork:Multizone:Zone = " + MultizoneZoneData(i).ZoneName); ShowContinueError(m_state, " has only one surface defined in " + CurrentModuleObject); ShowContinueError(m_state, " Each zone should have at least two surfaces defined in " + CurrentModuleObject); ErrorsFound = true; @@ -3621,7 +3601,7 @@ namespace AirflowNetwork { } } if (!SurfaceFound) { - ShowWarningError(m_state, EnergyPlus::format(RoutineName) + "AirflowNetwork:Multizone:Zone = " + MultizoneZoneData(i).ZoneName); + ShowWarningError(m_state, std::format(RoutineName) + "AirflowNetwork:Multizone:Zone = " + MultizoneZoneData(i).ZoneName); ShowContinueError(m_state, "has more than one surface defined in " + CurrentModuleObject + ", but has the same boundary conditions"); ShowContinueError(m_state, "Please check inputs of " + CurrentModuleObject); @@ -3700,8 +3680,8 @@ namespace AirflowNetwork { } if (IntraZoneNodeData(i).RAFNNodeNum == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "' invalid name " + cAlphaFields(2) + - "='" + Alphas(2)); + std::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "' invalid name " + cAlphaFields(2) + "='" + + Alphas(2)); ErrorsFound = true; } IntraZoneNodeData(i).AFNZoneNum = @@ -3715,7 +3695,7 @@ namespace AirflowNetwork { } if (IntraZoneNodeData(i).ZoneNum == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "' the Zone is not defined for " + + std::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "' the Zone is not defined for " + cAlphaFields(3) + "='" + Alphas(3)); ErrorsFound = true; } @@ -3726,14 +3706,13 @@ namespace AirflowNetwork { if (IntraZoneNumOfNodes > 0) { if (!Util::SameString(SimAirNetworkKey, "MultizoneWithoutDistribution")) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + + std::format(RoutineName) + CurrentModuleObject + " model requires Simulation Control = MultizoneWithoutDistribution, while the input choice is " + SimAirNetworkKey + "."); ErrorsFound = true; - ShowFatalError(m_state, - EnergyPlus::format("{}Errors found getting {} object. Previous error(s) cause program termination.", - RoutineName, - CurrentModuleObject)); + ShowFatalError( + m_state, + std::format("{}Errors found getting {} object. Previous error(s) cause program termination.", RoutineName, CurrentModuleObject)); } } @@ -3781,7 +3760,7 @@ namespace AirflowNetwork { Util::FindItemInList(Alphas(5), MultizoneSurfaceData, &MultizoneSurfaceProp::SurfName, AirflowNetworkNumOfSurfaces); if (IntraZoneLinkageData(i).LinkNum == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid " + cAlphaFields(5) + + std::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid " + cAlphaFields(5) + " given = " + Alphas(5) + " in AirflowNetwork:MultiZone:Surface objects"); ErrorsFound = true; } @@ -3790,8 +3769,8 @@ namespace AirflowNetwork { } if (Util::SameString(Alphas(2), Alphas(3))) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + - "': Invalid inputs of both node name with " + Alphas(2) + " = " + Alphas(3)); + std::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid inputs of both node name with " + + Alphas(2) + " = " + Alphas(3)); ErrorsFound = true; } // Check valid node names @@ -3802,7 +3781,7 @@ namespace AirflowNetwork { IntraZoneLinkageData(i).NodeHeights[0] = Zone(MultizoneZoneData(IntraZoneLinkageData(i).NodeNums[0]).ZoneNum).Centroid.z; if (IntraZoneLinkageData(i).NodeNums[0] == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid " + cAlphaFields(2) + + std::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid " + cAlphaFields(2) + " given = " + Alphas(2) + " in AirflowNetwork:IntraZone:Node and AirflowNetwork:MultiZone:Zone objects"); ErrorsFound = true; } @@ -3821,8 +3800,8 @@ namespace AirflowNetwork { IntraZoneLinkageData(i).NodeNums[1] = MultizoneSurfaceData(IntraZoneLinkageData(i).LinkNum).NodeNums[1]; if (IntraZoneLinkageData(i).NodeNums[1] == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid " + - cAlphaFields(3) + " given = " + Alphas(3) + + std::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid " + cAlphaFields(3) + + " given = " + Alphas(3) + " in AirflowNetwork:IntraZone:Node or AirflowNetwork:MultiZone:Zone or " "AirflowNetwork:MultiZone:ExternalNode objects"); ErrorsFound = true; @@ -3831,7 +3810,7 @@ namespace AirflowNetwork { if (simulation_control.iWPCCnt == iWPCCntr::SurfAvg) { if (!lAlphaBlanks(3)) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + " The input of " + + std::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + " The input of " + cAlphaFields(3) + " is not needed, "); ShowContinueError(m_state, " since AirflowNetwork Wind Pressure Coefficient Type = SURFACE-AVERAGE CALCULATION. The " @@ -3848,7 +3827,7 @@ namespace AirflowNetwork { if (IntraZoneLinkageData(i).NodeNums[1] <= AirflowNetworkNumOfZones && IntraZoneLinkageData(i).NodeNums[0] <= AirflowNetworkNumOfZones) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid node inputs " + Alphas(2) + + std::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + "': Invalid node inputs " + Alphas(2) + " and " + Alphas(3) + " are zone nodes"); ErrorsFound = true; } @@ -3859,8 +3838,8 @@ namespace AirflowNetwork { .AFNZoneNum) { ShowSevereError( m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + - ": Invalid zone inputs between Node and Link " + Alphas(2) + " and " + + std::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + ": Invalid zone inputs between Node and Link " + + Alphas(2) + " and " + m_state.afn->MultizoneZoneData(IntraZoneNodeData(IntraZoneLinkageData(i).NodeNums[0]).AFNZoneNum).ZoneName); ErrorsFound = true; } @@ -3872,8 +3851,8 @@ namespace AirflowNetwork { .AFNZoneNum) { ShowSevereError( m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + - ": Invalid zone inputs between Node and Link " + Alphas(3) + " and " + + std::format(RoutineName) + CurrentModuleObject + "='" + Alphas(1) + ": Invalid zone inputs between Node and Link " + + Alphas(3) + " and " + m_state.afn->MultizoneZoneData(IntraZoneNodeData(IntraZoneLinkageData(i).NodeNums[1]).AFNZoneNum).ZoneName); ErrorsFound = true; } @@ -3898,10 +3877,10 @@ namespace AirflowNetwork { MultizoneSurfaceData(j).ZonePtr = MultizoneSurfaceData(j).NodeNums[0]; MultizoneSurfaceData(j).NodeNums[0] = IntraZoneLinkageData(i).NodeNums[1]; } else { - ShowSevereError( - m_state, - EnergyPlus::format(RoutineName) + "The InterZone link is not found between AirflowNetwork:IntraZone:Linkage =" + - IntraZoneLinkageData(i).Name + " and AirflowNetwork:Multizone:Surface = " + MultizoneSurfaceData(j).SurfName); + ShowSevereError(m_state, + std::format(RoutineName) + "The InterZone link is not found between AirflowNetwork:IntraZone:Linkage =" + + IntraZoneLinkageData(i).Name + + " and AirflowNetwork:Multizone:Surface = " + MultizoneSurfaceData(j).SurfName); ErrorsFound = true; } } else { @@ -3931,7 +3910,7 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - EnergyPlus::format(RoutineName) + "The InterZone link is not found between AirflowNetwork:IntraZone:Linkage =" + + std::format(RoutineName) + "The InterZone link is not found between AirflowNetwork:IntraZone:Linkage =" + IntraZoneLinkageData(i).Name + " and AirflowNetwork:Multizone:Surface = " + MultizoneSurfaceData(j).SurfName); ErrorsFound = true; } @@ -3945,7 +3924,7 @@ namespace AirflowNetwork { } else { ShowSevereError( m_state, - EnergyPlus::format(RoutineName) + "The InterZone link is not found between AirflowNetwork:IntraZone:Linkage =" + + std::format(RoutineName) + "The InterZone link is not found between AirflowNetwork:IntraZone:Linkage =" + IntraZoneLinkageData(i).Name + " and AirflowNetwork:Multizone:Surface = " + MultizoneSurfaceData(j).SurfName); ErrorsFound = true; } @@ -3960,7 +3939,7 @@ namespace AirflowNetwork { if (IntraZoneLinkageData(link).LinkNum > 0) { if (m_state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + IntraZoneLinkageData(link).Name + + std::format(RoutineName) + CurrentModuleObject + "='" + IntraZoneLinkageData(link).Name + " is reomoved from the list due to the surface connection from Intrazone to Interzone."); } for (int j = link; j <= IntraZoneNumOfLinks - 1; ++j) { @@ -3974,7 +3953,7 @@ namespace AirflowNetwork { if (IntraZoneLinkageData(link).LinkNum > 0) { if (m_state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "='" + IntraZoneLinkageData(link).Name + + std::format(RoutineName) + CurrentModuleObject + "='" + IntraZoneLinkageData(link).Name + " is removed from the list due to the surface connection from Intrazone to Interzone."); } } @@ -4012,8 +3991,8 @@ namespace AirflowNetwork { } else if (simulation_control.DuctLoss && Util::SameString(Alphas(3), "Zone")) { } else { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "=\"" + Alphas(1) + "\" invalid " + cAlphaFields(3) + - "=\"" + Alphas(3) + "\" illegal key."); + std::format(RoutineName) + CurrentModuleObject + "=\"" + Alphas(1) + "\" invalid " + cAlphaFields(3) + "=\"" + + Alphas(3) + "\" illegal key."); ShowContinueError(m_state, "Valid keys are: AirLoopHVAC:ZoneMixer, AirLoopHVAC:ZoneSplitter, AirLoopHVAC:OutdoorAirSystem, " "OAMixerOutdoorAirStreamNode, OutdoorAir:NodeList, OutdoorAir:Node or Other."); @@ -4025,7 +4004,7 @@ namespace AirflowNetwork { if (!Util::SameString(Alphas(2), "")) { if (Util::SameString(DisSysNodeData(j).EPlusName, Alphas(2))) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + "=\"" + Alphas(1) + "\" Duplicated " + + std::format(RoutineName) + CurrentModuleObject + "=\"" + Alphas(1) + "\" Duplicated " + cAlphaFields(2) + "=\"" + Alphas(2) + "\". Please make a correction."); ErrorsFound = true; } @@ -4035,7 +4014,7 @@ namespace AirflowNetwork { } } else { if (distribution_simulated) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); + ShowSevereError(m_state, std::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); ErrorsFound = true; } } @@ -4043,7 +4022,7 @@ namespace AirflowNetwork { CurrentModuleObject = "AirflowNetwork:Distribution:Component:Duct"; if (DisSysNumOfDucts == 0) { if (distribution_simulated) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); + ShowSevereError(m_state, std::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); ErrorsFound = true; } } @@ -4146,7 +4125,7 @@ namespace AirflowNetwork { CurrentModuleObject = "AirflowNetwork:Distribution:Component:Fan"; if (DisSysNumOfCVFs == 0) { if (distribution_simulated) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); + ShowSevereError(m_state, std::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); ErrorsFound = true; } } @@ -4156,11 +4135,11 @@ namespace AirflowNetwork { NumOfPressureControllers = m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, CurrentModuleObject); if (NumOfPressureControllers > 1) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "More " + CurrentModuleObject + " are found. Currently only one( \"1\") " + + std::format(RoutineName) + "More " + CurrentModuleObject + " are found. Currently only one( \"1\") " + CurrentModuleObject + " object per simulation is allowed when using AirflowNetwork Distribution Systems."); - ShowFatalError(m_state, - EnergyPlus::format( - "{}Errors found getting {} object. Previous error(s) cause program termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + m_state, + std::format("{}Errors found getting {} object. Previous error(s) cause program termination.", RoutineName, CurrentModuleObject)); } if (NumOfPressureControllers > 0) { @@ -4187,8 +4166,7 @@ namespace AirflowNetwork { PressureControllerData(i).AFNNodeNum = Util::FindItemInList(Alphas(2), MultizoneZoneData, &MultizoneZoneProp::ZoneName, AirflowNetworkNumOfZones); if (PressureControllerData(i).ZoneNum == 0) { - ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, invalid " + cAlphaFields(2) + " given."); + ShowSevereError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, invalid " + cAlphaFields(2) + " given."); ShowContinueError(m_state, "..invalid " + cAlphaFields(2) + " = \"" + PressureControllerData(i).ZoneName + "\""); ErrorsFound = true; } @@ -4205,7 +4183,7 @@ namespace AirflowNetwork { PressureControllerData(i).ControlTypeSet = PressureCtrlRelief; } else { // Error ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, The entered choice for " + cAlphaFields(3) + + std::format(RoutineName) + CurrentModuleObject + " object, The entered choice for " + cAlphaFields(3) + " is not valid = \"" + PressureControllerData(i).Name + "\""); ShowContinueError(m_state, "Valid choices are " @@ -4224,7 +4202,7 @@ namespace AirflowNetwork { is_EXF = afe->second->type() == ComponentType::EXF; } if (!is_EXF) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, an invalid name is given:"); + ShowSevereError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, an invalid name is given:"); ShowContinueError(m_state, ".. invalid " + cAlphaFields(4) + " = \"" + Alphas(4) + "\"."); ErrorsFound = true; } @@ -4237,7 +4215,7 @@ namespace AirflowNetwork { is_REL = afe->second->type() == ComponentType::REL; } if (!is_REL) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + CurrentModuleObject + " object, an invalid name is given:"); + ShowSevereError(m_state, std::format(RoutineName) + CurrentModuleObject + " object, an invalid name is given:"); ShowContinueError(m_state, ".. invalid " + cAlphaFields(4) + " = \"" + Alphas(4) + "\"."); ErrorsFound = true; } @@ -4379,7 +4357,7 @@ namespace AirflowNetwork { AirflowNetworkNodeData(i).NodeTypeNum = 1; } else { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "AirflowNetwork:Distribution:Node: The outdoor air node is found at " + + std::format(RoutineName) + "AirflowNetwork:Distribution:Node: The outdoor air node is found at " + AirflowNetworkNodeData(i).Name); ShowContinueError(m_state, "The node with Component Object Type = OAMixerOutdoorAirStreamNode is not found. Please check inputs."); @@ -4390,9 +4368,8 @@ namespace AirflowNetwork { if (simulation_control.DuctLoss && Util::SameString(DisSysNodeData(i - NumOfNodesMultiZone).EPlusType, "Zone")) { AirflowNetworkNodeData(i).EPlusTypeNum = iEPlusNodeType::ZON; if (Util::FindItemInList(AirflowNetworkNodeData(i).Name, Zone) == 0) { - ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + - "AirflowNetwork:Distribution:Node object, Component Object Type or Node Type = Zone"); + ShowSevereError( + m_state, std::format(RoutineName) + "AirflowNetwork:Distribution:Node object, Component Object Type or Node Type = Zone"); ShowContinueError(m_state, "..invalid Zone name = \"" + DisSysNodeData(i - NumOfNodesMultiZone).Name + "\""); ErrorsFound = true; } else { @@ -4751,7 +4728,7 @@ namespace AirflowNetwork { if (!(surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::GlassDoor || surf.OriginalClass == SurfaceClass::Door || surf.IsAirBoundarySurf)) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + + std::format(RoutineName) + "AirflowNetworkComponent: The opening must be assigned to a window, door, glassdoor or air boundary at " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; @@ -4760,7 +4737,7 @@ namespace AirflowNetwork { if (surf.OriginalClass == SurfaceClass::Door || surf.OriginalClass == SurfaceClass::GlassDoor) { if (MultizoneCompDetOpeningData(AirflowNetworkCompData(compnum).TypeNum).LVOType == 2) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + + std::format(RoutineName) + "AirflowNetworkComponent: The opening with horizontally pivoted type must be assigned to a " "window surface at " + AirflowNetworkLinkageData(count).Name); @@ -4782,7 +4759,7 @@ namespace AirflowNetwork { if (!(surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::GlassDoor || surf.OriginalClass == SurfaceClass::Door || surf.IsAirBoundarySurf)) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + + std::format(RoutineName) + "AirflowNetworkComponent: The opening must be assigned to a window, door, glassdoor or air boundary at " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; @@ -4804,7 +4781,7 @@ namespace AirflowNetwork { } if (AirflowNetworkLinkageData(count).NodeNums[1] > AirflowNetworkNumOfZones) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + + std::format(RoutineName) + "AirflowNetworkComponent: The horizontal opening must be located between two thermal zones at " + AirflowNetworkLinkageData(count).Name); ShowContinueError(m_state, "This component is exposed to outdoors."); @@ -4813,7 +4790,7 @@ namespace AirflowNetwork { if (!(MultizoneZoneData(AirflowNetworkLinkageData(count).NodeNums[0]).ZoneNum > 0 && MultizoneZoneData(AirflowNetworkLinkageData(count).NodeNums[1]).ZoneNum > 0)) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + + std::format(RoutineName) + "AirflowNetworkComponent: The horizontal opening must be located between two thermal zones at " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; @@ -4830,7 +4807,7 @@ namespace AirflowNetwork { if (!(surf.OriginalClass == SurfaceClass::Window || surf.OriginalClass == SurfaceClass::GlassDoor || surf.OriginalClass == SurfaceClass::Door || surf.IsAirBoundarySurf)) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + + std::format(RoutineName) + "AirflowNetworkComponent: The opening must be assigned to a window, door, glassdoor or air boundary at " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; @@ -4842,7 +4819,7 @@ namespace AirflowNetwork { } } else { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + ": The component is not defined in " + + std::format(RoutineName) + CurrentModuleObject + ": The component is not defined in " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; } @@ -4871,8 +4848,8 @@ namespace AirflowNetwork { AirflowNetworkLinkageData(count).element->type() != ComponentType::SEL) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + AirflowNetworkLinkageData(count).CompName + - ": The component is not allowed in " + AirflowNetworkLinkageData(count).Name); + std::format(RoutineName) + AirflowNetworkLinkageData(count).CompName + ": The component is not allowed in " + + AirflowNetworkLinkageData(count).Name); ShowContinueError(m_state, "The allowed component type is either AirflowNetwork:MultiZone:Surface:Crack or " "AirflowNetwork:MultiZone:Surface:EffectiveLeakageArea."); @@ -4880,7 +4857,7 @@ namespace AirflowNetwork { } } else { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + AirflowNetworkLinkageData(count).CompName + ": The component is not defined in " + + std::format(RoutineName) + AirflowNetworkLinkageData(count).CompName + ": The component is not defined in " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; } @@ -4974,14 +4951,14 @@ namespace AirflowNetwork { AirflowNetworkLinkageData(count).ZoneNum = Util::FindItemInList(AirflowNetworkLinkageData(count).ZoneName, Zone); if (AirflowNetworkLinkageData(count).ZoneNum == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + ": Invalid " + + std::format(RoutineName) + CurrentModuleObject + ": Invalid " + AirflowNetworkLinkageData(count).ZoneName + " given = " + AirflowNetworkLinkageData(count).ZoneName); ErrorsFound = true; } } if (AirflowNetworkLinkageData(count).NodeNames[0] == AirflowNetworkLinkageData(count).NodeNames[1]) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + ", " + AirflowNetworkLinkageData(count).NodeNames[0] + + std::format(RoutineName) + CurrentModuleObject + ", " + AirflowNetworkLinkageData(count).NodeNames[0] + " = " + AirflowNetworkLinkageData(count).NodeNames[1] + " in " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; } @@ -4997,7 +4974,7 @@ namespace AirflowNetwork { AirflowNetworkLinkageData(count).CompNum = compnum; } else { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + ": The " + AirflowNetworkLinkageData(count).CompName + + std::format(RoutineName) + CurrentModuleObject + ": The " + AirflowNetworkLinkageData(count).CompName + " is not defined in " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; } @@ -5013,9 +4990,8 @@ namespace AirflowNetwork { } if (!found) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + ": The " + - AirflowNetworkLinkageData(count).NodeNames[0] + " is not found in the node data " + - AirflowNetworkLinkageData(count).Name); + std::format(RoutineName) + CurrentModuleObject + ": The " + AirflowNetworkLinkageData(count).NodeNames[0] + + " is not found in the node data " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; } for (int i = 1; i <= AirflowNetworkNumOfNodes; ++i) { @@ -5028,16 +5004,15 @@ namespace AirflowNetwork { } if (!found) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + ": The " + - AirflowNetworkLinkageData(count).NodeNames[1] + " is not found in the node data " + - AirflowNetworkLinkageData(count).Name); + std::format(RoutineName) + CurrentModuleObject + ": The " + AirflowNetworkLinkageData(count).NodeNames[1] + + " is not found in the node data " + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; } } if (!found && !simulation_control.DuctLoss) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + ": The " + cAlphaFields(2) + - " is not found in the node data " + AirflowNetworkLinkageData(count).Name); + std::format(RoutineName) + CurrentModuleObject + ": The " + cAlphaFields(2) + " is not found in the node data " + + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; } for (int i = 1; i <= AirflowNetworkNumOfNodes; ++i) { @@ -5050,15 +5025,15 @@ namespace AirflowNetwork { } if (!found && !simulation_control.DuctLoss) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + ": The " + cAlphaFields(3) + - " is not found in the node data " + AirflowNetworkLinkageData(count).Name); + std::format(RoutineName) + CurrentModuleObject + ": The " + cAlphaFields(3) + " is not found in the node data " + + AirflowNetworkLinkageData(count).Name); ErrorsFound = true; } } } else { if (distribution_simulated) { - ShowSevereError(m_state, EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); + ShowSevereError(m_state, std::format(RoutineName) + "An " + CurrentModuleObject + " object is required but not found."); ErrorsFound = true; } } @@ -5076,20 +5051,19 @@ namespace AirflowNetwork { } if (AirflowNetworkLinkageData(i).NodeNums[0] == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + ": The " + AirflowNetworkLinkageData(i).NodeNames[0] + + std::format(RoutineName) + CurrentModuleObject + ": The " + AirflowNetworkLinkageData(i).NodeNames[0] + " is not found in the AirflowNetwork:Distribution:Node. " + AirflowNetworkLinkageData(i).Name); ErrorsFound = true; } if (AirflowNetworkLinkageData(i).NodeNums[1] == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + ": The " + AirflowNetworkLinkageData(i).NodeNames[1] + + std::format(RoutineName) + CurrentModuleObject + ": The " + AirflowNetworkLinkageData(i).NodeNames[1] + " is not found in the AirflowNetwork:Distribution:Node. " + AirflowNetworkLinkageData(i).Name); ErrorsFound = true; } } if (ErrorsFound) { - ShowFatalError(m_state, - EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, std::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } return; @@ -5146,7 +5120,7 @@ namespace AirflowNetwork { // (AirflowNetworkCompData(j).CompTypeNum == iComponentTypeNum::TMU) CompName(2) = // "AirflowNetwork:Distribution:Component:TerminalUnit"; if (AirflowNetworkCompData(j).CompTypeNum == // iComponentTypeNum::HEX) CompName(2) = "AirflowNetwork:Distribution:Component:HeatExchanger"; ShowSevereError(m_state, - // format(RoutineName) + "Duplicated component names are found = " + AirflowNetworkCompData(i).Name); + // std::format(RoutineName) + "Duplicated component names are found = " + AirflowNetworkCompData(i).Name); // ShowContinueError(m_state, "A unique component name is required in both objects " + CompName(1) + " and " + CompName(2)); // ErrorsFound = true; // } @@ -5166,11 +5140,11 @@ namespace AirflowNetwork { if (!NodeFound) { if (count <= AirflowNetworkNumOfSurfaces) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[0] + + std::format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[0] + " in AIRFLOWNETWORK:MULTIZONE:SURFACE = " + AirflowNetworkLinkageData(count).Name + " is not found"); } else { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[0] + + std::format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[0] + " in AIRFLOWNETWORK:DISTRIBUTION:LINKAGE = " + AirflowNetworkLinkageData(count).Name + " is not found in AIRFLOWNETWORK:DISTRIBUTION:NODE objects."); } @@ -5186,11 +5160,11 @@ namespace AirflowNetwork { if (!NodeFound) { if (count <= AirflowNetworkNumOfSurfaces) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[0] + + std::format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[0] + " in AIRFLOWNETWORK:MULTIZONE:SURFACE = " + AirflowNetworkLinkageData(count).Name + " is not found"); } else { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[1] + + std::format(RoutineName) + AirflowNetworkLinkageData(count).NodeNames[1] + " in AIRFLOWNETWORK:DISTRIBUTION:LINKAGE = " + AirflowNetworkLinkageData(count).Name + " is not found in AIRFLOWNETWORK:DISTRIBUTION:NODE objects."); } @@ -5204,7 +5178,7 @@ namespace AirflowNetwork { } if (!CompFound) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "Component = " + AirflowNetworkLinkageData(count).CompName + + std::format(RoutineName) + "Component = " + AirflowNetworkLinkageData(count).CompName + " in AIRFLOWNETWORK:DISTRIBUTION:LINKAGE = " + AirflowNetworkLinkageData(count).Name + " is not found in AirflowNetwork Component Data objects."); ErrorsFound = true; @@ -5225,7 +5199,7 @@ namespace AirflowNetwork { } if ((!NodeFound1) && count > NumOfNodesMultiZone && AirflowNetworkNodeData(count).ExtNodeNum == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "AIRFLOWNETWORK:DISTRIBUTION:NODE = " + AirflowNetworkNodeData(count).Name + + std::format(RoutineName) + "AIRFLOWNETWORK:DISTRIBUTION:NODE = " + AirflowNetworkNodeData(count).Name + " is not found as Node 1 Name in AIRFLOWNETWORK:DISTRIBUTION:LINKAGE"); ShowContinueError(m_state, "Each non-external AIRFLOWNETWORK:DISTRIBUTION:NODE has to be defined as Node 1 once in " @@ -5234,7 +5208,7 @@ namespace AirflowNetwork { } if ((!NodeFound2) && count > NumOfNodesMultiZone && AirflowNetworkNodeData(count).ExtNodeNum == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "AIRFLOWNETWORK:DISTRIBUTION:NODE = " + AirflowNetworkNodeData(count).Name + + std::format(RoutineName) + "AIRFLOWNETWORK:DISTRIBUTION:NODE = " + AirflowNetworkNodeData(count).Name + " is not found as Node 2 Name in AIRFLOWNETWORK:DISTRIBUTION:LINKAGE"); ShowContinueError(m_state, "Each non-external AIRFLOWNETWORK:DISTRIBUTION:NODE has to be defined as Node 2 once in " @@ -5243,7 +5217,7 @@ namespace AirflowNetwork { } if ((!NodeFound1) && (!NodeFound2) && count > NumOfNodesMultiZone && AirflowNetworkNodeData(count).ExtNodeNum > 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "AIRFLOWNETWORK:DISTRIBUTION:NODE = " + AirflowNetworkNodeData(count).Name + + std::format(RoutineName) + "AIRFLOWNETWORK:DISTRIBUTION:NODE = " + AirflowNetworkNodeData(count).Name + " is not found as Node 1 Name or Node 2 Name in AIRFLOWNETWORK:DISTRIBUTION:LINKAGE"); ShowContinueError(m_state, "This external AIRFLOWNETWORK:DISTRIBUTION:NODE has to be defined in AIRFLOWNETWORK:DISTRIBUTION:LINKAGE"); ErrorsFound = true; @@ -5259,7 +5233,7 @@ namespace AirflowNetwork { } if (!NodeFound) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + + std::format(RoutineName) + "No External Nodes found in AirflowNetwork:Multizone:ExternalNode. There must be at least 1 external node defined."); ErrorsFound = true; } @@ -5315,22 +5289,22 @@ namespace AirflowNetwork { if (DisSysCompHXData(i).CoilParentExists && count != 2) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "The inputs of component name field as a heat exchanger in " - "AIRFLOWNETWORK:DISTRIBUTION:LINKAGE is not correct"); + std::format(RoutineName) + "The inputs of component name field as a heat exchanger in " + "AIRFLOWNETWORK:DISTRIBUTION:LINKAGE is not correct"); ShowContinueError(m_state, "The entered name of heat exchanger is " + DisSysCompHXData(i).name + " in AirflowNetwork:Distribution:Component:HeatExchanger objects"); - ShowContinueError(m_state, EnergyPlus::format("The correct appearance number is 2. The entered appearance number is {}", count)); + ShowContinueError(m_state, std::format("The correct appearance number is 2. The entered appearance number is {}", count)); ErrorsFound = true; } if ((!DisSysCompHXData(i).CoilParentExists) && count != 1) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "The inputs of component name field as a heat exchanger in " - "AIRFLOWNETWORK:DISTRIBUTION:LINKAGE is not correct"); + std::format(RoutineName) + "The inputs of component name field as a heat exchanger in " + "AIRFLOWNETWORK:DISTRIBUTION:LINKAGE is not correct"); ShowContinueError(m_state, "The entered name of heat exchanger is " + DisSysCompHXData(i).name + " in AirflowNetwork:Distribution:Component:HeatExchanger objects"); - ShowContinueError(m_state, EnergyPlus::format("The correct appearance number is 1. The entered appearance number is {}", count)); + ShowContinueError(m_state, std::format("The correct appearance number is 1. The entered appearance number is {}", count)); ErrorsFound = true; } } @@ -5346,7 +5320,7 @@ namespace AirflowNetwork { if (AirflowNetworkCompData(i).CompTypeNum == iComponentTypeNum::OAF) { if (!Util::SameString(DisSysNodeData(j - NumOfNodesMultiZone).EPlusType, "OAMixerOutdoorAirStreamNode")) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + + std::format(RoutineName) + "AirflowNetwork:Distribution:Linkage: When the component type is " "AirflowNetwork:Distribution:Component:OutdoorAirFlow at " + AirflowNetworkNodeData(j).Name + ","); @@ -5356,7 +5330,7 @@ namespace AirflowNetwork { } if (!Util::SameString(DisSysNodeData(k - NumOfNodesMultiZone).EPlusType, "AirLoopHVAC:OutdoorAirSystem")) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + + std::format(RoutineName) + "AirflowNetwork:Distribution:Linkage: When the component type is " "AirflowNetwork:Distribution:Component:OutdoorAirFlow at " + AirflowNetworkNodeData(k).Name + ","); @@ -5370,7 +5344,7 @@ namespace AirflowNetwork { if (AirflowNetworkCompData(i).CompTypeNum == iComponentTypeNum::REL) { if (!Util::SameString(DisSysNodeData(j - NumOfNodesMultiZone).EPlusType, "AirLoopHVAC:OutdoorAirSystem")) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + + std::format(RoutineName) + "AirflowNetwork:Distribution:Linkage: When the component type is " "AirflowNetwork:Distribution:Component:OutdoorAirFlow at " + AirflowNetworkNodeData(j).Name + ","); @@ -5381,7 +5355,7 @@ namespace AirflowNetwork { } if (!Util::SameString(DisSysNodeData(k - NumOfNodesMultiZone).EPlusType, "OAMixerOutdoorAirStreamNode")) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + + std::format(RoutineName) + "AirflowNetwork:Distribution:Linkage: When the component type is " "AirflowNetwork:Distribution:Component:OutdoorAirFlow at " + AirflowNetworkNodeData(k).Name + ","); @@ -5393,7 +5367,7 @@ namespace AirflowNetwork { } if (ErrorsFound) { - ShowFatalError(m_state, EnergyPlus::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); + ShowFatalError(m_state, std::format("{}Errors found getting inputs. Previous error(s) cause program termination.", RoutineName)); } Alphas.deallocate(); @@ -7070,7 +7044,7 @@ namespace AirflowNetwork { NumOfExtNodes = AirflowNetworkNumOfExtSurfaces; for (ExtNum = 1; ExtNum <= NumOfExtNodes; ++ExtNum) { MultizoneExternalNodeData(ExtNum).ExtNum = AirflowNetworkNumOfZones + ExtNum; - MultizoneExternalNodeData(ExtNum).Name = EnergyPlus::format("ExtNode{:4}", ExtNum); + MultizoneExternalNodeData(ExtNum).Name = std::format("ExtNode{:4}", ExtNum); } // Associate each external node with SurfaceData @@ -7200,7 +7174,7 @@ namespace AirflowNetwork { } // End of wind direction loop // Add new table vals[12] = vals[0]; // Enforce periodicity - curveIndex[FacadeNum - 1] = AirflowNetwork::makeTable(m_state, EnergyPlus::format("!WPCTABLE{}", FacadeNum), dirs30GridIndex, vals); + curveIndex[FacadeNum - 1] = AirflowNetwork::makeTable(m_state, std::format("!WPCTABLE{}", FacadeNum), dirs30GridIndex, vals); } // End of facade number loop } else { //-calculate the advanced single sided wind pressure coefficients @@ -7286,17 +7260,17 @@ namespace AirflowNetwork { for (FacadeNum = 1; FacadeNum <= 4; ++FacadeNum) { valsByFacade[FacadeNum - 1].push_back(valsByFacade[FacadeNum - 1][0]); // Enforce periodicity - curveIndex[FacadeNum - 1] = AirflowNetwork::makeTable( - m_state, EnergyPlus::format("!SSWPCTABLEFACADE{}", FacadeNum), dirs10GridIndex, valsByFacade[FacadeNum - 1]); + curveIndex[FacadeNum - 1] = + AirflowNetwork::makeTable(m_state, std::format("!SSWPCTABLEFACADE{}", FacadeNum), dirs10GridIndex, valsByFacade[FacadeNum - 1]); } FacadeNum = 5; valsByFacade[FacadeNum - 1].push_back(valsByFacade[FacadeNum - 1][0]); // Enforce periodicity - curveIndex[FacadeNum - 1] = AirflowNetwork::makeTable( - m_state, EnergyPlus::format("!SSWPCTABLEFACADE{}", FacadeNum), dirs30GridIndex, valsByFacade[FacadeNum - 1]); + curveIndex[FacadeNum - 1] = + AirflowNetwork::makeTable(m_state, std::format("!SSWPCTABLEFACADE{}", FacadeNum), dirs30GridIndex, valsByFacade[FacadeNum - 1]); for (unsigned facadeNum = 6; facadeNum <= valsByFacade.size(); ++facadeNum) { valsByFacade[facadeNum - 1].push_back(valsByFacade[facadeNum - 1][0]); // Enforce periodicity curveIndex[facadeNum - 1] = - AirflowNetwork::makeTable(m_state, EnergyPlus::format("!SSWPCTABLE{}", facadeNum), dirs10GridIndex, valsByFacade[facadeNum - 1]); + AirflowNetwork::makeTable(m_state, std::format("!SSWPCTABLE{}", facadeNum), dirs10GridIndex, valsByFacade[facadeNum - 1]); } } // Connect the external nodes to the new curves @@ -10463,7 +10437,7 @@ namespace AirflowNetwork { DisSysNodeData(i).AirLoopNum = get_airloop_number(j); if (DisSysNodeData(i).AirLoopNum == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "The Node or Component Name defined in " + DisSysNodeData(i).Name + + std::format(RoutineName) + "The Node or Component Name defined in " + DisSysNodeData(i).Name + " is not found in the AirLoopHVAC."); ShowContinueError(m_state, "The entered name is " + DisSysNodeData(i).EPlusName + " in an AirflowNetwork:Distribution:Node object."); @@ -10482,7 +10456,7 @@ namespace AirflowNetwork { Util::SameString(DisSysNodeData(i).EPlusType, "OutdoorAir:Node")) { if (!LocalError) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "The Node or Component Name defined in " + DisSysNodeData(i).Name + + std::format(RoutineName) + "The Node or Component Name defined in " + DisSysNodeData(i).Name + " is not found in the " + DisSysNodeData(i).EPlusType); ShowContinueError(m_state, "The entered name is " + DisSysNodeData(i).EPlusName + " in an AirflowNetwork:Distribution:Node object."); @@ -10491,7 +10465,7 @@ namespace AirflowNetwork { } if (DisSysNodeData(i).EPlusNodeNum == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + + std::format(RoutineName) + "Primary Air Loop Node is not found in AIRFLOWNETWORK:DISTRIBUTION:NODE = " + DisSysNodeData(i).Name); ErrorsFound = true; } @@ -10599,7 +10573,7 @@ namespace AirflowNetwork { if (m_state.dataZoneEquip->ZoneEquipConfig(zoneNum).ZoneNode == i) { if (zoneNum > AirflowNetworkNumOfNodes) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "'" + m_state.dataLoopNodes->NodeID(i) + + std::format(RoutineName) + "'" + m_state.dataLoopNodes->NodeID(i) + "' is not defined as an AirflowNetwork:Distribution:Node object."); ShowContinueError( m_state, "This Node is the zone air node for Zone '" + m_state.dataZoneEquip->ZoneEquipConfig(zoneNum).ZoneName + "'."); @@ -10660,7 +10634,7 @@ namespace AirflowNetwork { if (!NodeFound(i)) { // Check if this node is the OA relief node. For the time being, OA relief node is not used if (GetNumOAMixers(m_state) > 1) { - // ShowSevereError(m_state, format(RoutineName) + "Only one OutdoorAir:Mixer is allowed in the + // ShowSevereError(m_state, std::format(RoutineName) + "Only one OutdoorAir:Mixer is allowed in the // AirflowNetwork model." ); ErrorsFound = true; int OAFanNum; int OARelNum; @@ -10690,14 +10664,14 @@ namespace AirflowNetwork { } if (OAMixerNum == GetNumOAMixers(m_state)) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "'" + m_state.dataLoopNodes->NodeID(i) + + std::format(RoutineName) + "'" + m_state.dataLoopNodes->NodeID(i) + "' is not defined as an AirflowNetwork:Distribution:Node object."); ErrorsFound = true; } } } else if (GetNumOAMixers(m_state) == 0) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "'" + m_state.dataLoopNodes->NodeID(i) + + std::format(RoutineName) + "'" + m_state.dataLoopNodes->NodeID(i) + "' is not defined as an AirflowNetwork:Distribution:Node object."); ErrorsFound = true; } else { @@ -10715,7 +10689,7 @@ namespace AirflowNetwork { NodeFound(i) = true; } else { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "'" + m_state.dataLoopNodes->NodeID(i) + + std::format(RoutineName) + "'" + m_state.dataLoopNodes->NodeID(i) + "' is not defined as an AirflowNetwork:Distribution:Node object."); ErrorsFound = true; } @@ -10724,32 +10698,30 @@ namespace AirflowNetwork { } if (hpwhFound) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + - "Heat pump water heater is simulated along with an AirflowNetwork but is not included in " - "the AirflowNetwork."); + std::format(RoutineName) + "Heat pump water heater is simulated along with an AirflowNetwork but is not included in " + "the AirflowNetwork."); } if (standaloneERVFound) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + - "A ZoneHVAC:EnergyRecoveryVentilator is simulated along with an AirflowNetwork but is not " - "included in the AirflowNetwork."); + std::format(RoutineName) + "A ZoneHVAC:EnergyRecoveryVentilator is simulated along with an AirflowNetwork but is not " + "included in the AirflowNetwork."); } if (packagedUnitaryFound) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + "A ZoneHVAC:PackagedTerminalAirConditioner, ZoneHVAC:PackagedTerminalHeatPump, or " - "ZoneHVAC:WaterToAirHeatPump is simulated along with an AirflowNetwork but is not " - "included in the AirflowNetwork."); + std::format(RoutineName) + "A ZoneHVAC:PackagedTerminalAirConditioner, ZoneHVAC:PackagedTerminalHeatPump, or " + "ZoneHVAC:WaterToAirHeatPump is simulated along with an AirflowNetwork but is not " + "included in the AirflowNetwork."); } if (vrfTUFound) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + + std::format(RoutineName) + "A ZoneHVAC:TerminalUnit:VariableRefrigerantFlow is simulated along with an AirflowNetwork but is not " "included in the AirflowNetwork."); } if (windowACFound) { ShowWarningError(m_state, - EnergyPlus::format(RoutineName) + "A ZoneHVAC:WindowAirConditioner is simulated along with an AirflowNetwork but is not " - "included in the AirflowNetwork."); + std::format(RoutineName) + "A ZoneHVAC:WindowAirConditioner is simulated along with an AirflowNetwork but is not " + "included in the AirflowNetwork."); } NodeFound.deallocate(); @@ -10806,7 +10778,7 @@ namespace AirflowNetwork { if (SELECT_CASE_var == "COIL:COOLING:DX") { ValidateComponent( - m_state, "Coil:Cooling:DX", DisSysCompCoilData(i).name, IsNotOK, EnergyPlus::format(RoutineName) + CurrentModuleObject); + m_state, "Coil:Cooling:DX", DisSysCompCoilData(i).name, IsNotOK, std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { @@ -10823,11 +10795,8 @@ namespace AirflowNetwork { } } } else if (SELECT_CASE_var == "COIL:COOLING:DX:SINGLESPEED") { - ValidateComponent(m_state, - "Coil:Cooling:DX:SingleSpeed", - DisSysCompCoilData(i).name, - IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + ValidateComponent( + m_state, "Coil:Cooling:DX:SingleSpeed", DisSysCompCoilData(i).name, IsNotOK, std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { @@ -10835,11 +10804,8 @@ namespace AirflowNetwork { } } else if (SELECT_CASE_var == "COIL:HEATING:DX:SINGLESPEED") { - ValidateComponent(m_state, - "Coil:Heating:DX:SingleSpeed", - DisSysCompCoilData(i).name, - IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + ValidateComponent( + m_state, "Coil:Heating:DX:SingleSpeed", DisSysCompCoilData(i).name, IsNotOK, std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { @@ -10848,7 +10814,7 @@ namespace AirflowNetwork { } else if (SELECT_CASE_var == "COIL:HEATING:FUEL") { ValidateComponent( - m_state, "Coil:Heating:Fuel", DisSysCompCoilData(i).name, IsNotOK, EnergyPlus::format(RoutineName) + CurrentModuleObject); + m_state, "Coil:Heating:Fuel", DisSysCompCoilData(i).name, IsNotOK, std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { @@ -10857,7 +10823,7 @@ namespace AirflowNetwork { } else if (SELECT_CASE_var == "COIL:HEATING:ELECTRIC") { ValidateComponent( - m_state, "Coil:Heating:Electric", DisSysCompCoilData(i).name, IsNotOK, EnergyPlus::format(RoutineName) + CurrentModuleObject); + m_state, "Coil:Heating:Electric", DisSysCompCoilData(i).name, IsNotOK, std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { @@ -10866,14 +10832,14 @@ namespace AirflowNetwork { } else if (SELECT_CASE_var == "COIL:COOLING:WATER") { ValidateComponent( - m_state, "Coil:Cooling:Water", DisSysCompCoilData(i).name, IsNotOK, EnergyPlus::format(RoutineName) + CurrentModuleObject); + m_state, "Coil:Cooling:Water", DisSysCompCoilData(i).name, IsNotOK, std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } } else if (SELECT_CASE_var == "COIL:HEATING:WATER") { ValidateComponent( - m_state, "Coil:Heating:Water", DisSysCompCoilData(i).name, IsNotOK, EnergyPlus::format(RoutineName) + CurrentModuleObject); + m_state, "Coil:Heating:Water", DisSysCompCoilData(i).name, IsNotOK, std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } @@ -10883,7 +10849,7 @@ namespace AirflowNetwork { "Coil:Cooling:Water:DetailedGeometry", DisSysCompCoilData(i).name, IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } @@ -10893,7 +10859,7 @@ namespace AirflowNetwork { "Coil:Cooling:DX:TwoStageWithHumidityControlMode", DisSysCompCoilData(i).name, IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { @@ -10901,11 +10867,8 @@ namespace AirflowNetwork { } } else if (SELECT_CASE_var == "COIL:COOLING:DX:MULTISPEED") { - ValidateComponent(m_state, - "Coil:Cooling:DX:MultiSpeed", - DisSysCompCoilData(i).name, - IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + ValidateComponent( + m_state, "Coil:Cooling:DX:MultiSpeed", DisSysCompCoilData(i).name, IsNotOK, std::format(RoutineName) + CurrentModuleObject); ++MultiSpeedHPIndicator; if (IsNotOK) { ErrorsFound = true; @@ -10914,11 +10877,8 @@ namespace AirflowNetwork { } } else if (SELECT_CASE_var == "COIL:HEATING:DX:MULTISPEED") { - ValidateComponent(m_state, - "Coil:Heating:DX:MultiSpeed", - DisSysCompCoilData(i).name, - IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + ValidateComponent( + m_state, "Coil:Heating:DX:MultiSpeed", DisSysCompCoilData(i).name, IsNotOK, std::format(RoutineName) + CurrentModuleObject); ++MultiSpeedHPIndicator; if (IsNotOK) { ErrorsFound = true; @@ -10931,7 +10891,7 @@ namespace AirflowNetwork { "Coil:Cooling:DX:VariableSpeed", DisSysCompCoilData(i).name, IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + std::format(RoutineName) + CurrentModuleObject); ++MultiSpeedHPIndicator; if (IsNotOK) { ErrorsFound = true; @@ -10944,7 +10904,7 @@ namespace AirflowNetwork { "Coil:Heating:DX:VariableSpeed", DisSysCompCoilData(i).name, IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + std::format(RoutineName) + CurrentModuleObject); ++MultiSpeedHPIndicator; if (IsNotOK) { ErrorsFound = true; @@ -10956,7 +10916,7 @@ namespace AirflowNetwork { "Coil:Cooling:WaterToAirHeatPump:EquationFit", DisSysCompCoilData(i).name, IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } @@ -10966,7 +10926,7 @@ namespace AirflowNetwork { "Coil:Heating:WaterToAirHeatPump:EquationFit", DisSysCompCoilData(i).name, IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } @@ -10975,7 +10935,7 @@ namespace AirflowNetwork { "Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit", DisSysCompCoilData(i).name, IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } @@ -10985,27 +10945,21 @@ namespace AirflowNetwork { "Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit", DisSysCompCoilData(i).name, IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } } else if (SELECT_CASE_var == "COIL:HEATING:DESUPERHEATER") { - ValidateComponent(m_state, - "Coil:Heating:Desuperheater", - DisSysCompCoilData(i).name, - IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + ValidateComponent( + m_state, "Coil:Heating:Desuperheater", DisSysCompCoilData(i).name, IsNotOK, std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } } else if (SELECT_CASE_var == "COIL:COOLING:DX:TWOSPEED") { - ValidateComponent(m_state, - "Coil:Cooling:DX:TwoSpeed", - DisSysCompCoilData(i).name, - IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + ValidateComponent( + m_state, "Coil:Cooling:DX:TwoSpeed", DisSysCompCoilData(i).name, IsNotOK, std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { @@ -11016,26 +10970,22 @@ namespace AirflowNetwork { "Coil:Heating:Electric:MultiStage", DisSysCompCoilData(i).name, IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { SetHeatingCoilAirLoopNumber(m_state, DisSysCompCoilData(i).name, DisSysCompCoilData(i).AirLoopNum, ErrorsFound); } } else if (SELECT_CASE_var == "COIL:HEATING:GAS:MULTISTAGE") { - ValidateComponent(m_state, - "Coil:Heating:Gas:MultiStage", - DisSysCompCoilData(i).name, - IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + ValidateComponent( + m_state, "Coil:Heating:Gas:MultiStage", DisSysCompCoilData(i).name, IsNotOK, std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } else { SetHeatingCoilAirLoopNumber(m_state, DisSysCompCoilData(i).name, DisSysCompCoilData(i).AirLoopNum, ErrorsFound); } } else { - ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + " Invalid coil type = " + DisSysCompCoilData(i).name); + ShowSevereError(m_state, std::format(RoutineName) + CurrentModuleObject + " Invalid coil type = " + DisSysCompCoilData(i).name); ErrorsFound = true; } } @@ -11068,7 +11018,7 @@ namespace AirflowNetwork { if (DisSysCompCVFData(j).AirLoopNum == DisSysCompTermUnitData(i).AirLoopNum && !Util::SameString(DisSysCompTermUnitData(i).EPlusType, "AirTerminal:SingleDuct:VAV:Reheat")) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + + std::format(RoutineName) + CurrentModuleObject + " Invalid terminal type for a VAV system = " + DisSysCompTermUnitData(i).name); ShowContinueError(m_state, "The input type = " + DisSysCompTermUnitData(i).EPlusType); ShowContinueError(m_state, "A VAV system requires all terminal units with type = AirTerminal:SingleDuct:VAV:Reheat"); @@ -11078,10 +11028,9 @@ namespace AirflowNetwork { } } } else { - ShowSevereError( - m_state, - EnergyPlus::format(RoutineName) + - "AIRFLOWNETWORK:DISTRIBUTION:COMPONENT TERMINAL UNIT: Invalid Terminal unit type = " + DisSysCompTermUnitData(i).name); + ShowSevereError(m_state, + std::format(RoutineName) + "AIRFLOWNETWORK:DISTRIBUTION:COMPONENT TERMINAL UNIT: Invalid Terminal unit type = " + + DisSysCompTermUnitData(i).name); ErrorsFound = true; } } @@ -11097,7 +11046,7 @@ namespace AirflowNetwork { "HeatExchanger:AirToAir:FlatPlate", DisSysCompHXData(i).name, IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } @@ -11107,7 +11056,7 @@ namespace AirflowNetwork { "HeatExchanger:AirToAir:SensibleAndLatent", DisSysCompHXData(i).name, IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } @@ -11117,15 +11066,14 @@ namespace AirflowNetwork { "HeatExchanger:Desiccant:BalancedFlow", DisSysCompHXData(i).name, IsNotOK, - EnergyPlus::format(RoutineName) + CurrentModuleObject); + std::format(RoutineName) + CurrentModuleObject); if (IsNotOK) { ErrorsFound = true; } } else { - ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + CurrentModuleObject + - " Invalid heat exchanger type = " + DisSysCompHXData(i).EPlusType); + ShowSevereError( + m_state, std::format(RoutineName) + CurrentModuleObject + " Invalid heat exchanger type = " + DisSysCompHXData(i).EPlusType); ErrorsFound = true; } } @@ -11198,7 +11146,7 @@ namespace AirflowNetwork { if (AirflowNetworkLinkageData(i).NodeNums[0] == AirflowNetworkLinkageData(j).NodeNums[1]) { if (AirflowNetworkCompData(AirflowNetworkLinkageData(j).CompNum).CompTypeNum != iComponentTypeNum::DWC) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object (" + + std::format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); ShowContinueError(m_state, "must connect a duct component upstream and not " + AirflowNetworkLinkageData(j).Name); ErrorsFound = true; @@ -11206,72 +11154,64 @@ namespace AirflowNetwork { } } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[0]).EPlusTypeNum == iEPlusNodeType::SPL) { - ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object (" + - AirflowNetworkLinkageData(i).CompName + ')'); + ShowSevereError( + m_state, std::format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); ShowContinueError(m_state, "does not allow a AirLoopHVAC:ZoneSplitter node = " + AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[0]).Name); ErrorsFound = true; } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[1]).EPlusTypeNum == iEPlusNodeType::SPL) { - ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object (" + - AirflowNetworkLinkageData(i).CompName + ')'); + ShowSevereError( + m_state, std::format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); ShowContinueError(m_state, "does not allow a AirLoopHVAC:ZoneSplitter node = " + AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[1]).Name); ErrorsFound = true; } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[0]).EPlusTypeNum == iEPlusNodeType::MIX) { - ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object (" + - AirflowNetworkLinkageData(i).CompName + ')'); + ShowSevereError( + m_state, std::format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); ShowContinueError(m_state, "does not allow a AirLoopHVAC:ZoneMixer node = " + AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[0]).Name); ErrorsFound = true; } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[1]).EPlusTypeNum == iEPlusNodeType::MIX) { - ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object (" + - AirflowNetworkLinkageData(i).CompName + ')'); + ShowSevereError( + m_state, std::format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); ShowContinueError(m_state, "does not allow a AirLoopHVAC:ZoneMixer node = " + AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[1]).Name); ErrorsFound = true; } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[0]).EPlusNodeNum > 0) { - ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object (" + - AirflowNetworkLinkageData(i).CompName + ')'); + ShowSevereError( + m_state, std::format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); ShowContinueError(m_state, "does not allow to connect an EnergyPlus node = " + AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[0]).Name); ErrorsFound = true; } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[1]).EPlusNodeNum > 0) { - ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object (" + - AirflowNetworkLinkageData(i).CompName + ')'); + ShowSevereError( + m_state, std::format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); ShowContinueError(m_state, "does not allow to connect an EnergyPlus node = " + AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[1]).Name); ErrorsFound = true; } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[0]).EPlusZoneNum > 0) { - ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object (" + - AirflowNetworkLinkageData(i).CompName + ')'); + ShowSevereError( + m_state, std::format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); ShowContinueError(m_state, "does not allow to connect an EnergyPlus zone = " + AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[0]).Name); ErrorsFound = true; } if (AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[1]).EPlusZoneNum > 0) { - ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "An " + CurrentModuleObject + " object (" + - AirflowNetworkLinkageData(i).CompName + ')'); + ShowSevereError( + m_state, std::format(RoutineName) + "An " + CurrentModuleObject + " object (" + AirflowNetworkLinkageData(i).CompName + ')'); ShowContinueError(m_state, "does not allow to connect an EnergyPlus zone = " + AirflowNetworkNodeData(AirflowNetworkLinkageData(i).NodeNums[1]).Name); @@ -11502,7 +11442,7 @@ namespace AirflowNetwork { } if (NumOfFans > 1) { ShowSevereError(m_state, - EnergyPlus::format(RoutineName) + "An AirLoop branch, " + + std::format(RoutineName) + "An AirLoop branch, " + m_state.dataAirSystemsData->PrimaryAirSystems(1).Branch(BranchNum).Name + ", has two or more fans: " + FanNames); ShowContinueError(m_state, "The AirflowNetwork model allows a single supply fan in an AirLoop only. Please make changes in the input " @@ -11511,7 +11451,7 @@ namespace AirflowNetwork { } if (ErrorsFound) { - ShowFatalError(m_state, EnergyPlus::format("{}Program terminates for preceding reason(s).", RoutineName)); + ShowFatalError(m_state, std::format("{}Program terminates for preceding reason(s).", RoutineName)); } } @@ -11564,14 +11504,14 @@ namespace AirflowNetwork { } // Ensure the number of exhaust fan defined in the AirflowNetwork model matches the number of Zone Exhaust Fan objects if (NumOfExhaustFans != AirflowNetworkNumOfExhFan) { - ShowSevereError(m_state, - EnergyPlus::format( - "{}The number of {} is not equal to the number of Fan:ZoneExhaust fans defined in ZoneHVAC:EquipmentConnections", - RoutineName, - CurrentModuleObject)); - ShowContinueError(m_state, EnergyPlus::format("The number of {} is {}", CurrentModuleObject, AirflowNetworkNumOfExhFan)); - ShowContinueError( - m_state, EnergyPlus::format("The number of Zone exhaust fans defined in ZoneHVAC:EquipmentConnections is {}", NumOfExhaustFans)); + ShowSevereError( + m_state, + std::format("{}The number of {} is not equal to the number of Fan:ZoneExhaust fans defined in ZoneHVAC:EquipmentConnections", + RoutineName, + CurrentModuleObject)); + ShowContinueError(m_state, std::format("The number of {} is {}", CurrentModuleObject, AirflowNetworkNumOfExhFan)); + ShowContinueError(m_state, + std::format("The number of Zone exhaust fans defined in ZoneHVAC:EquipmentConnections is {}", NumOfExhaustFans)); ErrorsFound = true; } @@ -11590,10 +11530,10 @@ namespace AirflowNetwork { } if (MultizoneCompExhaustFanData(i).EPlusZoneNum == 0) { ShowSevereError(m_state, - EnergyPlus::format("{}Zone name in {} = {} does not match the zone name in ZoneHVAC:EquipmentConnections", - RoutineName, - CurrentModuleObject, - MultizoneCompExhaustFanData(i).name)); + std::format("{}Zone name in {} = {} does not match the zone name in ZoneHVAC:EquipmentConnections", + RoutineName, + CurrentModuleObject, + MultizoneCompExhaustFanData(i).name)); ErrorsFound = true; } // Ensure a surface using zone exhaust fan to expose to the same zone @@ -11606,10 +11546,10 @@ namespace AirflowNetwork { !(m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtBoundCond == OtherSideCoefNoCalcExt && m_state.dataSurface->Surface(MultizoneSurfaceData(i).SurfNum).ExtWind)) { ShowSevereError(m_state, - EnergyPlus::format("{}The surface using {} is not an exterior surface: {}", - RoutineName, - CurrentModuleObject, - MultizoneSurfaceData(j).SurfName)); + std::format("{}The surface using {} is not an exterior surface: {}", + RoutineName, + CurrentModuleObject, + MultizoneSurfaceData(j).SurfName)); ErrorsFound = true; } break; @@ -11621,10 +11561,10 @@ namespace AirflowNetwork { } else { if (MultizoneCompExhaustFanData(i).EPlusZoneNum != m_state.dataSurface->Surface(MultizoneSurfaceData(j).SurfNum).Zone) { ShowSevereError(m_state, - EnergyPlus::format("{}Zone name in {} = {} does not match the zone name", - RoutineName, - CurrentModuleObject, - MultizoneCompExhaustFanData(i).name)); + std::format("{}Zone name in {} = {} does not match the zone name", + RoutineName, + CurrentModuleObject, + MultizoneCompExhaustFanData(i).name)); ShowContinueError(m_state, "the surface is exposed to " + m_state.dataSurface->Surface(MultizoneSurfaceData(j).SurfNum).Name); ErrorsFound = true; } else { @@ -11650,7 +11590,7 @@ namespace AirflowNetwork { } } if (!found) { - ShowSevereError(m_state, EnergyPlus::format("{}Fan:ZoneExhaust is not defined in {}", RoutineName, CurrentModuleObject)); + ShowSevereError(m_state, std::format("{}Fan:ZoneExhaust is not defined in {}", RoutineName, CurrentModuleObject)); ShowContinueError(m_state, EnergyPlus::format( "The inlet node of the {} Fan:ZoneExhaust is not defined in the {}'s ZoneHVAC:EquipmentConnections", @@ -11664,7 +11604,7 @@ namespace AirflowNetwork { ValidateExhaustFanInputOneTimeFlag = false; if (ErrorsFound) { - ShowFatalError(m_state, EnergyPlus::format("{}Program terminates for preceding reason(s).", RoutineName)); + ShowFatalError(m_state, std::format("{}Program terminates for preceding reason(s).", RoutineName)); } } // End if OneTimeFlag_FindFirstLastPtr } @@ -11789,9 +11729,9 @@ namespace AirflowNetwork { if (HybridGlobalErrCount < 2) { ShowWarningError( m_state, - EnergyPlus::format("{}The hybrid ventilation control schedule value indicates global control in the controlled zone = {}", - RoutineName, - m_state.dataHeatBal->Zone(hybridVentMgr.Master).Name)); + std::format("{}The hybrid ventilation control schedule value indicates global control in the controlled zone = {}", + RoutineName, + m_state.dataHeatBal->Zone(hybridVentMgr.Master).Name)); ShowContinueError(m_state, "The exterior surface containing an opening component in the controlled zone is not found. No global control " "will not be modeled."); @@ -11800,8 +11740,7 @@ namespace AirflowNetwork { } else { ShowRecurringWarningErrorAtEnd( m_state, - EnergyPlus::format("{}The hybrid ventilation control requires a global control. The individual control continues...", - RoutineName), + std::format("{}The hybrid ventilation control requires a global control. The individual control continues...", RoutineName), HybridGlobalErrIndex, double(ControlType), double(ControlType)); @@ -11934,12 +11873,12 @@ namespace AirflowNetwork { MultizoneZoneData(AFNZnNum).SingleSidedCpType = "STANDARD"; } else if (NumofExtSurfInZone(AFNZnNum) > 2) { ShowWarningError(m_state, - EnergyPlus::format("AirflowNetwork:Multizone:Zone = {} has single side wind pressure coefficient type " - "\"ADVANCED\", but has {} exterior " - "AirflowNetwork:MultiZone:Component:DetailedOpening and/or " - "AirflowNetwork:MultiZone:Component:SimpleOpening objects.", - MultizoneZoneData(AFNZnNum).ZoneName, - NumofExtSurfInZone(AFNZnNum))); + std::format("AirflowNetwork:Multizone:Zone = {} has single side wind pressure coefficient type " + "\"ADVANCED\", but has {} exterior " + "AirflowNetwork:MultiZone:Component:DetailedOpening and/or " + "AirflowNetwork:MultiZone:Component:SimpleOpening objects.", + MultizoneZoneData(AFNZnNum).ZoneName, + NumofExtSurfInZone(AFNZnNum))); ShowContinueError(m_state, "Zones must have exactly two openings in order for the \"ADVANCED\" single side wind pressure coefficient " "model to be used."); @@ -12637,7 +12576,7 @@ namespace AirflowNetwork { } if (NumOfCtrlZones != 1) { ShowWarningError(m_state, "AirflowNetwork Duct Sizing: The current restriction is limited to a single controlled zone only"); - ShowContinueError(m_state, EnergyPlus::format("The number of controlled zone is {}", NumOfCtrlZones)); + ShowContinueError(m_state, std::format("The number of controlled zone is {}", NumOfCtrlZones)); ShowContinueError(m_state, "..Duct sizing is not performed"); simulation_control.autosize_ducts = false; simulation_control.iWPCCnt = iWPCCntr::Input; diff --git a/src/EnergyPlus/Autosizing/All_Simple_Sizing.cc b/src/EnergyPlus/Autosizing/All_Simple_Sizing.cc index 6ecc6fad9e4..1c54b41c641 100644 --- a/src/EnergyPlus/Autosizing/All_Simple_Sizing.cc +++ b/src/EnergyPlus/Autosizing/All_Simple_Sizing.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include @@ -168,10 +169,10 @@ Real64 ASHRAEMinSATCoolingSizer::size(EnergyPlusData &state, Real64 _originalVal this->addErrorMessage(msg); ShowSevereError(state, msg); msg = - EnergyPlus::format("SizingString = {}, DataCapacityUsedForSizing = {:.1T}", this->sizingString, this->dataCapacityUsedForSizing); + EnergyPlus::format("SizingString = {}, DataCapacityUsedForSizing = {:.1f}", this->sizingString, this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format("SizingString = {}, DataFlowUsedForSizing = {:.1T}", this->sizingString, this->dataFlowUsedForSizing); + msg = EnergyPlus::format("SizingString = {}, DataFlowUsedForSizing = {:.1f}", this->sizingString, this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); } @@ -192,14 +193,14 @@ Real64 ASHRAEMinSATCoolingSizer::size(EnergyPlusData &state, Real64 _originalVal this->addErrorMessage(msg); ShowSevereError(state, msg); msg = - EnergyPlus::format("SizingString = {}, DataCapacityUsedForSizing = {:.1T}", this->sizingString, this->dataCapacityUsedForSizing); + EnergyPlus::format("SizingString = {}, DataCapacityUsedForSizing = {:.1f}", this->sizingString, this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format("SizingString = {}, DataFlowUsedForSizing = {:.1T}", this->sizingString, this->dataFlowUsedForSizing); + msg = EnergyPlus::format("SizingString = {}, DataFlowUsedForSizing = {:.1f}", this->sizingString, this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); msg = - EnergyPlus::format("SizingString = {}, DataZoneUsedForSizing = {:.0T}", this->sizingString, Real64(this->dataZoneUsedForSizing)); + EnergyPlus::format("SizingString = {}, DataZoneUsedForSizing = {:.0f}", this->sizingString, Real64(this->dataZoneUsedForSizing)); ShowContinueError(state, msg); } } @@ -230,10 +231,10 @@ Real64 ASHRAEMaxSATHeatingSizer::size(EnergyPlusData &state, Real64 _originalVal this->addErrorMessage(msg); ShowSevereError(state, msg); msg = - EnergyPlus::format("SizingString = {}, DataCapacityUsedForSizing = {:.1T}", this->sizingString, this->dataCapacityUsedForSizing); + EnergyPlus::format("SizingString = {}, DataCapacityUsedForSizing = {:.1f}", this->sizingString, this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format("SizingString = {}, DataFlowUsedForSizing = {:.1T}", this->sizingString, this->dataFlowUsedForSizing); + msg = EnergyPlus::format("SizingString = {}, DataFlowUsedForSizing = {:.1f}", this->sizingString, this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); } @@ -254,14 +255,14 @@ Real64 ASHRAEMaxSATHeatingSizer::size(EnergyPlusData &state, Real64 _originalVal this->addErrorMessage(msg); ShowSevereError(state, msg); msg = - EnergyPlus::format("SizingString = {}, DataCapacityUsedForSizing = {:.1T}", this->sizingString, this->dataCapacityUsedForSizing); + EnergyPlus::format("SizingString = {}, DataCapacityUsedForSizing = {:.1f}", this->sizingString, this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format("SizingString = {}, DataFlowUsedForSizing = {:.1T}", this->sizingString, this->dataFlowUsedForSizing); + msg = EnergyPlus::format("SizingString = {}, DataFlowUsedForSizing = {:.1f}", this->sizingString, this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); msg = - EnergyPlus::format("SizingString = {}, DataZoneUsedForSizing = {:.0T}", this->sizingString, Real64(this->dataZoneUsedForSizing)); + EnergyPlus::format("SizingString = {}, DataZoneUsedForSizing = {:.0f}", this->sizingString, Real64(this->dataZoneUsedForSizing)); ShowContinueError(state, msg); } } diff --git a/src/EnergyPlus/Autosizing/Base.cc b/src/EnergyPlus/Autosizing/Base.cc index af81ff80413..615f02d4a1f 100644 --- a/src/EnergyPlus/Autosizing/Base.cc +++ b/src/EnergyPlus/Autosizing/Base.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include @@ -450,7 +451,7 @@ void BaseSizer::selectSizerOutput(EnergyPlusData &state, bool &errorsFound) std::string msg = this->callingRoutine + ' ' + this->compType + ' ' + this->compName + ", Developer Error: Component sizing incomplete."; this->addErrorMessage(msg); ShowSevereError(state, msg); - msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->originalValue); + msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1f}", this->sizingString, this->originalValue); this->addErrorMessage(msg); ShowContinueError(state, msg); this->errorType = AutoSizingResultType::ErrorType1; @@ -586,7 +587,7 @@ void BaseSizer::select2StgDXHumCtrlSizerOutput(EnergyPlusData &state, bool &erro std::string msg = this->callingRoutine + ' ' + this->compType + ' ' + this->compName + ", Developer Error: Component sizing incomplete."; this->addErrorMessage(msg); ShowSevereError(state, msg); - msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->originalValue); + msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1f}", this->sizingString, this->originalValue); this->addErrorMessage(msg); ShowContinueError(state, msg); this->errorType = AutoSizingResultType::ErrorType1; diff --git a/src/EnergyPlus/Autosizing/BaseSizerWithFanHeatInputs.cc b/src/EnergyPlus/Autosizing/BaseSizerWithFanHeatInputs.cc index 0ec460db58c..29a4df90edb 100644 --- a/src/EnergyPlus/Autosizing/BaseSizerWithFanHeatInputs.cc +++ b/src/EnergyPlus/Autosizing/BaseSizerWithFanHeatInputs.cc @@ -45,11 +45,14 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + +// EnergyPlus Headers #include #include #include #include -#include namespace EnergyPlus { diff --git a/src/EnergyPlus/Autosizing/BaseSizerWithScalableInputs.cc b/src/EnergyPlus/Autosizing/BaseSizerWithScalableInputs.cc index c5651a8133a..985bac81d46 100644 --- a/src/EnergyPlus/Autosizing/BaseSizerWithScalableInputs.cc +++ b/src/EnergyPlus/Autosizing/BaseSizerWithScalableInputs.cc @@ -45,12 +45,15 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + +// EnergyPlus Headers #include #include #include #include #include -#include namespace EnergyPlus { diff --git a/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.cc b/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.cc index e0420c9d176..69ffb5655dd 100644 --- a/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingAirFlowSizing.cc @@ -45,6 +45,10 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + +// EnergyPlus Headers #include #include #include @@ -326,7 +330,7 @@ Real64 CoolingAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, b std::string msg = this->callingRoutine + ' ' + this->compType + ' ' + this->compName + ", Developer Error: Component sizing incomplete."; ShowSevereError(state, msg); this->addErrorMessage(msg); - msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue); + msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1f}", this->sizingString, this->autoSizedValue); ShowContinueError(state, msg); this->addErrorMessage(msg); errorsFound = true; diff --git a/src/EnergyPlus/Autosizing/CoolingCapacitySizing.cc b/src/EnergyPlus/Autosizing/CoolingCapacitySizing.cc index 119f2ca46f3..ec90adf7f75 100644 --- a/src/EnergyPlus/Autosizing/CoolingCapacitySizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingCapacitySizing.cc @@ -45,18 +45,20 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + +// EnergyPlus Headers #include #include #include #include #include #include -#include #include #include #include #include -#include namespace EnergyPlus { @@ -223,33 +225,33 @@ Real64 CoolingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue, if (state.dataGlobal->DisplayExtraWarnings && this->autoSizedValue <= 0.0) { ShowWarningMessage(state, this->callingRoutine + ": Potential issue with equipment sizing for " + this->compType + ' ' + this->compName); - ShowContinueError(state, EnergyPlus::format("...Rated Total Cooling Capacity = {:.2T} [W]", this->autoSizedValue)); + ShowContinueError(state, EnergyPlus::format("...Rated Total Cooling Capacity = {:.2f} [W]", this->autoSizedValue)); if (this->zoneEqSizing(this->curZoneEqNum).CoolingCapacity) { ShowContinueError( state, - EnergyPlus::format("...Capacity passed by parent object to size child component = {:.2T} [W]", this->autoSizedValue)); + EnergyPlus::format("...Capacity passed by parent object to size child component = {:.2f} [W]", this->autoSizedValue)); } else { if (Util::SameString(this->compType, "COIL:COOLING:WATER") || Util::SameString(this->compType, "COIL:COOLING:WATER:DETAILEDGEOMETRY") || Util::SameString(this->compType, "ZONEHVAC:IDEALLOADSAIRSYSTEM")) { if (this->termUnitIU || this->zoneEqFanCoil) { ShowContinueError(state, - EnergyPlus::format("...Capacity passed by parent object to size child component = {:.2T} [W]", + EnergyPlus::format("...Capacity passed by parent object to size child component = {:.2f} [W]", this->autoSizedValue)); } else { - ShowContinueError(state, EnergyPlus::format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesVolFlow)); + ShowContinueError(state, EnergyPlus::format("...Air flow rate used for sizing = {:.5f} [m3/s]", DesVolFlow)); ShowContinueError(state, - EnergyPlus::format("...Coil inlet air temperature used for sizing = {:.2T} [C]", CoilInTemp)); + EnergyPlus::format("...Coil inlet air temperature used for sizing = {:.2f} [C]", CoilInTemp)); ShowContinueError(state, - EnergyPlus::format("...Coil outlet air temperature used for sizing = {:.2T} [C]", CoilOutTemp)); + EnergyPlus::format("...Coil outlet air temperature used for sizing = {:.2f} [C]", CoilOutTemp)); } } else { if (CoilOutTemp > -999.0) { - ShowContinueError(state, EnergyPlus::format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesVolFlow)); + ShowContinueError(state, EnergyPlus::format("...Air flow rate used for sizing = {:.5f} [m3/s]", DesVolFlow)); ShowContinueError(state, - EnergyPlus::format("...Coil inlet air temperature used for sizing = {:.2T} [C]", CoilInTemp)); + EnergyPlus::format("...Coil inlet air temperature used for sizing = {:.2f} [C]", CoilInTemp)); ShowContinueError(state, - EnergyPlus::format("...Coil outlet air temperature used for sizing = {:.2T} [C]", CoilOutTemp)); + EnergyPlus::format("...Coil outlet air temperature used for sizing = {:.2f} [C]", CoilOutTemp)); } else { ShowContinueError(state, "...Capacity used to size child component set to 0 [W]"); } @@ -453,19 +455,19 @@ Real64 CoolingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue, if (state.dataGlobal->DisplayExtraWarnings && this->autoSizedValue <= 0.0) { ShowWarningMessage(state, this->callingRoutine + ": Potential issue with equipment sizing for " + this->compType + ' ' + this->compName); - ShowContinueError(state, EnergyPlus::format("...Rated Total Cooling Capacity = {:.2T} [W]", this->autoSizedValue)); + ShowContinueError(state, EnergyPlus::format("...Rated Total Cooling Capacity = {:.2f} [W]", this->autoSizedValue)); if (this->oaSysFlag || this->airLoopSysFlag || this->finalSysSizing(this->curSysNum).CoolingCapMethod == DataSizing::CapacityPerFloorArea || (this->finalSysSizing(this->curSysNum).CoolingCapMethod == DataSizing::CoolingDesignCapacity && (this->finalSysSizing(this->curSysNum).CoolingTotalCapacity != 0.0))) { ShowContinueError( state, - EnergyPlus::format("...Capacity passed by parent object to size child component = {:.2T} [W]", this->autoSizedValue)); + EnergyPlus::format("...Capacity passed by parent object to size child component = {:.2f} [W]", this->autoSizedValue)); } else { - ShowContinueError(state, EnergyPlus::format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesVolFlow)); - ShowContinueError(state, EnergyPlus::format("...Outdoor air fraction used for sizing = {:.2T}", OutAirFrac)); - ShowContinueError(state, EnergyPlus::format("...Coil inlet air temperature used for sizing = {:.2T} [C]", CoilInTemp)); - ShowContinueError(state, EnergyPlus::format("...Coil outlet air temperature used for sizing = {:.2T} [C]", CoilOutTemp)); + ShowContinueError(state, EnergyPlus::format("...Air flow rate used for sizing = {:.5f} [m3/s]", DesVolFlow)); + ShowContinueError(state, EnergyPlus::format("...Outdoor air fraction used for sizing = {:.2f}", OutAirFrac)); + ShowContinueError(state, EnergyPlus::format("...Coil inlet air temperature used for sizing = {:.2f} [C]", CoilInTemp)); + ShowContinueError(state, EnergyPlus::format("...Coil outlet air temperature used for sizing = {:.2f} [C]", CoilOutTemp)); } } } @@ -477,7 +479,7 @@ Real64 CoolingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue, std::string msg = this->callingRoutine + ' ' + this->compType + ' ' + this->compName + ", Developer Error: Component sizing incomplete."; ShowSevereError(state, msg); this->addErrorMessage(msg); - msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue); + msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1f}", this->sizingString, this->autoSizedValue); ShowContinueError(state, msg); this->addErrorMessage(msg); errorsFound = true; @@ -506,13 +508,12 @@ Real64 CoolingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue, ShowWarningError(state, this->callingRoutine + ' ' + this->compType + ' ' + this->compName); ShowContinueError( state, "..." + this->sizingString + " will be limited by the minimum rated volume flow per rated total capacity ratio."); - ShowContinueError(state, EnergyPlus::format("...DX coil volume flow rate [m3/s] = {:.6T}", DesVolFlow)); - ShowContinueError(state, EnergyPlus::format("...Requested capacity [W] = {:.3T}", this->autoSizedValue)); - ShowContinueError(state, - EnergyPlus::format("...Requested flow/capacity ratio [m3/s/W] = {:.3T}", RatedVolFlowPerRatedTotCap)); + ShowContinueError(state, EnergyPlus::format("...DX coil volume flow rate [m3/s] = {:.6f}", DesVolFlow)); + ShowContinueError(state, EnergyPlus::format("...Requested capacity [W] = {:.3f}", this->autoSizedValue)); + ShowContinueError(state, std::format("...Requested flow/capacity ratio [m3/s/W] = {:.3f}", RatedVolFlowPerRatedTotCap)); ShowContinueError(state, - EnergyPlus::format("...Minimum flow/capacity ratio [m3/s/W] = {:.3T}", - HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + std::format("...Minimum flow/capacity ratio [m3/s/W] = {:.3f}", + HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); } DXFlowPerCapMinRatio = (DesVolFlow / HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) / @@ -520,20 +521,19 @@ Real64 CoolingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue, this->autoSizedValue = DesVolFlow / HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]; if (!this->dataEMSOverrideON && state.dataGlobal->DisplayExtraWarnings && this->printWarningFlag) { - ShowContinueError(state, EnergyPlus::format("...Adjusted capacity [W] = {:.3T}", this->autoSizedValue)); + ShowContinueError(state, std::format("...Adjusted capacity [W] = {:.3f}", this->autoSizedValue)); } } else if (RatedVolFlowPerRatedTotCap > HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) { if (!this->dataEMSOverrideON && state.dataGlobal->DisplayExtraWarnings && this->printWarningFlag) { ShowWarningError(state, this->callingRoutine + ' ' + this->compType + ' ' + this->compName); ShowContinueError( state, "..." + this->sizingString + " will be limited by the maximum rated volume flow per rated total capacity ratio."); - ShowContinueError(state, EnergyPlus::format("...DX coil volume flow rate [m3/s] = {:.6T}", DesVolFlow)); - ShowContinueError(state, EnergyPlus::format("...Requested capacity [W] = {:.3T}", this->autoSizedValue)); - ShowContinueError(state, - EnergyPlus::format("...Requested flow/capacity ratio [m3/s/W] = {:.3T}", RatedVolFlowPerRatedTotCap)); + ShowContinueError(state, std::format("...DX coil volume flow rate [m3/s] = {:.6f}", DesVolFlow)); + ShowContinueError(state, std::format("...Requested capacity [W] = {:.3f}", this->autoSizedValue)); + ShowContinueError(state, std::format("...Requested flow/capacity ratio [m3/s/W] = {:.3f}", RatedVolFlowPerRatedTotCap)); ShowContinueError(state, - EnergyPlus::format("...Maximum flow/capacity ratio [m3/s/W] = {:.3T}", - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + std::format("...Maximum flow/capacity ratio [m3/s/W] = {:.3f}", + HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); } DXFlowPerCapMaxRatio = DesVolFlow / HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT] / @@ -541,7 +541,7 @@ Real64 CoolingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue, this->autoSizedValue = DesVolFlow / HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]; if (!this->dataEMSOverrideON && state.dataGlobal->DisplayExtraWarnings && this->printWarningFlag) { - ShowContinueError(state, EnergyPlus::format("...Adjusted capacity [W] = {:.3T}", this->autoSizedValue)); + ShowContinueError(state, std::format("...Adjusted capacity [W] = {:.3f}", this->autoSizedValue)); } } } diff --git a/src/EnergyPlus/Autosizing/CoolingSHRSizing.cc b/src/EnergyPlus/Autosizing/CoolingSHRSizing.cc index d555c70f084..d6c59776550 100644 --- a/src/EnergyPlus/Autosizing/CoolingSHRSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingSHRSizing.cc @@ -45,6 +45,10 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + +// EnergyPlus Headers #include #include #include @@ -142,7 +146,7 @@ void CoolingSHRSizer::updateSizingString(EnergyPlusData &state) this->sizingString = "Low Speed Gross Rated Sensible Heat Ratio"; } } else if (this->coilType == HVAC::CoilType::CoolingDXMultiSpeed) { - this->sizingString = fmt::format("Speed {} Rated Sensible Heat Ratio", state.dataSize->DataDXSpeedNum); + this->sizingString = EnergyPlus::format("Speed {} Rated Sensible Heat Ratio", state.dataSize->DataDXSpeedNum); } else if (this->coilType == HVAC::CoilType::CoolingVRFFluidTCtrl) { this->sizingString = "Rated Sensible Heat Ratio"; } else if (this->coilType == HVAC::CoilType::CoolingDXCurveFit) { diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletHumRatSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletHumRatSizing.cc index 52f1d4b899c..ab191d94fb3 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletHumRatSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletHumRatSizing.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletTempSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletTempSizing.cc index 2220d1a93d2..e19fb16f531 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletTempSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirInletTempSizing.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.cc index 4fc82c9b642..153b4490b37 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletHumRatSizing.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc index 5bc299c38e0..2e90f0938e9 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesAirOutletTempSizing.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/Autosizing/CoolingWaterDesWaterInletTempSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterDesWaterInletTempSizing.cc index 067289c6536..077058c3a1a 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterDesWaterInletTempSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterDesWaterInletTempSizing.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include diff --git a/src/EnergyPlus/Autosizing/CoolingWaterNumofTubesPerRowSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterNumofTubesPerRowSizing.cc index 87c76b00d5d..56bb7fc9655 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterNumofTubesPerRowSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterNumofTubesPerRowSizing.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include namespace EnergyPlus { diff --git a/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc b/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc index 91251e0ce9d..f0318693678 100644 --- a/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc +++ b/src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.cc b/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.cc index 9dec6a75cea..1829faca838 100644 --- a/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingAirFlowSizing.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include @@ -251,7 +252,7 @@ Real64 HeatingAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, b std::string msg = this->callingRoutine + ' ' + this->compType + ' ' + this->compName + ", Developer Error: Component sizing incomplete."; ShowSevereError(state, msg); this->addErrorMessage(msg); - msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue); + msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1f}", this->sizingString, this->autoSizedValue); ShowContinueError(state, msg); this->addErrorMessage(msg); errorsFound = true; diff --git a/src/EnergyPlus/Autosizing/HeatingAirflowUASizing.cc b/src/EnergyPlus/Autosizing/HeatingAirflowUASizing.cc index d602e3d47a1..f01c203c3e0 100644 --- a/src/EnergyPlus/Autosizing/HeatingAirflowUASizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingAirflowUASizing.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include diff --git a/src/EnergyPlus/Autosizing/HeatingCapacitySizing.cc b/src/EnergyPlus/Autosizing/HeatingCapacitySizing.cc index 66ca609cd47..b64d2cb83ea 100644 --- a/src/EnergyPlus/Autosizing/HeatingCapacitySizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingCapacitySizing.cc @@ -45,17 +45,17 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + +// EnergyPlus Headers #include #include #include #include #include -#include #include -#include #include -#include -#include namespace EnergyPlus { @@ -181,17 +181,17 @@ Real64 HeatingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue, if (state.dataGlobal->DisplayExtraWarnings && this->autoSizedValue <= 0.0) { ShowWarningMessage(state, this->callingRoutine + ": Potential issue with equipment sizing for " + this->compType + ' ' + this->compName); - ShowContinueError(state, EnergyPlus::format("...Rated Total Heating Capacity = {:.2T} [W]", this->autoSizedValue)); + ShowContinueError(state, EnergyPlus::format("...Rated Total Heating Capacity = {:.2f} [W]", this->autoSizedValue)); if (this->zoneEqSizing(this->curZoneEqNum).HeatingCapacity || (this->dataCoolCoilCap > 0.0 && this->dataFlowUsedForSizing > 0.0)) { ShowContinueError( state, - EnergyPlus::format("...Capacity passed by parent object to size child component = {:.2T} [W]", NominalCapacityDes)); + EnergyPlus::format("...Capacity passed by parent object to size child component = {:.2f} [W]", NominalCapacityDes)); } else { if (CoilOutTemp > -999.0) { - ShowContinueError(state, EnergyPlus::format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesVolFlow)); - ShowContinueError(state, EnergyPlus::format("...Coil inlet air temperature used for sizing = {:.2T} [C]", CoilInTemp)); - ShowContinueError(state, EnergyPlus::format("...Coil outlet air temperature used for sizing = {:.2T} [C]", CoilOutTemp)); + ShowContinueError(state, EnergyPlus::format("...Air flow rate used for sizing = {:.5f} [m3/s]", DesVolFlow)); + ShowContinueError(state, EnergyPlus::format("...Coil inlet air temperature used for sizing = {:.2f} [C]", CoilInTemp)); + ShowContinueError(state, EnergyPlus::format("...Coil outlet air temperature used for sizing = {:.2f} [C]", CoilOutTemp)); } else { ShowContinueError(state, "...Capacity used to size child component set to 0 [W]"); } @@ -354,15 +354,15 @@ Real64 HeatingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue, if (state.dataGlobal->DisplayExtraWarnings && this->autoSizedValue <= 0.0) { ShowWarningMessage(state, this->callingRoutine + ": Potential issue with equipment sizing for " + this->compType + ' ' + this->compName); - ShowContinueError(state, EnergyPlus::format("...Rated Total Heating Capacity = {:.2T} [W]", this->autoSizedValue)); + ShowContinueError(state, EnergyPlus::format("...Rated Total Heating Capacity = {:.2f} [W]", this->autoSizedValue)); if (CoilOutTemp > -999.0) { - ShowContinueError(state, EnergyPlus::format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesVolFlow)); - ShowContinueError(state, EnergyPlus::format("...Outdoor air fraction used for sizing = {:.2T}", OutAirFrac)); - ShowContinueError(state, EnergyPlus::format("...Coil inlet air temperature used for sizing = {:.2T} [C]", CoilInTemp)); - ShowContinueError(state, EnergyPlus::format("...Coil outlet air temperature used for sizing = {:.2T} [C]", CoilOutTemp)); + ShowContinueError(state, EnergyPlus::format("...Air flow rate used for sizing = {:.5f} [m3/s]", DesVolFlow)); + ShowContinueError(state, EnergyPlus::format("...Outdoor air fraction used for sizing = {:.2f}", OutAirFrac)); + ShowContinueError(state, EnergyPlus::format("...Coil inlet air temperature used for sizing = {:.2f} [C]", CoilInTemp)); + ShowContinueError(state, EnergyPlus::format("...Coil outlet air temperature used for sizing = {:.2f} [C]", CoilOutTemp)); } else { ShowContinueError( - state, EnergyPlus::format("...Capacity passed by parent object to size child component = {:.2T} [W]", DesCoilLoad)); + state, EnergyPlus::format("...Capacity passed by parent object to size child component = {:.2f} [W]", DesCoilLoad)); } } } @@ -374,7 +374,7 @@ Real64 HeatingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue, std::string msg = this->callingRoutine + ' ' + this->compType + ' ' + this->compName + ", Developer Error: Component sizing incomplete."; ShowSevereError(state, msg); this->addErrorMessage(msg); - msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue); + msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1f}", this->sizingString, this->autoSizedValue); ShowContinueError(state, msg); this->addErrorMessage(msg); errorsFound = true; @@ -397,12 +397,12 @@ Real64 HeatingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue, ShowWarningError(state, this->callingRoutine + ' ' + this->compType + ' ' + this->compName); ShowContinueError( state, "..." + this->sizingString + " will be limited by the minimum rated volume flow per rated total capacity ratio."); - ShowContinueError(state, EnergyPlus::format("...DX coil volume flow rate [m3/s] = {:.6T}", DesVolFlow)); - ShowContinueError(state, EnergyPlus::format("...Requested capacity [W] = {:.3T}", this->autoSizedValue)); + ShowContinueError(state, EnergyPlus::format("...DX coil volume flow rate [m3/s] = {:.6f}", DesVolFlow)); + ShowContinueError(state, EnergyPlus::format("...Requested capacity [W] = {:.3f}", this->autoSizedValue)); ShowContinueError(state, - EnergyPlus::format("...Requested flow/capacity ratio [m3/s/W] = {:.3T}", RatedVolFlowPerRatedTotCap)); + EnergyPlus::format("...Requested flow/capacity ratio [m3/s/W] = {:.3f}", RatedVolFlowPerRatedTotCap)); ShowContinueError(state, - EnergyPlus::format("...Minimum flow/capacity ratio [m3/s/W] = {:.3T}", + EnergyPlus::format("...Minimum flow/capacity ratio [m3/s/W] = {:.3f}", HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); } @@ -411,20 +411,19 @@ Real64 HeatingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue, this->autoSizedValue = DesVolFlow / HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]; if (!this->dataEMSOverrideON && state.dataGlobal->DisplayExtraWarnings && this->printWarningFlag) { - ShowContinueError(state, EnergyPlus::format("...Adjusted capacity [W] = {:.3T}", this->autoSizedValue)); + ShowContinueError(state, EnergyPlus::format("...Adjusted capacity [W] = {:.3f}", this->autoSizedValue)); } } else if (RatedVolFlowPerRatedTotCap > HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) { if (!this->dataEMSOverrideON && state.dataGlobal->DisplayExtraWarnings && this->printWarningFlag) { ShowWarningError(state, this->callingRoutine + ' ' + this->compType + ' ' + this->compName); ShowContinueError( state, "..." + this->sizingString + " will be limited by the maximum rated volume flow per rated total capacity ratio."); - ShowContinueError(state, EnergyPlus::format("...DX coil volume flow rate [m3/s] = {:.6T}", DesVolFlow)); - ShowContinueError(state, EnergyPlus::format("...Requested capacity [W] = {:.3T}", this->autoSizedValue)); - ShowContinueError(state, - EnergyPlus::format("...Requested flow/capacity ratio [m3/s/W] = {:.3T}", RatedVolFlowPerRatedTotCap)); + ShowContinueError(state, EnergyPlus::format("...DX coil volume flow rate [m3/s] = {:.6f}", DesVolFlow)); + ShowContinueError(state, std::format("...Requested capacity [W] = {:.3f}", this->autoSizedValue)); + ShowContinueError(state, std::format("...Requested flow/capacity ratio [m3/s/W] = {:.3f}", RatedVolFlowPerRatedTotCap)); ShowContinueError(state, - EnergyPlus::format("...Maximum flow/capacity ratio [m3/s/W] = {:.3T}", - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + std::format("...Maximum flow/capacity ratio [m3/s/W] = {:.3f}", + HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); } DXFlowPerCapMaxRatio = DesVolFlow / HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT] / @@ -432,7 +431,7 @@ Real64 HeatingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue, this->autoSizedValue = DesVolFlow / HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]; if (!this->dataEMSOverrideON && state.dataGlobal->DisplayExtraWarnings && this->printWarningFlag) { - ShowContinueError(state, EnergyPlus::format("...Adjusted capacity [W] = {:.3T}", this->autoSizedValue)); + ShowContinueError(state, std::format("...Adjusted capacity [W] = {:.3f}", this->autoSizedValue)); } } } diff --git a/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletHumRatSizing.cc b/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletHumRatSizing.cc index 6003b0d7b47..2bca9d5c4e6 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletHumRatSizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletHumRatSizing.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletTempSizing.cc b/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletTempSizing.cc index 2dc2341f17c..c5b77af9899 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletTempSizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingWaterDesAirInletTempSizing.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.cc b/src/EnergyPlus/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.cc index 25bc91a1a53..92c4481826f 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include diff --git a/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc b/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc index f105f26fca1..336e23fd35f 100644 --- a/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc +++ b/src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/Autosizing/SystemAirFlowSizing.cc b/src/EnergyPlus/Autosizing/SystemAirFlowSizing.cc index 61e3df1dcc1..6b37d3117b3 100644 --- a/src/EnergyPlus/Autosizing/SystemAirFlowSizing.cc +++ b/src/EnergyPlus/Autosizing/SystemAirFlowSizing.cc @@ -45,6 +45,10 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + +// EnergyPlus Headers #include #include #include @@ -307,44 +311,44 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( - "{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + std::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->zoneHeatingOnlyFan) { this->autoSizedValue = this->dataFracOfAutosizedHeatingAirflow * this->finalZoneSizing(this->curZoneEqNum).DesHeatVolFlow; if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( - "{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + std::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow) { this->autoSizedValue = this->dataFracOfAutosizedCoolingAirflow * this->zoneEqSizing(this->curZoneEqNum).CoolingAirVolFlow; if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( - "{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + std::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) { this->autoSizedValue = this->dataFracOfAutosizedHeatingAirflow * this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow; if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( - "{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + std::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) { this->autoSizedValue = @@ -355,7 +359,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, @@ -366,7 +370,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, @@ -382,7 +386,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, @@ -393,7 +397,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, @@ -407,44 +411,44 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( - "{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + std::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->zoneHeatingOnlyFan) { this->autoSizedValue = this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity; if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( - "{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + std::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow) { this->autoSizedValue = this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity; if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( - "{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + std::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) { this->autoSizedValue = this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity; if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( - "{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + std::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) { this->autoSizedValue = max(this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity, @@ -453,7 +457,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, @@ -463,7 +467,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, @@ -477,7 +481,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, @@ -487,7 +491,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, @@ -501,44 +505,44 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( - "{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + std::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->zoneHeatingOnlyFan) { this->autoSizedValue = this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity; if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( - "{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + std::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow) { this->autoSizedValue = this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity; if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( - "{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + std::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) { this->autoSizedValue = this->dataFlowPerHeatingCapacity * this->dataAutosizedHeatingCapacity; if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( - "{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + std::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) { this->autoSizedValue = max(this->dataFlowPerCoolingCapacity * this->dataAutosizedCoolingCapacity, @@ -547,7 +551,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, @@ -557,7 +561,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, @@ -571,7 +575,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, @@ -581,7 +585,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, @@ -595,22 +599,22 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( - "{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, - ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); + dateTimeFanPeak = + std::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, + ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && !this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) { this->autoSizedValue = this->zoneEqSizing(this->curZoneEqNum).HeatingAirVolFlow; if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( - "{}/{} {}", - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, - state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, - ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); + dateTimeFanPeak = + std::format("{}/{} {}", + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, + state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, + ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax)); } } else if (this->zoneEqSizing(this->curZoneEqNum).HeatingAirFlow && this->zoneEqSizing(this->curZoneEqNum).CoolingAirFlow) { this->autoSizedValue = @@ -619,7 +623,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, @@ -629,7 +633,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, @@ -646,7 +650,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, @@ -657,7 +661,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, @@ -670,7 +674,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).CoolDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).CoolDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth, @@ -680,7 +684,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 && this->finalZoneSizing(this->curZoneEqNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { DDNameFanPeak = state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month, state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth, @@ -771,7 +775,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalSysSizing(this->curSysNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { auto &desDayInput = state.dataWeather->DesDayInput(this->finalSysSizing(this->curSysNum).HeatDDNum); DDNameFanPeak = desDayInput.Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", desDayInput.Month, desDayInput.DayOfMonth, @@ -782,12 +786,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (sysSizPeakDDNum.CoolFlowPeakDD > 0 && sysSizPeakDDNum.CoolFlowPeakDD <= state.dataEnvrn->TotDesDays) { auto &desDayInput = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD); DDNameFanPeak = desDayInput.Title; - dateTimeFanPeak = - EnergyPlus::format("{}/{} {}", - desDayInput.Month, - desDayInput.DayOfMonth, - ReportCoilSelection::getTimeText( - state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); + dateTimeFanPeak = std::format("{}/{} {}", + desDayInput.Month, + desDayInput.DayOfMonth, + ReportCoilSelection::getTimeText( + state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); } } } @@ -803,11 +806,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo auto &desDayInput = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD); DDNameFanPeak = desDayInput.Title; dateTimeFanPeak = - EnergyPlus::format("{}/{} {}", - desDayInput.Month, - desDayInput.DayOfMonth, - ReportCoilSelection::getTimeText( - state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); + std::format("{}/{} {}", + desDayInput.Month, + desDayInput.DayOfMonth, + ReportCoilSelection::getTimeText( + state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); } } else if (this->autoSizedValue == unitarysysEqSizing.HeatingAirVolFlow) { @@ -815,7 +818,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalSysSizing(this->curSysNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { auto &desDayInput = state.dataWeather->DesDayInput(this->finalSysSizing(this->curSysNum).HeatDDNum); DDNameFanPeak = desDayInput.Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", desDayInput.Month, desDayInput.DayOfMonth, @@ -827,12 +830,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (sysSizPeakDDNum.CoolFlowPeakDD > 0 && sysSizPeakDDNum.CoolFlowPeakDD <= state.dataEnvrn->TotDesDays) { auto &desDayInput = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD); DDNameFanPeak = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD).Title; - dateTimeFanPeak = - EnergyPlus::format("{}/{} {}", - desDayInput.Month, - desDayInput.DayOfMonth, - ReportCoilSelection::getTimeText( - state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); + dateTimeFanPeak = std::format("{}/{} {}", + desDayInput.Month, + desDayInput.DayOfMonth, + ReportCoilSelection::getTimeText( + state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); } } else if (unitarysysEqSizing.HeatingAirFlow) { this->autoSizedValue = unitarysysEqSizing.HeatingAirVolFlow; @@ -840,7 +842,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalSysSizing(this->curSysNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { auto &desDayInput = state.dataWeather->DesDayInput(this->finalSysSizing(this->curSysNum).HeatDDNum); DDNameFanPeak = desDayInput.Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", desDayInput.Month, desDayInput.DayOfMonth, @@ -854,7 +856,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalSysSizing(this->curSysNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { auto &desDayInput = state.dataWeather->DesDayInput(this->finalSysSizing(this->curSysNum).HeatDDNum); DDNameFanPeak = desDayInput.Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", desDayInput.Month, desDayInput.DayOfMonth, @@ -865,11 +867,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo auto &desDayInput = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD); DDNameFanPeak = desDayInput.Title; dateTimeFanPeak = - EnergyPlus::format("{}/{} {}", - desDayInput.Month, - desDayInput.DayOfMonth, - ReportCoilSelection::getTimeText( - state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); + std::format("{}/{} {}", + desDayInput.Month, + desDayInput.DayOfMonth, + ReportCoilSelection::getTimeText( + state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); } } } @@ -880,7 +882,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo this->finalSysSizing(this->curSysNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { auto &desDayInput = state.dataWeather->DesDayInput(this->finalSysSizing(this->curSysNum).HeatDDNum); DDNameFanPeak = desDayInput.Title; - dateTimeFanPeak = EnergyPlus::format( + dateTimeFanPeak = std::format( "{}/{} {}", desDayInput.Month, desDayInput.DayOfMonth, @@ -890,12 +892,11 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo if (sysSizPeakDDNum.CoolFlowPeakDD > 0 && sysSizPeakDDNum.CoolFlowPeakDD <= state.dataEnvrn->TotDesDays) { auto &desDayInput = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD); DDNameFanPeak = desDayInput.Title; - dateTimeFanPeak = - EnergyPlus::format("{}/{} {}", - desDayInput.Month, - desDayInput.DayOfMonth, - ReportCoilSelection::getTimeText( - state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); + dateTimeFanPeak = std::format("{}/{} {}", + desDayInput.Month, + desDayInput.DayOfMonth, + ReportCoilSelection::getTimeText( + state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); } } } @@ -913,7 +914,7 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo std::string msg = this->callingRoutine + ' ' + this->compType + ' ' + this->compName + ", Developer Error: Component sizing incomplete."; ShowSevereError(state, msg); this->addErrorMessage(msg); - msg = EnergyPlus::format("SizingString = {}, SizingResult = {:.1T}", this->sizingString, this->autoSizedValue); + msg = std::format("SizingString = {}, SizingResult = {:.1f}", this->sizingString, this->autoSizedValue); ShowContinueError(state, msg); this->addErrorMessage(msg); errorsFound = true; diff --git a/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc b/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc index 85bdeb99596..37a275dd0d7 100644 --- a/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc +++ b/src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include @@ -110,27 +111,27 @@ Real64 WaterHeatingCapacitySizer::size(EnergyPlusData &state, Real64 _originalVa std::string msg = this->callingRoutine + ": Potential issue with equipment sizing for " + this->compType + ' ' + this->compName; this->addErrorMessage(msg); ShowWarningMessage(state, msg); - msg = EnergyPlus::format("...Rated Total Heating Capacity = {:.2T} [W]", this->autoSizedValue); + msg = EnergyPlus::format("...Rated Total Heating Capacity = {:.2f} [W]", this->autoSizedValue); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesMassFlow / state.dataEnvrn->StdRhoAir); + msg = EnergyPlus::format("...Air flow rate used for sizing = {:.5f} [m3/s]", DesMassFlow / state.dataEnvrn->StdRhoAir); this->addErrorMessage(msg); ShowContinueError(state, msg); if (this->termUnitSingDuct || this->termUnitPIU || this->termUnitIU || this->zoneEqFanCoil || this->zoneEqUnitHeater) { - msg = EnergyPlus::format("...Air flow rate used for sizing = {:.5T} [m3/s]", DesMassFlow / state.dataEnvrn->StdRhoAir); + msg = EnergyPlus::format("...Air flow rate used for sizing = {:.5f} [m3/s]", DesMassFlow / state.dataEnvrn->StdRhoAir); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format("...Plant loop temperature difference = {:.2T} [C]", this->dataWaterCoilSizHeatDeltaT); + msg = EnergyPlus::format("...Plant loop temperature difference = {:.2f} [C]", this->dataWaterCoilSizHeatDeltaT); this->addErrorMessage(msg); ShowContinueError(state, msg); } else { - msg = EnergyPlus::format("...Coil inlet air temperature used for sizing = {:.2T} [C]", CoilInTemp); + msg = EnergyPlus::format("...Coil inlet air temperature used for sizing = {:.2f} [C]", CoilInTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format("...Coil outlet air temperature used for sizing = {:.2T} [C]", CoilOutTemp); + msg = EnergyPlus::format("...Coil outlet air temperature used for sizing = {:.2f} [C]", CoilOutTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format("...Coil outlet air humidity ratio used for sizing = {:.2T} [kgWater/kgDryAir]", CoilOutHumRat); + msg = EnergyPlus::format("...Coil outlet air humidity ratio used for sizing = {:.2f} [kgWater/kgDryAir]", CoilOutHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); } diff --git a/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.cc b/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.cc index 7a052a867dc..3a9cd537403 100644 --- a/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.cc +++ b/src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.cc @@ -45,6 +45,10 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + +// EnergyPlus Headers #include #include #include @@ -92,55 +96,55 @@ Real64 WaterHeatingCoilUASizer::size(EnergyPlusData &state, Real64 _originalValu msg = " Iteration limit exceeded in calculating coil UA"; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Lower UA estimate = {:.6T} W/m2-K (0.1% of Design Coil Load)", UA0); + msg = EnergyPlus::format(" Lower UA estimate = {:.6f} W/m2-K (0.1% of Design Coil Load)", UA0); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1); + msg = EnergyPlus::format(" Upper UA estimate = {:.6f} W/m2-K (100% of Design Coil Load)", UA1); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Final UA estimate when iterations exceeded limit = {:.6T} W/m2-K", this->autoSizedValue); + msg = EnergyPlus::format(" Final UA estimate when iterations exceeded limit = {:.6f} W/m2-K", this->autoSizedValue); this->addErrorMessage(msg); ShowContinueError(state, msg); msg = " Zone \"" + this->finalZoneSizing(this->curZoneEqNum).ZoneName + "\" coil sizing conditions (may be different than Sizing inputs):"; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp); + msg = EnergyPlus::format(" Coil inlet air temperature = {:.3f} C", this->dataDesInletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat); + msg = EnergyPlus::format(" Coil inlet air humidity ratio = {:.3f} kgWater/kgDryAir", this->dataDesInletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing); + msg = EnergyPlus::format(" Coil inlet air mass flow rate = {:.6f} kg/s", this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); // TotWaterHeatingCoilRate is set in CALL to CalcSimpleHeatingCoil - msg = EnergyPlus::format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity); + msg = EnergyPlus::format(" Design Coil Capacity = {:.3f} W", this->dataDesignCoilCapacity); this->addErrorMessage(msg); ShowContinueError(state, msg); if (this->dataNomCapInpMeth) { - msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = EnergyPlus::format(" Design Coil Load = {:.3f} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp); + msg = EnergyPlus::format(" Coil outlet air temperature = {:.3f} C", this->dataDesOutletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat); + msg = EnergyPlus::format(" Coil outlet air humidity ratio = {:.3f} kgWater/kgDryAir", this->dataDesOutletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); } else if (this->termUnitSingDuct || this->termUnitPIU || this->termUnitIU || this->zoneEqFanCoil) { - msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = EnergyPlus::format(" Design Coil Load = {:.3f} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); } else { - msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = EnergyPlus::format(" Design Coil Load = {:.3f} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); msg = - EnergyPlus::format(" Coil outlet air temperature = {:.3T} C", this->finalZoneSizing(this->curZoneEqNum).HeatDesTemp); + EnergyPlus::format(" Coil outlet air temperature = {:.3f} C", this->finalZoneSizing(this->curZoneEqNum).HeatDesTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", + msg = EnergyPlus::format(" Coil outlet air humidity ratio = {:.3f} kgWater/kgDryAir", this->finalZoneSizing(this->curZoneEqNum).HeatDesHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); @@ -156,52 +160,51 @@ Real64 WaterHeatingCoilUASizer::size(EnergyPlusData &state, Real64 _originalValu msg = " Bad starting values for UA"; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Lower UA estimate = {:.6T} W/m2-K (0.1% of Design Coil Load)", UA0); + msg = EnergyPlus::format(" Lower UA estimate = {:.6f} W/m2-K (0.1% of Design Coil Load)", UA0); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1); + msg = EnergyPlus::format(" Upper UA estimate = {:.6f} W/m2-K (100% of Design Coil Load)", UA1); this->addErrorMessage(msg); ShowContinueError(state, msg); msg = " Zone \"" + this->finalZoneSizing(this->curZoneEqNum).ZoneName + "\" coil sizing conditions (may be different than Sizing inputs):"; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp); + msg = EnergyPlus::format(" Coil inlet air temperature = {:.3f} C", this->dataDesInletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat); + msg = EnergyPlus::format(" Coil inlet air humidity ratio = {:.3f} kgWater/kgDryAir", this->dataDesInletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing); + msg = std::format(" Coil inlet air mass flow rate = {:.6f} kg/s", this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity); + msg = std::format(" Design Coil Capacity = {:.3f} W", this->dataDesignCoilCapacity); this->addErrorMessage(msg); ShowContinueError(state, msg); if (this->dataNomCapInpMeth) { - msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = std::format(" Design Coil Load = {:.3f} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp); + msg = std::format(" Coil outlet air temperature = {:.3f} C", this->dataDesOutletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat); + msg = std::format(" Coil outlet air humidity ratio = {:.3f} kgWater/kgDryAir", this->dataDesOutletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); } else if (this->termUnitSingDuct || this->termUnitPIU || this->termUnitIU || this->zoneEqFanCoil) { - msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = std::format(" Design Coil Load = {:.3f} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); } else { - msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = std::format(" Design Coil Load = {:.3f} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = - EnergyPlus::format(" Coil outlet air temperature = {:.3T} C", this->finalZoneSizing(this->curZoneEqNum).HeatDesTemp); + msg = std::format(" Coil outlet air temperature = {:.3f} C", this->finalZoneSizing(this->curZoneEqNum).HeatDesTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", - this->finalZoneSizing(this->curZoneEqNum).HeatDesHumRat); + msg = std::format(" Coil outlet air humidity ratio = {:.3f} kgWater/kgDryAir", + this->finalZoneSizing(this->curZoneEqNum).HeatDesHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); } @@ -216,11 +219,10 @@ Real64 WaterHeatingCoilUASizer::size(EnergyPlusData &state, Real64 _originalValu msg = " Plant Sizing object = " + this->plantSizData(this->dataPltSizHeatNum).PlantLoopName; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Plant design loop exit temperature = {:.3T} C", - this->plantSizData(this->dataPltSizHeatNum).ExitTemp); + msg = std::format(" Plant design loop exit temperature = {:.3f} C", this->plantSizData(this->dataPltSizHeatNum).ExitTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Plant design loop delta T = {:.3T} C", this->dataWaterCoilSizHeatDeltaT); + msg = std::format(" Plant design loop delta T = {:.3f} C", this->dataWaterCoilSizHeatDeltaT); this->addErrorMessage(msg); ShowContinueError(state, msg); } @@ -277,39 +279,39 @@ Real64 WaterHeatingCoilUASizer::size(EnergyPlusData &state, Real64 _originalValu msg = " Iteration limit exceeded in calculating coil UA"; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Lower UA estimate = {:.6T} W/m2-K (1% of Design Coil Load)", UA0); + msg = std::format(" Lower UA estimate = {:.6f} W/m2-K (1% of Design Coil Load)", UA0); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1); + msg = std::format(" Upper UA estimate = {:.6f} W/m2-K (100% of Design Coil Load)", UA1); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Final UA estimate when iterations exceeded limit = {:.6T} W/m2-K", this->autoSizedValue); + msg = std::format(" Final UA estimate when iterations exceeded limit = {:.6f} W/m2-K", this->autoSizedValue); this->addErrorMessage(msg); ShowContinueError(state, msg); msg = " AirloopHVAC \"" + this->finalSysSizing(this->curSysNum).AirPriLoopName + "\" coil sizing conditions (may be different than Sizing inputs):"; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp); + msg = std::format(" Coil inlet air temperature = {:.3f} C", this->dataDesInletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat); + msg = std::format(" Coil inlet air humidity ratio = {:.3f} kgWater/kgDryAir", this->dataDesInletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing); + msg = std::format(" Coil inlet air mass flow rate = {:.6f} kg/s", this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity); + msg = std::format(" Design Coil Capacity = {:.3f} W", this->dataDesignCoilCapacity); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = std::format(" Design Coil Load = {:.3f} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); if (this->dataNomCapInpMeth) { - msg = EnergyPlus::format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp); + msg = std::format(" Coil outlet air temperature = {:.3f} C", this->dataDesOutletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat); + msg = std::format(" Coil outlet air humidity ratio = {:.3f} kgWater/kgDryAir", this->dataDesOutletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); } @@ -323,36 +325,36 @@ Real64 WaterHeatingCoilUASizer::size(EnergyPlusData &state, Real64 _originalValu msg = " Bad starting values for UA"; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Lower UA estimate = {:.6T} W/m2-K (1% of Design Coil Load)", UA0); + msg = std::format(" Lower UA estimate = {:.6f} W/m2-K (1% of Design Coil Load)", UA0); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Upper UA estimate = {:.6T} W/m2-K (100% of Design Coil Load)", UA1); + msg = std::format(" Upper UA estimate = {:.6f} W/m2-K (100% of Design Coil Load)", UA1); this->addErrorMessage(msg); ShowContinueError(state, msg); msg = " AirloopHVAC \"" + this->finalSysSizing(this->curSysNum).AirPriLoopName + "\" coil sizing conditions (may be different than Sizing inputs):"; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil inlet air temperature = {:.3T} C", this->dataDesInletAirTemp); + msg = std::format(" Coil inlet air temperature = {:.3f} C", this->dataDesInletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil inlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesInletAirHumRat); + msg = std::format(" Coil inlet air humidity ratio = {:.3f} kgWater/kgDryAir", this->dataDesInletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil inlet air mass flow rate = {:.6T} kg/s", this->dataFlowUsedForSizing); + msg = std::format(" Coil inlet air mass flow rate = {:.6f} kg/s", this->dataFlowUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Design Coil Capacity = {:.3T} W", this->dataDesignCoilCapacity); + msg = std::format(" Design Coil Capacity = {:.3f} W", this->dataDesignCoilCapacity); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Design Coil Load = {:.3T} W", this->dataCapacityUsedForSizing); + msg = std::format(" Design Coil Load = {:.3f} W", this->dataCapacityUsedForSizing); this->addErrorMessage(msg); ShowContinueError(state, msg); if (this->dataNomCapInpMeth) { - msg = EnergyPlus::format(" Coil outlet air temperature = {:.3T} C", this->dataDesOutletAirTemp); + msg = std::format(" Coil outlet air temperature = {:.3f} C", this->dataDesOutletAirTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Coil outlet air humidity ratio = {:.3T} kgWater/kgDryAir", this->dataDesOutletAirHumRat); + msg = std::format(" Coil outlet air humidity ratio = {:.3f} kgWater/kgDryAir", this->dataDesOutletAirHumRat); this->addErrorMessage(msg); ShowContinueError(state, msg); } @@ -366,11 +368,10 @@ Real64 WaterHeatingCoilUASizer::size(EnergyPlusData &state, Real64 _originalValu msg = " Plant Sizing object = " + this->plantSizData(this->dataPltSizHeatNum).PlantLoopName; this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Plant design loop exit temperature = {:.3T} C", - this->plantSizData(this->dataPltSizHeatNum).ExitTemp); + msg = std::format(" Plant design loop exit temperature = {:.3f} C", this->plantSizData(this->dataPltSizHeatNum).ExitTemp); this->addErrorMessage(msg); ShowContinueError(state, msg); - msg = EnergyPlus::format(" Plant design loop delta T = {:.3T} C", this->dataWaterCoilSizHeatDeltaT); + msg = std::format(" Plant design loop delta T = {:.3f} C", this->dataWaterCoilSizHeatDeltaT); this->addErrorMessage(msg); ShowContinueError(state, msg); } diff --git a/src/EnergyPlus/BaseboardElectric.cc b/src/EnergyPlus/BaseboardElectric.cc index 13208c6f5d6..41f39c2dbc0 100644 --- a/src/EnergyPlus/BaseboardElectric.cc +++ b/src/EnergyPlus/BaseboardElectric.cc @@ -46,6 +46,7 @@ // POSSIBILITY OF SUCH DAMAGE. // C++ Headers +#include // EnergyPlus Headers #include @@ -234,7 +235,7 @@ namespace BaseboardElectric { if (thisBaseboard.ScaledHeatingCapacity < 0.0 && thisBaseboard.ScaledHeatingCapacity != AutoSize) { ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", + EnergyPlus::format("Illegal {} = {:.7f}", s_ipsc->cNumericFieldNames(iHeatDesignCapacityNumericNum), s_ipsc->rNumericArgs(iHeatDesignCapacityNumericNum))); ErrorsFound = true; @@ -260,7 +261,7 @@ namespace BaseboardElectric { s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", + EnergyPlus::format("Illegal {} = {:.7f}", s_ipsc->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), s_ipsc->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; @@ -290,29 +291,26 @@ namespace BaseboardElectric { if (!s_ipsc->lNumericFieldBlanks(iHeatFracOfAutosizedCapacityNumericNum)) { thisBaseboard.ScaledHeatingCapacity = s_ipsc->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum); if (thisBaseboard.ScaledHeatingCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - s_ipsc->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), - s_ipsc->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); + std::format("Illegal {} = {:.7f}", + s_ipsc->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), + s_ipsc->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); - ShowContinueError(state, - EnergyPlus::format("Input for {} = {}", - s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), - s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); ShowContinueError( state, - EnergyPlus::format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); + std::format("Input for {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowContinueError( + state, std::format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisBaseboard.EquipName)); ShowContinueError( - state, - EnergyPlus::format("Illegal {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); + state, std::format("Illegal {} = {}", s_ipsc->cAlphaFieldNames(iHeatCAPMAlphaNum), s_ipsc->cAlphaArgs(iHeatCAPMAlphaNum))); ErrorsFound = true; } @@ -321,8 +319,7 @@ namespace BaseboardElectric { } if (ErrorsFound) { - ShowFatalError(state, - EnergyPlus::format("{} Errors found in getting input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, std::format("{} Errors found in getting input. Preceding condition(s) cause termination.", RoutineName)); } } @@ -436,7 +433,7 @@ namespace BaseboardElectric { state.dataSize->DataZoneNumber = baseboard.ZonePtr; int SizingMethod = HVAC::HeatingCapacitySizing; int FieldNum = 1; - std::string const SizingString = EnergyPlus::format("{} [W]", baseboard.FieldNames[FieldNum - 1]); + std::string const SizingString = std::format("{} [W]", baseboard.FieldNames[FieldNum - 1]); int CapSizingMethod = baseboard.HeatingCapMethod; ZoneEqSizing.SizingMethod(SizingMethod) = CapSizingMethod; if (CapSizingMethod == DataSizing::HeatingDesignCapacity || CapSizingMethod == DataSizing::CapacityPerFloorArea || diff --git a/src/EnergyPlus/BaseboardRadiator.cc b/src/EnergyPlus/BaseboardRadiator.cc index 5911f843832..1e7141d2519 100644 --- a/src/EnergyPlus/BaseboardRadiator.cc +++ b/src/EnergyPlus/BaseboardRadiator.cc @@ -47,10 +47,10 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include -// #include // EnergyPlus Headers #include @@ -309,7 +309,7 @@ namespace BaseboardRadiator { if (thisBaseboard.ScaledHeatingCapacity < 0.0 && thisBaseboard.ScaledHeatingCapacity != AutoSize) { ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", + EnergyPlus::format("Illegal {} = {:.7f}", numericFieldNames[iHeatDesignCapacityNumericNum - 1], thisBaseboard.ScaledHeatingCapacity)); ErrorsFound = true; @@ -334,7 +334,7 @@ namespace BaseboardRadiator { state, EnergyPlus::format("Input for {} = {}", heatingDesignCapacityMethodFieldName, heatingDesignCapacityMethod)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", + EnergyPlus::format("Illegal {} = {:.7f}", numericFieldNames[iHeatCapacityPerFloorAreaNumericNum - 1], thisBaseboard.ScaledHeatingCapacity)); ErrorsFound = true; @@ -365,24 +365,22 @@ namespace BaseboardRadiator { if (thisBaseboard.ScaledHeatingCapacity < 0.0) { ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", + EnergyPlus::format("Illegal {} = {:.7f}", numericFieldNames[iHeatFracOfAutosizedCapacityNumericNum - 1], thisBaseboard.ScaledHeatingCapacity)); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); - ShowContinueError( - state, EnergyPlus::format("Input for {} = {}", heatingDesignCapacityMethodFieldName, heatingDesignCapacityMethod)); + ShowSevereError(state, std::format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); + ShowContinueError(state, + std::format("Input for {} = {}", heatingDesignCapacityMethodFieldName, heatingDesignCapacityMethod)); ShowContinueError( - state, - EnergyPlus::format("Blank field not allowed for {}", numericFieldNames[iHeatFracOfAutosizedCapacityNumericNum - 1])); + state, std::format("Blank field not allowed for {}", numericFieldNames[iHeatFracOfAutosizedCapacityNumericNum - 1])); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); - ShowContinueError(state, - EnergyPlus::format("Illegal {} = {}", heatingDesignCapacityMethodFieldName, heatingDesignCapacityMethod)); + ShowSevereError(state, std::format("{} = {}", cCMO_BBRadiator_Water, thisBaseboard.EquipID)); + ShowContinueError(state, std::format("Illegal {} = {}", heatingDesignCapacityMethodFieldName, heatingDesignCapacityMethod)); ErrorsFound = true; } @@ -403,7 +401,7 @@ namespace BaseboardRadiator { } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in getting input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in getting input. Preceding condition(s) cause termination.", RoutineName)); } } @@ -616,7 +614,7 @@ namespace BaseboardRadiator { state.dataSize->DataZoneNumber = this->ZonePtr; int SizingMethod = HVAC::HeatingCapacitySizing; int FieldNum = 1; - std::string const SizingString = EnergyPlus::format("{} [W]", this->FieldNames[FieldNum - 1]); + std::string const SizingString = std::format("{} [W]", this->FieldNames[FieldNum - 1]); int CapSizingMethod = this->HeatingCapMethod; zoneEqSizing.SizingMethod(SizingMethod) = CapSizingMethod; if (CapSizingMethod == DataSizing::HeatingDesignCapacity || CapSizingMethod == DataSizing::CapacityPerFloorArea || @@ -684,7 +682,7 @@ namespace BaseboardRadiator { state.dataSize->AutoVsHardSizingThreshold) { ShowMessage( state, - EnergyPlus::format( + std::format( "SizeBaseboard: Potential issue with equipment sizing for ZoneHVAC:Baseboard:Convective:Water=\"{}\".", this->EquipID)); ShowContinueError( @@ -729,7 +727,7 @@ namespace BaseboardRadiator { state.dataSize->DataZoneNumber = this->ZonePtr; int SizingMethod = HVAC::HeatingCapacitySizing; int FieldNum = 1; - std::string const SizingString = EnergyPlus::format("{} [W]", this->FieldNames[FieldNum - 1]); + std::string const SizingString = std::format("{} [W]", this->FieldNames[FieldNum - 1]); int CapSizingMethod = this->HeatingCapMethod; zoneEqSizing.SizingMethod(SizingMethod) = CapSizingMethod; if (CapSizingMethod == DataSizing::HeatingDesignCapacity || CapSizingMethod == DataSizing::CapacityPerFloorArea || @@ -797,9 +795,9 @@ namespace BaseboardRadiator { // if the numerical inversion failed, issue error messages. if (SolFla == -1) { ShowSevereError(state, - EnergyPlus::format("SizeBaseboard: Autosizing of HW baseboard UA failed for {}=\"{}\"", - cCMO_BBRadiator_Water, - this->EquipID)); + std::format("SizeBaseboard: Autosizing of HW baseboard UA failed for {}=\"{}\"", + cCMO_BBRadiator_Water, + this->EquipID)); ShowContinueError(state, "Iteration limit exceeded in calculating coil UA"); if (UAAutoSize) { ErrorsFound = true; @@ -810,9 +808,9 @@ namespace BaseboardRadiator { } } else if (SolFla == -2) { ShowSevereError(state, - EnergyPlus::format("SizeBaseboard: Autosizing of HW baseboard UA failed for {}=\"{}\"", - cCMO_BBRadiator_Water, - this->EquipID)); + std::format("SizeBaseboard: Autosizing of HW baseboard UA failed for {}=\"{}\"", + cCMO_BBRadiator_Water, + this->EquipID)); ShowContinueError(state, "Bad starting values for UA"); if (UAAutoSize) { ErrorsFound = true; @@ -827,13 +825,12 @@ namespace BaseboardRadiator { UADes = UA1; if (UAAutoSize) { ShowWarningError(state, - EnergyPlus::format("SizeBaseboard: Autosizing of HW baseboard UA failed for {}=\"{}\"", - cCMO_BBRadiator_Water, - this->EquipID)); - ShowContinueError(state, - EnergyPlus::format("Design UA set equal to design coil load for {}=\"{}\"", - cCMO_BBRadiator_Water, - this->EquipID)); + std::format("SizeBaseboard: Autosizing of HW baseboard UA failed for {}=\"{}\"", + cCMO_BBRadiator_Water, + this->EquipID)); + ShowContinueError( + state, + std::format("Design UA set equal to design coil load for {}=\"{}\"", cCMO_BBRadiator_Water, this->EquipID)); ShowContinueError(state, EnergyPlus::format("Design coil load used during sizing = {:.5R} W.", DesCoilLoad)); ShowContinueError( state, EnergyPlus::format("Inlet water temperature used during sizing = {:.5R} C.", this->WaterInletTemp)); @@ -843,13 +840,13 @@ namespace BaseboardRadiator { UADes = UA0; if (UAAutoSize) { ShowWarningError(state, - EnergyPlus::format("SizeBaseboard: Autosizing of HW baseboard UA failed for {}=\"{}\"", - cCMO_BBRadiator_Water, - this->EquipID)); + std::format("SizeBaseboard: Autosizing of HW baseboard UA failed for {}=\"{}\"", + cCMO_BBRadiator_Water, + this->EquipID)); ShowContinueError(state, - EnergyPlus::format("Design UA set equal to 0.001 * design coil load for {}=\"{}\"", - cCMO_BBRadiator_Water, - this->EquipID)); + std::format("Design UA set equal to 0.001 * design coil load for {}=\"{}\"", + cCMO_BBRadiator_Water, + this->EquipID)); ShowContinueError(state, EnergyPlus::format("Design coil load used during sizing = {:.5R} W.", DesCoilLoad)); ShowContinueError(state, EnergyPlus::format("Inlet water temperature used during sizing = {:.5R} C.", this->WaterInletTemp)); @@ -879,7 +876,7 @@ namespace BaseboardRadiator { if ((std::abs(UADes - UAUser) / UAUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage( state, - EnergyPlus::format( + std::format( "SizeBaseboard: Potential issue with equipment sizing for ZoneHVAC:Baseboard:Convective:Water=\"{}\".", this->EquipID)); ShowContinueError(state, EnergyPlus::format("User-Specified U-Factor Times Area Value of {:.2R} [W/K]", UAUser)); @@ -896,7 +893,7 @@ namespace BaseboardRadiator { } else { // if there is no heating Sizing:Plant object and autosizing was requested, issue an error message if (this->WaterVolFlowRateMax == DataSizing::AutoSize || this->UA == DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("SizeBaseboard: {}=\"{}\"", cCMO_BBRadiator_Water, this->EquipID)); + ShowSevereError(state, std::format("SizeBaseboard: {}=\"{}\"", cCMO_BBRadiator_Water, this->EquipID)); ShowContinueError(state, "...Autosizing of hot water baseboard requires a heating loop Sizing:Plant object"); ErrorsFound = true; } diff --git a/src/EnergyPlus/BoilerSteam.cc b/src/EnergyPlus/BoilerSteam.cc index 636e24a9016..146891c381e 100644 --- a/src/EnergyPlus/BoilerSteam.cc +++ b/src/EnergyPlus/BoilerSteam.cc @@ -50,7 +50,6 @@ // ObjexxFCL Headers #include -// #include // EnergyPlus Headers #include diff --git a/src/EnergyPlus/Boilers.cc b/src/EnergyPlus/Boilers.cc index c3995bbede2..61c084673d1 100644 --- a/src/EnergyPlus/Boilers.cc +++ b/src/EnergyPlus/Boilers.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -215,7 +216,7 @@ void GetBoilerInput(EnergyPlusData &state) thisBoiler.NomCap = inputProcessor->getRealFieldValue(boilerFields, boilerSchemaProps, "nominal_capacity"); if (thisBoiler.NomCap == 0.0) { - ShowSevereError(state, fmt::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, boilerName)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, boilerName)); ShowContinueError(state, EnergyPlus::format("Invalid {}={:.2R}", "Nominal Capacity", thisBoiler.NomCap)); ShowContinueError(state, "...Nominal Capacity must be greater than 0.0"); ErrorsFound = true; @@ -226,17 +227,17 @@ void GetBoilerInput(EnergyPlusData &state) thisBoiler.NomEffic = inputProcessor->getRealFieldValue(boilerFields, boilerSchemaProps, "nominal_thermal_efficiency"); if (thisBoiler.NomEffic == 0.0) { - ShowSevereError(state, fmt::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, boilerName)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, boilerName)); ShowContinueError(state, EnergyPlus::format("Invalid {}={:.3R}", "Nominal Thermal Efficiency", thisBoiler.NomEffic)); ShowContinueError(state, "...Nominal Thermal Efficiency must be greater than 0.0"); ErrorsFound = true; } else if (thisBoiler.NomEffic > 1.0) { ShowWarningError(state, - fmt::format("{} = {}: {}={} should not typically be greater than 1.", - s_ipsc->cCurrentModuleObject, - boilerName, - "Nominal Thermal Efficiency", - thisBoiler.NomEffic)); + EnergyPlus::format("{} = {}: {}={} should not typically be greater than 1.", + s_ipsc->cCurrentModuleObject, + boilerName, + "Nominal Thermal Efficiency", + thisBoiler.NomEffic)); } if (efficiencyCurveTempEvalVar == "ENTERINGBOILER") { @@ -263,7 +264,7 @@ void GetBoilerInput(EnergyPlusData &state) } else if (thisBoiler.EfficiencyCurve->numDims == 2) { if (thisBoiler.CurveTempMode == TempMode::NOTSET) { if (!efficiencyCurveTempEvalVar.empty()) { - ShowSevereError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, boilerName)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, boilerName)); ShowContinueError( state, EnergyPlus::format("Invalid {}={}", "Efficiency Curve Temperature Evaluation Variable", efficiencyCurveTempEvalVar)); ShowContinueError(state, @@ -272,7 +273,7 @@ void GetBoilerInput(EnergyPlusData &state) "Efficiency Curve Temperature Evaluation Variable")); ShowContinueError(state, "Available choices are EnteringBoiler or LeavingBoiler"); } else { - ShowSevereError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, boilerName)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, boilerName)); ShowContinueError(state, EnergyPlus::format("Field {} is blank", "Efficiency Curve Temperature Evaluation Variable")); ShowContinueError(state, EnergyPlus::format("boilers.Boiler using curve type of {} must specify either EnteringBoiler or LeavingBoiler", @@ -320,7 +321,7 @@ void GetBoilerInput(EnergyPlusData &state) thisBoiler.ParasiticFuelCapacity = getOptionalNumericField("off_cycle_parasitic_fuel_load"); if (thisBoiler.FuelType == Constant::eFuel::Electricity && thisBoiler.ParasiticFuelCapacity > 0) { - ShowWarningError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, boilerName)); + ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, boilerName)); ShowContinueError(state, EnergyPlus::format("{} should be zero when the fuel type is electricity.", "Parasitic Fuel Capacity")); ShowContinueError(state, "It will be ignored and the simulation continues."); thisBoiler.ParasiticFuelCapacity = 0.0; @@ -358,7 +359,7 @@ void GetBoilerInput(EnergyPlusData &state) } else if (boilerFlowMode == "NOTMODULATED" || boilerFlowMode.empty()) { thisBoiler.FlowMode = DataPlant::FlowMode::NotModulated; } else { - ShowSevereError(state, fmt::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, boilerName)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, boilerName)); ShowContinueError(state, EnergyPlus::format("Invalid {}={}", "Boiler Flow Mode", boilerFlowMode)); ShowContinueError(state, "Available choices are ConstantFlow, NotModulated, or LeavingSetpointModulated"); ShowContinueError(state, "Flow mode NotModulated is assumed and the simulation continues."); @@ -457,14 +458,14 @@ void BoilerSpecs::SetupOutputVars(EnergyPlusData &state) "Boiler Parasitic"); if (this->FuelType != Constant::eFuel::Electricity) { SetupOutputVariable(state, - EnergyPlus::format("Boiler Ancillary {} Rate", sFuelType), + std::format("Boiler Ancillary {} Rate", sFuelType), Constant::Units::W, this->ParasiticFuelRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - EnergyPlus::format("Boiler Ancillary {} Energy", sFuelType), + std::format("Boiler Ancillary {} Energy", sFuelType), Constant::Units::J, this->ParasiticFuelConsumption, OutputProcessor::TimeStepType::System, @@ -523,8 +524,8 @@ void BoilerSpecs::initEachEnvironment(EnergyPlusData &state) (state.dataLoopNodes->Node(this->BoilerOutletNodeNum).TempSetPointLo == Node::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { - ShowWarningError( - state, EnergyPlus::format("Missing temperature setpoint for LeavingSetpointModulated mode Boiler named {}", this->Name)); + ShowWarningError(state, + std::format("Missing temperature setpoint for LeavingSetpointModulated mode Boiler named {}", this->Name)); ShowContinueError( state, " A temperature setpoint is needed at the outlet node of a boiler in variable flow mode, use a SetpointManager"); ShowContinueError(state, " The overall loop setpoint will be assumed for Boiler. The simulation continues ... "); @@ -537,8 +538,8 @@ void BoilerSpecs::initEachEnvironment(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->BoilerOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError( - state, EnergyPlus::format("Missing temperature setpoint for LeavingSetpointModulated mode Boiler named {}", this->Name)); + ShowWarningError(state, + std::format("Missing temperature setpoint for LeavingSetpointModulated mode Boiler named {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the outlet node of a boiler in variable flow mode"); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the boiler outlet node "); ShowContinueError(state, " or use an EMS actuator to establish a setpoint at the boiler outlet node "); @@ -659,8 +660,7 @@ void BoilerSpecs::SizeBoiler(EnergyPlusData &state) NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeBoilerHotWater: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeBoilerHotWater: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Nominal Capacity of {:.2R} [W]", NomCapUser)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); @@ -674,7 +674,7 @@ void BoilerSpecs::SizeBoiler(EnergyPlusData &state) } else { if (this->NomCapWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Boiler nominal capacity requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Boiler object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Boiler object={}", this->Name)); ErrorsFound = true; } if (!this->NomCapWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->NomCap > 0.0)) { // Hard-sized with no sizing data @@ -714,8 +714,7 @@ void BoilerSpecs::SizeBoiler(EnergyPlusData &state) VolFlowRateUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpBoilerVolFlowRate - VolFlowRateUser) / VolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeBoilerHotWater: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeBoilerHotWater: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Water Flow Rate of {:.2R} [m3/s]", VolFlowRateUser)); ShowContinueError( @@ -733,7 +732,7 @@ void BoilerSpecs::SizeBoiler(EnergyPlusData &state) } else { if (this->VolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Boiler design flow rate requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Boiler object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Boiler object={}", this->Name)); ErrorsFound = true; } if (!this->VolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && @@ -936,23 +935,23 @@ void BoilerSpecs::CalcBoilerModel(EnergyPlusData &state, if (this->BoilerLoad > 0.0) { if (this->EffCurveOutputError < 1) { ++this->EffCurveOutputError; - ShowWarningError(state, EnergyPlus::format("Boiler:HotWater \"{}\"", this->Name)); + ShowWarningError(state, std::format("Boiler:HotWater \"{}\"", this->Name)); ShowContinueError(state, "...Normalized Boiler Efficiency Curve output is less than or equal to 0."); - ShowContinueError(state, EnergyPlus::format("...Curve input x value (PLR) = {:.5T}", this->BoilerPLR)); + ShowContinueError(state, std::format("...Curve input x value (PLR) = {:.5f}", this->BoilerPLR)); if (this->EfficiencyCurve->numDims == 2) { if (this->CurveTempMode == TempMode::ENTERINGBOILERTEMP) { - ShowContinueError( - state, EnergyPlus::format("...Curve input y value (Tinlet) = {:.2T}", state.dataLoopNodes->Node(BoilerInletNode).Temp)); + ShowContinueError(state, + std::format("...Curve input y value (Tinlet) = {:.2f}", state.dataLoopNodes->Node(BoilerInletNode).Temp)); } else if (this->CurveTempMode == TempMode::LEAVINGBOILERTEMP) { - ShowContinueError(state, EnergyPlus::format("...Curve input y value (Toutlet) = {:.2T}", this->BoilerOutletTemp)); + ShowContinueError(state, std::format("...Curve input y value (Toutlet) = {:.2f}", this->BoilerOutletTemp)); } } - ShowContinueError(state, EnergyPlus::format("...Curve output (normalized eff) = {:.5T}", EffCurveOutput)); + ShowContinueError(state, std::format("...Curve output (normalized eff) = {:.5f}", EffCurveOutput)); ShowContinueError( state, - EnergyPlus::format("...Calculated Boiler efficiency = {:.5T} (Boiler efficiency = Nominal Thermal Efficiency * Normalized " - "Boiler Efficiency Curve output)", - BoilerEff)); + std::format("...Calculated Boiler efficiency = {:.5f} (Boiler efficiency = Nominal Thermal Efficiency * Normalized " + "Boiler Efficiency Curve output)", + BoilerEff)); ShowContinueErrorTimeStamp(state, "...Curve output reset to 0.01 and simulation continues."); } else { ShowRecurringWarningErrorAtEnd(state, @@ -972,24 +971,24 @@ void BoilerSpecs::CalcBoilerModel(EnergyPlusData &state, NomEffic <= 1.0) { // NomEffic > 1 warning occurs elsewhere; avoid cascading warnings if (this->CalculatedEffError < 1) { ++this->CalculatedEffError; - ShowWarningError(state, EnergyPlus::format("Boiler:HotWater \"{}\"", this->Name)); + ShowWarningError(state, std::format("Boiler:HotWater \"{}\"", this->Name)); ShowContinueError(state, "...Calculated Boiler Efficiency is greater than 1.1."); ShowContinueError(state, "...Boiler Efficiency calculations shown below."); - ShowContinueError(state, EnergyPlus::format("...Curve input x value (PLR) = {:.5T}", this->BoilerPLR)); + ShowContinueError(state, std::format("...Curve input x value (PLR) = {:.5f}", this->BoilerPLR)); if (this->EfficiencyCurve->numDims == 2) { if (this->CurveTempMode == TempMode::ENTERINGBOILERTEMP) { - ShowContinueError( - state, EnergyPlus::format("...Curve input y value (Tinlet) = {:.2T}", state.dataLoopNodes->Node(BoilerInletNode).Temp)); + ShowContinueError(state, + std::format("...Curve input y value (Tinlet) = {:.2f}", state.dataLoopNodes->Node(BoilerInletNode).Temp)); } else if (this->CurveTempMode == TempMode::LEAVINGBOILERTEMP) { - ShowContinueError(state, EnergyPlus::format("...Curve input y value (Toutlet) = {:.2T}", this->BoilerOutletTemp)); + ShowContinueError(state, std::format("...Curve input y value (Toutlet) = {:.2f}", this->BoilerOutletTemp)); } } - ShowContinueError(state, EnergyPlus::format("...Curve output (normalized eff) = {:.5T}", EffCurveOutput)); + ShowContinueError(state, std::format("...Curve output (normalized eff) = {:.5f}", EffCurveOutput)); ShowContinueError( state, - EnergyPlus::format("...Calculated Boiler efficiency = {:.5T} (Boiler efficiency = Nominal Thermal Efficiency * Normalized " - "Boiler Efficiency Curve output)", - BoilerEff)); + std::format("...Calculated Boiler efficiency = {:.5f} (Boiler efficiency = Nominal Thermal Efficiency * Normalized " + "Boiler Efficiency Curve output)", + BoilerEff)); ShowContinueErrorTimeStamp(state, "...Curve output reset to 1.1 and simulation continues."); } else { ShowRecurringWarningErrorAtEnd(state, diff --git a/src/EnergyPlus/BranchInputManager.cc b/src/EnergyPlus/BranchInputManager.cc index c5703536a94..60712fce28a 100644 --- a/src/EnergyPlus/BranchInputManager.cc +++ b/src/EnergyPlus/BranchInputManager.cc @@ -46,6 +46,7 @@ // POSSIBILITY OF SUCH DAMAGE. // C++ Headers +#include #include // ObjexxFCL Headers @@ -190,7 +191,7 @@ namespace BranchInputManager { if (isize(BranchNames) < NumBranchNames) { ShowSevereError(state, "GetBranchList: Branch Names array not big enough to hold Branch Names"); ShowContinueError(state, EnergyPlus::format("Input BranchListName={}, in Loop={}", BranchListName, LoopName)); - ShowContinueError(state, fmt::format("BranchName Array size={}, but input size={}", size(BranchNames), (NumBranchNames))); + ShowContinueError(state, EnergyPlus::format("BranchName Array size={}, but input size={}", size(BranchNames), (NumBranchNames))); ErrFound = true; } else { BranchNames = ""; @@ -281,7 +282,7 @@ namespace BranchInputManager { if (MinCompsAllowed < NumComps) { ShowSevereError(state, "GetBranchData: Component List arrays not big enough to hold Number of Components"); ShowContinueError(state, EnergyPlus::format("Input BranchName={}, in Loop={}", BranchName, LoopName)); - ShowContinueError(state, fmt::format("Max Component Array size={}, but input size={}", MinCompsAllowed, NumComps)); + ShowContinueError(state, EnergyPlus::format("Max Component Array size={}, but input size={}", MinCompsAllowed, NumComps)); ShowFatalError(state, "Program terminates due to preceding conditions."); } @@ -413,7 +414,7 @@ namespace BranchInputManager { FanName = std::string(); if (NumBranches == 0) { - ShowSevereError(state, fmt::format("GetBranchFanTypeName: Branch index not found = {}", BranchNum)); + ShowSevereError(state, EnergyPlus::format("GetBranchFanTypeName: Branch index not found = {}", BranchNum)); ErrFound = true; } else { if (BranchNum > 0 && BranchNum <= NumBranches) { @@ -431,7 +432,7 @@ namespace BranchInputManager { ErrFound = true; } } else { - ShowSevereError(state, fmt::format("GetBranchFanTypeName: Branch index not found = {}", BranchNum)); + ShowSevereError(state, EnergyPlus::format("GetBranchFanTypeName: Branch index not found = {}", BranchNum)); ErrFound = true; } } @@ -638,12 +639,12 @@ namespace BranchInputManager { ++MixerNumber; } if (Count == 0) { - ShowFatalError(state, EnergyPlus::format("GetLoopMixer: No Mixer Found={}", Connectoid.ConnectorName(1))); + ShowFatalError(state, std::format("GetLoopMixer: No Mixer Found={}", Connectoid.ConnectorName(1))); } } else if (Util::SameString(Connectoid.ConnectorType(2), cMIXER)) { Count = Util::FindItemInList(Connectoid.ConnectorName(2), state.dataBranchInputManager->Mixers); if (Count == 0) { - ShowFatalError(state, EnergyPlus::format("GetLoopMixer: No Mixer Found={}", Connectoid.ConnectorName(2))); + ShowFatalError(state, std::format("GetLoopMixer: No Mixer Found={}", Connectoid.ConnectorName(2))); } } else { Count = 0; @@ -684,8 +685,7 @@ namespace BranchInputManager { BComponents, errFlag); if (errFlag) { - ShowContinueError(state, - EnergyPlus::format("..occurs for Connector:Mixer Name={}", state.dataBranchInputManager->Mixers(Count).Name)); + ShowContinueError(state, std::format("..occurs for Connector:Mixer Name={}", state.dataBranchInputManager->Mixers(Count).Name)); ErrorsFound = true; } if (NumComps > 0) { @@ -705,9 +705,9 @@ namespace BranchInputManager { errFlag); if (NumInletNodes > isize(InletNodeNames) || NumInletNodes > isize(InletNodeNums)) { - ShowSevereError( - state, EnergyPlus::format("GetLoopMixer: Connector:Mixer={} contains too many inlets for size of Inlet Array.", MixerName)); - ShowContinueError(state, fmt::format("Max array size={}, Mixer statement inlets={}", size(InletNodeNames), NumInletNodes)); + ShowSevereError(state, + std::format("GetLoopMixer: Connector:Mixer={} contains too many inlets for size of Inlet Array.", MixerName)); + ShowContinueError(state, std::format("Max array size={}, Mixer statement inlets={}", size(InletNodeNames), NumInletNodes)); ShowFatalError(state, "Program terminates due to preceding condition."); } InletNodeNums = 0; @@ -785,7 +785,7 @@ namespace BranchInputManager { } if (ConnectorListName.empty()) { - ShowSevereError(state, EnergyPlus::format("GetLoopSplitter: ConnectorListName is blank. LoopName={}", LoopName)); + ShowSevereError(state, std::format("GetLoopSplitter: ConnectorListName is blank. LoopName={}", LoopName)); ShowFatalError(state, "Program terminates due to previous condition."); } GetConnectorList(state, ConnectorListName, Connectoid, ConnectorNumber); @@ -795,12 +795,12 @@ namespace BranchInputManager { ++SplitterNumber; } if (Count == 0) { - ShowFatalError(state, EnergyPlus::format("GetLoopSplitter: No Splitter Found={}", Connectoid.ConnectorName(1))); + ShowFatalError(state, std::format("GetLoopSplitter: No Splitter Found={}", Connectoid.ConnectorName(1))); } } else if (Util::SameString(Connectoid.ConnectorType(2), cSPLITTER)) { Count = Util::FindItemInList(Connectoid.ConnectorName(2), state.dataBranchInputManager->Splitters); if (Count == 0) { - ShowFatalError(state, EnergyPlus::format("GetLoopSplitter: No Splitter Found={}", Connectoid.ConnectorName(2))); + ShowFatalError(state, std::format("GetLoopSplitter: No Splitter Found={}", Connectoid.ConnectorName(2))); } } else { Count = 0; @@ -842,7 +842,7 @@ namespace BranchInputManager { BComponents, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("..occurs for Splitter Name={}", state.dataBranchInputManager->Splitters(Count).Name)); + ShowContinueError(state, std::format("..occurs for Splitter Name={}", state.dataBranchInputManager->Splitters(Count).Name)); ErrorsFound = true; } if (NumComps > 0) { @@ -862,10 +862,10 @@ namespace BranchInputManager { errFlag); if (NumOutletNodes > isize(OutletNodeNames) || NumOutletNodes > isize(OutletNodeNums)) { - ShowSevereError(state, - EnergyPlus::format("GetLoopSplitter: Connector:Splitter={} contains too many outlets for size of Outlet Array.", - SplitterName)); - ShowContinueError(state, fmt::format("Max array size={}, Splitter statement outlets={}", size(OutletNodeNames), NumOutletNodes)); + ShowSevereError( + state, + std::format("GetLoopSplitter: Connector:Splitter={} contains too many outlets for size of Outlet Array.", SplitterName)); + ShowContinueError(state, std::format("Max array size={}, Splitter statement outlets={}", size(OutletNodeNames), NumOutletNodes)); ShowFatalError(state, "Program terminates due to preceding condition."); } OutletNodeNums = 0; @@ -925,15 +925,15 @@ namespace BranchInputManager { int Found1 = Util::FindItemInList(BranchListName, state.dataBranchInputManager->BranchList); if (Found1 == 0) { - ShowSevereError(state, EnergyPlus::format("GetFirstBranchInletNodeName: BranchList=\"{}\", not a valid BranchList Name", BranchListName)); + ShowSevereError(state, std::format("GetFirstBranchInletNodeName: BranchList=\"{}\", not a valid BranchList Name", BranchListName)); InletNodeName = "Invalid Node Name"; } else { int Found2 = Util::FindItemInList(state.dataBranchInputManager->BranchList(Found1).BranchNames(1), state.dataBranchInputManager->Branch); if (Found2 == 0) { ShowSevereError(state, - EnergyPlus::format("GetFirstBranchInletNodeName: BranchList=\"{}\", Branch=\"{}\" not a valid Branch Name", - BranchListName, - state.dataBranchInputManager->BranchList(Found1).BranchNames(1))); + std::format("GetFirstBranchInletNodeName: BranchList=\"{}\", Branch=\"{}\" not a valid Branch Name", + BranchListName, + state.dataBranchInputManager->BranchList(Found1).BranchNames(1))); InletNodeName = "Invalid Node Name"; } else { InletNodeName = state.dataBranchInputManager->Branch(Found2).Component(1).InletNodeName; @@ -964,7 +964,7 @@ namespace BranchInputManager { int Found1 = Util::FindItemInList(BranchListName, state.dataBranchInputManager->BranchList); if (Found1 == 0) { - ShowSevereError(state, EnergyPlus::format("GetLastBranchOutletNodeName: BranchList=\"{}\", not a valid BranchList Name", BranchListName)); + ShowSevereError(state, std::format("GetLastBranchOutletNodeName: BranchList=\"{}\", not a valid BranchList Name", BranchListName)); OutletNodeName = "Invalid Node Name"; } else { int Found2 = Util::FindItemInList( @@ -972,10 +972,10 @@ namespace BranchInputManager { state.dataBranchInputManager->Branch); if (Found2 == 0) { ShowSevereError(state, - EnergyPlus::format("GetLastBranchOutletNodeName: BranchList=\"{}\", Branch=\"{}\" not a valid Branch Name", - BranchListName, - state.dataBranchInputManager->BranchList(Found1).BranchNames( - state.dataBranchInputManager->BranchList(Found1).NumOfBranchNames))); + std::format("GetLastBranchOutletNodeName: BranchList=\"{}\", Branch=\"{}\" not a valid Branch Name", + BranchListName, + state.dataBranchInputManager->BranchList(Found1).BranchNames( + state.dataBranchInputManager->BranchList(Found1).NumOfBranchNames))); OutletNodeName = "Invalid Node Name"; } else { OutletNodeName = state.dataBranchInputManager->Branch(Found2) @@ -1115,8 +1115,8 @@ namespace BranchInputManager { state.dataBranchInputManager->Branch(BCount).Name = Alphas(1); Curve::GetPressureCurveTypeAndIndex(state, Alphas(2), pressureCurveType, PressureCurveIndex); if (pressureCurveType == DataBranchAirLoopPlant::PressureCurveType::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("..Invalid {}=\"{}\".", cAlphaFields(2), Alphas(2))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("..Invalid {}=\"{}\".", cAlphaFields(2), Alphas(2))); ShowContinueError(state, "This curve could not be found in the input deck. Ensure that this curve has been entered"); ShowContinueError(state, " as either a Curve:Functional:PressureDrop or one of Curve:{Linear,Quadratic,Cubic,Exponent}"); ShowContinueError(state, "This error could be caused by a misspelled curve name"); @@ -1133,22 +1133,22 @@ namespace BranchInputManager { Comp = 1; for (int Loop = 3; Loop <= NumAlphas; Loop += 4) { if (Util::SameString(Alphas(Loop), cSPLITTER) || Util::SameString(Alphas(Loop), cMIXER)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Connector:Splitter/Connector:Mixer not allowed in object {}", CurrentModuleObject)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Connector:Splitter/Connector:Mixer not allowed in object {}", CurrentModuleObject)); ErrFound = true; continue; } if (Comp > NumInComps) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, fmt::format("...Number of Arguments indicate [{}], but count of fields indicates [{}]", NumInComps, Comp)); - ShowContinueError(state, EnergyPlus::format("...examine {} carefully.", CurrentModuleObject)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...Number of Arguments indicate [{}], but count of fields indicates [{}]", NumInComps, Comp)); + ShowContinueError(state, std::format("...examine {} carefully.", CurrentModuleObject)); continue; } state.dataBranchInputManager->Branch(BCount).Component(Comp).CType = Alphas(Loop); state.dataBranchInputManager->Branch(BCount).Component(Comp).Name = Alphas(Loop + 1); ValidateComponent(state, Alphas(Loop), Alphas(Loop + 1), IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs on {}={}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Occurs on {}={}", CurrentModuleObject, Alphas(1))); ErrFound = true; } state.dataBranchInputManager->Branch(BCount).Component(Comp).InletNodeName = Alphas(Loop + 2); @@ -1173,25 +1173,24 @@ namespace BranchInputManager { false, cAlphaFields(Loop + 2)); if (NumNodes > 1) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, - EnergyPlus::format("..invalid {}=\"{}\" must be a single node - appears to be a list.", - cAlphaFields(Loop + 2), - state.dataBranchInputManager->Branch(BCount).Component(Comp).InletNodeName)); + std::format("..invalid {}=\"{}\" must be a single node - appears to be a list.", + cAlphaFields(Loop + 2), + state.dataBranchInputManager->Branch(BCount).Component(Comp).InletNodeName)); ShowContinueError( state, - EnergyPlus::format( - "Occurs on {}=\"{}\", {}=\"{}\".", cAlphaFields(Loop), Alphas(Loop), cAlphaFields(Loop + 1), Alphas(Loop + 1))); + std::format("Occurs on {}=\"{}\", {}=\"{}\".", cAlphaFields(Loop), Alphas(Loop), cAlphaFields(Loop + 1), Alphas(Loop + 1))); ErrFound = true; } else { state.dataBranchInputManager->Branch(BCount).Component(Comp).InletNode = NodeNums(1); } } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("blank required field: {}", cAlphaFields(Loop + 2))); - ShowContinueError(state, - EnergyPlus::format( - "Occurs on {}=\"{}\", {}=\"{}\".", cAlphaFields(Loop), Alphas(Loop), cAlphaFields(Loop + 1), Alphas(Loop + 1))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("blank required field: {}", cAlphaFields(Loop + 2))); + ShowContinueError( + state, + std::format("Occurs on {}=\"{}\", {}=\"{}\".", cAlphaFields(Loop), Alphas(Loop), cAlphaFields(Loop + 1), Alphas(Loop + 1))); ErrFound = true; } state.dataBranchInputManager->Branch(BCount).Component(Comp).OutletNodeName = Alphas(Loop + 3); @@ -1216,25 +1215,24 @@ namespace BranchInputManager { false, cAlphaFields(Loop + 3)); if (NumNodes > 1) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, - EnergyPlus::format("..invalid {}=\"{}\" must be a single node - appears to be a list.", - cAlphaFields(Loop + 2), - state.dataBranchInputManager->Branch(BCount).Component(Comp).InletNodeName)); + std::format("..invalid {}=\"{}\" must be a single node - appears to be a list.", + cAlphaFields(Loop + 2), + state.dataBranchInputManager->Branch(BCount).Component(Comp).InletNodeName)); ShowContinueError( state, - EnergyPlus::format( - "Occurs on {}=\"{}\", {}=\"{}\".", cAlphaFields(Loop), Alphas(Loop), cAlphaFields(Loop + 1), Alphas(Loop + 1))); + std::format("Occurs on {}=\"{}\", {}=\"{}\".", cAlphaFields(Loop), Alphas(Loop), cAlphaFields(Loop + 1), Alphas(Loop + 1))); ErrFound = true; } else { state.dataBranchInputManager->Branch(BCount).Component(Comp).OutletNode = NodeNums(1); } } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("blank required field: {}", cAlphaFields(Loop + 3))); - ShowContinueError(state, - EnergyPlus::format( - "Occurs on {}=\"{}\", {}=\"{}\".", cAlphaFields(Loop), Alphas(Loop), cAlphaFields(Loop + 1), Alphas(Loop + 1))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("blank required field: {}", cAlphaFields(Loop + 3))); + ShowContinueError( + state, + std::format("Occurs on {}=\"{}\", {}=\"{}\".", cAlphaFields(Loop), Alphas(Loop), cAlphaFields(Loop + 1), Alphas(Loop + 1))); ErrFound = true; } @@ -1318,9 +1316,9 @@ namespace BranchInputManager { if (NumNumbers > 0) { ShowSevereError(state, - EnergyPlus::format("{}{} Object definition contains numbers, cannot be decoded by GetBranchListInput routine.", - RoutineName, - CurrentModuleObject)); + std::format("{}{} Object definition contains numbers, cannot be decoded by GetBranchListInput routine.", + RoutineName, + CurrentModuleObject)); ErrFound = true; } BCount = 0; @@ -1345,10 +1343,10 @@ namespace BranchInputManager { state.dataBranchInputManager->BranchList(BCount).BranchNames.allocate(NumAlphas - 1); if (state.dataBranchInputManager->BranchList(BCount).NumOfBranchNames == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", No branch names entered.", - RoutineName, - CurrentModuleObject, - state.dataBranchInputManager->BranchList(BCount).Name)); + std::format("{}{}=\"{}\", No branch names entered.", + RoutineName, + CurrentModuleObject, + state.dataBranchInputManager->BranchList(BCount).Name)); ErrFound = true; } else { state.dataBranchInputManager->BranchList(BCount).BranchNames({1, NumAlphas - 1}) = Alphas({2, NumAlphas}); @@ -1362,13 +1360,13 @@ namespace BranchInputManager { state.dataBranchInputManager->Branch); if (Found == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid data.", - RoutineName, - CurrentModuleObject, - state.dataBranchInputManager->BranchList(BCount).Name)); + std::format("{}{}=\"{}\", invalid data.", + RoutineName, + CurrentModuleObject, + state.dataBranchInputManager->BranchList(BCount).Name)); ShowContinueError(state, - EnergyPlus::format("..invalid Branch Name not found=\"{}\".", - state.dataBranchInputManager->BranchList(BCount).BranchNames(Loop))); + std::format("..invalid Branch Name not found=\"{}\".", + state.dataBranchInputManager->BranchList(BCount).BranchNames(Loop))); ErrFound = true; } } @@ -1388,17 +1386,17 @@ namespace BranchInputManager { } ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, state.dataBranchInputManager->BranchList(BCount).Name)); ShowContinueError(state, "..invalid: duplicate branch name specified in the list."); - ShowContinueError(state, EnergyPlus::format("..Branch Name={}", TestName)); - ShowContinueError(state, fmt::format("..Branch Name #{} is duplicate.", Loop)); + ShowContinueError(state, std::format("..Branch Name={}", TestName)); + ShowContinueError(state, std::format("..Branch Name #{} is duplicate.", Loop)); ErrFound = true; } } if (ErrFound) { - ShowSevereError(state, EnergyPlus::format("{} Invalid Input -- preceding condition(s) will likely cause termination.", RoutineName)); + ShowSevereError(state, std::format("{} Invalid Input -- preceding condition(s) will likely cause termination.", RoutineName)); } NumOfBranchLists = BCount; Alphas.deallocate(); @@ -1472,9 +1470,9 @@ namespace BranchInputManager { state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, CurrentModuleObject, NumParams, NumAlphas, NumNumbers); if (NumAlphas != 5 || NumNumbers != 0) { ShowWarningError(state, - EnergyPlus::format("GetConnectorList: Illegal \"extension\" to {} object. Internal code does not support > 2 connectors " - "(Connector:Splitter and Connector:Mixer)", - CurrentModuleObject)); + std::format("GetConnectorList: Illegal \"extension\" to {} object. Internal code does not support > 2 connectors " + "(Connector:Splitter and Connector:Mixer)", + CurrentModuleObject)); } Alphas.allocate(NumAlphas); Numbers.dimension(NumNumbers, 0.0); @@ -1522,8 +1520,7 @@ namespace BranchInputManager { } else { ShowWarningError( state, - EnergyPlus::format( - "GetConnectorListInput: Invalid {}={} in {}={}", cAlphaFields(Arg), Alphas(Arg), CurrentModuleObject, Alphas(1))); + std::format("GetConnectorListInput: Invalid {}={} in {}={}", cAlphaFields(Arg), Alphas(Arg), CurrentModuleObject, Alphas(1))); } state.dataBranchInputManager->ConnectorLists(Count).ConnectorName(CCount) = Alphas(Arg + 1); } @@ -1567,10 +1564,10 @@ namespace BranchInputManager { // Following code sets up branch names to be matched from Splitter/Mixer data structure if (SplitNum == 0) { ShowSevereError(state, - EnergyPlus::format("Invalid Connector:Splitter(none)={}, referenced by {}={}", - state.dataBranchInputManager->ConnectorLists(Count).ConnectorName(Loop), - CurrentModuleObject, - state.dataBranchInputManager->ConnectorLists(Count).Name)); + std::format("Invalid Connector:Splitter(none)={}, referenced by {}={}", + state.dataBranchInputManager->ConnectorLists(Count).ConnectorName(Loop), + CurrentModuleObject, + state.dataBranchInputManager->ConnectorLists(Count).Name)); ErrorsFound = true; continue; } @@ -1583,10 +1580,10 @@ namespace BranchInputManager { state.dataBranchInputManager->Mixers); if (MixerNum == 0) { ShowSevereError(state, - EnergyPlus::format("Invalid Connector:Mixer(none)={}, referenced by {}={}", - state.dataBranchInputManager->ConnectorLists(Count).ConnectorName(Loop), - CurrentModuleObject, - state.dataBranchInputManager->ConnectorLists(Count).Name)); + std::format("Invalid Connector:Mixer(none)={}, referenced by {}={}", + state.dataBranchInputManager->ConnectorLists(Count).ConnectorName(Loop), + CurrentModuleObject, + state.dataBranchInputManager->ConnectorLists(Count).Name)); ErrorsFound = true; continue; } @@ -1672,12 +1669,11 @@ namespace BranchInputManager { continue; } // = 0, not matched. - ShowSevereError(state, - EnergyPlus::format("For {}={}", CurrentModuleObject, state.dataBranchInputManager->ConnectorLists(Count).Name)); + ShowSevereError(state, std::format("For {}={}", CurrentModuleObject, state.dataBranchInputManager->ConnectorLists(Count).Name)); ShowContinueError(state, - EnergyPlus::format("...Item={}, Type={} was not matched.", - state.dataBranchInputManager->ConnectorLists(Count).ConnectorName(Loop), - state.dataBranchInputManager->ConnectorLists(Count).ConnectorType(Loop))); + std::format("...Item={}, Type={} was not matched.", + state.dataBranchInputManager->ConnectorLists(Count).ConnectorName(Loop), + state.dataBranchInputManager->ConnectorLists(Count).ConnectorType(Loop))); if (Util::SameString(state.dataBranchInputManager->ConnectorLists(Count).ConnectorType(Loop), "Connector:Splitter")) { ShowContinueError( state, "The BranchList for this Connector:Splitter does not match the BranchList for its corresponding Connector:Mixer."); @@ -1797,10 +1793,10 @@ namespace BranchInputManager { int Found = Util::FindItemInList(state.dataBranchInputManager->Splitters(Count).InletBranchName, state.dataBranchInputManager->Branch); if (Found == 0) { ShowSevereError(state, - EnergyPlus::format("GetSplitterInput: Invalid Branch={}, referenced as Inlet Branch to {}={}", - state.dataBranchInputManager->Splitters(Count).InletBranchName, - CurrentModuleObject, - state.dataBranchInputManager->Splitters(Count).Name)); + std::format("GetSplitterInput: Invalid Branch={}, referenced as Inlet Branch to {}={}", + state.dataBranchInputManager->Splitters(Count).InletBranchName, + CurrentModuleObject, + state.dataBranchInputManager->Splitters(Count).Name)); ErrorsFound = true; } for (Loop = 1; Loop <= state.dataBranchInputManager->Splitters(Count).NumOutletBranches; ++Loop) { @@ -1808,7 +1804,7 @@ namespace BranchInputManager { state.dataBranchInputManager->Branch); if (Found == 0) { ShowSevereError(state, - fmt::format("GetSplitterInput: Invalid Branch={}, referenced as Outlet Branch # {} to {}={}", + std::format("GetSplitterInput: Invalid Branch={}, referenced as Outlet Branch # {} to {}={}", state.dataBranchInputManager->Splitters(Count).OutletBranchNames(Loop), Loop, CurrentModuleObject, @@ -1826,11 +1822,11 @@ namespace BranchInputManager { continue; } ShowSevereError(state, - EnergyPlus::format("{}={} specifies an outlet node name the same as the inlet node.", - CurrentModuleObject, - state.dataBranchInputManager->Splitters(Count).Name)); - ShowContinueError(state, EnergyPlus::format("..Inlet Node={}", TestName)); - ShowContinueError(state, fmt::format("..Outlet Node #{} is duplicate.", Loop)); + std::format("{}={} specifies an outlet node name the same as the inlet node.", + CurrentModuleObject, + state.dataBranchInputManager->Splitters(Count).Name)); + ShowContinueError(state, std::format("..Inlet Node={}", TestName)); + ShowContinueError(state, std::format("..Outlet Node #{} is duplicate.", Loop)); ErrorsFound = true; } for (Loop = 1; Loop <= state.dataBranchInputManager->Splitters(Count).NumOutletBranches; ++Loop) { @@ -1840,20 +1836,20 @@ namespace BranchInputManager { continue; } ShowSevereError(state, - EnergyPlus::format("{}={} specifies duplicate outlet nodes in its outlet node list.", - CurrentModuleObject, - state.dataBranchInputManager->Splitters(Count).Name)); + std::format("{}={} specifies duplicate outlet nodes in its outlet node list.", + CurrentModuleObject, + state.dataBranchInputManager->Splitters(Count).Name)); ShowContinueError( state, - fmt::format("..Outlet Node #{} Name={}", Loop, state.dataBranchInputManager->Splitters(Count).OutletBranchNames(Loop))); - ShowContinueError(state, fmt::format("..Outlet Node #{} is duplicate.", Loop)); + std::format("..Outlet Node #{} Name={}", Loop, state.dataBranchInputManager->Splitters(Count).OutletBranchNames(Loop))); + ShowContinueError(state, std::format("..Outlet Node #{} is duplicate.", Loop)); ErrorsFound = true; } } } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("GetSplitterInput: Fatal Errors Found in {}, program terminates.", CurrentModuleObject)); + ShowFatalError(state, std::format("GetSplitterInput: Fatal Errors Found in {}, program terminates.", CurrentModuleObject)); } // Everything supposed to be good. Now make sure all branches in Splitter on same side of loop. @@ -1881,19 +1877,17 @@ namespace BranchInputManager { } else { ShowSevereError( state, - EnergyPlus::format( - "GetSplitterInput: Inlet Splitter Branch=\"{}\" and BranchList=\"{}\" not matched to a Air/Plant/Condenser Loop", - TestName, - BranchListName)); + std::format("GetSplitterInput: Inlet Splitter Branch=\"{}\" and BranchList=\"{}\" not matched to a Air/Plant/Condenser Loop", + TestName, + BranchListName)); ShowContinueError(state, "...and therefore, not a valid Loop Splitter."); - ShowContinueError(state, - EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); + ShowContinueError(state, std::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("GetSplitterInput: Inlet Splitter Branch=\"{}\" not on BranchList", TestName)); + ShowSevereError(state, std::format("GetSplitterInput: Inlet Splitter Branch=\"{}\" not on BranchList", TestName)); ShowContinueError(state, "...and therefore, not a valid Loop Splitter."); - ShowContinueError(state, EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); + ShowContinueError(state, std::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); ErrorsFound = true; } for (Loop = 1; Loop <= state.dataBranchInputManager->Splitters(Count).NumOutletBranches; ++Loop) { @@ -1914,42 +1908,38 @@ namespace BranchInputManager { FindAirPlantCondenserLoopFromBranchList(state, BranchListName, FoundLoop, FoundSupplyDemandAir, MatchedLoop); if (MatchedLoop) { if (SaveSupplyDemandAir != FoundSupplyDemandAir || SaveLoop != FoundLoop) { - ShowSevereError(state, - EnergyPlus::format( - "GetSplitterInput: Outlet Splitter Branch=\"{}\" does not match types of Inlet Branch.", TestName)); - ShowContinueError(state, - EnergyPlus::format("...Inlet Branch is on \"{}\" on \"{}\" side.", SaveLoop, SaveSupplyDemandAir)); - ShowContinueError(state, - EnergyPlus::format("...Outlet Branch is on \"{}\" on \"{}\" side.", FoundLoop, FoundSupplyDemandAir)); + ShowSevereError( + state, + std::format("GetSplitterInput: Outlet Splitter Branch=\"{}\" does not match types of Inlet Branch.", TestName)); + ShowContinueError(state, std::format("...Inlet Branch is on \"{}\" on \"{}\" side.", SaveLoop, SaveSupplyDemandAir)); + ShowContinueError(state, std::format("...Outlet Branch is on \"{}\" on \"{}\" side.", FoundLoop, FoundSupplyDemandAir)); ShowContinueError(state, "...All branches in Loop Splitter must be on same kind of loop and supply/demand side."); - ShowContinueError( - state, EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); + ShowContinueError(state, + std::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); ErrorsFound = true; } } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "GetSplitterInput: Outlet Splitter Branch=\"{}\" and BranchList=\"{}\" not matched to a Air/Plant/Condenser Loop", TestName, BranchListName)); ShowContinueError(state, "...and therefore, not a valid Loop Splitter."); - ShowContinueError(state, - EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); + ShowContinueError(state, std::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("GetSplitterInput: Outlet Splitter Branch=\"{}\" not on BranchList", TestName)); + ShowSevereError(state, std::format("GetSplitterInput: Outlet Splitter Branch=\"{}\" not on BranchList", TestName)); ShowContinueError(state, "...and therefore, not a valid Loop Splitter"); - ShowContinueError(state, - EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); + ShowContinueError(state, std::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Splitters(Count).Name)); ErrorsFound = true; } } } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("GetSplitterInput: Fatal Errors Found in {}, program terminates.", CurrentModuleObject)); + ShowFatalError(state, std::format("GetSplitterInput: Fatal Errors Found in {}, program terminates.", CurrentModuleObject)); } } @@ -2059,10 +2049,10 @@ namespace BranchInputManager { int Found = Util::FindItemInList(state.dataBranchInputManager->Mixers(Count).OutletBranchName, state.dataBranchInputManager->Branch); if (Found == 0) { ShowSevereError(state, - EnergyPlus::format("GetMixerInput: Invalid Branch={}, referenced as Outlet Branch in {}={}", - state.dataBranchInputManager->Mixers(Count).OutletBranchName, - CurrentModuleObject, - state.dataBranchInputManager->Mixers(Count).Name)); + std::format("GetMixerInput: Invalid Branch={}, referenced as Outlet Branch in {}={}", + state.dataBranchInputManager->Mixers(Count).OutletBranchName, + CurrentModuleObject, + state.dataBranchInputManager->Mixers(Count).Name)); ErrorsFound = true; } for (Loop = 1; Loop <= state.dataBranchInputManager->Mixers(Count).NumInletBranches; ++Loop) { @@ -2070,11 +2060,11 @@ namespace BranchInputManager { Util::FindItemInList(state.dataBranchInputManager->Mixers(Count).InletBranchNames(Loop), state.dataBranchInputManager->Branch); if (Found == 0) { ShowSevereError(state, - EnergyPlus::format("GetMixerInput: Invalid Branch={}, referenced as Inlet Branch # {} in {}={}", - state.dataBranchInputManager->Mixers(Count).InletBranchNames(Loop), - Loop, - CurrentModuleObject, - state.dataBranchInputManager->Mixers(Count).Name)); + std::format("GetMixerInput: Invalid Branch={}, referenced as Inlet Branch # {} in {}={}", + state.dataBranchInputManager->Mixers(Count).InletBranchNames(Loop), + Loop, + CurrentModuleObject, + state.dataBranchInputManager->Mixers(Count).Name)); ErrorsFound = true; } } @@ -2088,11 +2078,11 @@ namespace BranchInputManager { continue; } ShowSevereError(state, - EnergyPlus::format("{}={} specifies an inlet node name the same as the outlet node.", - CurrentModuleObject, - state.dataBranchInputManager->Mixers(Count).Name)); - ShowContinueError(state, EnergyPlus::format("..Outlet Node={}", TestName)); - ShowContinueError(state, EnergyPlus::format("..Inlet Node #{} is duplicate.", Loop)); + std::format("{}={} specifies an inlet node name the same as the outlet node.", + CurrentModuleObject, + state.dataBranchInputManager->Mixers(Count).Name)); + ShowContinueError(state, std::format("..Outlet Node={}", TestName)); + ShowContinueError(state, std::format("..Inlet Node #{} is duplicate.", Loop)); ErrorsFound = true; } for (Loop = 1; Loop <= state.dataBranchInputManager->Mixers(Count).NumInletBranches; ++Loop) { @@ -2102,19 +2092,19 @@ namespace BranchInputManager { continue; } ShowSevereError(state, - EnergyPlus::format("{}={} specifies duplicate inlet nodes in its inlet node list.", - CurrentModuleObject, - state.dataBranchInputManager->Mixers(Count).Name)); + std::format("{}={} specifies duplicate inlet nodes in its inlet node list.", + CurrentModuleObject, + state.dataBranchInputManager->Mixers(Count).Name)); ShowContinueError( - state, fmt::format("..Inlet Node #{} Name={}", Loop, state.dataBranchInputManager->Mixers(Count).InletBranchNames(Loop))); - ShowContinueError(state, fmt::format("..Inlet Node #{} is duplicate.", Loop)); + state, std::format("..Inlet Node #{} Name={}", Loop, state.dataBranchInputManager->Mixers(Count).InletBranchNames(Loop))); + ShowContinueError(state, std::format("..Inlet Node #{} is duplicate.", Loop)); ErrorsFound = true; } } } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("GetMixerInput: Fatal Errors Found in {}, program terminates.", CurrentModuleObject)); + ShowFatalError(state, std::format("GetMixerInput: Fatal Errors Found in {}, program terminates.", CurrentModuleObject)); } // Everything supposed to be good. Now make sure all branches in Splitter on same side of loop. @@ -2140,19 +2130,19 @@ namespace BranchInputManager { SaveSupplyDemandAir = FoundSupplyDemandAir; SaveLoop = FoundLoop; } else { - ShowSevereError(state, - EnergyPlus::format( - "GetMixerInput: Outlet Mixer Branch=\"{}\" and BranchList=\"{}\" not matched to a Air/Plant/Condenser Loop", - TestName, - BranchListName)); + ShowSevereError( + state, + std::format("GetMixerInput: Outlet Mixer Branch=\"{}\" and BranchList=\"{}\" not matched to a Air/Plant/Condenser Loop", + TestName, + BranchListName)); ShowContinueError(state, "...and therefore, not a valid Loop Mixer."); - ShowContinueError(state, EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); + ShowContinueError(state, std::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("GetMixerInput: Outlet Mixer Branch=\"{}\" not on BranchList", TestName)); + ShowSevereError(state, std::format("GetMixerInput: Outlet Mixer Branch=\"{}\" not on BranchList", TestName)); ShowContinueError(state, "...and therefore, not a valid Loop Mixer."); - ShowContinueError(state, EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); + ShowContinueError(state, std::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); ErrorsFound = true; } for (Loop = 1; Loop <= state.dataBranchInputManager->Mixers(Count).NumInletBranches; ++Loop) { @@ -2173,41 +2163,35 @@ namespace BranchInputManager { FindAirPlantCondenserLoopFromBranchList(state, BranchListName, FoundLoop, FoundSupplyDemandAir, MatchedLoop); if (MatchedLoop) { if (SaveSupplyDemandAir != FoundSupplyDemandAir || SaveLoop != FoundLoop) { - ShowSevereError( - state, - EnergyPlus::format("GetMixerInput: Outlet Mixer Branch=\"{}\" does not match types of Inlet Branch.", TestName)); - ShowContinueError(state, - EnergyPlus::format("...Outlet Branch is on \"{}\" on \"{}\" side.", SaveLoop, SaveSupplyDemandAir)); - ShowContinueError(state, - EnergyPlus::format("...Inlet Branch is on \"{}\" on \"{}\" side.", FoundLoop, FoundSupplyDemandAir)); + ShowSevereError(state, + std::format("GetMixerInput: Outlet Mixer Branch=\"{}\" does not match types of Inlet Branch.", TestName)); + ShowContinueError(state, std::format("...Outlet Branch is on \"{}\" on \"{}\" side.", SaveLoop, SaveSupplyDemandAir)); + ShowContinueError(state, std::format("...Inlet Branch is on \"{}\" on \"{}\" side.", FoundLoop, FoundSupplyDemandAir)); ShowContinueError(state, "...All branches in Loop Mixer must be on same kind of loop and supply/demand side."); - ShowContinueError(state, - EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); + ShowContinueError(state, std::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); ErrorsFound = true; } } else { ShowSevereError( state, - EnergyPlus::format( - "GetMixerInput: Inlet Mixer Branch=\"{}\" and BranchList=\"{}\" not matched to a Air/Plant/Condenser Loop", - TestName, - BranchListName)); + std::format("GetMixerInput: Inlet Mixer Branch=\"{}\" and BranchList=\"{}\" not matched to a Air/Plant/Condenser Loop", + TestName, + BranchListName)); ShowContinueError(state, "...and therefore, not a valid Loop Mixer."); - ShowContinueError(state, - EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); + ShowContinueError(state, std::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("GetMixerInput: Inlet Mixer Branch=\"{}\" not on BranchList", TestName)); + ShowSevereError(state, std::format("GetMixerInput: Inlet Mixer Branch=\"{}\" not on BranchList", TestName)); ShowContinueError(state, "...and therefore, not a valid Loop Mixer"); - ShowContinueError(state, EnergyPlus::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); + ShowContinueError(state, std::format("...{}={}", CurrentModuleObject, state.dataBranchInputManager->Mixers(Count).Name)); ErrorsFound = true; } } } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("GetMixerInput: Fatal Errors Found in {}, program terminates.", CurrentModuleObject)); + ShowFatalError(state, std::format("GetMixerInput: Fatal Errors Found in {}, program terminates.", CurrentModuleObject)); } } @@ -2507,16 +2491,16 @@ namespace BranchInputManager { ++NumDanglingCount; if (state.dataGlobal->DisplayExtraWarnings || mustprint) { if (mustprint) { - ShowContinueError(state, - EnergyPlus::format("AuditBranches: Branch=\"{}\" not found on any BranchLists.", - state.dataBranchInputManager->Branch(BrN).Name)); + ShowContinueError( + state, + std::format("AuditBranches: Branch=\"{}\" not found on any BranchLists.", state.dataBranchInputManager->Branch(BrN).Name)); if (!FoundBranchName.empty()) { ShowContinueError(state, EnergyPlus::format("Branch contains component, type=\"{}\", name=\"{}\"", CompType, CompName)); } } else { - ShowSevereMessage(state, - EnergyPlus::format("AuditBranches: Branch=\"{}\" not found on any BranchLists.", - state.dataBranchInputManager->Branch(BrN).Name)); + ShowSevereMessage( + state, + std::format("AuditBranches: Branch=\"{}\" not found on any BranchLists.", state.dataBranchInputManager->Branch(BrN).Name)); ++state.dataErrTracking->TotalSevereErrors; } } @@ -2526,7 +2510,7 @@ namespace BranchInputManager { ShowContinueError(state, "Look for mistyped branch or component names/types."); } if (!mustprint && NumDanglingCount > 0) { - ShowSevereMessage(state, fmt::format("AuditBranches: There are {} branch(es) that do not appear on any BranchList.", NumDanglingCount)); + ShowSevereMessage(state, std::format("AuditBranches: There are {} branch(es) that do not appear on any BranchList.", NumDanglingCount)); state.dataErrTracking->TotalSevereErrors += NumDanglingCount; ShowContinueError(state, "Use Output:Diagnostics,DisplayExtraWarnings; for detail of each branch not on a branch list."); } @@ -2623,8 +2607,7 @@ namespace BranchInputManager { FoundBranches(Count) = Found; BranchPtrs(Count) = NumNodesOnBranchList; } else { - ShowSevereError(state, - EnergyPlus::format("Branch not found={}", state.dataBranchInputManager->BranchList(BCount).BranchNames(Count))); + ShowSevereError(state, std::format("Branch not found={}", state.dataBranchInputManager->BranchList(BCount).BranchNames(Count))); ErrFound = true; } } @@ -2652,7 +2635,7 @@ namespace BranchInputManager { MatchNodeName = state.dataBranchInputManager->Branch(Found).Component(1).InletNodeName; BranchInletNodeName = state.dataBranchInputManager->Branch(Found).Component(1).InletNodeName; } else { - ShowWarningError(state, EnergyPlus::format("Branch has no components={}", state.dataBranchInputManager->Branch(Found).Name)); + ShowWarningError(state, std::format("Branch has no components={}", state.dataBranchInputManager->Branch(Found).Name)); } NumErr = 0; for (Loop = 1; Loop <= state.dataBranchInputManager->Branch(Found).NumOfComponents; ++Loop) { @@ -2691,13 +2674,11 @@ namespace BranchInputManager { BranchFluidNodes(NumFluidNodes) = state.dataBranchInputManager->Branch(Found).Component(Loop).OutletNode; } if (state.dataBranchInputManager->Branch(Found).Component(Loop).InletNode != MatchNode) { - ShowSevereError(state, - EnergyPlus::format("Error Detected in BranchList={}", state.dataBranchInputManager->BranchList(BCount).Name)); + ShowSevereError(state, std::format("Error Detected in BranchList={}", state.dataBranchInputManager->BranchList(BCount).Name)); + ShowContinueError(state, std::format("Actual Error occurs in Branch={}", state.dataBranchInputManager->Branch(Found).Name)); + ShowContinueError(state, std::format("Branch Outlet does not match Inlet, Outlet={}", MatchNodeName)); ShowContinueError(state, - EnergyPlus::format("Actual Error occurs in Branch={}", state.dataBranchInputManager->Branch(Found).Name)); - ShowContinueError(state, EnergyPlus::format("Branch Outlet does not match Inlet, Outlet={}", MatchNodeName)); - ShowContinueError( - state, EnergyPlus::format("Inlet Name={}", state.dataBranchInputManager->Branch(Found).Component(Loop).InletNodeName)); + std::format("Inlet Name={}", state.dataBranchInputManager->Branch(Found).Component(Loop).InletNodeName)); ErrFound = true; ++NumErr; } else { @@ -2729,25 +2710,23 @@ namespace BranchInputManager { } if (MixedFluidTypesOnBranchList) { ShowSevereError( - state, - EnergyPlus::format("BranchList={} has mixed fluid types in its nodes.", state.dataBranchInputManager->BranchList(BCount).Name)); + state, std::format("BranchList={} has mixed fluid types in its nodes.", state.dataBranchInputManager->BranchList(BCount).Name)); ErrFound = true; if (OriginalBranchFluidType.empty()) { OriginalBranchFluidType = "**Unknown**"; } - ShowContinueError(state, - EnergyPlus::format("Initial Node={}, Fluid Type={}", - state.dataLoopNodes->NodeID(InitialBranchFluidNode), - OriginalBranchFluidType)); + ShowContinueError( + state, + std::format("Initial Node={}, Fluid Type={}", state.dataLoopNodes->NodeID(InitialBranchFluidNode), OriginalBranchFluidType)); ShowContinueError(state, "BranchList Topology - Note nodes which do not match that fluid type:"); Ptr = 1; EndPtr = BranchPtrs(1); for (Loop = 1; Loop <= state.dataBranchInputManager->BranchList(BCount).NumOfBranchNames; ++Loop) { if (FoundBranches(Loop) != 0) { - ShowContinueError(state, EnergyPlus::format("..Branch={}", state.dataBranchInputManager->Branch(FoundBranches(Loop)).Name)); + ShowContinueError(state, std::format("..Branch={}", state.dataBranchInputManager->Branch(FoundBranches(Loop)).Name)); } else { - ShowContinueError( - state, EnergyPlus::format("..Illegal Branch={}", state.dataBranchInputManager->BranchList(BCount).BranchNames(Loop))); + ShowContinueError(state, + std::format("..Illegal Branch={}", state.dataBranchInputManager->BranchList(BCount).BranchNames(Loop))); continue; } for (Loop2 = Ptr; Loop2 <= EndPtr; ++Loop2) { @@ -2756,8 +2735,7 @@ namespace BranchInputManager { cBranchFluidType = "**Unknown**"; } ShowContinueError( - state, - EnergyPlus::format("....Node={}, Fluid Type={}", state.dataLoopNodes->NodeID(BranchFluidNodes(Loop2)), cBranchFluidType)); + state, std::format("....Node={}, Fluid Type={}", state.dataLoopNodes->NodeID(BranchFluidNodes(Loop2)), cBranchFluidType)); } Ptr = EndPtr + 1; EndPtr = BranchPtrs(Loop + 1); @@ -2795,11 +2773,9 @@ namespace BranchInputManager { Found = Util::FindItemInList( BranchNodes(Count).UniqueNodeNames(Loop2), BranchNodes(Loop).UniqueNodeNames, BranchNodes(Loop).NumNodes); if (Found != 0) { - ShowSevereError(state, EnergyPlus::format("Non-unique node name found, name={}", BranchNodes(Count).UniqueNodeNames(Loop2))); - ShowContinueError(state, - EnergyPlus::format("..1st occurrence in Branch={}", state.dataBranchInputManager->Branch(Count).Name)); - ShowContinueError(state, - EnergyPlus::format("..duplicate occurrence in Branch={}", state.dataBranchInputManager->Branch(Loop).Name)); + ShowSevereError(state, std::format("Non-unique node name found, name={}", BranchNodes(Count).UniqueNodeNames(Loop2))); + ShowContinueError(state, std::format("..1st occurrence in Branch={}", state.dataBranchInputManager->Branch(Count).Name)); + ShowContinueError(state, std::format("..duplicate occurrence in Branch={}", state.dataBranchInputManager->Branch(Loop).Name)); ErrFound = true; } } @@ -2830,22 +2806,22 @@ namespace BranchInputManager { continue; } ++BCount; - ShowWarningError(state, EnergyPlus::format("Orphan Branch=\"{}\".", state.dataBranchInputManager->Branch(Count).Name)); + ShowWarningError(state, std::format("Orphan Branch=\"{}\".", state.dataBranchInputManager->Branch(Count).Name)); if (state.dataBranchInputManager->Branch(Count).NumOfComponents > 0) { MatchNode = state.dataBranchInputManager->Branch(Count).Component(1).InletNode; MatchNodeName = state.dataBranchInputManager->Branch(Count).Component(1).InletNodeName; BranchInletNodeName = state.dataBranchInputManager->Branch(Count).Component(1).InletNodeName; } else { - ShowWarningError(state, EnergyPlus::format("Branch has no components={}", state.dataBranchInputManager->Branch(Count).Name)); + ShowWarningError(state, std::format("Branch has no components={}", state.dataBranchInputManager->Branch(Count).Name)); } NumErr = 0; for (Loop = 1; Loop <= state.dataBranchInputManager->Branch(Count).NumOfComponents; ++Loop) { if (state.dataBranchInputManager->Branch(Count).Component(Loop).InletNode != MatchNode) { - ShowSevereError(state, EnergyPlus::format("Error Detected in Branch={}", state.dataBranchInputManager->Branch(Count).Name)); - ShowContinueError(state, EnergyPlus::format("Branch Outlet does not match Inlet, Outlet={}", MatchNodeName)); - ShowContinueError( - state, EnergyPlus::format("Inlet Name={}", state.dataBranchInputManager->Branch(Count).Component(Loop).InletNodeName)); + ShowSevereError(state, std::format("Error Detected in Branch={}", state.dataBranchInputManager->Branch(Count).Name)); + ShowContinueError(state, std::format("Branch Outlet does not match Inlet, Outlet={}", MatchNodeName)); + ShowContinueError(state, + std::format("Inlet Name={}", state.dataBranchInputManager->Branch(Count).Component(Loop).InletNodeName)); ErrFound = true; ++NumErr; } else { diff --git a/src/EnergyPlus/BranchNodeConnections.cc b/src/EnergyPlus/BranchNodeConnections.cc index 1dec3fac593..eda270272a0 100644 --- a/src/EnergyPlus/BranchNodeConnections.cc +++ b/src/EnergyPlus/BranchNodeConnections.cc @@ -45,6 +45,9 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + // ObjexxFCL Headers #include #include @@ -756,9 +759,9 @@ void RegisterNodeConnection(EnergyPlusData &state, &Node::EqNodeConnectionDef::NodeName, state.dataBranchNodeConnections->NumOfAirTerminalNodes - 1); if (Found != 0) { // Nodename already used - ShowSevereError(state, fmt::format("{}{}=\"{}\" node name duplicated", RoutineName, ObjectType, ObjectName)); + ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" node name duplicated", RoutineName, objTypeStr, ObjectName)); ShowContinueError(state, EnergyPlus::format("NodeName=\"{}\", entered as type={}", NodeName, conTypeStr)); - ShowContinueError(state, fmt::format("In Field={}", InputFieldName)); + ShowContinueError(state, EnergyPlus::format("In Field={}", InputFieldName)); ShowContinueError(state, EnergyPlus::format("NodeName=\"{}\", entered as type={}", NodeName, @@ -787,7 +790,7 @@ void RegisterNodeConnection(EnergyPlusData &state, InputFieldName; } } else { - ShowSevereError(state, fmt::format("{}{} , Developer Error: Input Field Name not included.", RoutineName, objTypeStr)); + ShowSevereError(state, EnergyPlus::format("{}{} , Developer Error: Input Field Name not included.", RoutineName, objTypeStr)); ShowContinueError(state, "Node names not checked for duplication."); } } @@ -1023,30 +1026,29 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) if (!IsValid) { ShowSevereError( state, - EnergyPlus::format("Node Connection Error, Node=\"{}\", Setpoint node did not find a matching node of appropriate type (other than " - "Setpoint, OutsideAir).", - state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); + std::format("Node Connection Error, Node=\"{}\", Setpoint node did not find a matching node of appropriate type (other than " + "Setpoint, OutsideAir).", + state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); ShowContinueError( state, - EnergyPlus::format("Reference Object={}, Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); + std::format("Reference Object={}, Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; ErrorsFound = true; } if (!IsInlet && !IsOutlet) { - ShowSevereError( - state, - EnergyPlus::format("Node Connection Error, Node=\"{}\", Setpoint node did not find a matching node of type Inlet or Outlet.", - state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); + ShowSevereError(state, + std::format("Node Connection Error, Node=\"{}\", Setpoint node did not find a matching node of type Inlet or Outlet.", + state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); ShowContinueError(state, "It appears this node is not part of the HVAC system."); ShowContinueError( state, - EnergyPlus::format("Reference Object={}, Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); + std::format("Reference Object={}, Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; } } @@ -1074,14 +1076,14 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) } if (!IsValid) { ShowSevereError(state, - EnergyPlus::format("Node Connection Error, Node=\"{}\", ZoneInlet node did not find an outlet node.", - state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); + std::format("Node Connection Error, Node=\"{}\", ZoneInlet node did not find an outlet node.", + state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); ShowContinueError( state, - EnergyPlus::format("Reference Object={}, Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); + std::format("Reference Object={}, Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; } } @@ -1107,14 +1109,14 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) } if (!IsValid) { ShowSevereError(state, - EnergyPlus::format("Node Connection Error, Node=\"{}\", ZoneExhaust node did not find a matching inlet node.", - state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); + std::format("Node Connection Error, Node=\"{}\", ZoneExhaust node did not find a matching inlet node.", + state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); ShowContinueError( state, - EnergyPlus::format("Reference Object={}, Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); + std::format("Reference Object={}, Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; } } @@ -1141,14 +1143,14 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) if (!IsValid) { ShowSevereError( state, - EnergyPlus::format("Node Connection Error, Node=\"{}\", Return plenum induced air outlet node did not find a matching inlet node.", - state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); + std::format("Node Connection Error, Node=\"{}\", Return plenum induced air outlet node did not find a matching inlet node.", + state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); ShowContinueError( state, - EnergyPlus::format("Reference Object={}, Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); + std::format("Reference Object={}, Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; ErrorsFound = true; } @@ -1199,17 +1201,17 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) } if (!IsValid && !MatchedAtLeastOne) { ShowSevereError(state, - EnergyPlus::format("{}{}{}", - "Node Connection Error, Node=\"", - state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName, - R"(", Inlet node did not find an appropriate matching "outlet" node.)")); + std::format("{}{}{}", + "Node Connection Error, Node=\"", + state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName, + R"(", Inlet node did not find an appropriate matching "outlet" node.)")); ShowContinueError(state, "If this is an outdoor air inlet node, it must be listed in an OutdoorAir:Node or OutdoorAir:NodeList object."); ShowContinueError( state, - EnergyPlus::format("Reference Object={}, Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); + std::format("Reference Object={}, Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; } } @@ -1235,22 +1237,21 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) } if (state.dataBranchNodeConnections->NodeConnections(Loop2).NodeNumber == state.dataBranchNodeConnections->NodeConnections(Loop1).NodeNumber) { - ShowSevereError( - state, - EnergyPlus::format("Node Connection Error, Node=\"{}\", The same node appears as a non-parent Inlet node more than once.", - state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); + ShowSevereError(state, + std::format("Node Connection Error, Node=\"{}\", The same node appears as a non-parent Inlet node more than once.", + state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); - ShowContinueError(state, - EnergyPlus::format( - "Reference Object={}, Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); + ShowContinueError( + state, + std::format("Reference Object={}, Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); - ShowContinueError(state, - EnergyPlus::format( - "Reference Object={}, Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectName)); + ShowContinueError( + state, + std::format("Reference Object={}, Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectName)); ++ErrorCounter; break; } @@ -1280,22 +1281,21 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) if (state.dataBranchNodeConnections->NodeConnections(Loop2).NodeNumber == state.dataBranchNodeConnections->NodeConnections(Loop1).NodeNumber) { // Skip if one of the - ShowSevereError( - state, - EnergyPlus::format("Node Connection Error, Node=\"{}\", The same node appears as a non-parent Outlet node more than once.", - state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); + ShowSevereError(state, + std::format("Node Connection Error, Node=\"{}\", The same node appears as a non-parent Outlet node more than once.", + state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); - ShowContinueError(state, - EnergyPlus::format( - "Reference Object={}, Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); + ShowContinueError( + state, + std::format("Reference Object={}, Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); - ShowContinueError(state, - EnergyPlus::format( - "Reference Object={}, Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectName)); + ShowContinueError( + state, + std::format("Reference Object={}, Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectName)); ++ErrorCounter; break; @@ -1325,17 +1325,17 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) } if (!IsValid) { ShowSevereError(state, - EnergyPlus::format("{}{}{}", - "Node Connection Error, Node=\"", - state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName, - R"(", Outdoor Air Reference did not find an appropriate "outdoor air" node.)")); + std::format("{}{}{}", + "Node Connection Error, Node=\"", + state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName, + R"(", Outdoor Air Reference did not find an appropriate "outdoor air" node.)")); ShowContinueError(state, "This node must be listed in an OutdoorAir:Node or OutdoorAir:NodeList object in order to set its conditions."); ShowContinueError( state, - EnergyPlus::format("Reference Object={}, Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); + std::format("Reference Object={}, Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ++ErrorCounter; } @@ -1407,16 +1407,16 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) } if (!IsValid) { - ShowSevereError(state, - EnergyPlus::format( - "(Developer) Node Connection Error, Object={}:{}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); + ShowSevereError( + state, + std::format("(Developer) Node Connection Error, Object={}:{}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); ShowContinueError(state, "Object has multiple connections on both inlet and outlet fluid streams."); for (int Loop2 = 1; Loop2 <= MaxFluidStream; ++Loop2) { if (FluidStreamCounts(Loop2)) { - ShowContinueError(state, EnergyPlus::format("...occurs in Fluid Stream [{}].", Loop2)); + ShowContinueError(state, std::format("...occurs in Fluid Stream [{}].", Loop2)); } } ++ErrorCounter; @@ -1449,20 +1449,20 @@ void CheckNodeConnections(EnergyPlusData &state, bool &ErrorsFound) } ShowSevereError(state, - EnergyPlus::format("Node Connection Error, Node Name=\"{}\", The same zone node appears more than once.", - state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); + std::format("Node Connection Error, Node Name=\"{}\", The same zone node appears more than once.", + state.dataBranchNodeConnections->NodeConnections(Loop1).NodeName)); - ShowContinueError(state, - EnergyPlus::format( - "Reference Object={}, Object Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); + ShowContinueError( + state, + std::format("Reference Object={}, Object Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop1).ObjectName)); - ShowContinueError(state, - EnergyPlus::format( - "Reference Object={}, Object Name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectType)], - state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectName)); + ShowContinueError( + state, + std::format("Reference Object={}, Object Name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectType)], + state.dataBranchNodeConnections->NodeConnections(Loop2).ObjectName)); ++ErrorCounter; ErrorsFound = true; @@ -1580,16 +1580,16 @@ void GetParentData(EnergyPlusData &state, } else { ErrInObject = true; ShowWarningError(state, - EnergyPlus::format("GetParentData: Component Type={}, Component Name={} not found.", - ConnectionObjectTypeNames[static_cast(ComponentType)], - ComponentName)); + std::format("GetParentData: Component Type={}, Component Name={} not found.", + ConnectionObjectTypeNames[static_cast(ComponentType)], + ComponentName)); } } else { ErrInObject = true; ShowWarningError(state, - EnergyPlus::format("GetParentData: Component Type={}, Component Name={} not found.", - ConnectionObjectTypeNames[static_cast(ComponentType)], - ComponentName)); + std::format("GetParentData: Component Type={}, Component Name={} not found.", + ConnectionObjectTypeNames[static_cast(ComponentType)], + ComponentName)); } if (ErrInObject) { @@ -1824,16 +1824,16 @@ void GetChildrenData(EnergyPlusData &state, if (!Node::IsParentObject(state, ComponentType, ComponentName)) { ShowWarningError(state, - EnergyPlus::format("GetChildrenData: Requested Children Data for non Parent Node={}:{}.", - ConnectionObjectTypeNames[static_cast(ComponentType)], - ComponentName)); + std::format("GetChildrenData: Requested Children Data for non Parent Node={}:{}.", + ConnectionObjectTypeNames[static_cast(ComponentType)], + ComponentName)); ErrorsFound = true; } else if ((NumChildren = Node::GetNumChildren(state, ComponentType, ComponentName)) == 0) { ShowWarningError(state, - EnergyPlus::format("GetChildrenData: Parent Node has no children, node={}:{}.", - ConnectionObjectTypeNames[static_cast(ComponentType)], - ComponentName)); + std::format("GetChildrenData: Parent Node has no children, node={}:{}.", + ConnectionObjectTypeNames[static_cast(ComponentType)], + ComponentName)); } else { int ParentInletNodeNum; @@ -2128,21 +2128,21 @@ void SetUpCompSets(EnergyPlusData &state, } } if (Found2 == 0) { - ShowWarningError(state, EnergyPlus::format("Node used as an inlet more than once: {}", InletNode)); + ShowWarningError(state, std::format("Node used as an inlet more than once: {}", InletNode)); ShowContinueError( state, - EnergyPlus::format( + std::format( " Used by: {}, name={}", ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)], state.dataBranchNodeConnections->CompSets(Count).ParentCName)); ShowContinueError( state, - EnergyPlus::format( + std::format( " as inlet for: {}, name={}", ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], state.dataBranchNodeConnections->CompSets(Count).CName)); - ShowContinueError(state, EnergyPlus::format("{}{}{}", " and by : ", ParentTypeUC + ", name=", ParentName)); - ShowContinueError(state, EnergyPlus::format("{}{}{}", " as inlet for: ", CompTypeUC + ", name=", CompName)); + ShowContinueError(state, std::format("{}{}{}", " and by : ", ParentTypeUC + ", name=", ParentName)); + ShowContinueError(state, std::format("{}{}{}", " as inlet for: ", CompTypeUC + ", name=", CompName)); } } } @@ -2184,21 +2184,21 @@ void SetUpCompSets(EnergyPlusData &state, std::string_view const CType = ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)]; if ((!has_prefixi(CType, "AirTerminal:DualDuct:")) && (!has_prefixi(CompTypeUC, "AirTerminal:DualDuct:"))) { - ShowWarningError(state, EnergyPlus::format("Node used as an outlet more than once: {}", OutletNode)); + ShowWarningError(state, std::format("Node used as an outlet more than once: {}", OutletNode)); ShowContinueError( state, - EnergyPlus::format( + std::format( " Used by: {}, name={}", ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)], state.dataBranchNodeConnections->CompSets(Count).ParentCName)); ShowContinueError( state, - EnergyPlus::format( + std::format( " as outlet for: {}, name={}", ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], state.dataBranchNodeConnections->CompSets(Count).CName)); - ShowContinueError(state, EnergyPlus::format("{}{}{}", " and by : ", ParentTypeUC + ", name=", ParentName)); - ShowContinueError(state, EnergyPlus::format("{}{}{}", " as outlet for: ", CompTypeUC + ", name=", CompName)); + ShowContinueError(state, std::format("{}{}{}", " and by : ", ParentTypeUC + ", name=", ParentName)); + ShowContinueError(state, std::format("{}{}{}", " as outlet for: ", CompTypeUC + ", name=", CompName)); } } } @@ -2268,30 +2268,27 @@ void TestInletOutletNodes(EnergyPlusData &state) state.dataBranchNodeConnections->CompSets(Count).OutletNodeName != state.dataBranchNodeConnections->CompSets(Other).OutletNodeName) { AlreadyNoted(Other) = true; ShowWarningError( - state, - EnergyPlus::format("Node used as an inlet more than once: {}", state.dataBranchNodeConnections->CompSets(Count).InletNodeName)); + state, std::format("Node used as an inlet more than once: {}", state.dataBranchNodeConnections->CompSets(Count).InletNodeName)); ShowContinueError( state, - EnergyPlus::format(" Used by: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)], - state.dataBranchNodeConnections->CompSets(Count).ParentCName)); + std::format(" Used by: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)], + state.dataBranchNodeConnections->CompSets(Count).ParentCName)); ShowContinueError( state, - EnergyPlus::format( - " as inlet for: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ComponentObjectType)], - state.dataBranchNodeConnections->CompSets(Other).CName)); + std::format(" as inlet for: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ComponentObjectType)], + state.dataBranchNodeConnections->CompSets(Other).CName)); ShowContinueError( state, - EnergyPlus::format(" and by: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ParentObjectType)], - state.dataBranchNodeConnections->CompSets(Other).ParentCName)); + std::format(" and by: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ParentObjectType)], + state.dataBranchNodeConnections->CompSets(Other).ParentCName)); ShowContinueError( state, - EnergyPlus::format( - " as inlet for: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], - state.dataBranchNodeConnections->CompSets(Count).CName)); + std::format(" as inlet for: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], + state.dataBranchNodeConnections->CompSets(Count).CName)); } } } @@ -2315,30 +2312,27 @@ void TestInletOutletNodes(EnergyPlusData &state) state.dataBranchNodeConnections->CompSets(Count).InletNodeName != state.dataBranchNodeConnections->CompSets(Other).InletNodeName) { AlreadyNoted(Other) = true; ShowWarningError( - state, - EnergyPlus::format("Node used as an outlet more than once: {}", state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); + state, std::format("Node used as an outlet more than once: {}", state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); ShowContinueError( state, - EnergyPlus::format(" Used by: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)], - state.dataBranchNodeConnections->CompSets(Count).ParentCName)); + std::format(" Used by: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)], + state.dataBranchNodeConnections->CompSets(Count).ParentCName)); ShowContinueError( state, - EnergyPlus::format( - " as outlet for: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ComponentObjectType)], - state.dataBranchNodeConnections->CompSets(Other).CName)); + std::format(" as outlet for: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ComponentObjectType)], + state.dataBranchNodeConnections->CompSets(Other).CName)); ShowContinueError( state, - EnergyPlus::format(" and by: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ParentObjectType)], - state.dataBranchNodeConnections->CompSets(Other).ParentCName)); + std::format(" and by: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Other).ParentObjectType)], + state.dataBranchNodeConnections->CompSets(Other).ParentCName)); ShowContinueError( state, - EnergyPlus::format( - " as outlet for: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], - state.dataBranchNodeConnections->CompSets(Count).CName)); + std::format(" as outlet for: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], + state.dataBranchNodeConnections->CompSets(Count).CName)); } } } @@ -2478,21 +2472,21 @@ void TestCompSetInletOutletNodes(EnergyPlusData &state, bool &ErrorsFound) ShowSevereError(state, "Same component name and type has differing Node Names."); ShowContinueError( state, - EnergyPlus::format(" Component: {}, name={}", - ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], - state.dataBranchNodeConnections->CompSets(Count).CName)); + std::format(" Component: {}, name={}", + ConnectionObjectTypeNames[static_cast(state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType)], + state.dataBranchNodeConnections->CompSets(Count).CName)); ShowContinueError(state, - EnergyPlus::format(" Nodes, inlet: {}, outlet: {}", - state.dataBranchNodeConnections->CompSets(Count).InletNodeName, - state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); + std::format(" Nodes, inlet: {}, outlet: {}", + state.dataBranchNodeConnections->CompSets(Count).InletNodeName, + state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); ShowContinueError(state, - EnergyPlus::format(" & Nodes, inlet: {}, outlet: {}", - state.dataBranchNodeConnections->CompSets(Other).InletNodeName, - state.dataBranchNodeConnections->CompSets(Other).OutletNodeName)); + std::format(" & Nodes, inlet: {}, outlet: {}", + state.dataBranchNodeConnections->CompSets(Other).InletNodeName, + state.dataBranchNodeConnections->CompSets(Other).OutletNodeName)); ShowContinueError(state, - EnergyPlus::format(" Node Types: {} & {}", - state.dataBranchNodeConnections->CompSets(Count).Description, - state.dataBranchNodeConnections->CompSets(Other).Description)); + std::format(" Node Types: {} & {}", + state.dataBranchNodeConnections->CompSets(Count).Description, + state.dataBranchNodeConnections->CompSets(Other).Description)); ErrorsFound = true; } } @@ -2533,7 +2527,7 @@ void GetNodeConnectionType(EnergyPlusData &state, int const NodeNumber, EPVector } } else { if (NodeNumber > 0) { - ShowWarningError(state, EnergyPlus::format("Node not found = {}.", state.dataLoopNodes->NodeID(NodeNumber))); + ShowWarningError(state, std::format("Node not found = {}.", state.dataLoopNodes->NodeID(NodeNumber))); } else { ShowWarningError(state, "Invalid node number passed = 0."); } diff --git a/src/EnergyPlus/ChilledCeilingPanelSimple.cc b/src/EnergyPlus/ChilledCeilingPanelSimple.cc index 27664b71daf..825e2df65f9 100644 --- a/src/EnergyPlus/ChilledCeilingPanelSimple.cc +++ b/src/EnergyPlus/ChilledCeilingPanelSimple.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -382,7 +383,7 @@ void GetCoolingPanelInput(EnergyPlusData &state) thisCP.ScaledCoolingCapacity = s_ipsc->rNumericArgs(4); if (thisCP.ScaledCoolingCapacity < 0.0 && thisCP.ScaledCoolingCapacity != DataSizing::AutoSize) { ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", s_ipsc->cNumericFieldNames(4), s_ipsc->rNumericArgs(4))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7f}", s_ipsc->cNumericFieldNames(4), s_ipsc->rNumericArgs(4))); ErrorsFound = true; } } else { @@ -400,18 +401,18 @@ void GetCoolingPanelInput(EnergyPlusData &state) if (thisCP.ScaledCoolingCapacity < 0.0) { ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); ShowContinueError(state, EnergyPlus::format("Input for {} = {}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", s_ipsc->cNumericFieldNames(5), s_ipsc->rNumericArgs(5))); + ShowContinueError(state, std::format("Illegal {} = {:.7f}", s_ipsc->cNumericFieldNames(5), s_ipsc->rNumericArgs(5))); ErrorsFound = true; } else if (thisCP.ScaledCoolingCapacity == DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = Autosize", s_ipsc->cNumericFieldNames(5))); + ShowSevereError(state, std::format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); + ShowContinueError(state, std::format("Input for {} = {}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); + ShowContinueError(state, std::format("Illegal {} = Autosize", s_ipsc->cNumericFieldNames(5))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(5))); + ShowSevereError(state, std::format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); + ShowContinueError(state, std::format("Input for {} = {}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); + ShowContinueError(state, std::format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(5))); ErrorsFound = true; } } else if (Util::SameString(s_ipsc->cAlphaArgs(5), "FractionOfAutosizedCoolingCapacity")) { @@ -419,39 +420,39 @@ void GetCoolingPanelInput(EnergyPlusData &state) if (!s_ipsc->lNumericFieldBlanks(6)) { thisCP.ScaledCoolingCapacity = s_ipsc->rNumericArgs(6); if (thisCP.ScaledCoolingCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", s_ipsc->cNumericFieldNames(6), s_ipsc->rNumericArgs(6))); + ShowSevereError(state, std::format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); + ShowContinueError(state, std::format("Illegal {} = {:.7f}", s_ipsc->cNumericFieldNames(6), s_ipsc->rNumericArgs(6))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(6))); + ShowSevereError(state, std::format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); + ShowContinueError(state, std::format("Input for {} = {}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); + ShowContinueError(state, std::format("Blank field not allowed for {}", s_ipsc->cNumericFieldNames(6))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); + ShowSevereError(state, std::format("{} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); + ShowContinueError(state, std::format("Illegal {} = {}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); ErrorsFound = true; } thisCP.WaterVolFlowRateMax = s_ipsc->rNumericArgs(7); if ((thisCP.WaterVolFlowRateMax <= MinWaterFlowRate) && thisCP.WaterVolFlowRateMax != DataSizing::AutoSize) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was less than the allowable minimum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(7))); + std::format("{}{}=\"{}\", {} was less than the allowable minimum.", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(7))); ShowContinueError(state, EnergyPlus::format("...reset to minimum value=[{:.2R}].", MinWaterFlowRate)); thisCP.WaterVolFlowRateMax = MinWaterFlowRate; } else if (thisCP.WaterVolFlowRateMax > MaxWaterFlowRate) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(7))); + std::format("{}{}=\"{}\", {} was higher than the allowable maximum.", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(7))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MaxWaterFlowRate)); thisCP.WaterVolFlowRateMax = MaxWaterFlowRate; } @@ -472,16 +473,16 @@ void GetCoolingPanelInput(EnergyPlusData &state) } else if (Util::SameString(s_ipsc->cAlphaArgs(6), ZoneConvectiveLoad)) { thisCP.controlType = ClgPanelCtrlType::ZoneConvectiveLoad; } else { - ShowWarningError(state, EnergyPlus::format("Invalid {} ={}", s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(6))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", RoutineName, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("Invalid {} ={}", s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(6))); + ShowContinueError(state, std::format("Occurs in {} = {}", RoutineName, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Control reset to MAT control for this Simple Cooling Panel."); thisCP.controlType = ClgPanelCtrlType::MAT; } thisCP.ColdThrottlRange = s_ipsc->rNumericArgs(8); if (thisCP.ColdThrottlRange < MinThrottlingRange) { - ShowWarningError(state, EnergyPlus::format("{}Cooling throttling range too small, reset to 0.5", cCMO_CoolingPanel_Simple)); - ShowContinueError(state, EnergyPlus::format("Occurs in Cooling Panel={}", thisCP.Name)); + ShowWarningError(state, std::format("{}Cooling throttling range too small, reset to 0.5", cCMO_CoolingPanel_Simple)); + ShowContinueError(state, std::format("Occurs in Cooling Panel={}", thisCP.Name)); thisCP.ColdThrottlRange = MinThrottlingRange; } @@ -508,21 +509,21 @@ void GetCoolingPanelInput(EnergyPlusData &state) thisCP.FracRadiant = s_ipsc->rNumericArgs(10); if (thisCP.FracRadiant < MinFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(10))); + std::format("{}{}=\"{}\", {} was lower than the allowable minimum.", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(10))); ShowContinueError(state, EnergyPlus::format("...reset to minimum value=[{:.2R}].", MinFraction)); thisCP.FracRadiant = MinFraction; } if (thisCP.FracRadiant > MaxFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(10))); + std::format("{}{}=\"{}\", {} was higher than the allowable maximum.", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(10))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MaxFraction)); thisCP.FracRadiant = MaxFraction; } @@ -530,10 +531,10 @@ void GetCoolingPanelInput(EnergyPlusData &state) // Remaining fraction is added to the zone as convective heat transfer if (thisCP.FracRadiant > MaxFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", Fraction Radiant was higher than the allowable maximum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1))); + std::format("{}{}=\"{}\", Fraction Radiant was higher than the allowable maximum.", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1))); thisCP.FracRadiant = MaxFraction; thisCP.FracConvect = 0.0; } else { @@ -543,34 +544,33 @@ void GetCoolingPanelInput(EnergyPlusData &state) thisCP.FracDistribPerson = s_ipsc->rNumericArgs(11); if (thisCP.FracDistribPerson < MinFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(11))); + std::format("{}{}=\"{}\", {} was lower than the allowable minimum.", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(11))); ShowContinueError(state, EnergyPlus::format("...reset to minimum value=[{:.3R}].", MinFraction)); thisCP.FracDistribPerson = MinFraction; } if (thisCP.FracDistribPerson > MaxFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(11))); + std::format("{}{}=\"{}\", {} was higher than the allowable maximum.", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(11))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.3R}].", MaxFraction)); thisCP.FracDistribPerson = MaxFraction; } thisCP.TotSurfToDistrib = NumNumbers - 11; if ((thisCP.TotSurfToDistrib < MinDistribSurfaces) && (thisCP.FracRadiant > MinFraction)) { - ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\", the number of surface/radiant fraction groups entered was less than the allowable minimum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); + ShowSevereError(state, + std::format("{}{}=\"{}\", the number of surface/radiant fraction groups entered was less than the allowable minimum.", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); ErrorsFound = true; thisCP.TotSurfToDistrib = 0; // error } @@ -592,8 +592,8 @@ void GetCoolingPanelInput(EnergyPlusData &state) } } if (thisCP.ZonePtr <= 0) { - ShowSevereError( - state, EnergyPlus::format("{}{}=\"{}\" is not on any ZoneHVAC:EquipmentList.", RoutineName, cCMO_CoolingPanel_Simple, thisCP.Name)); + ShowSevereError(state, + std::format("{}{}=\"{}\" is not on any ZoneHVAC:EquipmentList.", RoutineName, cCMO_CoolingPanel_Simple, thisCP.Name)); ErrorsFound = true; continue; } @@ -606,21 +606,21 @@ void GetCoolingPanelInput(EnergyPlusData &state) thisCP.FracDistribToSurf(SurfNum) = s_ipsc->rNumericArgs(SurfNum + 11); if (thisCP.FracDistribToSurf(SurfNum) > MaxFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {}was greater than the allowable maximum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(SurfNum + 8))); + std::format("{}{}=\"{}\", {}was greater than the allowable maximum.", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(SurfNum + 8))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MaxFraction)); thisCP.TotSurfToDistrib = MaxFraction; } if (thisCP.FracDistribToSurf(SurfNum) < MinFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {}was less than the allowable minimum.", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(SurfNum + 8))); + std::format("{}{}=\"{}\", {}was less than the allowable minimum.", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(SurfNum + 8))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MinFraction)); thisCP.TotSurfToDistrib = MinFraction; } @@ -634,39 +634,39 @@ void GetCoolingPanelInput(EnergyPlusData &state) if (AllFracsSummed > (MaxFraction + 0.01)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", Summed radiant fractions for people + surface groups > 1.0", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1))); + std::format("{}{}=\"{}\", Summed radiant fractions for people + surface groups > 1.0", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } if ((AllFracsSummed < (MaxFraction - 0.01)) && (thisCP.FracRadiant > MinFraction)) { // User didn't distribute all of the | radiation warn that some will be lost ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", Summed radiant fractions for people + surface groups < 1.0", - RoutineName, - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1))); + std::format("{}{}=\"{}\", Summed radiant fractions for people + surface groups < 1.0", + RoutineName, + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "This would result in some of the radiant energy delivered by the high temp radiant heater being lost."); - ShowContinueError( - state, EnergyPlus::format("The sum of all radiation fractions to surfaces = {:.5T}", (AllFracsSummed - thisCP.FracDistribPerson))); - ShowContinueError(state, EnergyPlus::format("The radiant fraction to people = {:.5T}", thisCP.FracDistribPerson)); - ShowContinueError(state, EnergyPlus::format("So, all radiant fractions including surfaces and people = {:.5T}", AllFracsSummed)); + ShowContinueError(state, + std::format("The sum of all radiation fractions to surfaces = {:.5f}", (AllFracsSummed - thisCP.FracDistribPerson))); + ShowContinueError(state, std::format("The radiant fraction to people = {:.5f}", thisCP.FracDistribPerson)); + ShowContinueError(state, std::format("So, all radiant fractions including surfaces and people = {:.5f}", AllFracsSummed)); ShowContinueError( state, - EnergyPlus::format("This means that the fraction of radiant energy that would be lost from the high temperature radiant heater " - "would be = {:.5T}", - (1.0 - AllFracsSummed))); + std::format("This means that the fraction of radiant energy that would be lost from the high temperature radiant heater " + "would be = {:.5f}", + (1.0 - AllFracsSummed))); ShowContinueError(state, - EnergyPlus::format("Please check and correct this so that all radiant energy is accounted for in {} = {}", - cCMO_CoolingPanel_Simple, - s_ipsc->cAlphaArgs(1))); + std::format("Please check and correct this so that all radiant energy is accounted for in {} = {}", + cCMO_CoolingPanel_Simple, + s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}{}Errors found getting input. Program terminates.", RoutineName, cCMO_CoolingPanel_Simple)); + ShowFatalError(state, std::format("{}{}Errors found getting input. Program terminates.", RoutineName, cCMO_CoolingPanel_Simple)); } // Setup Report variables for the Coils @@ -796,9 +796,9 @@ void InitCoolingPanel(EnergyPlusData &state, int const CoolingPanelNum, int cons thisCP.ZoneEquipmentListChecked = true; if (!DataZoneEquipment::CheckZoneEquipmentList(state, cCMO_CoolingPanel_Simple, thisCP.Name)) { ShowSevereError(state, - EnergyPlus::format("InitCoolingPanel: Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - cCMO_CoolingPanel_Simple, - thisCP.Name)); + std::format("InitCoolingPanel: Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + cCMO_CoolingPanel_Simple, + thisCP.Name)); } } @@ -945,7 +945,7 @@ void SizeCoolingPanel(EnergyPlusData &state, int const CoolingPanelNum) state.dataSize->DataScalableCapSizingON = false; } else if (CapSizingMethod == DataSizing::FractionOfAutosizedCoolingCapacity) { if (thisCP.WaterVolFlowRateMax == DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{}: auto-sizing cannot be done for {} = {}\".", RoutineName, CompType, thisCP.Name)); + ShowSevereError(state, std::format("{}: auto-sizing cannot be done for {} = {}\".", RoutineName, CompType, thisCP.Name)); ShowContinueError(state, "The \"SimulationControl\" object must have the field \"Do Zone Sizing Calculation\" set to Yes when the " "Cooling Design Capacity Method = \"FractionOfAutosizedCoolingCapacity\"."); @@ -1019,7 +1019,7 @@ void SizeCoolingPanel(EnergyPlusData &state, int const CoolingPanelNum) } } else { ShowSevereError(state, "Autosizing of water flow requires a cooling loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in ZoneHVAC:CoolingPanel:RadiantConvective:Water Object={}", thisCP.Name)); + ShowContinueError(state, std::format("Occurs in ZoneHVAC:CoolingPanel:RadiantConvective:Water Object={}", thisCP.Name)); } } @@ -1040,9 +1040,9 @@ void SizeCoolingPanel(EnergyPlusData &state, int const CoolingPanelNum) if ((std::abs(WaterVolFlowMaxCoolDes - WaterVolFlowMaxCoolUser) / WaterVolFlowMaxCoolUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeCoolingPanel: Potential issue with equipment sizing for " - "ZoneHVAC:CoolingPanel:RadiantConvective:Water = \"{}\".", - thisCP.Name)); + std::format("SizeCoolingPanel: Potential issue with equipment sizing for " + "ZoneHVAC:CoolingPanel:RadiantConvective:Water = \"{}\".", + thisCP.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Maximum Cool Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxCoolUser)); ShowContinueError( @@ -1095,11 +1095,10 @@ bool CoolingPanelParams::SizeCoolingPanelUA(EnergyPlusData &state) Real64 const Tzoner = this->RatedZoneAirTemp; if (Tinletr >= Tzoner) { - ShowSevereError( - state, - EnergyPlus::format("SizeCoolingPanelUA: Unit=[{},{}] has a rated water temperature that is higher than the rated zone temperature.", - cCMO_CoolingPanel_Simple, - this->Name)); + ShowSevereError(state, + std::format("SizeCoolingPanelUA: Unit=[{},{}] has a rated water temperature that is higher than the rated zone temperature.", + cCMO_CoolingPanel_Simple, + this->Name)); ShowContinueError(state, "Such a situation would not lead to cooling and thus the rated water or zone temperature or both should be adjusted."); this->UA = 1.0; @@ -1116,9 +1115,9 @@ bool CoolingPanelParams::SizeCoolingPanelUA(EnergyPlusData &state) RatCapToTheoMax = 0.9999; } else if (RatCapToTheoMax >= 1.1) { ShowSevereError(state, - EnergyPlus::format("SizeCoolingPanelUA: Unit=[{},{}] has a cooling capacity that is greater than the maximum possible value.", - cCMO_CoolingPanel_Simple, - this->Name)); + std::format("SizeCoolingPanelUA: Unit=[{},{}] has a cooling capacity that is greater than the maximum possible value.", + cCMO_CoolingPanel_Simple, + this->Name)); ShowContinueError(state, "The result of this is that a UA value is impossible to calculate."); ShowContinueError(state, "Check the rated input for temperatures, flow, and capacity for this unit."); ShowContinueError(state, "The ratio of the capacity to the rated theoretical maximum must be less than unity."); @@ -1137,8 +1136,7 @@ bool CoolingPanelParams::SizeCoolingPanelUA(EnergyPlusData &state) this->UA = -MDotXCp * log(1.0 - RatCapToTheoMax); if (this->UA <= 0.0) { ShowSevereError( - state, - EnergyPlus::format("SizeCoolingPanelUA: Unit=[{},{}] has a zero or negative calculated UA value.", cCMO_CoolingPanel_Simple, this->Name)); + state, std::format("SizeCoolingPanelUA: Unit=[{},{}] has a zero or negative calculated UA value.", cCMO_CoolingPanel_Simple, this->Name)); ShowContinueError(state, "This is not allowed. Please check the rated input parameters for this device to ensure that the values are correct."); return false; @@ -1236,11 +1234,10 @@ void CoolingPanelParams::CalcCoolingPanel(EnergyPlusData &state, int const Cooli // Produce a warning message so that user knows the system was shut-off due to potential for condensation if (!state.dataGlobal->WarmupFlag) { if (this->CondErrIndex == 0) { // allow errors up to number of radiant systems - ShowWarningMessage( - state, - EnergyPlus::format("{} [{}] inlet water temperature below dew-point temperature--potential for condensation exists", - cCMO_CoolingPanel_Simple, - this->Name)); + ShowWarningMessage(state, + std::format("{} [{}] inlet water temperature below dew-point temperature--potential for condensation exists", + cCMO_CoolingPanel_Simple, + this->Name)); ShowContinueError(state, "Flow to the simple cooling panel will be shut-off to avoid condensation"); ShowContinueError(state, EnergyPlus::format("Water inlet temperature = {:.2R}", waterInletTemp)); ShowContinueError( @@ -1594,19 +1591,19 @@ void DistributeCoolingPanelRadGains(EnergyPlusData &state) // CR 8074, trap for excessive intensity (throws off surface balance ) if (ThisSurfIntensity > DataHeatBalFanSys::MaxRadHeatFlux) { ShowSevereError(state, "DistributeCoolingPanelRadGains: excessive thermal radiation heat flux intensity detected"); - ShowContinueError(state, EnergyPlus::format("Surface = {}", ThisSurf.Name)); + ShowContinueError(state, std::format("Surface = {}", ThisSurf.Name)); ShowContinueError(state, EnergyPlus::format("Surface area = {:.3R} [m2]", ThisSurf.Area)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); ShowContinueError(state, EnergyPlus::format("Radiation intensity = {:.2R} [W/m2]", ThisSurfIntensity)); - ShowContinueError(state, EnergyPlus::format("Assign a larger surface area or more surfaces in {}", cCMO_CoolingPanel_Simple)); + ShowContinueError(state, std::format("Assign a larger surface area or more surfaces in {}", cCMO_CoolingPanel_Simple)); ShowFatalError(state, "DistributeCoolingPanelRadGains: excessive thermal radiation heat flux intensity detected"); } } else { ShowSevereError(state, "DistributeCoolingPanelRadGains: surface not large enough to receive thermal radiation heat flux"); - ShowContinueError(state, EnergyPlus::format("Surface = {}", ThisSurf.Name)); + ShowContinueError(state, std::format("Surface = {}", ThisSurf.Name)); ShowContinueError(state, EnergyPlus::format("Surface area = {:.3R} [m2]", ThisSurf.Area)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); - ShowContinueError(state, EnergyPlus::format("Assign a larger surface area or more surfaces in {}", cCMO_CoolingPanel_Simple)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCMO_CoolingPanel_Simple, thisCP.Name)); + ShowContinueError(state, std::format("Assign a larger surface area or more surfaces in {}", cCMO_CoolingPanel_Simple)); ShowFatalError(state, "DistributeCoolingPanelRadGains: surface not large enough to receive thermal radiation heat flux"); } } diff --git a/src/EnergyPlus/ChillerAbsorption.cc b/src/EnergyPlus/ChillerAbsorption.cc index 9486807f304..3eb434a7f98 100644 --- a/src/EnergyPlus/ChillerAbsorption.cc +++ b/src/EnergyPlus/ChillerAbsorption.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -1026,7 +1027,7 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) NomPumpPowerUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomPumpPower - NomPumpPowerUser) / NomPumpPowerUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, EnergyPlus::format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Nominal Pumping Power of {:.2R} [W]", NomPumpPowerUser)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Nominal Pumping Power of {:.2R} [W]", tmpNomPumpPower)); @@ -1077,8 +1078,7 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); ShowContinueError(state, @@ -1096,7 +1096,7 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) } else { if (this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Absorption Chiller evap flow rate requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in CHILLER:ABSORPTION object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in CHILLER:ABSORPTION object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && this->EvapVolFlowRate > 0.0) { @@ -1151,8 +1151,7 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); @@ -1172,7 +1171,7 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Absorption Chiller condenser flow rate requires a condenser"); ShowContinueError(state, "loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in CHILLER:ABSORPTION object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in CHILLER:ABSORPTION object={}", this->Name)); ErrorsFound = true; } if (!this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize && (this->CondVolFlowRate > 0.0)) { @@ -1226,9 +1225,8 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpGeneratorVolFlowRate - GeneratorVolFlowRateUser) / GeneratorVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, + std::format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Generator Fluid Flow Rate of {:.5R} [m3/s]", GeneratorVolFlowRateUser)); @@ -1294,9 +1292,8 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpGeneratorVolFlowRate - GeneratorVolFlowRateUser) / GeneratorVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, + std::format("SizeChillerAbsorption: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Generator Fluid Flow Rate of {:.5R} [m3/s]", GeneratorVolFlowRateUser)); @@ -1329,7 +1326,7 @@ void BLASTAbsorberSpecs::sizeChiller(EnergyPlusData &state) ShowSevereError(state, "Autosizing of Absorption Chiller generator flow rate requires a loop Sizing:Plant object."); ShowContinueError(state, " For steam loops, use a steam Sizing:Plant object."); ShowContinueError(state, " For hot water loops, use a heating Sizing:Plant object."); - ShowContinueError(state, EnergyPlus::format("Occurs in Chiller:Absorption object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Chiller:Absorption object={}", this->Name)); ErrorsFound = true; } if (!this->GeneratorVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->GeneratorVolFlowRate > 0.0)) { diff --git a/src/EnergyPlus/ChillerElectricASHRAE205.cc b/src/EnergyPlus/ChillerElectricASHRAE205.cc index 22f2aa7f5f9..30a5eda6921 100644 --- a/src/EnergyPlus/ChillerElectricASHRAE205.cc +++ b/src/EnergyPlus/ChillerElectricASHRAE205.cc @@ -48,13 +48,13 @@ // C++ Headers #include #include +#include #include // ObjexxFCL Headers #include // EnergyPlus Headers -#include "rs0001_factory.h" #include #include #include @@ -89,6 +89,9 @@ #include #include +// Local Headers +#include "rs0001_factory.h" + namespace EnergyPlus::ChillerElectricASHRAE205 { constexpr std::array(AmbientTempIndicator::Num) - 1> AmbientTempNamesUC{ @@ -156,7 +159,7 @@ void getChillerASHRAE205Input(EnergyPlusData &state) thisChiller.Representation = std::dynamic_pointer_cast( RSInstanceFactory::create("RS0001", FileSystem::toString(rep_file_path).c_str(), std::make_shared())); if (nullptr == thisChiller.Representation) { - ShowSevereError(state, EnergyPlus::format("{} is not an instance of an ASHRAE205 Chiller.", rep_file_path)); + ShowSevereError(state, EnergyPlus::format("{} is not an instance of an ASHRAE205 Chiller.", rep_file_path.string())); ErrorsFound = true; } thisChiller.Representation->performance.performance_map_cooling.get_logger()->set_message_context(&thisChiller.LoggerContext); @@ -754,7 +757,7 @@ void ASHRAE205ChillerSpecs::size([[maybe_unused]] EnergyPlusData &state) } else { if (this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Electric Chiller evap flow rate requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Electric Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->EvapVolFlowRate > 0.0)) { @@ -805,7 +808,7 @@ void ASHRAE205ChillerSpecs::size([[maybe_unused]] EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, EnergyPlus::format("{}: Potential issue with equipment sizing for {}", RoutineName, this->Name)); + ShowMessage(state, std::format("{}: Potential issue with equipment sizing for {}", RoutineName, this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Condenser Maximum Requested Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); @@ -828,7 +831,7 @@ void ASHRAE205ChillerSpecs::size([[maybe_unused]] EnergyPlusData &state) if (this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Electric ASHRAE 205 Chiller condenser fluid flow rate requires a condenser"); ShowContinueError(state, "loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Electric ASHRAE 205 Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Electric ASHRAE 205 Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->CondVolFlowRate > 0.0)) { @@ -901,7 +904,7 @@ void ASHRAE205ChillerSpecs::size([[maybe_unused]] EnergyPlusData &state) RefCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - RefCapUser) / RefCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, EnergyPlus::format("{}: Potential issue with equipment sizing for {}", RoutineName, this->Name)); + ShowMessage(state, std::format("{}: Potential issue with equipment sizing for {}", RoutineName, this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Rated Capacity of {:.2R} [W]", RefCapUser)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Rated Capacity of {:.2R} [W]", tmpNomCap)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); @@ -916,7 +919,7 @@ void ASHRAE205ChillerSpecs::size([[maybe_unused]] EnergyPlusData &state) } else { if (this->RefCapWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Electric Chiller reference capacity requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Electric Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->RefCapWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->RefCap > 0.0)) { // Hard-sized with no sizing data @@ -1220,13 +1223,13 @@ void ASHRAE205ChillerSpecs::findEvaporatorMassFlowRate(EnergyPlusData &state, Re ShowContinueErrorTimeStamp(state, ""); } else if (!state.dataGlobal->WarmupFlag) { ++this->ChillerCapFTError; - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format( - "{} \"{}\": Evaporator DeltaTemp = 0 in mass flow calculation warning continues...", this->ObjectType, this->Name), - this->DeltaTErrCountIndex, - evapDeltaTemp, - evapDeltaTemp); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} \"{}\": Evaporator DeltaTemp = 0 in mass flow calculation warning continues...", + this->ObjectType, + this->Name), + this->DeltaTErrCountIndex, + evapDeltaTemp, + evapDeltaTemp); } } } diff --git a/src/EnergyPlus/ChillerElectricEIR.cc b/src/EnergyPlus/ChillerElectricEIR.cc index 44ad84ecf87..19b973b46f5 100644 --- a/src/EnergyPlus/ChillerElectricEIR.cc +++ b/src/EnergyPlus/ChillerElectricEIR.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include #include // ObjexxFCL Headers @@ -480,7 +481,7 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) } if (thisChiller.MinPartLoadRat > thisChiller.MaxPartLoadRat) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} [{:.3R}] > {} [{:.3R}]", s_ipsc->cNumericFieldNames(7), @@ -492,24 +493,22 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) } if (thisChiller.MinUnloadRat < thisChiller.MinPartLoadRat || thisChiller.MinUnloadRat > thisChiller.MaxPartLoadRat) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} = {:.3R}", s_ipsc->cNumericFieldNames(10), s_ipsc->rNumericArgs(10))); ShowContinueError( - state, - EnergyPlus::format("{} must be greater than or equal to the {}", s_ipsc->cNumericFieldNames(10), s_ipsc->cNumericFieldNames(7))); - ShowContinueError( - state, EnergyPlus::format("{} must be less than or equal to the {}", s_ipsc->cNumericFieldNames(10), s_ipsc->cNumericFieldNames(8))); + state, std::format("{} must be greater than or equal to the {}", s_ipsc->cNumericFieldNames(10), s_ipsc->cNumericFieldNames(7))); + ShowContinueError(state, + std::format("{} must be less than or equal to the {}", s_ipsc->cNumericFieldNames(10), s_ipsc->cNumericFieldNames(8))); ErrorsFound = true; } if (thisChiller.OptPartLoadRat < thisChiller.MinPartLoadRat || thisChiller.OptPartLoadRat > thisChiller.MaxPartLoadRat) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} = {:.3R}", s_ipsc->cNumericFieldNames(9), s_ipsc->rNumericArgs(9))); ShowContinueError( - state, - EnergyPlus::format("{} must be greater than or equal to the {}", s_ipsc->cNumericFieldNames(9), s_ipsc->cNumericFieldNames(7))); - ShowContinueError( - state, EnergyPlus::format("{} must be less than or equal to the {}", s_ipsc->cNumericFieldNames(9), s_ipsc->cNumericFieldNames(8))); + state, std::format("{} must be greater than or equal to the {}", s_ipsc->cNumericFieldNames(9), s_ipsc->cNumericFieldNames(7))); + ShowContinueError(state, + std::format("{} must be less than or equal to the {}", s_ipsc->cNumericFieldNames(9), s_ipsc->cNumericFieldNames(8))); ErrorsFound = true; } @@ -517,10 +516,10 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) thisChiller.CompPowerToCondenserFrac = s_ipsc->rNumericArgs(12); if (thisChiller.CompPowerToCondenserFrac < 0.0 || thisChiller.CompPowerToCondenserFrac > 1.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} = {:.3R}", s_ipsc->cNumericFieldNames(12), s_ipsc->rNumericArgs(12))); - ShowContinueError(state, EnergyPlus::format("{} must be greater than or equal to zero", s_ipsc->cNumericFieldNames(12))); - ShowContinueError(state, EnergyPlus::format("{} must be less than or equal to one", s_ipsc->cNumericFieldNames(12))); + ShowContinueError(state, std::format("{} must be greater than or equal to zero", s_ipsc->cNumericFieldNames(12))); + ShowContinueError(state, std::format("{} must be less than or equal to one", s_ipsc->cNumericFieldNames(12))); ErrorsFound = true; } @@ -543,8 +542,8 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) Node::CompFluidStream::Tertiary, Node::ObjectIsNotParent); if (thisChiller.HeatRecInletNodeNum == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(11), s_ipsc->cAlphaArgs(11))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(11), s_ipsc->cAlphaArgs(11))); ErrorsFound = true; } thisChiller.HeatRecOutletNodeNum = Node::GetOnlySingleNode(state, @@ -557,8 +556,8 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) Node::CompFluidStream::Tertiary, Node::ObjectIsNotParent); if (thisChiller.HeatRecOutletNodeNum == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(12), s_ipsc->cAlphaArgs(12))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(12), s_ipsc->cAlphaArgs(12))); ErrorsFound = true; } @@ -610,7 +609,7 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) thisChiller.HeatRecInletNodeNum = 0; thisChiller.HeatRecOutletNodeNum = 0; if (!s_ipsc->lAlphaFieldBlanks(11) || !s_ipsc->lAlphaFieldBlanks(12)) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Since Reference Heat Reclaim Volume Flow Rate = 0.0, heat recovery is inactive."); ShowContinueError(state, "However, node names were specified for heat recovery inlet or outlet nodes."); } @@ -624,8 +623,8 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) } if (thisChiller.CondenserFlowControl == DataPlant::CondenserFlowControl::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(17), s_ipsc->cAlphaArgs(17))); + ShowSevereError(state, std::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(17), s_ipsc->cAlphaArgs(17))); ShowContinueError(state, "Available choices are ConstantFlow, ModulatedChillerPLR, ModulatedLoopPLR, or ModulatedDeltaTemperature"); ShowContinueError(state, "Flow mode ConstantFlow is assumed and the simulation continues."); thisChiller.CondenserFlowControl = DataPlant::CondenserFlowControl::ConstantFlow; @@ -636,8 +635,8 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) } if ((thisChiller.ChillerCondLoopFlowFLoopPLRIndex == 0) && (thisChiller.CondenserFlowControl == DataPlant::CondenserFlowControl::ModulatedLoopPLR)) { - ShowSevereError(state, EnergyPlus::format("{}{} \"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(18), s_ipsc->cAlphaArgs(18))); + ShowSevereError(state, std::format("{}{} \"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(18), s_ipsc->cAlphaArgs(18))); ErrorsFound = true; } @@ -657,20 +656,20 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) if (thisChiller.ChillerCapFTIndex > 0) { Real64 CurveVal = Curve::CurveValue(state, thisChiller.ChillerCapFTIndex, thisChiller.TempRefEvapOut, thisChiller.TempRefCondIn); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError( state, "Capacity ratio as a function of temperature curve output is not equal to 1.0 (+ or - 10%) at reference conditions."); - ShowContinueError(state, EnergyPlus::format("Curve output at reference conditions = {:.3T}", CurveVal)); + ShowContinueError(state, std::format("Curve output at reference conditions = {:.3f}", CurveVal)); } } if (thisChiller.ChillerEIRFTIndex > 0) { Real64 CurveVal = Curve::CurveValue(state, thisChiller.ChillerEIRFTIndex, thisChiller.TempRefEvapOut, thisChiller.TempRefCondIn); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError( state, "Energy input ratio as a function of temperature curve output is not equal to 1.0 (+ or - 10%) at reference conditions."); - ShowContinueError(state, EnergyPlus::format("Curve output at reference conditions = {:.3T}", CurveVal)); + ShowContinueError(state, std::format("Curve output at reference conditions = {:.3f}", CurveVal)); } } @@ -678,11 +677,11 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) Real64 CurveVal = Curve::CurveValue(state, thisChiller.ChillerEIRFPLRIndex, 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError( state, "Energy input ratio as a function of part-load ratio curve output is not equal to 1.0 (+ or - 10%) at reference conditions."); - ShowContinueError(state, EnergyPlus::format("Curve output at reference conditions = {:.3T}", CurveVal)); + ShowContinueError(state, std::format("Curve output at reference conditions = {:.3f}", CurveVal)); } } @@ -726,7 +725,7 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) PLRArray[8] = 0.8; PLRArray[9] = 0.9; PLRArray[10] = 1; - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Energy input ratio as a function of part-load ratio curve shows negative values."); ShowContinueError(state, "EIR as a function of PLR curve output at various part-load ratios shown below:"); ShowContinueError( @@ -739,8 +738,8 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) // Basin heater power as a function of temperature must be greater than or equal to 0 thisChiller.BasinHeaterPowerFTempDiff = s_ipsc->rNumericArgs(16); if (s_ipsc->rNumericArgs(16) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} must be >= 0", s_ipsc->cNumericFieldNames(16))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} must be >= 0", s_ipsc->cNumericFieldNames(16))); ErrorsFound = true; } @@ -751,8 +750,8 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) thisChiller.BasinHeaterSetPointTemp = 2.0; } if (thisChiller.BasinHeaterSetPointTemp < 2.0) { - ShowWarningError(state, EnergyPlus::format("{}{} \"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} is less than 2 deg C. Freezing could occur.", s_ipsc->cNumericFieldNames(17))); + ShowWarningError(state, std::format("{}{} \"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} is less than 2 deg C. Freezing could occur.", s_ipsc->cNumericFieldNames(17))); } } @@ -774,8 +773,8 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) if (!s_ipsc->lAlphaFieldBlanks(20)) { thisChiller.thermosiphonTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(s_ipsc->cAlphaArgs(20))); if (thisChiller.thermosiphonTempCurveIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, thisChiller.Name)); - ShowContinueError(state, EnergyPlus::format("Invalid {} = {}", s_ipsc->cAlphaFieldNames(20), s_ipsc->cAlphaArgs(20))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, thisChiller.Name)); + ShowContinueError(state, std::format("Invalid {} = {}", s_ipsc->cAlphaFieldNames(20), s_ipsc->cAlphaArgs(20))); ErrorsFound = true; } } @@ -783,7 +782,7 @@ void GetElectricEIRChillerInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", s_ipsc->cCurrentModuleObject)); + ShowFatalError(state, std::format("Errors found in processing input for {}", s_ipsc->cCurrentModuleObject)); } } @@ -1154,8 +1153,8 @@ void ElectricEIRChillerSpecs::oneTimeInit(EnergyPlusData &state) (state.dataLoopNodes->Node(this->EvapOutletNodeNum).TempSetPointHi == Node::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { - ShowWarningError( - state, EnergyPlus::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError(state, + std::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); ShowContinueError( state, " A temperature setpoint is needed at the outlet node of a chiller in variable flow mode, use a SetpointManager"); ShowContinueError(state, " The overall loop setpoint will be assumed for chiller. The simulation continues ... "); @@ -1168,8 +1167,8 @@ void ElectricEIRChillerSpecs::oneTimeInit(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (fatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError( - state, EnergyPlus::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError(state, + std::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the outlet node of a chiller evaporator in variable flow mode"); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the chiller evaporator outlet node "); @@ -1246,7 +1245,7 @@ void ElectricEIRChillerSpecs::initEachEnvironment(EnergyPlusData &state) if (THeatRecSetPoint == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->HRSPErrDone) { - ShowWarningError(state, EnergyPlus::format("Missing heat recovery temperature setpoint for chiller named {}", this->Name)); + ShowWarningError(state, std::format("Missing heat recovery temperature setpoint for chiller named {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the heat recovery leaving temperature setpoint node " "specified, use a SetpointManager"); @@ -1261,8 +1260,7 @@ void ElectricEIRChillerSpecs::initEachEnvironment(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (fatalError) { if (!this->HRSPErrDone) { - ShowWarningError(state, - EnergyPlus::format("Missing heat recovery temperature setpoint for chiller named {}", this->Name)); + ShowWarningError(state, std::format("Missing heat recovery temperature setpoint for chiller named {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the heat recovery leaving temperature setpoint node " "specified, use a SetpointManager to establish a setpoint"); @@ -1410,8 +1408,7 @@ void ElectricEIRChillerSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerElectricEIR: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeChillerElectricEIR: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Reference Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); @@ -1430,7 +1427,7 @@ void ElectricEIRChillerSpecs::size(EnergyPlusData &state) } else { if (this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Electric Chiller evap flow rate requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Electric Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->EvapVolFlowRate > 0.0)) { @@ -1472,8 +1469,7 @@ void ElectricEIRChillerSpecs::size(EnergyPlusData &state) RefCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - RefCapUser) / RefCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerElectricEIR: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeChillerElectricEIR: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Reference Capacity of {:.2R} [W]", RefCapUser)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Reference Capacity of {:.2R} [W]", tmpNomCap)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); @@ -1488,7 +1484,7 @@ void ElectricEIRChillerSpecs::size(EnergyPlusData &state) } else { if (this->RefCapWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Electric Chiller reference capacity requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Electric Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->RefCapWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->RefCap > 0.0)) { // Hard-sized with no sizing data @@ -1537,8 +1533,7 @@ void ElectricEIRChillerSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerElectricEIR: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeChillerElectricEIR: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Reference Condenser Fluid Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); @@ -1560,7 +1555,7 @@ void ElectricEIRChillerSpecs::size(EnergyPlusData &state) if (this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Electric EIR Chiller condenser fluid flow rate requires a condenser"); ShowContinueError(state, "loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Electric EIR Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Electric EIR Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->CondVolFlowRate > 0.0)) { @@ -1644,8 +1639,7 @@ void ElectricEIRChillerSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tempHeatRecVolFlowRate - nomHeatRecVolFlowRateUser) / nomHeatRecVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerElectricEIR: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeChillerElectricEIR: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Heat Recovery Water Flow Rate of {:.5R} [m3/s]", nomHeatRecVolFlowRateUser)); @@ -1810,7 +1804,7 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b ++this->MsgErrorCount; // Show single warning and pass additional info to ShowRecurringWarningErrorAtEnd if (this->MsgErrorCount < 2) { - ShowWarningError(state, EnergyPlus::format("{}.", this->MsgBuffer1)); + ShowWarningError(state, std::format("{}.", this->MsgBuffer1)); ShowContinueError(state, this->MsgBuffer2); } else { ShowRecurringWarningErrorAtEnd( @@ -1857,11 +1851,11 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b this->MsgBuffer1 = "ElectricEIRChillerModel - CHILLER:ELECTRIC:EIR \"" + this->Name + "\" - Air Cooled Condenser Inlet Temperature below 0C"; - this->MsgBuffer2 = EnergyPlus::format("... Outdoor Dry-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", - state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); + this->MsgBuffer2 = std::format("... Outdoor Dry-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", + state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state)); this->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { @@ -1880,11 +1874,11 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b this->PrintMessage = true; this->MsgBuffer1 = "ElectricEIRChillerModel - CHILLER:ELECTRIC:EIR \"" + this->Name + "\" - Air Cooled Condenser Inlet Temperature below 10C"; - this->MsgBuffer2 = EnergyPlus::format("... Outdoor Wet-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", - state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); + this->MsgBuffer2 = std::format("... Outdoor Wet-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", + state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state)); this->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -1991,7 +1985,7 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b if (this->ChillerCapFT < 0) { if (this->ChillerCapFTError < 1 && this->CWPlantLoc.side->FlowLock != DataPlant::FlowLock::Unlocked && !state.dataGlobal->WarmupFlag) { ++this->ChillerCapFTError; - ShowWarningError(state, EnergyPlus::format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name)); + ShowWarningError(state, std::format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name)); ShowContinueError( state, EnergyPlus::format(" Chiller Capacity as a Function of Temperature curve output is negative ({:.3R}).", this->ChillerCapFT)); ShowContinueError( @@ -2264,7 +2258,7 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b if (this->ChillerEIRFT < 0.0) { if (this->ChillerEIRFTError < 1 && this->CWPlantLoc.side->FlowLock != DataPlant::FlowLock::Unlocked && !state.dataGlobal->WarmupFlag) { ++this->ChillerEIRFTError; - ShowWarningError(state, EnergyPlus::format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name)); + ShowWarningError(state, std::format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name)); ShowContinueError(state, EnergyPlus::format(" Chiller EIR as a Function of Temperature curve output is negative ({:.3R}).", this->ChillerEIRFT)); ShowContinueError( @@ -2289,7 +2283,7 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b if (this->ChillerEIRFPLR < 0.0) { if (this->ChillerEIRFPLRError < 1 && this->CWPlantLoc.side->FlowLock != DataPlant::FlowLock::Unlocked && !state.dataGlobal->WarmupFlag) { ++this->ChillerEIRFPLRError; - ShowWarningError(state, EnergyPlus::format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name)); + ShowWarningError(state, std::format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name)); ShowContinueError(state, EnergyPlus::format(" Chiller EIR as a function of PLR curve output is negative ({:.3R}).", this->ChillerEIRFPLR)); ShowContinueError(state, EnergyPlus::format(" Negative value occurs using a part-load ratio of {:.3R}.", PartLoadRat)); @@ -2341,9 +2335,9 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b } } else { ShowFatalError(state, - EnergyPlus::format("{}: The ModulatedLoopPLR condenser flow control requires a Sizing:Plant object for " - "both loops connected to the condenser and evaporator of the chiller.", - RoutineName)); + std::format("{}: The ModulatedLoopPLR condenser flow control requires a Sizing:Plant object for " + "both loops connected to the condenser and evaporator of the chiller.", + RoutineName)); } } break; case DataPlant::CondenserFlowControl::ModulatedDeltaTemperature: { @@ -2377,7 +2371,7 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b this->CondOutletTemp = this->QCondenser / this->CondMassFlowRate / CpCond + condInletTemp; } else { - ShowSevereError(state, EnergyPlus::format("CalcElectricEIRChillerModel: Condenser flow = 0, for ElectricEIRChiller={}", this->Name)); + ShowSevereError(state, std::format("CalcElectricEIRChillerModel: Condenser flow = 0, for ElectricEIRChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); // maybe this could be handled earlier, check if this component has a load and an evap flow rate // then if cond flow is zero, just make a request to the condenser, diff --git a/src/EnergyPlus/ChillerExhaustAbsorption.cc b/src/EnergyPlus/ChillerExhaustAbsorption.cc index e0479fc16f5..0fac70c7596 100644 --- a/src/EnergyPlus/ChillerExhaustAbsorption.cc +++ b/src/EnergyPlus/ChillerExhaustAbsorption.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -318,7 +319,7 @@ void GetExhaustAbsorberInput(EnergyPlusData &state) // Get_ErrorsFound will be set to True if problem was found, left untouched otherwise GlobalNames::VerifyUniqueChillerName( - state, cCurrentModuleObject, s_ipsc->cAlphaArgs(1), Get_ErrorsFound, fmt::format("{} Name", cCurrentModuleObject)); + state, cCurrentModuleObject, s_ipsc->cAlphaArgs(1), Get_ErrorsFound, EnergyPlus::format("{} Name", cCurrentModuleObject)); auto &thisChiller = state.dataChillerExhaustAbsorption->ExhaustAbsorber(AbsorberNum); thisChiller.Name = s_ipsc->cAlphaArgs(1); @@ -928,7 +929,7 @@ void ExhaustAbsorberSpecs::oneTimeInit_new(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->HeatSupplyNodeNum).needsSetpointChecking = false; if (errFlag) { if (!this->HeatSetPointErrDone) { - ShowWarningError(state, EnergyPlus::format("Missing temperature setpoint on heat side for chiller heater named {}", this->Name)); + ShowWarningError(state, std::format("Missing temperature setpoint on heat side for chiller heater named {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the outlet node of this chiller heater "); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the heater side outlet node "); ShowContinueError(state, " or use an EMS actuator to establish a setpoint at the outlet node "); @@ -1118,9 +1119,9 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeChillerHeaterAbsorptionDoubleEffect: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage( + state, + std::format("SizeChillerHeaterAbsorptionDoubleEffect: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Nominal Capacity of {:.2R} [W]", NomCapUser)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); @@ -1135,8 +1136,7 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->NomCoolingCapWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, - EnergyPlus::format("SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, std::format("SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect=\"{}\", autosize error.", this->Name)); ShowContinueError(state, "Autosizing of Exhaust Fired Absorption Chiller nominal cooling capacity requires"); ShowContinueError(state, "a cooling loop Sizing:Plant object."); ErrorsFound = true; @@ -1194,9 +1194,9 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerAbsorptionDoubleEffect: Potential issue with equipment sizing for {}", - this->Name)); + ShowMessage( + state, + std::format("SizeChillerAbsorptionDoubleEffect: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); ShowContinueError(state, @@ -1214,8 +1214,7 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->EvapVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, - EnergyPlus::format("SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, std::format("SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect=\"{}\", autosize error.", this->Name)); ShowContinueError(state, "Autosizing of Exhaust Fired Absorption Chiller evap flow rate requires"); ShowContinueError(state, "a cooling loop Sizing:Plant object."); ErrorsFound = true; @@ -1278,9 +1277,9 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHeatRecVolFlowRate - HeatRecVolFlowRateUser) / HeatRecVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeChillerHeaterAbsorptionDoubleEffect: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage( + state, + std::format("SizeChillerHeaterAbsorptionDoubleEffect: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Design Hot Water Flow Rate of {:.5R} [m3/s]", HeatRecVolFlowRateUser)); ShowContinueError(state, @@ -1298,8 +1297,7 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->HeatVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, - EnergyPlus::format("SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, std::format("SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect=\"{}\", autosize error.", this->Name)); ShowContinueError(state, "Autosizing of Exhaust Fired Absorption Chiller hot water flow rate requires"); ShowContinueError(state, "a heating loop Sizing:Plant object."); ErrorsFound = true; @@ -1365,9 +1363,9 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerAbsorptionDoubleEffect: Potential issue with equipment sizing for {}", - this->Name)); + ShowMessage( + state, + std::format("SizeChillerAbsorptionDoubleEffect: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); @@ -1386,8 +1384,7 @@ void ExhaustAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->CondVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, - EnergyPlus::format("SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, std::format("SizeExhaustAbsorber: ChillerHeater:Absorption:DoubleEffect=\"{}\", autosize error.", this->Name)); ShowContinueError(state, "Autosizing of Exhaust Fired Absorption Chiller condenser flow rate requires a condenser"); ShowContinueError(state, "loop Sizing:Plant object."); ErrorsFound = true; @@ -1744,12 +1741,12 @@ void ExhaustAbsorberSpecs::calcChiller(EnergyPlusData &state, Real64 &MyLoad) if (lExhHeatRecPotentialCool < lCoolThermalEnergyUseRate) { if (this->ExhTempLTAbsLeavingTempIndex == 0) { - ShowWarningError(state, EnergyPlus::format("ChillerHeater:Absorption:DoubleEffect \"{}\"", this->Name)); + ShowWarningError(state, std::format("ChillerHeater:Absorption:DoubleEffect \"{}\"", this->Name)); ShowContinueError(state, "...Exhaust temperature and flow input from Micro Turbine is not sufficient during cooling to run the chiller "); - ShowContinueError(state, EnergyPlus::format("...Value of Exhaust air inlet temp ={:.4T} C.", lExhaustInTemp)); - ShowContinueError(state, EnergyPlus::format("... and Exhaust air flow rate of {:.2T} kg/s.", lExhaustInFlow)); - ShowContinueError(state, EnergyPlus::format("...Value of minimum absorber leaving temp ={:.4T} C.", AbsLeavingTemp)); + ShowContinueError(state, std::format("...Value of Exhaust air inlet temp ={:.4f} C.", lExhaustInTemp)); + ShowContinueError(state, std::format("... and Exhaust air flow rate of {:.2f} kg/s.", lExhaustInFlow)); + ShowContinueError(state, std::format("...Value of minimum absorber leaving temp ={:.4f} C.", AbsLeavingTemp)); ShowContinueError(state, "...Either increase the Exhaust temperature (min required = 350 C ) or flow or both of Micro Turbine to meet " "the min available potential criteria."); @@ -1777,18 +1774,16 @@ void ExhaustAbsorberSpecs::calcChiller(EnergyPlusData &state, Real64 &MyLoad) lCondSupplyTemp = lCondReturnTemp + lTowerLoad / (lCondWaterMassFlowRate * Cp_CD); } else { if (this->lCondWaterMassFlowRate_Index == 0) { - ShowSevereError( - state, - EnergyPlus::format("CalcExhaustAbsorberChillerModel: Condenser flow = 0, for Exhaust Absorber Chiller={}", this->Name)); + ShowSevereError(state, + std::format("CalcExhaustAbsorberChillerModel: Condenser flow = 0, for Exhaust Absorber Chiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); // ShowFatalError(state, "Program Terminates due to previous error condition."); } - ShowRecurringSevereErrorAtEnd( - state, - EnergyPlus::format("CalcExhaustAbsorberChillerModel: Condenser flow = 0, for Exhaust Absorber Chiller={}: " - "Condenser flow rate = 0 severe error warning continues...", - this->Name), // Message automatically written to "error file" at end of simulation - this->lCondWaterMassFlowRate_Index // Recurring message index, if zero, next available index is assigned + ShowRecurringSevereErrorAtEnd(state, + std::format("CalcExhaustAbsorberChillerModel: Condenser flow = 0, for Exhaust Absorber Chiller={}: " + "Condenser flow rate = 0 severe error warning continues...", + this->Name), // Message automatically written to "error file" at end of simulation + this->lCondWaterMassFlowRate_Index // Recurring message index, if zero, next available index is assigned ); } } else { @@ -1943,7 +1938,7 @@ void ExhaustAbsorberSpecs::calcHeater(EnergyPlusData &state, Real64 &MyLoad, boo lHotWaterMassFlowRate = 0.0; ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("ExhaustAbsorberChillerModel:Heating\"{}\", DeltaTemp = 0 in mass flow calculation", this->Name), + std::format("ExhaustAbsorberChillerModel:Heating\"{}\", DeltaTemp = 0 in mass flow calculation", this->Name), this->DeltaTempHeatErrCount); } lHotWaterSupplyTemp = HeatSupplySetPointTemp; @@ -1988,25 +1983,24 @@ void ExhaustAbsorberSpecs::calcHeater(EnergyPlusData &state, Real64 &MyLoad, boo lExhHeatRecPotentialHeat = lExhaustInFlow * CpAir * (lExhaustInTemp - AbsLeavingTemp); if (lExhHeatRecPotentialHeat < lHeatThermalEnergyUseRate) { if (this->ExhTempLTAbsLeavingHeatingTempIndex == 0) { - ShowWarningError(state, EnergyPlus::format("ChillerHeater:Absorption:DoubleEffect \"{}\"", this->Name)); + ShowWarningError(state, std::format("ChillerHeater:Absorption:DoubleEffect \"{}\"", this->Name)); ShowContinueError(state, "...Exhaust temperature and flow input from Micro Turbine is not sufficient to run the chiller during heating ."); - ShowContinueError(state, EnergyPlus::format("...Value of Exhaust air inlet temp ={:.4T} C.", lExhaustInTemp)); - ShowContinueError(state, EnergyPlus::format("... and Exhaust air flow rate of {:.2T} kg/s.", lExhaustInFlow)); - ShowContinueError(state, EnergyPlus::format("...Value of minimum absorber leaving temp ={:.4T} C.", AbsLeavingTemp)); + ShowContinueError(state, std::format("...Value of Exhaust air inlet temp ={:.4f} C.", lExhaustInTemp)); + ShowContinueError(state, std::format("... and Exhaust air flow rate of {:.2f} kg/s.", lExhaustInFlow)); + ShowContinueError(state, std::format("...Value of minimum absorber leaving temp ={:.4f} C.", AbsLeavingTemp)); ShowContinueError(state, "...Either increase the Exhaust temperature (min required = 350 C) or flow or both of Micro Turbine to meet " "the min available potential criteria."); ShowContinueErrorTimeStamp(state, "... Simulation will continue."); } - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("ChillerHeater:Absorption:DoubleEffect \"{}\": Exhaust temperature from Micro Turbine is not " - "sufficient to run the chiller during heating warning continues...", - this->Name), - this->ExhTempLTAbsLeavingHeatingTempIndex, - lExhaustInTemp, - AbsLeavingTemp); + ShowRecurringWarningErrorAtEnd(state, + std::format("ChillerHeater:Absorption:DoubleEffect \"{}\": Exhaust temperature from Micro Turbine is not " + "sufficient to run the chiller during heating warning continues...", + this->Name), + this->ExhTempLTAbsLeavingHeatingTempIndex, + lExhaustInTemp, + AbsLeavingTemp); // If exhaust is not available, it means the available thermal energy is 0.0 and Chiller is not available lHeatThermalEnergyUseRate = 0.0; lHeatElectricPower = 0.0; diff --git a/src/EnergyPlus/ChillerGasAbsorption.cc b/src/EnergyPlus/ChillerGasAbsorption.cc index 57aaacd7d08..d684d02fab5 100644 --- a/src/EnergyPlus/ChillerGasAbsorption.cc +++ b/src/EnergyPlus/ChillerGasAbsorption.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -627,7 +628,7 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) this->Name); // Do not include this on meters, this would duplicate the cool fuel and heat fuel SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater {} Energy", sFuelType), + std::format("Chiller Heater {} Energy", sFuelType), Constant::Units::J, this->FuelEnergy, OutputProcessor::TimeStepType::System, @@ -635,14 +636,14 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) this->Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Cooling {} Rate", sFuelType), + std::format("Chiller Heater Cooling {} Rate", sFuelType), Constant::Units::W, this->CoolFuelUseRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Cooling {} Energy", sFuelType), + std::format("Chiller Heater Cooling {} Energy", sFuelType), Constant::Units::J, this->CoolFuelEnergy, OutputProcessor::TimeStepType::System, @@ -661,14 +662,14 @@ void GasAbsorberSpecs::setupOutputVariables(EnergyPlusData &state) this->Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Heating {} Rate", sFuelType), + std::format("Chiller Heater Heating {} Rate", sFuelType), Constant::Units::W, this->HeatFuelUseRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Heating {} Energy", sFuelType), + std::format("Chiller Heater Heating {} Energy", sFuelType), Constant::Units::J, this->HeatFuelEnergy, OutputProcessor::TimeStepType::System, @@ -891,7 +892,7 @@ void GasAbsorberSpecs::oneTimeInit_new(EnergyPlusData &state) (state.dataLoopNodes->Node(this->ChillSupplyNodeNum).TempSetPointHi == Node::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ChillSetPointErrDone) { - ShowWarningError(state, EnergyPlus::format("Missing temperature setpoint on cool side for chiller heater named {}", this->Name)); + ShowWarningError(state, std::format("Missing temperature setpoint on cool side for chiller heater named {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the outlet node of this chiller, use a SetpointManager"); ShowContinueError(state, " The overall loop setpoint will be assumed for chiller. The simulation continues ... "); this->ChillSetPointErrDone = true; @@ -903,7 +904,7 @@ void GasAbsorberSpecs::oneTimeInit_new(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->ChillSupplyNodeNum).needsSetpointChecking = false; if (errFlag) { if (!this->ChillSetPointErrDone) { - ShowWarningError(state, EnergyPlus::format("Missing temperature setpoint on cool side for chiller heater named {}", this->Name)); + ShowWarningError(state, std::format("Missing temperature setpoint on cool side for chiller heater named {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the outlet node of this chiller evaporator "); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the chiller evaporator outlet node "); ShowContinueError(state, " or use an EMS actuator to establish a setpoint at the outlet node "); @@ -923,7 +924,7 @@ void GasAbsorberSpecs::oneTimeInit_new(EnergyPlusData &state) (state.dataLoopNodes->Node(this->HeatSupplyNodeNum).TempSetPointLo == Node::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->HeatSetPointErrDone) { - ShowWarningError(state, EnergyPlus::format("Missing temperature setpoint on heat side for chiller heater named {}", this->Name)); + ShowWarningError(state, std::format("Missing temperature setpoint on heat side for chiller heater named {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the outlet node of this chiller, use a SetpointManager"); ShowContinueError(state, " The overall loop setpoint will be assumed for chiller. The simulation continues ... "); this->HeatSetPointErrDone = true; @@ -935,7 +936,7 @@ void GasAbsorberSpecs::oneTimeInit_new(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->HeatSupplyNodeNum).needsSetpointChecking = false; if (errFlag) { if (!this->HeatSetPointErrDone) { - ShowWarningError(state, EnergyPlus::format("Missing temperature setpoint on heat side for chiller heater named {}", this->Name)); + ShowWarningError(state, std::format("Missing temperature setpoint on heat side for chiller heater named {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the outlet node of this chiller heater "); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the heater side outlet node "); ShowContinueError(state, " or use an EMS actuator to establish a setpoint at the outlet node "); @@ -1116,9 +1117,9 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerHeaterAbsorptionDirectFired: Potential issue with equipment sizing for {}", - this->Name)); + ShowMessage( + state, + std::format("SizeChillerHeaterAbsorptionDirectFired: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Nominal Capacity of {:.2R} [W]", NomCapUser)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); @@ -1133,8 +1134,7 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->NomCoolingCapWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, - EnergyPlus::format("SizeGasAbsorber: ChillerHeater:Absorption:DirectFired=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, std::format("SizeGasAbsorber: ChillerHeater:Absorption:DirectFired=\"{}\", autosize error.", this->Name)); ShowContinueError(state, "Autosizing of Direct Fired Absorption Chiller nominal cooling capacity requires"); ShowContinueError(state, "a cooling loop Sizing:Plant object."); ErrorsFound = true; @@ -1192,8 +1192,7 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage( - state, - EnergyPlus::format("SizeChillerAbsorptionDirectFired: Potential issue with equipment sizing for {}", this->Name)); + state, std::format("SizeChillerAbsorptionDirectFired: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); ShowContinueError(state, @@ -1211,8 +1210,7 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->EvapVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, - EnergyPlus::format("SizeGasAbsorber: ChillerHeater:Absorption:DirectFired=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, std::format("SizeGasAbsorber: ChillerHeater:Absorption:DirectFired=\"{}\", autosize error.", this->Name)); ShowContinueError(state, "Autosizing of Direct Fired Absorption Chiller evap flow rate requires"); ShowContinueError(state, "a cooling loop Sizing:Plant object."); ErrorsFound = true; @@ -1275,9 +1273,9 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHeatRecVolFlowRate - HeatRecVolFlowRateUser) / HeatRecVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerHeaterAbsorptionDirectFired: Potential issue with equipment sizing for {}", - this->Name)); + ShowMessage( + state, + std::format("SizeChillerHeaterAbsorptionDirectFired: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Design Hot Water Flow Rate of {:.5R} [m3/s]", HeatRecVolFlowRateUser)); ShowContinueError(state, @@ -1295,8 +1293,7 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->HeatVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, - EnergyPlus::format("SizeGasAbsorber: ChillerHeater:Absorption:DirectFired=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, std::format("SizeGasAbsorber: ChillerHeater:Absorption:DirectFired=\"{}\", autosize error.", this->Name)); ShowContinueError(state, "Autosizing of Direct Fired Absorption Chiller hot water flow rate requires"); ShowContinueError(state, "a heating loop Sizing:Plant object."); ErrorsFound = true; @@ -1364,8 +1361,7 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage( - state, - EnergyPlus::format("SizeChillerAbsorptionDirectFired: Potential issue with equipment sizing for {}", this->Name)); + state, std::format("SizeChillerAbsorptionDirectFired: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); @@ -1384,8 +1380,7 @@ void GasAbsorberSpecs::size(EnergyPlusData &state) } else { if (this->CondVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, - EnergyPlus::format("SizeGasAbsorber: ChillerHeater:Absorption:DirectFired=\"{}\", autosize error.", this->Name)); + ShowSevereError(state, std::format("SizeGasAbsorber: ChillerHeater:Absorption:DirectFired=\"{}\", autosize error.", this->Name)); ShowContinueError(state, "Autosizing of Direct Fired Absorption Chiller condenser flow rate requires a condenser"); ShowContinueError(state, "loop Sizing:Plant object."); ErrorsFound = true; @@ -1738,16 +1733,15 @@ void GasAbsorberSpecs::calculateChiller(EnergyPlusData &state, Real64 &MyLoad) lCondSupplyTemp = lCondReturnTemp + lTowerLoad / (lCondWaterMassFlowRate * Cp_CD); } else { if (this->lCondWaterMassFlowRate_Index == 0) { - ShowSevereError(state, - EnergyPlus::format("CalcGasAbsorberChillerModel: Condenser flow = 0, for Gas Absorber Chiller={}", this->Name)); + ShowSevereError(state, std::format("CalcGasAbsorberChillerModel: Condenser flow = 0, for Gas Absorber Chiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); // ShowFatalError(state, "Program Terminates due to previous error condition."); } ShowRecurringSevereErrorAtEnd( state, - EnergyPlus::format("CalcGasAbsorberChillerModel: Condenser flow = 0, for Gas Absorber Chiller={}: Condenser flow " - "rate = 0 severe error warning continues...", - this->Name), // Message automatically written to "error file" at end of simulation + std::format("CalcGasAbsorberChillerModel: Condenser flow = 0, for Gas Absorber Chiller={}: Condenser flow " + "rate = 0 severe error warning continues...", + this->Name), // Message automatically written to "error file" at end of simulation this->lCondWaterMassFlowRate_Index // Recurring message index, if zero, next available index is assigned ); } diff --git a/src/EnergyPlus/ChillerIndirectAbsorption.cc b/src/EnergyPlus/ChillerIndirectAbsorption.cc index 7a4f9b9ba45..ef3efa888bb 100644 --- a/src/EnergyPlus/ChillerIndirectAbsorption.cc +++ b/src/EnergyPlus/ChillerIndirectAbsorption.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -1200,9 +1201,8 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizeChillerElectricIndirect: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, + std::format("SizeChillerElectricIndirect: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); ShowContinueError(state, @@ -1221,7 +1221,7 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (this->EvapVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Absorption Chiller evap flow rate requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Chiller:Absorption:Indirect object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Chiller:Absorption:Indirect object={}", this->Name)); ErrorsFound = true; } } else { @@ -1288,9 +1288,8 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizeChillerAbsorptionIndirect: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, + std::format("SizeChillerAbsorptionIndirect: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); @@ -1311,7 +1310,7 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Absorption Chiller condenser flow rate requires a condenser"); ShowContinueError(state, "loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Chiller:Absorption:Indirect object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Chiller:Absorption:Indirect object={}", this->Name)); ErrorsFound = true; } } else { @@ -1379,9 +1378,9 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpGeneratorVolFlowRate - GeneratorVolFlowRateUser) / GeneratorVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerAbsorptionIndirect: Potential issue with equipment sizing for {}", - this->Name)); + ShowMessage( + state, + std::format("SizeChillerAbsorptionIndirect: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Generator Fluid Flow Rate of {:.5R} [m3/s]", GeneratorVolFlowRateUser)); @@ -1454,9 +1453,9 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpGeneratorVolFlowRate - GeneratorVolFlowRateUser) / GeneratorVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerAbsorptionIndirect: Potential issue with equipment sizing for {}", - this->Name)); + ShowMessage( + state, + std::format("SizeChillerAbsorptionIndirect: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Generator Fluid Flow Rate of {:.5R} [m3/s]", GeneratorVolFlowRateUser)); @@ -1490,7 +1489,7 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) ShowSevereError(state, "Autosizing of Absorption Chiller generator flow rate requires a loop Sizing:Plant object."); ShowContinueError(state, " For steam loops, use a steam Sizing:Plant object."); ShowContinueError(state, " For hot water loops, use a heating Sizing:Plant object."); - ShowContinueError(state, EnergyPlus::format("Occurs in Chiller:Absorption:Indirect object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Chiller:Absorption:Indirect object={}", this->Name)); ErrorsFound = true; } } else { @@ -1639,7 +1638,7 @@ void IndirectAbsorberSpecs::calculate(EnergyPlusData &state, Real64 MyLoad, bool if (!state.dataGlobal->WarmupFlag) { if (this->MinCondInletTempCtr < 1) { ++this->MinCondInletTempCtr; - ShowWarningError(state, EnergyPlus::format("Chiller:Absorption:Indirect \"{}\"", this->Name)); + ShowWarningError(state, std::format("Chiller:Absorption:Indirect \"{}\"", this->Name)); ShowContinueError( state, EnergyPlus::format("...Entering condenser water temperature below specified minimum ({:.3R} C).", this->MinCondInletTemp)); ShowContinueError(state, @@ -1662,7 +1661,7 @@ void IndirectAbsorberSpecs::calculate(EnergyPlusData &state, Real64 MyLoad, bool if (!state.dataGlobal->WarmupFlag) { if (this->MinGenInletTempCtr < 1) { ++this->MinGenInletTempCtr; - ShowWarningError(state, EnergyPlus::format("Chiller:Absorption:Indirect \"{}\"", this->Name)); + ShowWarningError(state, std::format("Chiller:Absorption:Indirect \"{}\"", this->Name)); ShowContinueError(state, EnergyPlus::format("...Entering generator fluid temperature below specified minimum ({:.3R} C).", this->MinGeneratorInletTemp)); diff --git a/src/EnergyPlus/ChillerReformulatedEIR.cc b/src/EnergyPlus/ChillerReformulatedEIR.cc index e4464bf6a64..e67a381343e 100644 --- a/src/EnergyPlus/ChillerReformulatedEIR.cc +++ b/src/EnergyPlus/ChillerReformulatedEIR.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include #include // ObjexxFCL Headers @@ -390,8 +391,8 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) { thisChiller.FlowMode = static_cast(getEnumValue(DataPlant::FlowModeNamesUC, s_ipsc->cAlphaArgs(10))); if (thisChiller.FlowMode == DataPlant::FlowMode::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(10), s_ipsc->cAlphaArgs(10))); + ShowSevereError(state, std::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(10), s_ipsc->cAlphaArgs(10))); ShowContinueError(state, "Available choices are ConstantFlow, NotModulated, or LeavingSetpointModulated"); ShowContinueError(state, "Flow mode NotModulated is assumed and the simulation continues."); thisChiller.FlowMode = DataPlant::FlowMode::NotModulated; @@ -404,14 +405,14 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) thisChiller.RefCapWasAutoSized = true; } if (s_ipsc->rNumericArgs(1) == 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("Invalid {}={:.2R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); ErrorsFound = true; } thisChiller.RefCOP = s_ipsc->rNumericArgs(2); if (s_ipsc->rNumericArgs(2) == 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("Invalid {}={:.2R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); ErrorsFound = true; } @@ -419,7 +420,7 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) thisChiller.TempRefEvapOut = s_ipsc->rNumericArgs(3); thisChiller.TempRefCondOut = s_ipsc->rNumericArgs(4); if (thisChiller.TempRefEvapOut >= thisChiller.TempRefCondOut) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] >= {} [{:.2R}]", s_ipsc->cNumericFieldNames(3), @@ -448,7 +449,7 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) } if (thisChiller.MinPartLoadRat > thisChiller.MaxPartLoadRat) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} [{:.3R}] > {} [{:.3R}]", s_ipsc->cNumericFieldNames(7), @@ -460,34 +461,32 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) } if (thisChiller.MinUnloadRat < thisChiller.MinPartLoadRat || thisChiller.MinUnloadRat > thisChiller.MaxPartLoadRat) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} = {:.3R}", s_ipsc->cNumericFieldNames(10), s_ipsc->rNumericArgs(10))); ShowContinueError( - state, - EnergyPlus::format("{} must be greater than or equal to the {}", s_ipsc->cNumericFieldNames(10), s_ipsc->cNumericFieldNames(7))); - ShowContinueError( - state, EnergyPlus::format("{} must be less than or equal to the {}", s_ipsc->cNumericFieldNames(10), s_ipsc->cNumericFieldNames(8))); + state, std::format("{} must be greater than or equal to the {}", s_ipsc->cNumericFieldNames(10), s_ipsc->cNumericFieldNames(7))); + ShowContinueError(state, + std::format("{} must be less than or equal to the {}", s_ipsc->cNumericFieldNames(10), s_ipsc->cNumericFieldNames(8))); ErrorsFound = true; } if (thisChiller.OptPartLoadRat < thisChiller.MinPartLoadRat || thisChiller.OptPartLoadRat > thisChiller.MaxPartLoadRat) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} = {:.3R}", s_ipsc->cNumericFieldNames(9), s_ipsc->rNumericArgs(9))); ShowContinueError( - state, - EnergyPlus::format("{} must be greater than or equal to the {}", s_ipsc->cNumericFieldNames(9), s_ipsc->cNumericFieldNames(7))); - ShowContinueError( - state, EnergyPlus::format("{} must be less than or equal to the {}", s_ipsc->cNumericFieldNames(9), s_ipsc->cNumericFieldNames(8))); + state, std::format("{} must be greater than or equal to the {}", s_ipsc->cNumericFieldNames(9), s_ipsc->cNumericFieldNames(7))); + ShowContinueError(state, + std::format("{} must be less than or equal to the {}", s_ipsc->cNumericFieldNames(9), s_ipsc->cNumericFieldNames(8))); ErrorsFound = true; } thisChiller.CompPowerToCondenserFrac = s_ipsc->rNumericArgs(11); if (thisChiller.CompPowerToCondenserFrac < 0.0 || thisChiller.CompPowerToCondenserFrac > 1.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} = {:.3R}", s_ipsc->cNumericFieldNames(11), s_ipsc->rNumericArgs(11))); - ShowContinueError(state, EnergyPlus::format("{} must be greater than or equal to zero", s_ipsc->cNumericFieldNames(11))); - ShowContinueError(state, EnergyPlus::format("{} must be less than or equal to one", s_ipsc->cNumericFieldNames(11))); + ShowContinueError(state, std::format("{} must be greater than or equal to zero", s_ipsc->cNumericFieldNames(11))); + ShowContinueError(state, std::format("{} must be less than or equal to one", s_ipsc->cNumericFieldNames(11))); ErrorsFound = true; } @@ -510,8 +509,8 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) Node::CompFluidStream::Tertiary, Node::ObjectIsNotParent); if (thisChiller.HeatRecInletNodeNum == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(11), s_ipsc->cAlphaArgs(11))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(11), s_ipsc->cAlphaArgs(11))); ErrorsFound = true; } thisChiller.HeatRecOutletNodeNum = Node::GetOnlySingleNode(state, @@ -524,8 +523,8 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) Node::CompFluidStream::Tertiary, Node::ObjectIsNotParent); if (thisChiller.HeatRecOutletNodeNum == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(12), s_ipsc->cAlphaArgs(12))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(12), s_ipsc->cAlphaArgs(12))); ErrorsFound = true; } @@ -576,7 +575,7 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) thisChiller.HeatRecInletNodeNum = 0; thisChiller.HeatRecOutletNodeNum = 0; if ((!s_ipsc->lAlphaFieldBlanks(11)) || (!s_ipsc->lAlphaFieldBlanks(12))) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowWarningError(state, "Since Reference Heat Reclaim Volume Flow Rate = 0.0, heat recovery is inactive."); ShowContinueError(state, "However, node names were specified for heat recovery inlet or outlet nodes."); } @@ -596,8 +595,8 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) } if (thisChiller.CondenserFlowControl == DataPlant::CondenserFlowControl::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(16), s_ipsc->cAlphaArgs(16))); + ShowSevereError(state, std::format("{}{}=\"{}\",", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(16), s_ipsc->cAlphaArgs(16))); ShowContinueError(state, "Available choices are ConstantFlow, ModulatedChillerPLR, ModulatedLoopPLR, or ModulatedDeltaTemperature"); thisChiller.CondenserFlowControl = DataPlant::CondenserFlowControl::ConstantFlow; ErrorsFound = true; @@ -608,8 +607,8 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) } if ((thisChiller.ChillerCondLoopFlowFLoopPLRIndex == 0) && (thisChiller.CondenserFlowControl == DataPlant::CondenserFlowControl::ModulatedLoopPLR)) { - ShowSevereError(state, EnergyPlus::format("{}{} \"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(17), s_ipsc->cAlphaArgs(17))); + ShowSevereError(state, std::format("{}{} \"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(17), s_ipsc->cAlphaArgs(17))); ErrorsFound = true; } @@ -627,8 +626,8 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) if (!s_ipsc->lAlphaFieldBlanks(19)) { thisChiller.thermosiphonTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(s_ipsc->cAlphaArgs(19))); if (thisChiller.thermosiphonTempCurveIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, thisChiller.Name)); - ShowContinueError(state, EnergyPlus::format("Invalid {} = {}", s_ipsc->cAlphaFieldNames(19), s_ipsc->cAlphaArgs(19))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, s_ipsc->cCurrentModuleObject, thisChiller.Name)); + ShowContinueError(state, std::format("Invalid {} = {}", s_ipsc->cAlphaFieldNames(19), s_ipsc->cAlphaArgs(19))); ErrorsFound = true; } } @@ -636,7 +635,7 @@ void GetElecReformEIRChillerInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", s_ipsc->cCurrentModuleObject)); + ShowFatalError(state, std::format("Errors found in processing input for {}", s_ipsc->cCurrentModuleObject)); } } @@ -944,8 +943,8 @@ void ReformulatedEIRChillerSpecs::oneTimeInit(EnergyPlusData &state) (state.dataLoopNodes->Node(this->EvapOutletNodeNum).TempSetPointHi == Node::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { - ShowWarningError( - state, EnergyPlus::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError(state, + std::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); ShowContinueError( state, " A temperature setpoint is needed at the outlet node of a chiller in variable flow mode, use a SetpointManager"); ShowContinueError(state, " The overall loop setpoint will be assumed for chiller. The simulation continues ... "); @@ -958,8 +957,8 @@ void ReformulatedEIRChillerSpecs::oneTimeInit(EnergyPlusData &state) state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (fatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError( - state, EnergyPlus::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + ShowWarningError(state, + std::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the outlet node of a chiller evaporator in variable flow mode"); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the chiller evaporator outlet node "); @@ -1163,9 +1162,9 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerElectricReformulatedEIR: Potential issue with equipment sizing for {}", - this->Name)); + ShowMessage( + state, + std::format("SizeChillerElectricReformulatedEIR: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Reference Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); @@ -1184,7 +1183,7 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) } else { if (this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Reformulated Electric Chiller evap flow rate requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Reformulated Electric Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Reformulated Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && @@ -1240,9 +1239,9 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) RefCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - RefCapUser) / RefCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("Size:ChillerElectricReformulatedEIR: Potential issue with equipment sizing for {}", - this->Name)); + ShowMessage( + state, + std::format("Size:ChillerElectricReformulatedEIR: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Reference Capacity of {:.2R} [W]", RefCapUser)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Reference Capacity of {:.2R} [W]", tmpNomCap)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); @@ -1257,7 +1256,7 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) } else { if (this->RefCapWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Reformulated Electric Chiller reference capacity requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Reformulated Electric Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Reformulated Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->RefCapWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->RefCap > 0.0)) { @@ -1310,9 +1309,9 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("Size:ChillerElectricReformulatedEIR: Potential issue with equipment sizing for {}", - this->Name)); + ShowMessage( + state, + std::format("Size:ChillerElectricReformulatedEIR: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Reference Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); @@ -1333,7 +1332,7 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) this->CondenserType == DataPlant::CondenserType::WaterCooled) { ShowSevereError(state, "Autosizing of Reformulated Electric EIR Chiller condenser flow rate requires a condenser"); ShowContinueError(state, "loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Reformulated Electric EIR Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Reformulated Electric EIR Chiller object={}", this->Name)); ErrorsFound = true; } tmpCondVolFlowRate = this->CondVolFlowRateWasAutoSized ? this->RefCap * 0.000114 : this->CondVolFlowRate; @@ -1403,9 +1402,9 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHeatRecVolFlowRate - DesignHeatRecVolFlowRateUser) / DesignHeatRecVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("Size:ChillerElectricReformulatedEIR: Potential issue with equipment sizing for {}", - this->Name)); + ShowMessage( + state, + std::format("Size:ChillerElectricReformulatedEIR: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", DesignHeatRecVolFlowRateUser)); @@ -1523,9 +1522,8 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) Real64 CurveVal = Curve::CurveValue(state, this->ChillerCapFTIndex, this->TempRefEvapOut, this->TempRefCondOut); if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, "Capacity ratio as a function of temperature curve output is not equal to 1.0"); - ShowContinueError(state, - EnergyPlus::format("(+ or - 10%) at reference conditions for Chiller:Electric:ReformulatedEIR = {}", equipName)); - ShowContinueError(state, EnergyPlus::format("Curve output at reference conditions = {:.3T}", CurveVal)); + ShowContinueError(state, std::format("(+ or - 10%) at reference conditions for Chiller:Electric:ReformulatedEIR = {}", equipName)); + ShowContinueError(state, std::format("Curve output at reference conditions = {:.3f}", CurveVal)); } Curve::GetCurveMinMaxValues(state, this->ChillerCapFTIndex, @@ -1539,9 +1537,8 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) Real64 CurveVal = Curve::CurveValue(state, this->ChillerEIRFTIndex, this->TempRefEvapOut, this->TempRefCondOut); if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, "Energy input ratio as a function of temperature curve output is not equal to 1.0"); - ShowContinueError(state, - EnergyPlus::format("(+ or - 10%) at reference conditions for Chiller:Electric:ReformulatedEIR = {}", equipName)); - ShowContinueError(state, EnergyPlus::format("Curve output at reference conditions = {:.3T}", CurveVal)); + ShowContinueError(state, std::format("(+ or - 10%) at reference conditions for Chiller:Electric:ReformulatedEIR = {}", equipName)); + ShowContinueError(state, std::format("Curve output at reference conditions = {:.3f}", CurveVal)); } Curve::GetCurveMinMaxValues(state, this->ChillerEIRFTIndex, @@ -1560,9 +1557,8 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) } if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, "Energy input ratio as a function of part-load ratio curve output is not equal to 1.0"); - ShowContinueError(state, - EnergyPlus::format("(+ or - 10%) at reference conditions for Chiller:Electric:ReformulatedEIR = {}", equipName)); - ShowContinueError(state, EnergyPlus::format("Curve output at reference conditions = {:.3T}", CurveVal)); + ShowContinueError(state, std::format("(+ or - 10%) at reference conditions for Chiller:Electric:ReformulatedEIR = {}", equipName)); + ShowContinueError(state, std::format("Curve output at reference conditions = {:.3f}", CurveVal)); } if (this->PartLoadCurveType == PLR::LeavingCondenserWaterTemperature) { @@ -1585,19 +1581,19 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) if (this->ChillerEIRFPLRPLRMin < 0 || this->ChillerEIRFPLRPLRMin >= this->ChillerEIRFPLRPLRMax || this->ChillerEIRFPLRPLRMin > 1) { ShowSevereError(state, - EnergyPlus::format("Invalid minimum value of PLR = {:.3T} in bicubic curve = {} which is used", - this->ChillerEIRFPLRPLRMin, - this->EIRFPLRName)); - ShowContinueError(state, EnergyPlus::format("by Chiller:Electric:ReformulatedEIR = {}.", equipName)); + std::format("Invalid minimum value of PLR = {:.3f} in bicubic curve = {} which is used", + this->ChillerEIRFPLRPLRMin, + this->EIRFPLRName)); + ShowContinueError(state, std::format("by Chiller:Electric:ReformulatedEIR = {}.", equipName)); ShowContinueError(state, "The minimum value of PLR [y] must be from zero to 1, and less than the maximum value of PLR."); ErrorsFound = true; } if (this->ChillerEIRFPLRPLRMax > 1.1 || this->ChillerEIRFPLRPLRMax <= this->ChillerEIRFPLRPLRMin || this->ChillerEIRFPLRPLRMax < 0) { ShowSevereError(state, - EnergyPlus::format("Invalid maximum value of PLR = {:.3T} in bicubic curve = {} which is used", - this->ChillerEIRFPLRPLRMax, - this->EIRFPLRName)); - ShowContinueError(state, EnergyPlus::format("by Chiller:Electric:ReformulatedEIR = {}.", equipName)); + std::format("Invalid maximum value of PLR = {:.3f} in bicubic curve = {} which is used", + this->ChillerEIRFPLRPLRMax, + this->EIRFPLRName)); + ShowContinueError(state, std::format("by Chiller:Electric:ReformulatedEIR = {}.", equipName)); ShowContinueError(state, "The maximum value of PLR [y] must be from zero to 1.1, and greater than the minimum value of PLR."); ErrorsFound = true; } @@ -1644,7 +1640,7 @@ void ReformulatedEIRChillerSpecs::size(EnergyPlusData &state) // Output warning message if negative values are found in the EIRFPLR curve output. Results in Fatal error. if (FoundNegValue) { ShowWarningError(state, "Energy input to cooling output ratio function of part-load ratio curve shows negative values "); - ShowContinueError(state, EnergyPlus::format("for Chiller:Electric:ReformulatedEIR = {}.", equipName)); + ShowContinueError(state, std::format("for Chiller:Electric:ReformulatedEIR = {}.", equipName)); ShowContinueError(state, "EIR as a function of PLR curve output at various part-load ratios and condenser water temperatures shown below:"); ShowContinueError(state, "PLR = 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00"); @@ -1778,9 +1774,8 @@ void ReformulatedEIRChillerSpecs::control(EnergyPlusData &state, Real64 &MyLoad, if (this->IterLimitExceededNum == 1) { ShowWarningError( state, - EnergyPlus::format( - "{}: Iteration limit exceeded calculating condenser outlet temperature and non-converged temperature is used", - this->Name)); + std::format("{}: Iteration limit exceeded calculating condenser outlet temperature and non-converged temperature is used", + this->Name)); } else { ShowRecurringWarningErrorAtEnd(state, this->Name + ": Iteration limit exceeded calculating condenser outlet temperature.", @@ -1795,11 +1790,10 @@ void ReformulatedEIRChillerSpecs::control(EnergyPlusData &state, Real64 &MyLoad, if (this->IterFailed == 1) { ShowWarningError( state, - EnergyPlus::format("{}: Solution found when calculating condenser outlet temperature. The inlet temperature will used " - "and the simulation continues...", - this->Name)); - ShowContinueError(state, - EnergyPlus::format("Please check minimum and maximum values of x in EIRFPLR Curve {}", this->EIRFPLRName)); + std::format("{}: Solution found when calculating condenser outlet temperature. The inlet temperature will used " + "and the simulation continues...", + this->Name)); + ShowContinueError(state, std::format("Please check minimum and maximum values of x in EIRFPLR Curve {}", this->EIRFPLRName)); } else { ShowRecurringWarningErrorAtEnd(state, this->Name + ": Solution is not found in calculating condenser outlet temperature.", @@ -2460,9 +2454,9 @@ void ReformulatedEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoa } } else { ShowFatalError(state, - EnergyPlus::format("{}: The ModulatedLoopPLR condenser flow control requires a Sizing:Plant object for " - "both loops connected to the condenser and evaporator of the chiller.", - RoutineName)); + std::format("{}: The ModulatedLoopPLR condenser flow control requires a Sizing:Plant object for " + "both loops connected to the condenser and evaporator of the chiller.", + RoutineName)); } } break; case DataPlant::CondenserFlowControl::ModulatedDeltaTemperature: { @@ -2493,7 +2487,7 @@ void ReformulatedEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoa Real64 CpCond = this->CDPlantLoc.loop->glycol->getSpecificHeat(state, condInletTemp, RoutineName); this->CondOutletTemp = this->QCondenser / this->CondMassFlowRate / CpCond + condInletTemp; } else { - ShowSevereError(state, EnergyPlus::format("ControlReformEIRChillerModel: Condenser flow = 0, for ElecReformEIRChiller={}", this->Name)); + ShowSevereError(state, std::format("ControlReformEIRChillerModel: Condenser flow = 0, for ElecReformEIRChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); } } @@ -2530,13 +2524,13 @@ void ReformulatedEIRChillerSpecs::checkMinMaxCurveBoundaries(EnergyPlusData &sta if (this->CAPFTXIter == 1) { ShowWarningError( state, - EnergyPlus::format( - "CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The evaporator outlet temperature ({:.2T} C) is outside the range of evaporator " + std::format( + "CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The evaporator outlet temperature ({:.2f} C) is outside the range of evaporator " "outlet temperatures (X var) given in Cooling Capacity Function of Temperature biquadratic curve = {}", this->Name, this->EvapOutletTemp, this->CAPFTName)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("The range specified = {:.2T} C to {:.2T} C.", CAPFTXTmin, CAPFTXTmax)); + ShowContinueErrorTimeStamp(state, std::format("The range specified = {:.2f} C to {:.2f} C.", CAPFTXTmin, CAPFTXTmax)); ShowRecurringWarningErrorAtEnd(state, "CHILLER:ELECTRIC:REFORMULATEDEIR \"" + this->Name + "\": The evap outlet temp range in Cooling Capacity Function of Temp curve error continues.", @@ -2558,13 +2552,13 @@ void ReformulatedEIRChillerSpecs::checkMinMaxCurveBoundaries(EnergyPlusData &sta if (this->EIRFTXIter == 1) { ShowWarningError( state, - EnergyPlus::format( - "CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The evaporator outlet temperature ({:.2T} C) is outside the range of evaporator " + std::format( + "CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The evaporator outlet temperature ({:.2f} C) is outside the range of evaporator " "outlet temperatures (X var) given in Electric Input to Cooling Output Ratio Function of Temperature biquadratic curve = {}", this->Name, this->EvapOutletTemp, this->EIRFTName)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("The range specified = {:.2T} C to {:.2T} C.", EIRFTXTmin, EIRFTXTmax)); + ShowContinueErrorTimeStamp(state, std::format("The range specified = {:.2f} C to {:.2f} C.", EIRFTXTmin, EIRFTXTmax)); ShowRecurringWarningErrorAtEnd( state, "CHILLER:ELECTRIC:REFORMULATEDEIR \"" + this->Name + @@ -2619,13 +2613,12 @@ void ReformulatedEIRChillerSpecs::checkMinMaxCurveBoundaries(EnergyPlusData &sta if (this->CAPFTYIter == 1) { ShowWarningError( state, - EnergyPlus::format( - "CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The condenser outlet temperature ({:.2T} C) is outside the range of condenser " - "outlet temperatures (Y var) given in Cooling Capacity Function of Temperature biquadratic curve = {}", - this->Name, - this->CondOutletTemp, - this->CAPFTName)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("The range specified = {:.2T} C to {:.2T} C.", CAPFTYTmin, CAPFTYTmax)); + std::format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The condenser outlet temperature ({:.2f} C) is outside the range of condenser " + "outlet temperatures (Y var) given in Cooling Capacity Function of Temperature biquadratic curve = {}", + this->Name, + this->CondOutletTemp, + this->CAPFTName)); + ShowContinueErrorTimeStamp(state, std::format("The range specified = {:.2f} C to {:.2f} C.", CAPFTYTmin, CAPFTYTmax)); ShowRecurringWarningErrorAtEnd(state, "CHILLER:ELECTRIC:REFORMULATEDEIR \"" + this->Name + "\": The cond outlet temp range in Cooling Capacity Function of Temp curve error continues.", @@ -2647,13 +2640,13 @@ void ReformulatedEIRChillerSpecs::checkMinMaxCurveBoundaries(EnergyPlusData &sta if (this->EIRFTYIter == 1) { ShowWarningError( state, - EnergyPlus::format( - "CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The condenser outlet temperature ({:.2T} C) is outside the range of condenser " + std::format( + "CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The condenser outlet temperature ({:.2f} C) is outside the range of condenser " "outlet temperatures (Y var) given in Electric Input to Cooling Output Ratio Function of Temperature biquadratic curve = {}", this->Name, this->CondOutletTemp, this->EIRFTName)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("The range specified = {:.2T} C to {:.2T} C.", EIRFTYTmin, EIRFTYTmax)); + ShowContinueErrorTimeStamp(state, std::format("The range specified = {:.2f} C to {:.2f} C.", EIRFTYTmin, EIRFTYTmax)); ShowRecurringWarningErrorAtEnd( state, "CHILLER:ELECTRIC:REFORMULATEDEIR \"" + this->Name + @@ -2678,13 +2671,13 @@ void ReformulatedEIRChillerSpecs::checkMinMaxCurveBoundaries(EnergyPlusData &sta if (this->EIRFPLRTIter == 1) { ShowWarningError( state, - EnergyPlus::format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The condenser outlet temperature ({:.2T} C) is outside the " - "range of condenser outlet temperatures (X var) given in Electric Input to Cooling Output Ratio Function " - "of Part-load Ratio bicubic curve = {}", - this->Name, - this->CondOutletTemp, - this->EIRFPLRName)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("The range specified = {:.2T} C to {:.2T} C.", EIRFPLRTmin, EIRFPLRTmax)); + std::format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The condenser outlet temperature ({:.2f} C) is outside the " + "range of condenser outlet temperatures (X var) given in Electric Input to Cooling Output Ratio Function " + "of Part-load Ratio bicubic curve = {}", + this->Name, + this->CondOutletTemp, + this->EIRFPLRName)); + ShowContinueErrorTimeStamp(state, std::format("The range specified = {:.2f} C to {:.2f} C.", EIRFPLRTmin, EIRFPLRTmax)); ShowRecurringWarningErrorAtEnd( state, "CHILLER:ELECTRIC:REFORMULATEDEIR \"" + this->Name + @@ -2709,13 +2702,12 @@ void ReformulatedEIRChillerSpecs::checkMinMaxCurveBoundaries(EnergyPlusData &sta if (this->EIRFPLRPLRIter == 1) { ShowWarningError( state, - EnergyPlus::format( - "CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The part-load ratio ({:.3T}) is outside the range of part-load ratios (Y var) " - "given in Electric Input to Cooling Output Ratio Function of Part-load Ratio bicubic curve = {}", - this->Name, - this->ChillerPartLoadRatio, - this->EIRFPLRName)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("The range specified = {:.3T} to {:.3T}.", EIRFPLRPLRmin, EIRFPLRPLRmax)); + std::format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\": The part-load ratio ({:.3f}) is outside the range of part-load ratios (Y var) " + "given in Electric Input to Cooling Output Ratio Function of Part-load Ratio bicubic curve = {}", + this->Name, + this->ChillerPartLoadRatio, + this->EIRFPLRName)); + ShowContinueErrorTimeStamp(state, std::format("The range specified = {:.3f} to {:.3f}.", EIRFPLRPLRmin, EIRFPLRPLRmax)); ShowRecurringWarningErrorAtEnd( state, "CHILLER:ELECTRIC:REFORMULATEDEIR \"" + this->Name + @@ -2767,7 +2759,7 @@ void ReformulatedEIRChillerSpecs::checkMinMaxCurveBoundaries(EnergyPlusData &sta if (this->ChillerCapFT < 0) { if (this->ChillerCapFTError < 1 && this->CWPlantLoc.side->FlowLock != DataPlant::FlowLock::Unlocked && !state.dataGlobal->WarmupFlag) { ++this->ChillerCapFTError; - ShowWarningError(state, EnergyPlus::format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\":", this->Name)); + ShowWarningError(state, std::format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\":", this->Name)); ShowContinueError( state, EnergyPlus::format(" Chiller Capacity as a Function of Temperature curve output is negative ({:.3R}).", this->ChillerCapFT)); ShowContinueError( @@ -2792,7 +2784,7 @@ void ReformulatedEIRChillerSpecs::checkMinMaxCurveBoundaries(EnergyPlusData &sta if (this->ChillerEIRFT < 0.0) { if (this->ChillerEIRFTError < 1 && this->CWPlantLoc.side->FlowLock != DataPlant::FlowLock::Unlocked && !state.dataGlobal->WarmupFlag) { ++this->ChillerEIRFTError; - ShowWarningError(state, EnergyPlus::format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\":", this->Name)); + ShowWarningError(state, std::format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\":", this->Name)); ShowContinueError( state, EnergyPlus::format(" Reformulated Chiller EIR as a Function of Temperature curve output is negative ({:.3R}).", this->ChillerEIRFT)); @@ -2842,7 +2834,7 @@ void ReformulatedEIRChillerSpecs::checkMinMaxCurveBoundaries(EnergyPlusData &sta if (this->ChillerEIRFPLR < 0.0) { if (this->ChillerEIRFPLRError < 1 && this->CWPlantLoc.side->FlowLock != DataPlant::FlowLock::Unlocked && !state.dataGlobal->WarmupFlag) { ++this->ChillerEIRFPLRError; - ShowWarningError(state, EnergyPlus::format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\":", this->Name)); + ShowWarningError(state, std::format("CHILLER:ELECTRIC:REFORMULATEDEIR \"{}\":", this->Name)); ShowContinueError( state, EnergyPlus::format(" Chiller EIR as a function of PLR and condenser water temperature curve output is negative ({:.3R}).", diff --git a/src/EnergyPlus/Coils/CoilCoolingDX.cc b/src/EnergyPlus/Coils/CoilCoolingDX.cc index 7147f61f367..638e2b709a0 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDX.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDX.cc @@ -45,10 +45,13 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers #include +// ObjexxFCL Headers #include // needs to be in BranchNodeConnections.hh +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/Coils/CoilCoolingDXAshrae205Performance.cc b/src/EnergyPlus/Coils/CoilCoolingDXAshrae205Performance.cc index 0f2b4d88bc6..edb2b6c3b75 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXAshrae205Performance.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDXAshrae205Performance.cc @@ -45,7 +45,13 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + +// Local Headers #include "rs0004_factory.h" + +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.cc b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.cc index bfc2e99738f..c4802878968 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitOperatingMode.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include @@ -166,7 +167,7 @@ CoilCoolingDXCurveFitOperatingMode::CoilCoolingDXCurveFitOperatingMode(EnergyPlu inputProcessor->getRealFieldValue(modeFields, modeSchemaProps, "nominal_evaporative_condenser_pump_power"); input_specs.nominal_speed_number = inputProcessor->getIntFieldValue(modeFields, modeSchemaProps, "nominal_speed_number"); for (int fieldNum = 1; fieldNum <= 10; ++fieldNum) { - auto const speedFieldName = format("speed_{}_name", fieldNum); + auto const speedFieldName = EnergyPlus::format("speed_{}_name", fieldNum); auto const speedName = inputProcessor->getAlphaFieldValue(modeFields, modeSchemaProps, speedFieldName); if (speedName.empty()) { break; diff --git a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.cc b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.cc index 47a5d74baff..ae886a9d584 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitPerformance.cc @@ -45,17 +45,15 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include #include #include #include -#include -#include #include #include -#include #include #include #include diff --git a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc index 81fd51eb160..3214b8b0a59 100644 --- a/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc +++ b/src/EnergyPlus/Coils/CoilCoolingDXCurveFitSpeed.cc @@ -45,8 +45,11 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include #include +// EnergyPlus Headers #include #include #include @@ -149,7 +152,7 @@ void CoilCoolingDXCurveFitSpeed::instantiateFromInputSpec(EnergyPlus::EnergyPlus "Waste Heat Modifier Function of Temperature Curve Name = " + input_data.waste_heat_function_of_temperature_curve_name); ShowContinueError( state, "...Waste Heat Modifier Function of Temperature Curve Name output is not equal to 1.0 (+ or - 10%) at rated conditions."); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } @@ -184,7 +187,7 @@ void CoilCoolingDXCurveFitSpeed::instantiateFromInputSpec(EnergyPlus::EnergyPlus ShowContinueError( state, EnergyPlus::format("...{}=\"{}\" has out of range value.", fieldName, input_data.part_load_fraction_correlation_curve_name)); ShowContinueError(state, - EnergyPlus::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + EnergyPlus::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2f} is {:.3f}", MinCurvePLR, MinCurveVal)); ShowContinueError(state, "...Setting curve minimum to 0.7 and simulation continues."); Curve::SetCurveOutputMinValue(state, this->indexPLRFPLF, errorsFound, 0.7); } @@ -194,7 +197,7 @@ void CoilCoolingDXCurveFitSpeed::instantiateFromInputSpec(EnergyPlus::EnergyPlus ShowContinueError( state, EnergyPlus::format("...{}=\"{}\" has out of range value.", fieldName, input_data.part_load_fraction_correlation_curve_name)); ShowContinueError(state, - EnergyPlus::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + EnergyPlus::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2f} is {:.3f}", MaxCurvePLR, MaxCurveVal)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, this->indexPLRFPLF, errorsFound, 1.0); } diff --git a/src/EnergyPlus/CommandLineInterface.cc b/src/EnergyPlus/CommandLineInterface.cc index 84d1d8e43e4..caaf3a2efba 100644 --- a/src/EnergyPlus/CommandLineInterface.cc +++ b/src/EnergyPlus/CommandLineInterface.cc @@ -46,12 +46,13 @@ // POSSIBILITY OF SUCH DAMAGE. // C++ Headers +#include #include // CLI Headers #include -// Project headers +// EnergyPlus Headers #include #include #include @@ -59,11 +60,10 @@ #include #include #include -#include - #if LINK_WITH_PYTHON # include #endif +#include namespace EnergyPlus { @@ -114,13 +114,13 @@ namespace CommandLineInterface { // opt.add("", false, 0, 0, "Display version information", "-v", "--version"); app.set_version_flag("-v,--version", EnergyPlus::DataStringGlobals::VerString); - std::string const description = fmt::format(R"({} + std::string const description = EnergyPlus::format(R"({} PythonLinkage: {} Built on Platform: {} )", - state.dataStrGlobals->VerStringVar, - PluginManagement::pythonStringForUsage(state), - DataStringGlobals::BuildPlatformString); + state.dataStrGlobals->VerStringVar, + PluginManagement::pythonStringForUsage(state), + DataStringGlobals::BuildPlatformString); app.description(description); auto *annualOpt = app.add_flag("-a,--annual", state.dataGlobal->AnnualSimulation, "Force annual simulation"); @@ -180,15 +180,16 @@ Built on Platform: {} bool const converted = CLI::detail::lexical_cast(input, number_of_threads); if (!converted) { // CLI::ValidationError - return fmt::format("Argument should be an integer, not '{}'", input); + return EnergyPlus::format("Argument should be an integer, not '{}'", input); } if (number_of_threads <= 0) { DisplayString(state, "Invalid value for -j arg. Defaulting to 1."); return "1"; } if (number_of_threads > MAX_N) { - DisplayString(state, - fmt::format("Invalid value for -j arg. Value exceeds num available. Defaulting to num available. -j {}", MAX_N)); + DisplayString( + state, + EnergyPlus::format("Invalid value for -j arg. Value exceeds num available. Defaulting to num available. -j {}", MAX_N)); return std::to_string(MAX_N); } return input; @@ -396,7 +397,8 @@ state.dataStrGlobals->inputFilePath='{:g}', break; default: DisplayString(state, - fmt::format("ERROR: Input file must have IDF, IMF, or epJSON extension: {:g}", state.dataStrGlobals->inputFilePath)); + EnergyPlus::format("ERROR: Input file must have IDF, IMF, or epJSON extension: {}", + state.dataStrGlobals->inputFilePath.generic_string())); if (eplusRunningViaAPI) { return static_cast(ReturnCodes::Failure); } @@ -606,7 +608,7 @@ state.dataStrGlobals->inputFilePath='{:g}', if (FileSystem::fileExists(state.files.iniFile.filePath)) { EnergyPlus::InputFile iniFile = state.files.iniFile.try_open(); if (!iniFile.good()) { - DisplayString(state, fmt::format("ERROR: Could not open file {} for input (read).", iniFile.filePath)); + DisplayString(state, EnergyPlus::format("ERROR: Could not open file {} for input (read).", iniFile.filePath.string())); if (eplusRunningViaAPI) { return static_cast(ReturnCodes::Failure); } @@ -633,8 +635,9 @@ state.dataStrGlobals->inputFilePath='{:g}', // Check if specified files exist if (!FileSystem::fileExists(state.dataStrGlobals->inputFilePath)) { - DisplayString( - state, fmt::format("ERROR: Could not find input data file: {}.", FileSystem::getAbsolutePath(state.dataStrGlobals->inputFilePath))); + DisplayString(state, + EnergyPlus::format("ERROR: Could not find input data file: {}.", + FileSystem::getAbsolutePath(state.dataStrGlobals->inputFilePath).string())); DisplayString(state, errorFollowUp); if (eplusRunningViaAPI) { return static_cast(ReturnCodes::Failure); @@ -644,9 +647,9 @@ state.dataStrGlobals->inputFilePath='{:g}', if ((weatherPathOpt->count() > 0) && !state.dataGlobal->DDOnlySimulation) { if (!FileSystem::fileExists(state.files.inputWeatherFilePath.filePath)) { - DisplayString( - state, - fmt::format("ERROR: Could not find weather file: {}.", FileSystem::getAbsolutePath(state.files.inputWeatherFilePath.filePath))); + DisplayString(state, + EnergyPlus::format("ERROR: Could not find weather file: {}.", + FileSystem::getAbsolutePath(state.files.inputWeatherFilePath.filePath).string())); DisplayString(state, errorFollowUp); if (eplusRunningViaAPI) { return static_cast(ReturnCodes::Failure); @@ -661,7 +664,8 @@ state.dataStrGlobals->inputFilePath='{:g}', if (runEPMacro) { fs::path epMacroPath = (state.dataStrGlobals->exeDirectoryPath / "EPMacro").replace_extension(FileSystem::exeExtension); if (!FileSystem::fileExists(epMacroPath)) { - DisplayString(state, fmt::format("ERROR: Could not find EPMacro executable: {}.", FileSystem::getAbsolutePath(epMacroPath))); + DisplayString(state, + EnergyPlus::format("ERROR: Could not find EPMacro executable: {}.", FileSystem::getAbsolutePath(epMacroPath).string())); if (eplusRunningViaAPI) { return static_cast(ReturnCodes::Failure); } @@ -688,7 +692,8 @@ state.dataStrGlobals->inputFilePath='{:g}', (state.dataStrGlobals->exeDirectoryPath / fs::path("ExpandObjects")).replace_extension(FileSystem::exeExtension); if (!FileSystem::fileExists(expandObjectsPath)) { DisplayString(state, - fmt::format("ERROR: Could not find ExpandObjects executable: {}.", FileSystem::getAbsolutePath(expandObjectsPath))); + EnergyPlus::format("ERROR: Could not find ExpandObjects executable: {}.", + FileSystem::getAbsolutePath(expandObjectsPath).string())); if (eplusRunningViaAPI) { return static_cast(ReturnCodes::Failure); } @@ -700,8 +705,8 @@ state.dataStrGlobals->inputFilePath='{:g}', // check if IDD actually exists since ExpandObjects still requires it if (!FileSystem::fileExists(state.dataStrGlobals->inputIddFilePath)) { DisplayString(state, - fmt::format("ERROR: Could not find input data dictionary: {}.", - FileSystem::getAbsolutePath(state.dataStrGlobals->inputIddFilePath))); + EnergyPlus::format("ERROR: Could not find input data dictionary: {}.", + FileSystem::getAbsolutePath(state.dataStrGlobals->inputIddFilePath).string())); DisplayString(state, errorFollowUp); if (eplusRunningViaAPI) { return static_cast(ReturnCodes::Failure); @@ -894,7 +899,9 @@ state.dataStrGlobals->inputFilePath='{:g}', state, "ERROR: Could not find ReadVarsESO executable. When calling through C API, make sure to call setEnergyPlusRootDirectory"); } else { - DisplayString(state, fmt::format("ERROR: Could not find ReadVarsESO executable: {}.", FileSystem::getAbsolutePath(readVarsPath))); + DisplayString( + state, + EnergyPlus::format("ERROR: Could not find ReadVarsESO executable: {}.", FileSystem::getAbsolutePath(readVarsPath).string())); } return static_cast(ReturnCodes::Failure); } @@ -907,7 +914,7 @@ state.dataStrGlobals->inputFilePath='{:g}', if (!rviFileExists) { std::ofstream ofs{RVIfile}; if (!ofs.good()) { - ShowFatalError(state, EnergyPlus::format("EnergyPlus: Could not open file \"{}\" for output (write).", RVIfile)); + ShowFatalError(state, EnergyPlus::format("EnergyPlus: Could not open file \"{}\" for output (write).", RVIfile.string())); } else { ofs << FileSystem::toString(state.files.eso.filePath) << '\n'; ofs << FileSystem::toString(state.files.csv.filePath) << '\n'; @@ -918,7 +925,7 @@ state.dataStrGlobals->inputFilePath='{:g}', if (!mviFileExists) { std::ofstream ofs{MVIfile}; if (!ofs.good()) { - ShowFatalError(state, EnergyPlus::format("EnergyPlus: Could not open file \"{}\" for output (write).", RVIfile)); + ShowFatalError(state, EnergyPlus::format("EnergyPlus: Could not open file \"{}\" for output (write).", RVIfile.string())); } else { ofs << FileSystem::toString(state.files.mtr.filePath) << '\n'; ofs << FileSystem::toString(state.files.mtr_csv.filePath) << '\n'; diff --git a/src/EnergyPlus/CondenserLoopTowers.cc b/src/EnergyPlus/CondenserLoopTowers.cc index 19074546f58..62db2c0af17 100644 --- a/src/EnergyPlus/CondenserLoopTowers.cc +++ b/src/EnergyPlus/CondenserLoopTowers.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -895,7 +896,7 @@ namespace CondenserLoopTowers { } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} \"{}\". Nominal capacity input method has been specified and tower UA at low fan speed is being autosized.", s_ipsc->cCurrentModuleObject, tower.Name)); @@ -905,32 +906,31 @@ namespace CondenserLoopTowers { if (tower.FreeConvTowerUA != 0.0) { if (tower.FreeConvTowerUA > 0.0) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\". Nominal capacity input method and free convection UA have been specified.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + std::format("{} \"{}\". Nominal capacity input method and free convection UA have been specified.", + s_ipsc->cCurrentModuleObject, + tower.Name)); } else { - ShowSevereError(state, - EnergyPlus::format( - "{} \"{}\". Nominal capacity input method has been specified and free convection UA is being autosized.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + ShowSevereError( + state, + std::format("{} \"{}\". Nominal capacity input method has been specified and free convection UA is being autosized.", + s_ipsc->cCurrentModuleObject, + tower.Name)); } ShowContinueError(state, "Free convection UA will be set according to nominal tower capacity."); } if (tower.TowerLowSpeedNomCap >= tower.TowerNominalCapacity) { ShowSevereError(state, - EnergyPlus::format("{} \"{}\". Low-speed nominal capacity must be less than the high-speed nominal capacity.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + std::format("{} \"{}\". Low-speed nominal capacity must be less than the high-speed nominal capacity.", + s_ipsc->cCurrentModuleObject, + tower.Name)); ErrorsFound = true; } if (!tower.TowerLowSpeedNomCapWasAutoSized) { if (tower.TowerFreeConvNomCap >= tower.TowerLowSpeedNomCap) { - ShowSevereError( - state, - EnergyPlus::format("{} \"{}\". Free convection nominal capacity must be less than the low-speed nominal capacity.", - s_ipsc->cCurrentModuleObject, - tower.Name)); + ShowSevereError(state, + std::format("{} \"{}\". Free convection nominal capacity must be less than the low-speed nominal capacity.", + s_ipsc->cCurrentModuleObject, + tower.Name)); ErrorsFound = true; } } @@ -997,9 +997,9 @@ namespace CondenserLoopTowers { s_ipsc->lAlphaFieldBlanks(5)) { ShowSevereCustom(state, eoh, - EnergyPlus::format("A {} must be specified when {} is specified as CoolToolsUserDefined or YorkCalcUserDefined", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaFieldNames(4))); + std::format("A {} must be specified when {} is specified as CoolToolsUserDefined or YorkCalcUserDefined", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaFieldNames(4))); ErrorsFound = true; } else if ((Util::SameString(AlphArray(4), "CoolToolsCrossFlow") || Util::SameString(AlphArray(4), "YorkCalc")) && !s_ipsc->lAlphaFieldBlanks(5)) { @@ -1018,10 +1018,10 @@ namespace CondenserLoopTowers { ShowWarningCustom( state, eoh, - EnergyPlus::format("The Fan Power Ratio as a function of Air Flow Rate Ratio Curve Name specified as {} was not found." - "Fan Power as a function of Air Flow Rate Ratio will default to Fan Power = (Air Flow Rate Ratio)^3." - "The simulation continues.", - AlphArray(6))); + std::format("The Fan Power Ratio as a function of Air Flow Rate Ratio Curve Name specified as {} was not found." + "Fan Power as a function of Air Flow Rate Ratio will default to Fan Power = (Air Flow Rate Ratio)^3." + "The simulation continues.", + AlphArray(6))); } } @@ -1134,10 +1134,10 @@ namespace CondenserLoopTowers { // verify the correct number of coefficients for the CoolTools model if (NumNums2 != 43) { ShowSevereError(state, - EnergyPlus::format("CoolingTower:VariableSpeed \"{}\". The number of numeric inputs for object " - "CoolingTowerPerformance:CoolTools \"{}\" must equal 43.", - tower.Name, - tower.ModelCoeffObjectName)); + std::format("CoolingTower:VariableSpeed \"{}\". The number of numeric inputs for object " + "CoolingTowerPerformance:CoolTools \"{}\" must equal 43.", + tower.Name, + tower.ModelCoeffObjectName)); ErrorsFound = true; } else { @@ -1159,10 +1159,10 @@ namespace CondenserLoopTowers { if (!vstower.FoundModelCoeff) { ShowSevereError( state, - EnergyPlus::format("CoolingTower:VariableSpeed \"{}\". User defined name for variable speed cooling tower model coefficients " - "object not found = {}", - tower.Name, - tower.ModelCoeffObjectName)); + std::format("CoolingTower:VariableSpeed \"{}\". User defined name for variable speed cooling tower model coefficients " + "object not found = {}", + tower.Name, + tower.ModelCoeffObjectName)); ErrorsFound = true; } } else if (Util::SameString(AlphArray(4), "YorkCalcUserDefined")) { @@ -1178,10 +1178,10 @@ namespace CondenserLoopTowers { // verify the correct number of coefficients for the YorkCalc model if (NumNums2 != 36) { ShowSevereError(state, - EnergyPlus::format("CoolingTower:VariableSpeed \"{}\". The number of numeric inputs for object " - "CoolingTowerPerformance:YorkCalc \"{}\" must equal 36.", - tower.Name, - tower.ModelCoeffObjectName)); + std::format("CoolingTower:VariableSpeed \"{}\". The number of numeric inputs for object " + "CoolingTowerPerformance:YorkCalc \"{}\" must equal 36.", + tower.Name, + tower.ModelCoeffObjectName)); ErrorsFound = true; } else { @@ -1205,10 +1205,10 @@ namespace CondenserLoopTowers { if (!vstower.FoundModelCoeff) { ShowSevereError( state, - EnergyPlus::format("{} \"{}\". User defined name for variable speed cooling tower model coefficients object not found = {}", - s_ipsc->cCurrentModuleObject, - tower.Name, - tower.ModelCoeffObjectName)); + std::format("{} \"{}\". User defined name for variable speed cooling tower model coefficients object not found = {}", + s_ipsc->cCurrentModuleObject, + tower.Name, + tower.ModelCoeffObjectName)); ErrorsFound = true; } } else { @@ -1250,11 +1250,11 @@ namespace CondenserLoopTowers { if (NumArray(1) < vstower.MinInletAirWBTemp || NumArray(1) > vstower.MaxInletAirWBTemp) { ShowSevereCustom(state, eoh, - EnergyPlus::format("The design inlet air wet-bulb temperature of {:5.2F}" - "must be within the model limits of {:5.2F} and {:5.2F} degrees C", - tower.DesignInletWB, - vstower.MinInletAirWBTemp, - vstower.MaxInletAirWBTemp)); + std::format("The design inlet air wet-bulb temperature of {:5.2F}" + "must be within the model limits of {:5.2F} and {:5.2F} degrees C", + tower.DesignInletWB, + vstower.MinInletAirWBTemp, + vstower.MaxInletAirWBTemp)); ErrorsFound = true; } @@ -1262,11 +1262,11 @@ namespace CondenserLoopTowers { if (NumArray(2) < vstower.MinApproachTemp || NumArray(2) > vstower.MaxApproachTemp) { ShowSevereCustom(state, eoh, - EnergyPlus::format("The design approach temperature of {:5.2F}" - "must be within the model limits of {:5.2F} and {:5.2F} degrees C", - tower.DesignApproach, - vstower.MinApproachTemp, - vstower.MaxApproachTemp)); + std::format("The design approach temperature of {:5.2F}" + "must be within the model limits of {:5.2F} and {:5.2F} degrees C", + tower.DesignApproach, + vstower.MinApproachTemp, + vstower.MaxApproachTemp)); ErrorsFound = true; } @@ -1274,11 +1274,11 @@ namespace CondenserLoopTowers { if (NumArray(3) < vstower.MinRangeTemp || NumArray(3) > vstower.MaxRangeTemp) { ShowSevereCustom(state, eoh, - EnergyPlus::format("The design range temperature of {:5.2F}" - "must be within the model limits of {:5.2F} and {:5.2F} degrees C", - tower.DesignRange, - vstower.MinRangeTemp, - vstower.MaxRangeTemp)); + std::format("The design range temperature of {:5.2F}" + "must be within the model limits of {:5.2F} and {:5.2F} degrees C", + tower.DesignRange, + vstower.MinRangeTemp, + vstower.MaxRangeTemp)); ErrorsFound = true; } @@ -1341,8 +1341,7 @@ namespace CondenserLoopTowers { tower.BasinHeaterSetPointTemp = 2.0; } if (tower.BasinHeaterSetPointTemp < 2.0) { - ShowWarningCustom( - state, eoh, EnergyPlus::format("{} is less than 2 deg C. Freezing could occur.", s_ipsc->cNumericFieldNames(10))); + ShowWarningCustom(state, eoh, std::format("{} is less than 2 deg C. Freezing could occur.", s_ipsc->cNumericFieldNames(10))); } } @@ -1587,8 +1586,7 @@ namespace CondenserLoopTowers { tower.BasinHeaterSetPointTemp = 2.0; } if (tower.BasinHeaterSetPointTemp < 2.0) { - ShowWarningCustom( - state, eoh, EnergyPlus::format("{} is less than 2 deg C. Freezing could occur.", s_ipsc->cNumericFieldNames(22))); + ShowWarningCustom(state, eoh, std::format("{} is less than 2 deg C. Freezing could occur.", s_ipsc->cNumericFieldNames(22))); } } @@ -2342,38 +2340,34 @@ namespace CondenserLoopTowers { if (std::abs(DesTowerWaterDeltaT - PlantSizData(PltSizCondNum).DeltaT) > TolTemp) { ShowWarningError( state, - EnergyPlus::format("Error when autosizing the load for cooling tower = {}. Tower Design Range Temperature is different " - "from the Design Loop Delta Temperature.", - this->Name)); - ShowContinueError(state, EnergyPlus::format("Tower Design Range Temperature specified in tower = {}", this->Name)); - ShowContinueError( - state, - EnergyPlus::format("is inconsistent with Design Loop Delta Temperature specified in Sizing:Plant object = {}.", - PlantSizData(PltSizCondNum).PlantLoopName)); + std::format("Error when autosizing the load for cooling tower = {}. Tower Design Range Temperature is different " + "from the Design Loop Delta Temperature.", + this->Name)); + ShowContinueError(state, std::format("Tower Design Range Temperature specified in tower = {}", this->Name)); ShowContinueError(state, - EnergyPlus::format("..The Design Range Temperature specified in tower is = {:.2T}", this->DesignRange)); + std::format("is inconsistent with Design Loop Delta Temperature specified in Sizing:Plant object = {}.", + PlantSizData(PltSizCondNum).PlantLoopName)); + ShowContinueError(state, std::format("..The Design Range Temperature specified in tower is = {:.2f}", this->DesignRange)); ShowContinueError(state, - EnergyPlus::format("..The Design Loop Delta Temperature specified in plant sizing data is = {:.2T}", - PlantSizData(PltSizCondNum).DeltaT)); + std::format("..The Design Loop Delta Temperature specified in plant sizing data is = {:.2f}", + PlantSizData(PltSizCondNum).DeltaT)); } // check if the tower approach is different from plant sizing data DesTowerApproachFromPlant = PlantSizData(PltSizCondNum).ExitTemp - this->DesignInletWB; if (std::abs(DesTowerApproachFromPlant - this->DesignApproach) > TolTemp) { - ShowWarningError( - state, - EnergyPlus::format("Error when autosizing the UA for cooling tower = {}. Tower Design Approach Temperature is " - "inconsistent with Approach from Plant Sizing Data.", - this->Name)); + ShowWarningError(state, + std::format("Error when autosizing the UA for cooling tower = {}. Tower Design Approach Temperature is " + "inconsistent with Approach from Plant Sizing Data.", + this->Name)); ShowContinueError(state, - EnergyPlus::format("The Design Approach Temperature from inputs specified in Sizing:Plant object = {}", - PlantSizData(PltSizCondNum).PlantLoopName)); - ShowContinueError( - state, EnergyPlus::format("is inconsistent with Design Approach Temperature specified in tower = {}.", this->Name)); - ShowContinueError( - state, - EnergyPlus::format("..The Design Approach Temperature from inputs specified is = {:.2T}", DesTowerApproachFromPlant)); + std::format("The Design Approach Temperature from inputs specified in Sizing:Plant object = {}", + PlantSizData(PltSizCondNum).PlantLoopName)); + ShowContinueError(state, + std::format("is inconsistent with Design Approach Temperature specified in tower = {}.", this->Name)); ShowContinueError( - state, EnergyPlus::format("..The Design Approach Temperature specified in tower is = {:.2T}", this->DesignApproach)); + state, std::format("..The Design Approach Temperature from inputs specified is = {:.2f}", DesTowerApproachFromPlant)); + ShowContinueError(state, + std::format("..The Design Approach Temperature specified in tower is = {:.2f}", this->DesignApproach)); } } } @@ -2439,7 +2433,7 @@ namespace CondenserLoopTowers { } } else { if (state.dataPlnt->PlantFinalSizesOkayToReport) { - ShowSevereError(state, EnergyPlus::format("Autosizing error for cooling tower object = {}", this->Name)); + ShowSevereError(state, std::format("Autosizing error for cooling tower object = {}", this->Name)); ShowFatalError(state, "Autosizing of cooling tower condenser flow rate requires a loop Sizing:Plant object."); } } @@ -2508,7 +2502,7 @@ namespace CondenserLoopTowers { } else { if (state.dataPlnt->PlantFinalSizesOkayToReport) { ShowSevereError(state, "Autosizing of cooling tower fan power requires a loop Sizing:Plant object."); - ShowFatalError(state, EnergyPlus::format(" Occurs in cooling tower object= {}", this->Name)); + ShowFatalError(state, std::format(" Occurs in cooling tower object= {}", this->Name)); } } } @@ -2596,25 +2590,24 @@ namespace CondenserLoopTowers { // This conditional statement is to trap when the user specified condenser/tower water design setpoint // temperature is less than design inlet air wet bulb temperature if (PlantSizData(PltSizCondNum).ExitTemp <= this->DesignInletWB) { - ShowSevereError( - state, - EnergyPlus::format("Error when autosizing the UA value for cooling tower = {}. Design Loop Exit Temperature must be " - "greater than {:.2T} C when autosizing the tower UA.", - this->Name, - this->DesignInletWB)); - ShowContinueError(state, - EnergyPlus::format("The Design Loop Exit Temperature specified in Sizing:Plant object = {} ({:.2T} C)", - PlantSizData(PltSizCondNum).PlantLoopName, - PlantSizData(PltSizCondNum).ExitTemp)); + ShowSevereError(state, + std::format("Error when autosizing the UA value for cooling tower = {}. Design Loop Exit Temperature must be " + "greater than {:.2f} C when autosizing the tower UA.", + this->Name, + this->DesignInletWB)); ShowContinueError(state, - EnergyPlus::format("is less than or equal to the design inlet air wet-bulb temperature of {:.2T} C.", - this->DesignInletWB)); + std::format("The Design Loop Exit Temperature specified in Sizing:Plant object = {} ({:.2f} C)", + PlantSizData(PltSizCondNum).PlantLoopName, + PlantSizData(PltSizCondNum).ExitTemp)); + ShowContinueError( + state, + std::format("is less than or equal to the design inlet air wet-bulb temperature of {:.2f} C.", this->DesignInletWB)); ShowContinueError( state, - EnergyPlus::format("If using HVACTemplate:Plant:ChilledWaterLoop, then check that input field Condenser Water Design " - "Setpoint must be > {:.2T} C if autosizing the cooling tower.", - this->DesignInletWB)); - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower fails for tower = {}.", this->Name)); + std::format("If using HVACTemplate:Plant:ChilledWaterLoop, then check that input field Condenser Water Design " + "Setpoint must be > {:.2f} C if autosizing the cooling tower.", + this->DesignInletWB)); + ShowFatalError(state, std::format("Autosizing of cooling tower fails for tower = {}.", this->Name)); } Real64 const solveDesignWaterMassFlow = rho * tmpDesignWaterFlowRate; // design water mass flow rate @@ -2634,10 +2627,10 @@ namespace CondenserLoopTowers { General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f1, UA0, UA1); if (SolFla == -1) { ShowSevereError(state, "Iteration limit exceeded in calculating tower UA"); - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { @@ -2698,35 +2691,34 @@ namespace CondenserLoopTowers { if (DesTowerExitWaterTemp <= this->DesignInletWB) { ShowSevereError( state, - EnergyPlus::format("Error when autosizing the UA value for cooling tower = {}. Design Tower Exit Temperature must be " - "greater than {:.2T} C when autosizing the tower UA.", - this->Name, - this->DesignInletWB)); - ShowContinueError(state, EnergyPlus::format("The User-specified Design Loop Exit Temperature={:.2T}", DesTowerExitWaterTemp)); - ShowContinueError(state, - EnergyPlus::format("is less than or equal to the design inlet air wet-bulb temperature of {:.2T} C.", - this->DesignInletWB)); + std::format("Error when autosizing the UA value for cooling tower = {}. Design Tower Exit Temperature must be " + "greater than {:.2f} C when autosizing the tower UA.", + this->Name, + this->DesignInletWB)); + ShowContinueError(state, std::format("The User-specified Design Loop Exit Temperature={:.2f}", DesTowerExitWaterTemp)); + ShowContinueError( + state, + std::format("is less than or equal to the design inlet air wet-bulb temperature of {:.2f} C.", this->DesignInletWB)); if (this->TowerInletCondsAutoSize) { ShowContinueError(state, - EnergyPlus::format("Because you did not specify the Design Approach Temperature, and you do not have a " - "Sizing:Plant object, it was defaulted to {:.2T} C.", - DesTowerExitWaterTemp)); + std::format("Because you did not specify the Design Approach Temperature, and you do not have a " + "Sizing:Plant object, it was defaulted to {:.2f} C.", + DesTowerExitWaterTemp)); } else { // Should never get there... - ShowContinueError( - state, - EnergyPlus::format("The Design Loop Exit Temperature is the sum of the design air inlet wet-bulb temperature= " - "{:.2T} C plus the cooling tower design approach temperature = {:.2T}C.", - this->DesignInletWB, - this->DesignApproach)); + ShowContinueError(state, + std::format("The Design Loop Exit Temperature is the sum of the design air inlet wet-bulb temperature= " + "{:.2f} C plus the cooling tower design approach temperature = {:.2f}C.", + this->DesignInletWB, + this->DesignApproach)); } ShowContinueError( state, - EnergyPlus::format("If using HVACTemplate:Plant:ChilledWaterLoop, then check that input field Condenser Water Design " - "Setpoint must be > {:.2T} C if autosizing the cooling tower.", - this->DesignInletWB)); - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower fails for tower = {}.", this->Name)); + std::format("If using HVACTemplate:Plant:ChilledWaterLoop, then check that input field Condenser Water Design " + "Setpoint must be > {:.2f} C if autosizing the cooling tower.", + this->DesignInletWB)); + ShowFatalError(state, std::format("Autosizing of cooling tower fails for tower = {}.", this->Name)); } Real64 const solveWaterMassFlow = rho * tmpDesignWaterFlowRate; // design water mass flow rate @@ -2745,10 +2737,10 @@ namespace CondenserLoopTowers { General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f, UA0, UA1); if (SolFla == -1) { ShowSevereError(state, "Iteration limit exceeded in calculating tower UA"); - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { @@ -2818,10 +2810,10 @@ namespace CondenserLoopTowers { General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f, UA0, UA1); if (SolFla == -1) { ShowSevereError(state, "Iteration limit exceeded in calculating tower UA"); - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { this->HighSpeedTowerUA = UA; @@ -2992,10 +2984,10 @@ namespace CondenserLoopTowers { General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f, UA0, UA1); if (SolFla == -1) { ShowSevereError(state, "Iteration limit exceeded in calculating tower UA"); - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { this->LowSpeedTowerUA = UA; @@ -3083,31 +3075,31 @@ namespace CondenserLoopTowers { General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f, UA0, UA1); if (SolFla == -1) { ShowSevereError(state, "Iteration limit exceeded in calculating tower UA"); - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA calculations"); ShowContinueError(state, "Tower inlet design water temperature assumed to be 35.0 C."); ShowContinueError(state, "Tower inlet design air dry-bulb temperature assumed to be 35.0 C."); ShowContinueError(state, "Tower inlet design air wet-bulb temperature assumed to be 25.6 C."); ShowContinueError(state, - EnergyPlus::format("Tower load assumed to be {:.3T} times free convection capacity of {:.0T} W.", - this->HeatRejectCapNomCapSizingRatio, - this->TowerFreeConvNomCap)); + std::format("Tower load assumed to be {:.3f} times free convection capacity of {:.0f} W.", + this->HeatRejectCapNomCapSizingRatio, + this->TowerFreeConvNomCap)); Real64 OutWaterTemp; // outlet water temperature during sizing [C] OutWaterTemp = this->calculateSimpleTowerOutletTemp(state, solveWaterFlow, this->FreeConvAirFlowRate, UA0); Real64 CoolingOutput = Cp * solveWaterFlow * (this->WaterTemp - OutWaterTemp); // tower capacity during sizing [W] - ShowContinueError(state, EnergyPlus::format("Tower capacity at lower UA guess ({:.4T}) = {:.0T} W.", UA0, CoolingOutput)); + ShowContinueError(state, std::format("Tower capacity at lower UA guess ({:.4f}) = {:.0f} W.", UA0, CoolingOutput)); OutWaterTemp = this->calculateSimpleTowerOutletTemp(state, solveWaterFlow, this->FreeConvAirFlowRate, UA1); CoolingOutput = Cp * solveWaterFlow * (this->WaterTemp - OutWaterTemp); - ShowContinueError(state, EnergyPlus::format("Tower capacity at upper UA guess ({:.4T}) = {:.0T} W.", UA1, CoolingOutput)); + ShowContinueError(state, std::format("Tower capacity at upper UA guess ({:.4f}) = {:.0f} W.", UA1, CoolingOutput)); if (CoolingOutput < DesTowerLoad) { ShowContinueError(state, "Free convection capacity should be less than tower capacity at upper UA guess."); } - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { this->FreeConvTowerUA = UA; @@ -3171,22 +3163,22 @@ namespace CondenserLoopTowers { ShowContinueError(state, "Inlet air wet-bulb, range, and/or approach temperature does not allow calibration of water flow rate ratio " "for this variable-speed cooling tower."); - ShowFatalError(state, EnergyPlus::format("Cooling tower calibration failed for tower {}", this->Name)); + ShowFatalError(state, std::format("Cooling tower calibration failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for cooling tower water flow rate ratio calibration."); ShowContinueError(state, "Inlet air wet-bulb, range, and/or approach temperature does not allow calibration of water flow rate ratio " "for this variable-speed cooling tower."); - ShowFatalError(state, EnergyPlus::format("Cooling tower calibration failed for tower {}.", this->Name)); + ShowFatalError(state, std::format("Cooling tower calibration failed for tower {}.", this->Name)); } } else { ShowSevereError(state, "Bad starting values for cooling tower water flow rate ratio calibration."); ShowContinueError(state, "Design inlet air wet-bulb or range temperature must be modified to achieve the design approach"); ShowContinueError(state, - EnergyPlus::format("A water flow rate ratio of {:.6F} was calculated to yield an approach temperature of {:.2F}.", - WaterFlowRateRatio, - Tapproach)); - ShowFatalError(state, EnergyPlus::format("Cooling tower calibration failed for tower {}.", this->Name)); + std::format("A water flow rate ratio of {:.6F} was calculated to yield an approach temperature of {:.2F}.", + WaterFlowRateRatio, + Tapproach)); + ShowFatalError(state, std::format("Cooling tower calibration failed for tower {}.", this->Name)); } this->CalibratedWaterFlowRate = this->DesignWaterFlowRate / WaterFlowRatio; @@ -3194,12 +3186,12 @@ namespace CondenserLoopTowers { if (WaterFlowRatio < this->MinWaterFlowRatio || WaterFlowRatio > this->MaxWaterFlowRatio) { ShowWarningError( state, - EnergyPlus::format("CoolingTower:VariableSpeed, \"{}\" the calibrated water flow rate ratio is determined to be {:9.6F}. This " - "is outside the valid range of {:.2F} to {:.2F}.", - this->Name, - WaterFlowRatio, - this->MinWaterFlowRatio, - this->MaxWaterFlowRatio)); + std::format("CoolingTower:VariableSpeed, \"{}\" the calibrated water flow rate ratio is determined to be {:9.6F}. This " + "is outside the valid range of {:.2F} to {:.2F}.", + this->Name, + WaterFlowRatio, + this->MinWaterFlowRatio, + this->MaxWaterFlowRatio)); } Real64 const rho = @@ -3293,16 +3285,16 @@ namespace CondenserLoopTowers { if (this->DesignWaterFlowRate > 0.0) { if (this->FreeConvAirFlowRate >= this->HighSpeedAirFlowRate) { ShowSevereError(state, - EnergyPlus::format("{} \"{}\". Free convection air flow rate must be less than the design air flow rate.", - cCoolingTower_SingleSpeed, - this->Name)); + std::format("{} \"{}\". Free convection air flow rate must be less than the design air flow rate.", + cCoolingTower_SingleSpeed, + this->Name)); ErrorsFound = true; } if (this->FreeConvTowerUA >= this->HighSpeedTowerUA) { ShowSevereError(state, - EnergyPlus::format("{} \"{}\". Free convection UA must be less than the design tower UA.", - cCoolingTower_SingleSpeed, - this->Name)); + std::format("{} \"{}\". Free convection UA must be less than the design tower UA.", + cCoolingTower_SingleSpeed, + this->Name)); ErrorsFound = true; } } @@ -3312,31 +3304,31 @@ namespace CondenserLoopTowers { if (this->DesignWaterFlowRate > 0.0) { if (this->HighSpeedAirFlowRate <= this->LowSpeedAirFlowRate) { ShowSevereError(state, - EnergyPlus::format("{} \"{}\". Low speed air flow rate must be less than the high speed air flow rate.", - cCoolingTower_TwoSpeed, - this->Name)); + std::format("{} \"{}\". Low speed air flow rate must be less than the high speed air flow rate.", + cCoolingTower_TwoSpeed, + this->Name)); ErrorsFound = true; } if (this->LowSpeedAirFlowRate <= this->FreeConvAirFlowRate) { ShowSevereError(state, - EnergyPlus::format("{} \"{}\". Free convection air flow rate must be less than the low speed air flow rate.", - cCoolingTower_TwoSpeed, - this->Name)); + std::format("{} \"{}\". Free convection air flow rate must be less than the low speed air flow rate.", + cCoolingTower_TwoSpeed, + this->Name)); ErrorsFound = true; } if (this->HighSpeedTowerUA <= this->LowSpeedTowerUA) { ShowSevereError(state, - EnergyPlus::format("{} \"{}\". Tower UA at low fan speed must be less than the tower UA at high fan speed.", - cCoolingTower_TwoSpeed, - this->Name)); + std::format("{} \"{}\". Tower UA at low fan speed must be less than the tower UA at high fan speed.", + cCoolingTower_TwoSpeed, + this->Name)); ErrorsFound = true; } if (this->LowSpeedTowerUA <= this->FreeConvTowerUA) { - ShowSevereError(state, - EnergyPlus::format( - "{} \"{}\". Tower UA at free convection air flow rate must be less than the tower UA at low fan speed.", - cCoolingTower_TwoSpeed, - this->Name)); + ShowSevereError( + state, + std::format("{} \"{}\". Tower UA at free convection air flow rate must be less than the tower UA at low fan speed.", + cCoolingTower_TwoSpeed, + this->Name)); ErrorsFound = true; } } @@ -3407,35 +3399,33 @@ namespace CondenserLoopTowers { if (std::abs(DesTowerWaterDeltaT - PlantSizData(PltSizCondNum).DeltaT) > TolTemp) { ShowWarningError( state, - EnergyPlus::format("Error when autosizing the load for cooling tower = {}. Tower Design Range Temperature is different from " - "the Design Loop Delta Temperature.", - this->Name)); - ShowContinueError(state, EnergyPlus::format("Tower Design Range Temperature specified in tower = {}", this->Name)); + std::format("Error when autosizing the load for cooling tower = {}. Tower Design Range Temperature is different from " + "the Design Loop Delta Temperature.", + this->Name)); + ShowContinueError(state, std::format("Tower Design Range Temperature specified in tower = {}", this->Name)); ShowContinueError(state, - EnergyPlus::format("is inconsistent with Design Loop Delta Temperature specified in Sizing:Plant object = {}.", - PlantSizData(PltSizCondNum).PlantLoopName)); - ShowContinueError(state, EnergyPlus::format("..The Design Range Temperature specified in tower is = {:.2T}", this->DesignRange)); + std::format("is inconsistent with Design Loop Delta Temperature specified in Sizing:Plant object = {}.", + PlantSizData(PltSizCondNum).PlantLoopName)); + ShowContinueError(state, std::format("..The Design Range Temperature specified in tower is = {:.2f}", this->DesignRange)); ShowContinueError(state, - EnergyPlus::format("..The Design Loop Delta Temperature specified in plant sizing data is = {:.2T}", - PlantSizData(PltSizCondNum).DeltaT)); + std::format("..The Design Loop Delta Temperature specified in plant sizing data is = {:.2f}", + PlantSizData(PltSizCondNum).DeltaT)); } // check if the tower approach is different from plant sizing data DesTowerApproachFromPlant = PlantSizData(PltSizCondNum).ExitTemp - this->DesignInletWB; if (std::abs(DesTowerApproachFromPlant - this->DesignApproach) > TolTemp) { ShowWarningError( state, - EnergyPlus::format("Error when autosizing the UA for cooling tower = {}. Tower Design Approach Temperature is inconsistent " - "with Approach from Plant Sizing Data.", - this->Name)); - ShowContinueError(state, - EnergyPlus::format("The Design Approach Temperature from inputs specified in Sizing:Plant object = {}", - PlantSizData(PltSizCondNum).PlantLoopName)); + std::format("Error when autosizing the UA for cooling tower = {}. Tower Design Approach Temperature is inconsistent " + "with Approach from Plant Sizing Data.", + this->Name)); ShowContinueError(state, - EnergyPlus::format("is inconsistent with Design Approach Temperature specified in tower = {}.", this->Name)); - ShowContinueError( - state, EnergyPlus::format("..The Design Approach Temperature from inputs specified is = {:.2T}", DesTowerApproachFromPlant)); + std::format("The Design Approach Temperature from inputs specified in Sizing:Plant object = {}", + PlantSizData(PltSizCondNum).PlantLoopName)); + ShowContinueError(state, std::format("is inconsistent with Design Approach Temperature specified in tower = {}.", this->Name)); ShowContinueError(state, - EnergyPlus::format("..The Design Approach Temperature specified in tower is = {:.2T}", this->DesignApproach)); + std::format("..The Design Approach Temperature from inputs specified is = {:.2f}", DesTowerApproachFromPlant)); + ShowContinueError(state, std::format("..The Design Approach Temperature specified in tower is = {:.2f}", this->DesignApproach)); } } } @@ -3467,7 +3457,7 @@ namespace CondenserLoopTowers { } } else { // do not have enough data to size. if (state.dataPlnt->PlantFirstSizesOkayToFinalize && this->TowerNominalCapacityWasAutoSized) { - ShowSevereError(state, EnergyPlus::format("Autosizing error for cooling tower object = {}", this->Name)); + ShowSevereError(state, std::format("Autosizing error for cooling tower object = {}", this->Name)); ShowFatalError(state, "Autosizing of cooling tower nominal capacity requires a loop Sizing:Plant object."); } } @@ -3503,8 +3493,7 @@ namespace CondenserLoopTowers { NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomTowerCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Nominal Capacity of {:.2R} [W]", NomCapUser)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomTowerCap)); @@ -3550,8 +3539,7 @@ namespace CondenserLoopTowers { NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpTowerFreeConvNomCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Free Convection Nominal Capacity of {:.2R} [W]", NomCapUser)); ShowContinueError(state, @@ -3603,8 +3591,7 @@ namespace CondenserLoopTowers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpDesignWaterFlowRate - NomDesWaterFlowUser) / NomDesWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Design Water Flow Rate of {:.2R} [m3/s]", NomDesWaterFlowUser)); ShowContinueError( @@ -3657,7 +3644,7 @@ namespace CondenserLoopTowers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpDesignAirFlowRate - DesignAirFlowRateUser) / DesignAirFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, EnergyPlus::format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Air Flow Rate of {:.2R} [m3/s]", DesignAirFlowRateUser)); ShowContinueError(state, @@ -3703,7 +3690,7 @@ namespace CondenserLoopTowers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpFreeConvAirFlowRate - FreeConvAirFlowUser) / FreeConvAirFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, EnergyPlus::format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Free Convection Regime Air Flow Rate of {:.2R} [m3/s]", FreeConvAirFlowUser)); @@ -3748,10 +3735,10 @@ namespace CondenserLoopTowers { General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f, UA0, UA1); if (SolFla == -1) { ShowSevereError(state, "Iteration limit exceeded in calculating tower UA"); - ShowFatalError(state, EnergyPlus::format("calculating cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("calculating cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } this->HighSpeedTowerUA = UA; if (state.dataPlnt->PlantFinalSizesOkayToReport) { @@ -3786,10 +3773,10 @@ namespace CondenserLoopTowers { General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f2, UA0, UA1); if (SolFla == -1) { ShowSevereError(state, "Iteration limit exceeded in calculating tower free convection UA"); - ShowFatalError(state, EnergyPlus::format("calculating cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("calculating cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for free convection tower {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of cooling tower UA failed for free convection tower {}", this->Name)); } this->FreeConvTowerUA = UA; if (state.dataPlnt->PlantFinalSizesOkayToReport) { @@ -3861,7 +3848,7 @@ namespace CondenserLoopTowers { } } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, EnergyPlus::format("Autosizing error for cooling tower object = {}", this->Name)); + ShowSevereError(state, std::format("Autosizing error for cooling tower object = {}", this->Name)); ShowFatalError(state, "Autosizing of cooling tower nominal capacity requires a loop Sizing:Plant object."); } } @@ -3960,7 +3947,7 @@ namespace CondenserLoopTowers { } } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, EnergyPlus::format("Autosizing error for cooling tower object = {}", this->Name)); + ShowSevereError(state, std::format("Autosizing error for cooling tower object = {}", this->Name)); ShowFatalError(state, "Autosizing of cooling tower nominal capacity requires a loop Sizing:Plant object."); } } @@ -4051,10 +4038,10 @@ namespace CondenserLoopTowers { General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f, UA0, UA1); if (SolFla == -1) { ShowSevereError(state, "Iteration limit exceeded in calculating tower UA"); - ShowFatalError(state, EnergyPlus::format("calculating cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("calculating cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of cooling tower UA failed for tower {}", this->Name)); } this->HighSpeedTowerUA = UA; if (state.dataPlnt->PlantFinalSizesOkayToReport) { @@ -4089,10 +4076,10 @@ namespace CondenserLoopTowers { General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f3, UA0, UA1); if (SolFla == -1) { ShowSevereError(state, "Iteration limit exceeded in calculating tower free convection UA"); - ShowFatalError(state, EnergyPlus::format("calculating cooling tower UA failed for tower {}", this->Name)); + ShowFatalError(state, std::format("calculating cooling tower UA failed for tower {}", this->Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for UA"); - ShowFatalError(state, EnergyPlus::format("Autosizing of cooling tower UA failed for free convection tower {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of cooling tower UA failed for free convection tower {}", this->Name)); } this->FreeConvTowerUA = UA; if (state.dataPlnt->PlantFinalSizesOkayToReport) { @@ -4183,7 +4170,7 @@ namespace CondenserLoopTowers { } else { tmpNomTowerCap = 0.0; // Suppress uninitialized warnings if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, EnergyPlus::format("Autosizing error for cooling tower object = {}", this->Name)); + ShowSevereError(state, std::format("Autosizing error for cooling tower object = {}", this->Name)); ShowFatalError(state, "Autosizing of cooling tower nominal capacity requires a loop Sizing:Plant object."); } } @@ -4323,7 +4310,7 @@ namespace CondenserLoopTowers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHighSpeedFanPower - HighSpeedFanPowerUser) / HighSpeedFanPowerUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, EnergyPlus::format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeVSMerkelTower: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Fan Power of {:.2R} [W]", HighSpeedFanPowerUser)); ShowContinueError(state, EnergyPlus::format("differs from Design Fan Power of {:.2R} [W]", tmpHighSpeedFanPower)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); @@ -4659,8 +4646,7 @@ namespace CondenserLoopTowers { } if (NumIteration > MaxIteration) { ShowWarningError( - state, - EnergyPlus::format("Cooling tower fluid bypass iteration exceeds maximum limit of {} for {}", MaxItChar, this->Name)); + state, std::format("Cooling tower fluid bypass iteration exceeds maximum limit of {} for {}", MaxItChar, this->Name)); } this->BypassFraction = BypassFraction2; // may not meet TempSetPoint due to limit of tower outlet temp to OWTLowerLimit @@ -5153,8 +5139,7 @@ namespace CondenserLoopTowers { if (!state.dataGlobal->WarmupFlag) { ShowWarningError( state, - EnergyPlus::format("Cooling tower iteration limit exceeded when calculating air flow rate ratio for tower {}", - this->Name)); + std::format("Cooling tower iteration limit exceeded when calculating air flow rate ratio for tower {}", this->Name)); } // IF RegulaFalsi cannot find a solution then provide detailed output for debugging } else if (SolFla == -2) { @@ -5164,19 +5149,19 @@ namespace CondenserLoopTowers { ++this->CoolingTowerAFRRFailedCount; ShowWarningError( state, - EnergyPlus::format("CoolingTower:VariableSpeed \"{}\" - Cooling tower air flow rate ratio calculation failed ", - this->Name)); + std::format("CoolingTower:VariableSpeed \"{}\" - Cooling tower air flow rate ratio calculation failed ", + this->Name)); ShowContinueError( state, - EnergyPlus::format("...with conditions as Twb = {:5.2F}, Trange = {:5.2F}, Tapproach = {:5.2F}, and water flow " - "rate ratio = {:5.2F}", - TwbCapped, - Tr, - Ta, - WaterFlowRateRatioCapped)); + std::format("...with conditions as Twb = {:5.2F}, Trange = {:5.2F}, Tapproach = {:5.2F}, and water flow " + "rate ratio = {:5.2F}", + TwbCapped, + Tr, + Ta, + WaterFlowRateRatioCapped)); ShowContinueError(state, "...a solution could not be found within the valid range of air flow rate ratios"); ShowContinueErrorTimeStamp( - state, EnergyPlus::format(" ...Valid air flow rate ratio range = {:5.2F} to 1.0.", this->MinimumVSAirFlowFrac)); + state, std::format(" ...Valid air flow rate ratio range = {:5.2F} to 1.0.", this->MinimumVSAirFlowFrac)); ShowContinueError(state, "...Consider modifying the design approach or design range temperature for this tower."); } else { ShowRecurringWarningErrorAtEnd(state, @@ -5220,9 +5205,9 @@ namespace CondenserLoopTowers { ShowContinueError(state, this->LGBuffer2); } else { ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{} \"{}\" - Liquid to gas ratio is out of range error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name), + std::format("{} \"{}\" - Liquid to gas ratio is out of range error continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], + this->Name), this->ErrIndexLG, this->LGLast, this->LGLast); @@ -5245,15 +5230,15 @@ namespace CondenserLoopTowers { // Report warnings only during actual simulation if (!state.dataGlobal->WarmupFlag) { this->PrintLGMessage = true; - this->LGBuffer1 = EnergyPlus::format("{} \"{}\" - Liquid to gas ratio (L/G) is out of range at {:5.2F}.", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name, - FlowFraction); - this->LGBuffer2 = EnergyPlus::format(" ...Valid maximum ratio = {:5.2F}. Occurrence info = {}, {} {}", - this->MaxLiquidToGasRatio, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); + this->LGBuffer1 = std::format("{} \"{}\" - Liquid to gas ratio (L/G) is out of range at {:5.2F}.", + DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], + this->Name, + FlowFraction); + this->LGBuffer2 = std::format(" ...Valid maximum ratio = {:5.2F}. Occurrence info = {}, {} {}", + this->MaxLiquidToGasRatio, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state)); this->LGLast = FlowFraction; } @@ -5469,9 +5454,9 @@ namespace CondenserLoopTowers { if (this->VSMerkelAFRErrorIter < 1) { ++this->VSMerkelAFRErrorIter; ShowWarningError(state, - EnergyPlus::format("{} - Iteration limit exceeded calculating variable speed fan ratio for unit = {}", - cCoolingTower_VariableSpeedMerkel, - this->Name)); + std::format("{} - Iteration limit exceeded calculating variable speed fan ratio for unit = {}", + cCoolingTower_VariableSpeedMerkel, + this->Name)); ShowContinueError(state, EnergyPlus::format("Estimated air flow ratio = {:.4R}", (std::abs(MyLoad) - MinSpeedFanQdot) / (FullSpeedFanQdot - MinSpeedFanQdot))); @@ -5493,9 +5478,9 @@ namespace CondenserLoopTowers { if (this->VSMerkelAFRErrorFail < 1) { ++this->VSMerkelAFRErrorFail; ShowWarningError(state, - EnergyPlus::format("{} - solver failed calculating variable speed fan ratio for unit = {}", - cCoolingTower_VariableSpeedMerkel, - this->Name)); + std::format("{} - solver failed calculating variable speed fan ratio for unit = {}", + cCoolingTower_VariableSpeedMerkel, + this->Name)); ShowContinueError(state, EnergyPlus::format("Estimated air flow ratio = {:.4R}", this->airFlowRateRatio)); ShowContinueErrorTimeStamp(state, "The estimated air flow ratio will be used and the simulation continues. Occurrence info:"); } @@ -5691,7 +5676,7 @@ namespace CondenserLoopTowers { ShowContinueError( state, "Design inlet air wet-bulb or approach temperature must be modified to achieve an acceptable range at the minimum air flow rate"); - ShowContinueError(state, EnergyPlus::format("Cooling tower simulation failed to converge for tower {}", this->Name)); + ShowContinueError(state, std::format("Cooling tower simulation failed to converge for tower {}", this->Name)); } else if (SolFla == -2) { // bad starting value means that solution corresponds to a range that is beyond // the bounds of the model; The maximum range is used here @@ -5700,19 +5685,19 @@ namespace CondenserLoopTowers { if (this->VSErrorCountTRCalc < 2) { ShowWarningError( state, - EnergyPlus::format( + std::format( "The range for the cooling tower {} likely exceeds the bounds of the model. The maximum range of the model is used {}.", this->Name, this->MaxRangeTemp)); ShowContinueError(state, - EnergyPlus::format(" ... Occurrence info = {}, {} {}", - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state))); + std::format(" ... Occurrence info = {}, {} {}", + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state))); } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "The range for the cooling tower {} likely exceeds the bounds of the model. The maximum range of the model is used {}", this->Name, this->MaxRangeTemp), @@ -5841,9 +5826,9 @@ namespace CondenserLoopTowers { ShowContinueError(state, " ...This is not an unexpected occurrence when simulating actual conditions."); } else { ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{} \"{}\" - Tower range temperature is out of range error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name), + std::format("{} \"{}\" - Tower range temperature is out of range error continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], + this->Name), this->ErrIndexTR, this->TrLast, this->TrLast); @@ -5858,9 +5843,9 @@ namespace CondenserLoopTowers { ShowContinueError(state, " ...Wet-bulb temperatures outside model boundaries may not adversely affect tower performance."); } else { ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{} \"{}\" - Inlet air wet-bulb temperature is out of range error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name), + std::format("{} \"{}\" - Inlet air wet-bulb temperature is out of range error continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], + this->Name), this->ErrIndexIAWB, this->TwbLast, this->TwbLast); @@ -5876,9 +5861,9 @@ namespace CondenserLoopTowers { ShowContinueError(state, " ...This is not an unexpected occurrence when simulating actual conditions."); } else { ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{} \"{}\" - Tower approach temperature is out of range error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name), + std::format("{} \"{}\" - Tower approach temperature is out of range error continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], + this->Name), this->ErrIndexTA, this->TaLast, this->TaLast); @@ -5893,9 +5878,9 @@ namespace CondenserLoopTowers { ShowContinueError(state, " ...Water flow rate ratios outside model boundaries may not adversely affect tower performance."); } else { ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{} \"{}\" - Water flow rate ratio is out of range error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name), + std::format("{} \"{}\" - Water flow rate ratio is out of range error continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], + this->Name), this->ErrIndexWFRR, this->WaterFlowRateRatioLast, this->WaterFlowRateRatioLast); @@ -5920,10 +5905,10 @@ namespace CondenserLoopTowers { } if (!state.dataGlobal->WarmupFlag) { this->PrintTwbMessage = true; - this->TwbBuffer1 = EnergyPlus::format("{} \"{}\" - Inlet air wet-bulb temperature is outside model boundaries at {}.", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name, - OutputChar); + this->TwbBuffer1 = std::format("{} \"{}\" - Inlet air wet-bulb temperature is outside model boundaries at {}.", + DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], + this->Name, + OutputChar); this->TwbBuffer2 = " ...Valid range = " + OutputCharLo + " to " + OutputCharHi + ". Occurrence info = " + state.dataEnvrn->EnvironmentName + ", " + state.dataEnvrn->CurMnDy + ' ' + General::CreateSysTimeIntervalString(state); @@ -5949,10 +5934,10 @@ namespace CondenserLoopTowers { } if (!state.dataGlobal->WarmupFlag) { this->PrintTrMessage = true; - this->TrBuffer1 = EnergyPlus::format("{} \"{}\" - Tower range temperature is outside model boundaries at {}.", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name, - OutputChar); + this->TrBuffer1 = std::format("{} \"{}\" - Tower range temperature is outside model boundaries at {}.", + DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], + this->Name, + OutputChar); this->TrBuffer2 = " ...Valid range = " + OutputCharLo + " to " + OutputCharHi + ". Occurrence info = " + state.dataEnvrn->EnvironmentName + ", " + state.dataEnvrn->CurMnDy + ' ' + General::CreateSysTimeIntervalString(state); @@ -5978,10 +5963,10 @@ namespace CondenserLoopTowers { } if (!state.dataGlobal->WarmupFlag) { this->PrintTaMessage = true; - this->TaBuffer1 = EnergyPlus::format("{} \"{}\" - Tower approach temperature is outside model boundaries at {}.", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name, - OutputChar); + this->TaBuffer1 = std::format("{} \"{}\" - Tower approach temperature is outside model boundaries at {}.", + DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], + this->Name, + OutputChar); this->TaBuffer2 = " ...Valid range = " + OutputCharLo + " to " + OutputCharHi + ". Occurrence info = " + state.dataEnvrn->EnvironmentName + ", " + state.dataEnvrn->CurMnDy + ' ' + General::CreateSysTimeIntervalString(state); @@ -6012,10 +5997,10 @@ namespace CondenserLoopTowers { } if (!state.dataGlobal->WarmupFlag) { this->PrintWFRRMessage = true; - this->WFRRBuffer1 = EnergyPlus::format("{} \"{}\" - Water flow rate ratio is outside model boundaries at {}.", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name, - OutputChar); + this->WFRRBuffer1 = std::format("{} \"{}\" - Water flow rate ratio is outside model boundaries at {}.", + DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], + this->Name, + OutputChar); this->WFRRBuffer2 = " ...Valid range = " + OutputCharLo + " to " + OutputCharHi + ". Occurrence info = " + state.dataEnvrn->EnvironmentName + ", " + state.dataEnvrn->CurMnDy + ' ' + General::CreateSysTimeIntervalString(state); @@ -6185,21 +6170,18 @@ namespace CondenserLoopTowers { if (state.dataLoopNodes->Node(this->WaterOutletNodeNum).MassFlowRate > this->DesWaterMassFlowRate * this->TowerMassFlowRateMultiplier) { ++this->HighMassFlowErrorCount; if (this->HighMassFlowErrorCount < 2) { - ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], this->Name)); + ShowWarningError(state, std::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], this->Name)); ShowContinueError(state, " Condenser Loop Mass Flow Rate is much greater than the towers design mass flow rate."); ShowContinueError( - state, - EnergyPlus::format(" Condenser Loop Mass Flow Rate = {:.6T}", state.dataLoopNodes->Node(this->WaterOutletNodeNum).MassFlowRate)); - ShowContinueError(state, EnergyPlus::format(" Tower Design Mass Flow Rate = {:.6T}", this->DesWaterMassFlowRate)); + state, std::format(" Condenser Loop Mass Flow Rate = {:.6f}", state.dataLoopNodes->Node(this->WaterOutletNodeNum).MassFlowRate)); + ShowContinueError(state, std::format(" Tower Design Mass Flow Rate = {:.6f}", this->DesWaterMassFlowRate)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{} \"{}\" Condenser Loop Mass Flow Rate is much greater than the towers design mass flow rate error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name), + std::format("{} \"{}\" Condenser Loop Mass Flow Rate is much greater than the towers design mass flow rate error continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], + this->Name), this->HighMassFlowErrorIndex, state.dataLoopNodes->Node(this->WaterOutletNodeNum).MassFlowRate, state.dataLoopNodes->Node(this->WaterOutletNodeNum).MassFlowRate); @@ -6213,19 +6195,17 @@ namespace CondenserLoopTowers { if (outletWaterTempTooLow && flowIsOn) { ++this->OutletWaterTempErrorCount; if (this->OutletWaterTempErrorCount < 2) { - ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], this->Name)); + ShowWarningError(state, std::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], this->Name)); ShowContinueError( state, - EnergyPlus::format( - "Cooling tower water outlet temperature ({:.2F} C) is below the specified minimum condenser loop temp of {:.2F} C", - this->OutletWaterTemp, - LoopMinTemp)); + std::format("Cooling tower water outlet temperature ({:.2F} C) is below the specified minimum condenser loop temp of {:.2F} C", + this->OutletWaterTemp, + LoopMinTemp)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\" Cooling tower water outlet temperature is below the specified minimum condenser loop temp error continues...", DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], this->Name), @@ -6239,16 +6219,15 @@ namespace CondenserLoopTowers { if (this->WaterMassFlowRate > 0.0 && this->WaterMassFlowRate <= DataBranchAirLoopPlant::MassFlowTolerance) { ++this->SmallWaterMassFlowErrorCount; if (this->SmallWaterMassFlowErrorCount < 2) { - ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], this->Name)); + ShowWarningError(state, std::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], this->Name)); ShowContinueError(state, "Cooling tower water mass flow rate near zero."); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, EnergyPlus::format("Actual Mass flow = {:.2T}", this->WaterMassFlowRate)); + ShowContinueError(state, std::format("Actual Mass flow = {:.2f}", this->WaterMassFlowRate)); } else { ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{} \"{}\" Cooling tower water mass flow rate near zero error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], - this->Name), + std::format("{} \"{}\" Cooling tower water mass flow rate near zero error continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->TowerType)], + this->Name), this->SmallWaterMassFlowErrorIndex, this->WaterMassFlowRate, this->WaterMassFlowRate); diff --git a/src/EnergyPlus/ConvectionCoefficients.cc b/src/EnergyPlus/ConvectionCoefficients.cc index 6386fdd2c7f..9fe1d26804c 100644 --- a/src/EnergyPlus/ConvectionCoefficients.cc +++ b/src/EnergyPlus/ConvectionCoefficients.cc @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -197,10 +198,10 @@ void InitIntConvCoeff(EnergyPlusData &state, } ShowSevereError( state, - EnergyPlus::format("InitInteriorConvectionCoeffs: Inside Convection=CeilingDiffuser, but no system inlet node defined, Zone={}", - zone.Name)); - ShowContinueError( - state, EnergyPlus::format("Defaulting inside convection to TARP. Check ZoneHVAC:EquipmentConnections for Zone={}", zone.Name)); + std::format("InitInteriorConvectionCoeffs: Inside Convection=CeilingDiffuser, but no system inlet node defined, Zone={}", + zone.Name)); + ShowContinueError(state, + std::format("Defaulting inside convection to TARP. Check ZoneHVAC:EquipmentConnections for Zone={}", zone.Name)); zone.IntConvAlgo = HcInt::ASHRAETARP; } // insert one-time setup for adaptive inside face @@ -642,8 +643,7 @@ void InitExtConvCoeff(EnergyPlusData &state, } break; default: { - ShowFatalError(state, - EnergyPlus::format("InitExtConvection Coefficients: invalid parameter -- outside convection type, Surface={}", surface.Name)); + ShowFatalError(state, std::format("InitExtConvection Coefficients: invalid parameter -- outside convection type, Surface={}", surface.Name)); } break; } @@ -965,14 +965,14 @@ void GetUserConvCoeffs(EnergyPlusData &state) ++state.dataSurface->TotUserExtConvModels; } if (NumAlphas >= 2 && ipsc->lAlphaFieldBlanks(2)) { - ShowWarningError( - state, EnergyPlus::format("GetUserConvectionCoefficients: {}, for {}={}", CurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); - ShowContinueError(state, EnergyPlus::format("{} is blank and rest of fields will not be processed.", ipsc->cAlphaFieldNames(2))); + ShowWarningError(state, + std::format("GetUserConvectionCoefficients: {}, for {}={}", CurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); + ShowContinueError(state, std::format("{} is blank and rest of fields will not be processed.", ipsc->cAlphaFieldNames(2))); } if (NumAlphas >= 6 && ipsc->lAlphaFieldBlanks(6)) { - ShowWarningError( - state, EnergyPlus::format("GetUserConvectionCoefficients: {}, for {}={}", CurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); - ShowContinueError(state, EnergyPlus::format("{} is blank and rest of fields will not be processed.", ipsc->cAlphaFieldNames(6))); + ShowWarningError(state, + std::format("GetUserConvectionCoefficients: {}, for {}={}", CurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); + ShowContinueError(state, std::format("{} is blank and rest of fields will not be processed.", ipsc->cAlphaFieldNames(6))); } } CurrentModuleObject = "SurfaceProperty:ConvectionCoefficients"; @@ -1002,14 +1002,14 @@ void GetUserConvCoeffs(EnergyPlusData &state) ++state.dataSurface->TotUserExtConvModels; } if (NumAlphas >= 2 && ipsc->lAlphaFieldBlanks(2)) { - ShowWarningError( - state, EnergyPlus::format("GetUserConvectionCoefficients: {}, for {}={}", CurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); - ShowContinueError(state, EnergyPlus::format("{} is blank and rest of fields will not be processed.", ipsc->cAlphaFieldNames(2))); + ShowWarningError(state, + std::format("GetUserConvectionCoefficients: {}, for {}={}", CurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); + ShowContinueError(state, std::format("{} is blank and rest of fields will not be processed.", ipsc->cAlphaFieldNames(2))); } if (NumAlphas >= 6 && ipsc->lAlphaFieldBlanks(6)) { - ShowWarningError( - state, EnergyPlus::format("GetUserConvectionCoefficients: {}, for {}={}", CurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); - ShowContinueError(state, EnergyPlus::format("{} is blank and rest of fields will not be processed.", ipsc->cAlphaFieldNames(6))); + ShowWarningError(state, + std::format("GetUserConvectionCoefficients: {}, for {}={}", CurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); + ShowContinueError(state, std::format("{} is blank and rest of fields will not be processed.", ipsc->cAlphaFieldNames(6))); } } @@ -1055,11 +1055,10 @@ void GetUserConvCoeffs(EnergyPlusData &state) if (Surface(surfNum).OSCPtr > 0) { ShowSevereError( state, - EnergyPlus::format( - "GetUserSuppliedConvectionCoefficients: {}, OUTSIDE {} cannot be specified for OtherSideCoefficient Surface={}", - CurrentModuleObject, - CurrentModuleObject, - Alphas(1))); + std::format("GetUserSuppliedConvectionCoefficients: {}, OUTSIDE {} cannot be specified for OtherSideCoefficient Surface={}", + CurrentModuleObject, + CurrentModuleObject, + Alphas(1))); ErrorsFound = true; } @@ -1081,7 +1080,7 @@ void GetUserConvCoeffs(EnergyPlusData &state) userExtConvModel.SurfaceName = Alphas(1); userExtConvModel.WhichSurface = surfNum; if (Numbers(NumField) < state.dataHeatBal->LowHConvLimit || Numbers(NumField) > state.dataHeatBal->HighHConvLimit) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, out of range value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}{}=\"{}, out of range value", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, EnergyPlus::format("{}={}, {}=[{:.5R}].", ipsc->cAlphaFieldNames(Ptr), @@ -1098,12 +1097,12 @@ void GetUserConvCoeffs(EnergyPlusData &state) userExtConvModel.overrideType = OverrideType::Value; userExtConvModel.OverrideValue = Numbers(NumField); if (!ipsc->lAlphaFieldBlanks(Ptr + 2)) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, - EnergyPlus::format("Since VALUE is used for \"{}\", {}={} is ignored.", - ipsc->cAlphaFieldNames(FieldNo + 2), - ipsc->cAlphaFieldNames(Ptr + 2), - Alphas(Ptr + 2))); + std::format("Since VALUE is used for \"{}\", {}={} is ignored.", + ipsc->cAlphaFieldNames(FieldNo + 2), + ipsc->cAlphaFieldNames(Ptr + 2), + Alphas(Ptr + 2))); } ApplyExtConvValue(state, surfNum, hcExt, state.dataSurface->TotUserExtConvModels); } break; @@ -1153,8 +1152,8 @@ void GetUserConvCoeffs(EnergyPlusData &state) case HcExt::ASHRAETARP: case HcExt::BLASTHcOutside: case HcExt::None: { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, check input", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Check Input Entered :{}", Alphas(Ptr + 1))); + ShowSevereError(state, std::format("{}{}=\"{}, check input", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Check Input Entered :{}", Alphas(Ptr + 1))); ErrorsFound = true; } break; @@ -1173,7 +1172,7 @@ void GetUserConvCoeffs(EnergyPlusData &state) } else if (Alphas(Ptr) == "INSIDE") { if (state.dataSurface->surfIntConv(surfNum).userModelNum != 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, duplicate (inside)", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}{}=\"{}, duplicate (inside)", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Duplicate (Inside) assignment attempt."); ErrorsFound = true; continue; @@ -1186,20 +1185,20 @@ void GetUserConvCoeffs(EnergyPlusData &state) case HcInt::UserValue: case HcInt::UserSchedule: case HcInt::SetByZone: { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Invalid Value Entered, for {}={}", ipsc->cAlphaFieldNames(Ptr), Alphas(Ptr))); - ShowContinueError(state, EnergyPlus::format("invalid value in {}={}", ipsc->cAlphaFieldNames(Ptr + 1), Alphas(Ptr + 1))); + ShowSevereError(state, std::format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Invalid Value Entered, for {}={}", ipsc->cAlphaFieldNames(Ptr), Alphas(Ptr))); + ShowContinueError(state, std::format("invalid value in {}={}", ipsc->cAlphaFieldNames(Ptr + 1), Alphas(Ptr + 1))); ErrorsFound = true; } break; case HcInt::CeilingDiffuser: case HcInt::TrombeWall: { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Invalid Value Entered, for {}={}", ipsc->cAlphaFieldNames(Ptr), Alphas(Ptr))); + ShowSevereError(state, std::format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Invalid Value Entered, for {}={}", ipsc->cAlphaFieldNames(Ptr), Alphas(Ptr))); ShowContinueError(state, - EnergyPlus::format("invalid value in {}={}\". This type is only applicable at a Zone level.", - ipsc->cAlphaFieldNames(Ptr + 1), - Alphas(Ptr + 1))); + std::format("invalid value in {}={}\". This type is only applicable at a Zone level.", + ipsc->cAlphaFieldNames(Ptr + 1), + Alphas(Ptr + 1))); ErrorsFound = true; } break; @@ -1230,12 +1229,12 @@ void GetUserConvCoeffs(EnergyPlusData &state) userIntConvModel.overrideType = OverrideType::Value; userIntConvModel.OverrideValue = Numbers(NumField); if (!ipsc->lAlphaFieldBlanks(Ptr + 2)) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, - EnergyPlus::format("Since VALUE is used for \"{}\", {}={} is ignored.", - ipsc->cAlphaFieldNames(FieldNo + 1), - ipsc->cAlphaFieldNames(Ptr + 2), - Alphas(Ptr + 2))); + std::format("Since VALUE is used for \"{}\", {}={} is ignored.", + ipsc->cAlphaFieldNames(FieldNo + 1), + ipsc->cAlphaFieldNames(Ptr + 2), + Alphas(Ptr + 2))); } ApplyIntConvValue(state, surfNum, hcInt, state.dataSurface->TotUserIntConvModels); } break; @@ -1330,8 +1329,8 @@ void GetUserConvCoeffs(EnergyPlusData &state) case HcExt::BLASTHcOutside: case HcExt::UserValue: case HcExt::UserSchedule: { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, check input", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Check Input Entered :{}", Alphas(Ptr + 1))); + ShowSevereError(state, std::format("{}{}=\"{}, check input", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Check Input Entered :{}", Alphas(Ptr + 1))); ErrorsFound = true; } break; @@ -1364,12 +1363,12 @@ void GetUserConvCoeffs(EnergyPlusData &state) userExtConvModel.overrideType = OverrideType::Value; userExtConvModel.OverrideValue = Numbers(NumField); if (!ipsc->lAlphaFieldBlanks(Ptr + 2)) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, - EnergyPlus::format("Since VALUE is used for \"{}\", {}={} is ignored.", - ipsc->cAlphaFieldNames(FieldNo + 2), - ipsc->cAlphaFieldNames(Ptr + 2), - Alphas(Ptr + 2))); + std::format("Since VALUE is used for \"{}\", {}={} is ignored.", + ipsc->cAlphaFieldNames(FieldNo + 2), + ipsc->cAlphaFieldNames(Ptr + 2), + Alphas(Ptr + 2))); } ApplyExtConvValueMulti(state, surfaceFilter, hcExt, state.dataSurface->TotUserExtConvModels); } break; @@ -1434,19 +1433,19 @@ void GetUserConvCoeffs(EnergyPlusData &state) case HcInt::SetByZone: case HcInt::UserValue: case HcInt::UserSchedule: { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format(" Invalid {} entered={}", ipsc->cAlphaFieldNames(Ptr + 1), Alphas(Ptr + 1))); + ShowSevereError(state, std::format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format(" Invalid {} entered={}", ipsc->cAlphaFieldNames(Ptr + 1), Alphas(Ptr + 1))); ErrorsFound = true; } break; case HcInt::CeilingDiffuser: case HcInt::TrombeWall: { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format(" Invalid {} entered={}", ipsc->cAlphaFieldNames(Ptr), Alphas(Ptr))); + ShowSevereError(state, std::format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format(" Invalid {} entered={}", ipsc->cAlphaFieldNames(Ptr), Alphas(Ptr))); ShowContinueError(state, - EnergyPlus::format("invalid value in {}={}\". This type is only applicable at a Zone level.", - ipsc->cAlphaFieldNames(Ptr + 1), - Alphas(Ptr + 1))); + std::format("invalid value in {}={}\". This type is only applicable at a Zone level.", + ipsc->cAlphaFieldNames(Ptr + 1), + Alphas(Ptr + 1))); ErrorsFound = true; } break; @@ -1478,12 +1477,12 @@ void GetUserConvCoeffs(EnergyPlusData &state) userIntConvModel.overrideType = OverrideType::Value; userIntConvModel.OverrideValue = Numbers(NumField); if (!ipsc->lAlphaFieldBlanks(Ptr + 2)) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("{}{}=\"{}, duplicate value", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, - EnergyPlus::format("Since VALUE is used for \"{}\", {}={} is ignored.", - ipsc->cAlphaFieldNames(FieldNo + 2), - ipsc->cAlphaFieldNames(Ptr + 2), - Alphas(Ptr + 2))); + std::format("Since VALUE is used for \"{}\", {}={} is ignored.", + ipsc->cAlphaFieldNames(FieldNo + 2), + ipsc->cAlphaFieldNames(Ptr + 2), + Alphas(Ptr + 2))); } ApplyIntConvValueMulti(state, surfaceFilter, hcInt, state.dataSurface->TotUserIntConvModels); } break; @@ -1543,8 +1542,8 @@ void GetUserConvCoeffs(EnergyPlusData &state) } // switch (hcIn) } else { // Error Case - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format(" Invalid {} entered={}", ipsc->cAlphaFieldNames(Ptr), Alphas(Ptr))); + ShowSevereError(state, std::format("{}{}=\"{}, invalid value", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format(" Invalid {} entered={}", ipsc->cAlphaFieldNames(Ptr), Alphas(Ptr))); ErrorsFound = true; } } // for (Pass) @@ -1568,17 +1567,17 @@ void GetUserConvCoeffs(EnergyPlusData &state) userExtConvModel.overrideType != OverrideType::SpecifiedModel)) { ++Count; if (state.dataGlobal->DisplayExtraWarnings) { - ShowSevereError(state, EnergyPlus::format("{}Surface=\"{}\", mixed algorithms.", RoutineName, userExtConvModel.SurfaceName)); + ShowSevereError(state, std::format("{}Surface=\"{}\", mixed algorithms.", RoutineName, userExtConvModel.SurfaceName)); ShowContinueError( state, "Zone Outside Convection Algorithm specifies \"SimpleCombined\". SimpleCombined will be used for this surface."); } } } if (Count > 0) { - ShowSevereMessage( - state, - EnergyPlus::format( - "{}{}", RoutineName, EnergyPlus::format("{} surfaces had different outside convection algorithms specified when", Count))); + ShowSevereMessage(state, + std::format("{}{}", + RoutineName, + EnergyPlus::format("{} surfaces had different outside convection algorithms specified when", Count))); ShowContinueError(state, "the Zone Outside Convection Algorithm specifies \"SimpleCombined\". SimpleCombined will be used for these surfaces."); if (!state.dataGlobal->DisplayExtraWarnings) { @@ -1665,7 +1664,7 @@ void GetUserConvCoeffs(EnergyPlusData &state) } // if (Count == 1) if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found getting input. Program termination.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found getting input. Program termination.", RoutineName)); } SetupAdaptiveConvStaticMetaData(state); @@ -1681,8 +1680,8 @@ void ApplyIntConvValue(EnergyPlusData &state, int surfNum, HcInt model, int conv surfIntConv.userModelNum = convUserCoeffNum; } else { ShowWarningError(state, - EnergyPlus::format("User Supplied Convection Coefficients not overwriting already assigned value for (Inside) in Surface={}", - state.dataSurface->Surface(surfNum).Name)); + std::format("User Supplied Convection Coefficients not overwriting already assigned value for (Inside) in Surface={}", + state.dataSurface->Surface(surfNum).Name)); } } @@ -1699,9 +1698,9 @@ void ApplyIntConvValueMulti(EnergyPlusData &state, SurfaceFilter surfaceFilter, if (state.dataSurface->SurfaceFilterLists[(int)surfaceFilter].empty()) { ShowWarningError( state, - EnergyPlus::format("User Supplied Convection Coefficients, Multiple Surface Assignments=\"{}\", there were no surfaces of that type " - "found for Inside assignment.", - SurfaceFilterNamesUC[(int)surfaceFilter])); + std::format("User Supplied Convection Coefficients, Multiple Surface Assignments=\"{}\", there were no surfaces of that type " + "found for Inside assignment.", + SurfaceFilterNamesUC[(int)surfaceFilter])); return; } @@ -1715,22 +1714,21 @@ void ApplyIntConvValueMulti(EnergyPlusData &state, SurfaceFilter surfaceFilter, surfIntConv.userModelNum = userModelNum; } else if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - EnergyPlus::format("User Supplied Convection Coefficients, Multiple Surface Assignments=\"{}\", not overwriting already " - "assigned value for (Inside) in Surface={}", - SurfaceFilterNamesUC[(int)surfaceFilter], - state.dataSurface->Surface(surfNum).Name)); + std::format("User Supplied Convection Coefficients, Multiple Surface Assignments=\"{}\", not overwriting already " + "assigned value for (Inside) in Surface={}", + SurfaceFilterNamesUC[(int)surfaceFilter], + state.dataSurface->Surface(surfNum).Name)); } else { ++numWarnings; } } // for (surfNum) if (!state.dataGlobal->DisplayExtraWarnings && numWarnings > 0) { - ShowWarningError( - state, - EnergyPlus::format("User Supplied Convection Coefficients, Multiple Surface Assignments=\"{}\", not overwriting already assigned " - "values for {} Inside assignments.", - SurfaceFilterNamesUC[(int)surfaceFilter], - numWarnings)); + ShowWarningError(state, + std::format("User Supplied Convection Coefficients, Multiple Surface Assignments=\"{}\", not overwriting already assigned " + "values for {} Inside assignments.", + SurfaceFilterNamesUC[(int)surfaceFilter], + numWarnings)); } } @@ -1747,10 +1745,9 @@ void ApplyExtConvValue(EnergyPlusData &state, int surfNum, HcExt model, int user surfExtConv.model = model; surfExtConv.userModelNum = userModelNum; } else { - ShowWarningError( - state, - EnergyPlus::format("User Supplied Convection Coefficients not overwriting already assigned value for (Outside) in Surface={}", - state.dataSurface->Surface(surfNum).Name)); + ShowWarningError(state, + std::format("User Supplied Convection Coefficients not overwriting already assigned value for (Outside) in Surface={}", + state.dataSurface->Surface(surfNum).Name)); } } @@ -1781,22 +1778,21 @@ void ApplyExtConvValueMulti(EnergyPlusData &state, SurfaceFilter surfaceFilter, surfExtConv.userModelNum = convUserCoeffNum; } else if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - EnergyPlus::format("User Supplied Convection Coefficients, Multiple Surface Assignments=\"{}\", not overwriting already " - "assigned value for (Outside) in Surface={}", - SurfaceFilterNamesUC[(int)surfaceFilter], - state.dataSurface->Surface(surfNum).Name)); + std::format("User Supplied Convection Coefficients, Multiple Surface Assignments=\"{}\", not overwriting already " + "assigned value for (Outside) in Surface={}", + SurfaceFilterNamesUC[(int)surfaceFilter], + state.dataSurface->Surface(surfNum).Name)); } else { ++numWarnings; } } // for (surfNum) if (!state.dataGlobal->DisplayExtraWarnings && numWarnings > 0) { - ShowWarningError( - state, - EnergyPlus::format("User Supplied Convection Coefficients, Multiple Surface Assignments=\"{}\", not overwriting already assigned " - "values for {} Outside assignments.", - SurfaceFilterNamesUC[(int)surfaceFilter], - numWarnings)); + ShowWarningError(state, + std::format("User Supplied Convection Coefficients, Multiple Surface Assignments=\"{}\", not overwriting already assigned " + "values for {} Outside assignments.", + SurfaceFilterNamesUC[(int)surfaceFilter], + numWarnings)); } } @@ -2438,7 +2434,7 @@ void CalcTrombeWallIntConvCoeff(EnergyPlusData &state, // assign the convection coefficient to the major surfaces and any subsurfaces on them if ((surface.BaseSurf == Surf1) || (surface.BaseSurf == Surf2)) { if (surface.ExtBoundCond == DataSurfaces::KivaFoundation) { - ShowFatalError(state, EnergyPlus::format("Trombe wall convection model not applicable for foundation surface ={}", surface.Name)); + ShowFatalError(state, std::format("Trombe wall convection model not applicable for foundation surface ={}", surface.Name)); } state.dataHeatBalSurf->SurfHConvInt(SurfNum) = 2.0 * HConvNet; } @@ -2778,7 +2774,7 @@ void CalcISO15099WindowIntConvCoeff(EnergyPlusData &state, Real64 sineTilt = surface.SinTilt; if (surface.ExtBoundCond == DataSurfaces::KivaFoundation) { - ShowFatalError(state, EnergyPlus::format("ISO15099 convection model not applicable for foundation surface ={}", surface.Name)); + ShowFatalError(state, std::format("ISO15099 convection model not applicable for foundation surface ={}", surface.Name)); } state.dataHeatBalSurf->SurfHConvInt(SurfNum) = @@ -3662,7 +3658,7 @@ Real64 EvaluateExtHcModels(EnergyPlusData &state, int const SurfNum, HcExt const case HcExt::FohannoPolidoriVerticalWall: { if (surface.ExtBoundCond == DataSurfaces::KivaFoundation) { // Not compatible with Kiva (Exterior surfaces in Kiva are not currently reported. Also need to add cell-level convection.) - ShowFatalError(state, EnergyPlus::format("Fohanno Polidori convection model not applicable for foundation surface ={}", surface.Name)); + ShowFatalError(state, std::format("Fohanno Polidori convection model not applicable for foundation surface ={}", surface.Name)); } Hn = CallCalcFohannoPolidoriVerticalWall(state, (SurfOutTemp - state.dataSurface->SurfOutDryBulbTemp(SurfNum)), @@ -3889,7 +3885,7 @@ Real64 EvaluateExtHcModels(EnergyPlusData &state, int const SurfNum, HcExt const Hf = CalcBlockenWindward(state, state.dataEnvrn->WindSpeed, state.dataEnvrn->WindDir, surface.Azimuth, SurfNum); // Not compatible with Kiva (doesn't use weather station windspeed) if (surface.ExtBoundCond == DataSurfaces::KivaFoundation) { - ShowFatalError(state, EnergyPlus::format("Blocken Windward convection model not applicable for foundation surface ={}", surface.Name)); + ShowFatalError(state, std::format("Blocken Windward convection model not applicable for foundation surface ={}", surface.Name)); } } break; @@ -3897,7 +3893,7 @@ Real64 EvaluateExtHcModels(EnergyPlusData &state, int const SurfNum, HcExt const Hf = CalcEmmelVertical(state.dataEnvrn->WindSpeed, state.dataEnvrn->WindDir, surface.Azimuth); // Not compatible with Kiva (doesn't use weather station windspeed) if (surface.ExtBoundCond == DataSurfaces::KivaFoundation) { - ShowFatalError(state, EnergyPlus::format("Emmel Vertical convection model not applicable for foundation surface ={}", surface.Name)); + ShowFatalError(state, std::format("Emmel Vertical convection model not applicable for foundation surface ={}", surface.Name)); } } break; @@ -3905,7 +3901,7 @@ Real64 EvaluateExtHcModels(EnergyPlusData &state, int const SurfNum, HcExt const Hf = CalcEmmelRoof(state.dataEnvrn->WindSpeed, state.dataEnvrn->WindDir, state.dataConvect->RoofLongAxisOutwardAzimuth); // Not compatible with Kiva (doesn't use weather station windspeed) if (surface.ExtBoundCond == DataSurfaces::KivaFoundation) { - ShowFatalError(state, EnergyPlus::format("Emmel Roof convection model not applicable for foundation surface ={}", surface.Name)); + ShowFatalError(state, std::format("Emmel Roof convection model not applicable for foundation surface ={}", surface.Name)); } break; } break; @@ -4446,8 +4442,8 @@ void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int const SurfNu } if (surfIntConv.convClass == IntConvClass::Invalid) { - ShowSevereError( - state, EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for A1 surface named{}", surface.Name)); + ShowSevereError(state, + std::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for A1 surface named{}", surface.Name)); } } break; // A1 @@ -4474,8 +4470,8 @@ void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int const SurfNu } if (surfIntConv.convClass == IntConvClass::Invalid) { - ShowSevereError( - state, EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for A2 surface named{}", surface.Name)); + ShowSevereError(state, + std::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for A2 surface named{}", surface.Name)); } } break; // A2 @@ -4503,8 +4499,8 @@ void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int const SurfNu } if (surfIntConv.convClass == IntConvClass::Invalid) { - ShowSevereError( - state, EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for A3 surface named{}", surface.Name)); + ShowSevereError(state, + std::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for A3 surface named{}", surface.Name)); } } break; // A3 @@ -4534,8 +4530,8 @@ void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int const SurfNu } if (surfIntConv.convClass == IntConvClass::Invalid) { - ShowSevereError( - state, EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for B surface named{}", surface.Name)); + ShowSevereError(state, + std::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for B surface named{}", surface.Name)); } } break; // B @@ -4565,8 +4561,8 @@ void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int const SurfNu } if (surfIntConv.convClass == IntConvClass::Invalid) { - ShowSevereError( - state, EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for C surface named{}", surface.Name)); + ShowSevereError(state, + std::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for C surface named{}", surface.Name)); } } break; // C @@ -4594,8 +4590,8 @@ void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int const SurfNu } if (surfIntConv.convClass == IntConvClass::Invalid) { - ShowSevereError( - state, EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for D surface named{}", surface.Name)); + ShowSevereError(state, + std::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for D surface named{}", surface.Name)); } } break; // D @@ -4649,17 +4645,15 @@ void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int const SurfNu } if (surfIntConv.convClass == IntConvClass::Invalid) { - ShowSevereError( - state, - EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for E surface named {}", surface.Name)); + ShowSevereError(state, + std::format("DynamicIntConvSurfaceClassification: failed to resolve Hc model for E surface named {}", surface.Name)); } } } break; // E default: - ShowSevereError( - state, - EnergyPlus::format("DynamicIntConvSurfaceClassification: failed to determine zone flow regime for surface named {}", surface.Name)); + ShowSevereError(state, + std::format("DynamicIntConvSurfaceClassification: failed to determine zone flow regime for surface named {}", surface.Name)); } // Set report var after surface has been classified @@ -5466,76 +5460,75 @@ Real64 CalcBeausoleilMorrisonMixedStableFloor(Real64 const DeltaTemp, // void ShowWarningHydraulicDiameterZero(EnergyPlusData &state, int &errorIdx, ErrorObjectHeader const &eoh) { if (errorIdx == 0) { - ShowWarningMessage(state, EnergyPlus::format("{}: Convection model not evaluated (would divide by zero)", eoh.routineName)); - ShowContinueError(state, - EnergyPlus::format("Effective hydraulic diameter is zero, convection model not applicable for {} named {}", - eoh.objectType, - eoh.objectName)); + ShowWarningMessage(state, std::format("{}: Convection model not evaluated (would divide by zero)", eoh.routineName)); + ShowContinueError( + state, + std::format("Effective hydraulic diameter is zero, convection model not applicable for {} named {}", eoh.objectType, eoh.objectName)); ShowContinueError(state, "Convection heat transfer coefficient set to 9.999 [W/m2-K] and the simulation continues"); } ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{}: Convection model not evaluated because effective hydraulic diameter is zero " - "and set to 9.999 [W/m2-K]", - eoh.routineName), + std::format("{}: Convection model not evaluated because effective hydraulic diameter is zero " + "and set to 9.999 [W/m2-K]", + eoh.routineName), errorIdx); } void ShowWarningDeltaTempZero(EnergyPlusData &state, int &errorIdx, ErrorObjectHeader const &eoh) { if (errorIdx == 0) { - ShowWarningMessage(state, EnergyPlus::format("{}: Convection model not evaluated (would divide by zero)", eoh.routineName)); + ShowWarningMessage(state, std::format("{}: Convection model not evaluated (would divide by zero)", eoh.routineName)); ShowContinueError(state, "The temperature difference between surface and air is zero"); - ShowContinueError(state, EnergyPlus::format("Occurs for {} named {}", eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("Occurs for {} named {}", eoh.objectType, eoh.objectName)); ShowContinueError(state, "Convection surface heat transfer coefficient set to 9.999 [W/m2-K] and the simulation continues"); } ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{}: Convection model not evaluated because of zero temperature " - "difference and set to 9.999 [W/m2-K]", - eoh.routineName), + std::format("{}: Convection model not evaluated because of zero temperature " + "difference and set to 9.999 [W/m2-K]", + eoh.routineName), errorIdx); } void ShowWarningWindowLocation(EnergyPlusData &state, int &errorIdx, ErrorObjectHeader const &eoh, IntConvWinLoc winLoc) { if (errorIdx == 0) { - ShowSevereMessage(state, EnergyPlus::format("{}: Convection model not evaluated (bad relative window location)", eoh.routineName)); + ShowSevereMessage(state, std::format("{}: Convection model not evaluated (bad relative window location)", eoh.routineName)); ShowContinueError(state, EnergyPlus::format("Value for window location = {}", winLoc)); - ShowContinueError(state, EnergyPlus::format("Occurs for {} named {}", eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("Occurs for {} named {}", eoh.objectType, eoh.objectName)); ShowContinueError(state, "Convection surface heat transfer coefficient set to 9.999 [W/m2-K] and the simulation continues"); } ShowRecurringSevereErrorAtEnd(state, - EnergyPlus::format("{}: Convection model not evaluated because bad window " - "location and set to 9.999 [W/m2-K]", - eoh.routineName), + std::format("{}: Convection model not evaluated because bad window " + "location and set to 9.999 [W/m2-K]", + eoh.routineName), errorIdx); } void ShowWarningPerimeterLengthZero(EnergyPlusData &state, int &errorIdx, ErrorObjectHeader const &eoh) { if (errorIdx == 0) { - ShowWarningError(state, EnergyPlus::format("{}: Convection model not evaluated (zero zone exterior perimeter length)", eoh.routineName)); + ShowWarningError(state, std::format("{}: Convection model not evaluated (zero zone exterior perimeter length)", eoh.routineName)); ShowContinueError(state, "Value for zone exterior perimeter length = 0.0"); - ShowContinueError(state, EnergyPlus::format("Occurs for {} named {}", eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("Occurs for {} named {}", eoh.objectType, eoh.objectName)); ShowContinueError(state, "Convection surface heat transfer coefficient set to 9.999 [W/m2-K] and the simulation continues"); } ShowRecurringSevereErrorAtEnd(state, - EnergyPlus::format("{}: Convection model not evaluated because bad perimeter " - "length and set to 9.999 [W/m2-K]", - eoh.routineName), + std::format("{}: Convection model not evaluated because bad perimeter " + "length and set to 9.999 [W/m2-K]", + eoh.routineName), errorIdx); } void ShowWarningFaceAreaZero(EnergyPlusData &state, int &errorIdx, ErrorObjectHeader const &eoh) { if (errorIdx == 0) { - ShowSevereMessage(state, EnergyPlus::format("{}: Convection model not evaluated (bad face area)", eoh.routineName)); + ShowSevereMessage(state, std::format("{}: Convection model not evaluated (bad face area)", eoh.routineName)); ShowContinueError(state, "Value for effective face area = 0.0"); - ShowContinueError(state, EnergyPlus::format("Occurs for {} named {}", eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("Occurs for {} named {}", eoh.objectType, eoh.objectName)); ShowContinueError(state, "Convection surface heat transfer coefficient set to 9.999 [W/m2-K] and the simulation continues"); } ShowRecurringSevereErrorAtEnd( - state, EnergyPlus::format("{}: Convection model not evaluated because bad face area and set to 9.999 [W/m2-k]", eoh.routineName), errorIdx); + state, std::format("{}: Convection model not evaluated because bad face area and set to 9.999 [W/m2-k]", eoh.routineName), errorIdx); } Real64 CalcBeausoleilMorrisonMixedStableFloor(EnergyPlusData &state, @@ -6222,7 +6215,7 @@ Real64 CalcMitchell(EnergyPlusData &state, Real64 const WindAtZ, Real64 const Le if (state.dataConvect->CalcMitchellErrorIDX == 0) { ShowSevereMessage(state, "CalcMitchell: Convection model not evaluated (bad length scale)"); ShowContinueError(state, EnergyPlus::format("Value for effective length scale = {:.5R}", LengthScale)); - ShowContinueError(state, EnergyPlus::format("Occurs for surface named = {}", state.dataSurface->Surface(SurfNum).Name)); + ShowContinueError(state, std::format("Occurs for surface named = {}", state.dataSurface->Surface(SurfNum).Name)); ShowContinueError(state, "Convection surface heat transfer coefficient set to 9.999 [W/m2-K] and the simulation continues"); } ShowRecurringSevereErrorAtEnd(state, @@ -6282,7 +6275,7 @@ Real64 CalcBlockenWindward(EnergyPlusData &state, if (state.dataConvect->CalcBlockenWindwardErrorIDX == 0) { ShowSevereMessage(state, "CalcBlockenWindward: Convection model wind angle calculation suspect (developer issue)"); ShowContinueError(state, EnergyPlus::format("Value for theta angle = {:.5R}", Theta)); - ShowContinueError(state, EnergyPlus::format("Occurs for surface named = {}", state.dataSurface->Surface(SurfNum).Name)); + ShowContinueError(state, std::format("Occurs for surface named = {}", state.dataSurface->Surface(SurfNum).Name)); ShowContinueError(state, "Convection model uses EmmelVertical correlation and the simulation continues"); } ShowRecurringSevereErrorAtEnd( @@ -6423,7 +6416,7 @@ Real64 CalcClearRoof(EnergyPlusData &state, if (state.dataConvect->CalcClearRoofErrorIDX == 0) { ShowSevereMessage(state, "CalcClearRoof: Convection model not evaluated (bad value for distance to roof edge)"); ShowContinueError(state, EnergyPlus::format("Value for distance to roof edge ={:.3R}", x)); - ShowContinueError(state, EnergyPlus::format("Occurs for surface named = {}", state.dataSurface->Surface(SurfNum).Name)); + ShowContinueError(state, std::format("Occurs for surface named = {}", state.dataSurface->Surface(SurfNum).Name)); ShowContinueError(state, "Convection surface heat transfer coefficient set to 9.999 [W/m2-K] and the simulation continues"); } ShowRecurringSevereErrorAtEnd( diff --git a/src/EnergyPlus/CostEstimateManager.cc b/src/EnergyPlus/CostEstimateManager.cc index a0b7efe2968..74ad5cca8ae 100644 --- a/src/EnergyPlus/CostEstimateManager.cc +++ b/src/EnergyPlus/CostEstimateManager.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -449,17 +450,16 @@ namespace CostEstimateManager { EnergyPlus::format("ComponentCost:LineItem: \"{}\", Chiller:Electric, invalid chiller specified.", state.dataCostEstimateManager->CostLineItem(Item).LineName)); ShowContinueError(state, - EnergyPlus::format("Chiller Specified=\"{}\", calculations will not be completed for this item.", - state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); + std::format("Chiller Specified=\"{}\", calculations will not be completed for this item.", + state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); } } break; case ParentObject::DaylightingControls: { if (state.dataCostEstimateManager->CostLineItem(Item).ParentObjName == "*") { // wildcard, apply to all such components } else if (state.dataCostEstimateManager->CostLineItem(Item).ParentObjName.empty()) { - ShowSevereError( - state, - EnergyPlus::format("ComponentCost:LineItem: \"{}\", Daylighting:Controls, need to specify a Reference Object Name", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + ShowSevereError(state, + std::format("ComponentCost:LineItem: \"{}\", Daylighting:Controls, need to specify a Reference Object Name", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } else { ThisZoneID = Util::FindItem(state.dataCostEstimateManager->CostLineItem(Item).ParentObjName, Zone); @@ -467,10 +467,10 @@ namespace CostEstimateManager { state.dataCostEstimateManager->CostLineItem(Item).Qty = state.dataDayltg->ZoneDaylight(ThisZoneID).totRefPts; } else { ShowSevereError(state, - EnergyPlus::format("ComponentCost:LineItem: \"{}\", Daylighting:Controls, need to specify a valid zone name", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); - ShowContinueError( - state, EnergyPlus::format("Zone specified=\"{}\".", state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); + std::format("ComponentCost:LineItem: \"{}\", Daylighting:Controls, need to specify a valid zone name", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); + ShowContinueError(state, + std::format("Zone specified=\"{}\".", state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); ErrorsFound = true; } } @@ -481,26 +481,24 @@ namespace CostEstimateManager { if (ThisSurfID > 0) { ThisZoneID = Util::FindItem(state.dataSurface->Surface(ThisSurfID).ZoneName, Zone); if (ThisZoneID == 0) { - ShowSevereError( - state, - EnergyPlus::format("ComponentCost:LineItem: \"{}\", Shading:Zone:Detailed, need to specify a valid zone name", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); - ShowContinueError(state, EnergyPlus::format("Zone specified=\"{}\".", state.dataSurface->Surface(ThisSurfID).ZoneName)); + ShowSevereError(state, + std::format("ComponentCost:LineItem: \"{}\", Shading:Zone:Detailed, need to specify a valid zone name", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); + ShowContinueError(state, std::format("Zone specified=\"{}\".", state.dataSurface->Surface(ThisSurfID).ZoneName)); ErrorsFound = true; } } else { - ShowSevereError( - state, - EnergyPlus::format("ComponentCost:LineItem: \"{}\", Shading:Zone:Detailed, need to specify a valid surface name", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); - ShowContinueError( - state, EnergyPlus::format("Surface specified=\"{}\".", state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); + ShowSevereError(state, + std::format("ComponentCost:LineItem: \"{}\", Shading:Zone:Detailed, need to specify a valid surface name", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); + ShowContinueError(state, + std::format("Surface specified=\"{}\".", state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); ErrorsFound = true; } } else { ShowSevereError(state, - EnergyPlus::format("ComponentCost:LineItem: \"{}\", Shading:Zone:Detailed, specify a Reference Object Name", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + std::format("ComponentCost:LineItem: \"{}\", Shading:Zone:Detailed, specify a Reference Object Name", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } } break; @@ -508,8 +506,8 @@ namespace CostEstimateManager { if ((state.dataCostEstimateManager->CostLineItem(Item).PerKiloWattCap > 0.0) && (state.dataCostEstimateManager->CostLineItem(Item).PerEach > 0.0)) { ShowSevereError(state, - EnergyPlus::format("ComponentCost:LineItem: \"{}\", Lights, too many pricing methods specified", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + std::format("ComponentCost:LineItem: \"{}\", Lights, too many pricing methods specified", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } if (state.dataCostEstimateManager->CostLineItem(Item).PerKiloWattCap != 0.0) { @@ -517,16 +515,16 @@ namespace CostEstimateManager { ThisZoneID = Util::FindItem(state.dataCostEstimateManager->CostLineItem(Item).ParentObjName, Zone); if (ThisZoneID == 0) { ShowSevereError(state, - EnergyPlus::format("ComponentCost:LineItem: \"{}\", Lights, need to specify a valid zone name", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); - ShowContinueError( - state, EnergyPlus::format("Zone specified=\"{}\".", state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); + std::format("ComponentCost:LineItem: \"{}\", Lights, need to specify a valid zone name", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); + ShowContinueError(state, + std::format("Zone specified=\"{}\".", state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); ErrorsFound = true; } } else { ShowSevereError(state, - EnergyPlus::format("ComponentCost:LineItem: \"{}\", Lights, need to specify a Reference Object Name", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + std::format("ComponentCost:LineItem: \"{}\", Lights, need to specify a Reference Object Name", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } } @@ -537,44 +535,40 @@ namespace CostEstimateManager { thisPV = Util::FindItem(state.dataCostEstimateManager->CostLineItem(Item).ParentObjName, state.dataPhotovoltaic->PVarray); if (thisPV > 0) { if (state.dataPhotovoltaic->PVarray(thisPV).PVModelType != DataPhotovoltaics::PVModel::Simple) { - ShowSevereError( - state, - EnergyPlus::format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, only available for model type " - "PhotovoltaicPerformance:Simple", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + ShowSevereError(state, + std::format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, only available for model type " + "PhotovoltaicPerformance:Simple", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } } else { - ShowSevereError( - state, - EnergyPlus::format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, need to specify a valid PV array", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + ShowSevereError(state, + std::format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, need to specify a valid PV array", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ShowContinueError( - state, - EnergyPlus::format("PV Array specified=\"{}\".", state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); + state, std::format("PV Array specified=\"{}\".", state.dataCostEstimateManager->CostLineItem(Item).ParentObjName)); ErrorsFound = true; } } else { - ShowSevereError( - state, - EnergyPlus::format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, need to specify a Reference Object Name", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + ShowSevereError(state, + std::format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, need to specify a Reference Object Name", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } } else { ShowSevereError(state, - EnergyPlus::format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, need to specify a per-kilowatt cost ", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + std::format("ComponentCost:LineItem: \"{}\", Generator:Photovoltaic, need to specify a per-kilowatt cost ", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ErrorsFound = true; } } break; default: { ShowWarningError(state, - EnergyPlus::format("ComponentCost:LineItem: \"{}\", invalid cost item -- not included in cost estimate.", - state.dataCostEstimateManager->CostLineItem(Item).LineName)); + std::format("ComponentCost:LineItem: \"{}\", invalid cost item -- not included in cost estimate.", + state.dataCostEstimateManager->CostLineItem(Item).LineName)); ShowContinueError( state, - EnergyPlus::format( + std::format( "... invalid object type={}", EnergyPlus::format(ParentObjectNamesUC[static_cast(state.dataCostEstimateManager->CostLineItem(Item).ParentObjType)]))); } break; diff --git a/src/EnergyPlus/CrossVentMgr.cc b/src/EnergyPlus/CrossVentMgr.cc index c12f61a2459..862071fe4db 100644 --- a/src/EnergyPlus/CrossVentMgr.cc +++ b/src/EnergyPlus/CrossVentMgr.cc @@ -52,8 +52,10 @@ // ObjexxFCL Headers #include -// EnergyPlus Headers +// Local Headers #include + +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/CurveManager.cc b/src/EnergyPlus/CurveManager.cc index 67500cf3593..c23887bb8e8 100644 --- a/src/EnergyPlus/CurveManager.cc +++ b/src/EnergyPlus/CurveManager.cc @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -57,7 +58,7 @@ #include #include -// Third-party Headers +// Third Party Headers #include // EnergyPlus Headers @@ -1081,7 +1082,7 @@ namespace Curve { } if (Numbers(4) > Numbers(5)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(4), @@ -1092,13 +1093,12 @@ namespace Curve { } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1146,7 +1146,7 @@ namespace Curve { } if (Numbers(7) > Numbers(8)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(7), @@ -1156,7 +1156,7 @@ namespace Curve { ErrorsFound = true; } if (Numbers(9) > Numbers(10)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(9), @@ -1167,19 +1167,17 @@ namespace Curve { } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveInputTypeValid(Alphas(3))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 4) { if (!IsCurveOutputTypeValid(Alphas(4))) { - ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1227,7 +1225,7 @@ namespace Curve { } if (Numbers(7) > Numbers(8)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(7), @@ -1237,7 +1235,7 @@ namespace Curve { ErrorsFound = true; } if (Numbers(9) > Numbers(10)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(9), @@ -1248,19 +1246,17 @@ namespace Curve { } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveInputTypeValid(Alphas(3))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 4) { if (!IsCurveOutputTypeValid(Alphas(4))) { - ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1306,7 +1302,7 @@ namespace Curve { } if (Numbers(3) > Numbers(4)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(3), @@ -1317,13 +1313,12 @@ namespace Curve { } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1371,7 +1366,7 @@ namespace Curve { } if (Numbers(11) > Numbers(12)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(11), @@ -1381,7 +1376,7 @@ namespace Curve { ErrorsFound = true; } if (Numbers(13) > Numbers(14)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(13), @@ -1392,19 +1387,17 @@ namespace Curve { } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveInputTypeValid(Alphas(3))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 4) { if (!IsCurveOutputTypeValid(Alphas(4))) { - ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1478,7 +1471,7 @@ namespace Curve { } if (Numbers(28) > Numbers(29)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(28), @@ -1488,7 +1481,7 @@ namespace Curve { ErrorsFound = true; } if (Numbers(30) > Numbers(31)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(30), @@ -1498,7 +1491,7 @@ namespace Curve { ErrorsFound = true; } if (Numbers(32) > Numbers(33)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(32), @@ -1509,25 +1502,22 @@ namespace Curve { } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveInputTypeValid(Alphas(3))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for Y is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 4) { if (!IsCurveInputTypeValid(Alphas(4))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for Z is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for Z is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 5) { if (!IsCurveOutputTypeValid(Alphas(5))) { - ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1585,7 +1575,7 @@ namespace Curve { int MinIndex = 2 * i + 4; int MaxIndex = MinIndex + 1; if (Numbers(MinIndex) > Numbers(MaxIndex)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(MinIndex), @@ -1598,14 +1588,13 @@ namespace Curve { if (NumAlphas >= InputTypeIndex) { if (!IsCurveInputTypeValid(Alphas(InputTypeIndex))) { ShowWarningError( - state, - EnergyPlus::format("In {} named {} the Input Unit Type for {} is invalid.", CurrentModuleObject, Alphas(1), VarNames[i])); + state, std::format("In {} named {} the Input Unit Type for {} is invalid.", CurrentModuleObject, Alphas(1), VarNames[i])); } } } if (NumAlphas >= 6) { if (!IsCurveOutputTypeValid(Alphas(6))) { - ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1664,7 +1653,7 @@ namespace Curve { int MinIndex = 2 * i + 5; int MaxIndex = MinIndex + 1; if (Numbers(MinIndex) > Numbers(MaxIndex)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(MinIndex), @@ -1677,14 +1666,13 @@ namespace Curve { if (NumAlphas >= InputTypeIndex) { if (!IsCurveInputTypeValid(Alphas(InputTypeIndex))) { ShowWarningError( - state, - EnergyPlus::format("In {} named {} the Input Unit Type for {} is invalid.", CurrentModuleObject, Alphas(1), VarNames[i])); + state, std::format("In {} named {} the Input Unit Type for {} is invalid.", CurrentModuleObject, Alphas(1), VarNames[i])); } } } if (NumAlphas >= 7) { if (!IsCurveOutputTypeValid(Alphas(7))) { - ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1722,7 +1710,7 @@ namespace Curve { thisCurve->inputLimits[0].max = Numbers(5); if (Numbers(4) > Numbers(5)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(4), @@ -1742,13 +1730,12 @@ namespace Curve { } if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } @@ -1797,7 +1784,7 @@ namespace Curve { } if (Numbers(5) > Numbers(6)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(5), @@ -1807,7 +1794,7 @@ namespace Curve { ErrorsFound = true; } if (Numbers(7) > Numbers(8)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(7), @@ -1861,7 +1848,7 @@ namespace Curve { } if (Numbers(5) > Numbers(6)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(5), @@ -1873,13 +1860,12 @@ namespace Curve { if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } // Exponential Skew Normal @@ -1926,7 +1912,7 @@ namespace Curve { } if (Numbers(6) > Numbers(7)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(6), @@ -1938,13 +1924,12 @@ namespace Curve { if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } // Sigmoid @@ -1991,7 +1976,7 @@ namespace Curve { } if (Numbers(4) > Numbers(5)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(4), @@ -2003,13 +1988,12 @@ namespace Curve { if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } // Rectangular Hyperbola Type 1 @@ -2056,7 +2040,7 @@ namespace Curve { } if (Numbers(4) > Numbers(5)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(4), @@ -2068,13 +2052,12 @@ namespace Curve { if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } // Rectangular Hyperbola Type 2 @@ -2121,7 +2104,7 @@ namespace Curve { } if (Numbers(4) > Numbers(5)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(4), @@ -2133,13 +2116,12 @@ namespace Curve { if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } // Exponential Decay @@ -2177,7 +2159,7 @@ namespace Curve { thisCurve->inputLimits[0].max = Numbers(7); if (Numbers(6) > Numbers(7)) { // error - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] > {} [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(6), @@ -2198,13 +2180,12 @@ namespace Curve { if (NumAlphas >= 2) { if (!IsCurveInputTypeValid(Alphas(2))) { - ShowWarningError(state, - EnergyPlus::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Input Unit Type for X is invalid.", CurrentModuleObject, Alphas(1))); } } if (NumAlphas >= 3) { if (!IsCurveOutputTypeValid(Alphas(3))) { - ShowWarningError(state, EnergyPlus::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("In {} named {} the Output Unit Type is invalid.", CurrentModuleObject, Alphas(1))); } } } // Exponential Decay @@ -2218,7 +2199,7 @@ namespace Curve { if (numOfCPArray != 1) { ShowSevereError( state, - EnergyPlus::format( + std::format( "GetCurveInput: Currently exactly one (\"1\") {} object per simulation is required when using the AirflowNetwork model.", CurrentModuleObject)); ErrorsFound = true; @@ -2248,7 +2229,7 @@ namespace Curve { dirMax = std::max(dirMax, Numbers(j)); if (j > 1) { if (windDirs[j - 2] >= windDirs[j - 1]) { - ShowSevereError(state, EnergyPlus::format("GetCurveInput: An {} object ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: An {} object ", CurrentModuleObject)); ShowContinueError(state, "has either the same values for two consecutive wind directions, or a lower wind direction value after " "a higher wind direction value."); @@ -2265,7 +2246,7 @@ namespace Curve { } // Check that the first table value is zero if (dirMin != 0.0) { - ShowSevereError(state, EnergyPlus::format("GetCurveInput: An {} object ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: An {} object ", CurrentModuleObject)); ShowContinueError(state, EnergyPlus::format("has a nonzero minimum value of {:.2R}", dirMin)); ShowContinueError(state, "Wind direction values must begin at zero."); ErrorsFound = true; @@ -2298,11 +2279,11 @@ namespace Curve { // Ensure the CP array name should be the same as the name of AirflowNetwork:MultiZone:WindPressureCoefficientArray if (!Util::SameString(Alphas(2), wpcName)) { ShowSevereError(state, - EnergyPlus::format("GetCurveInput: Invalid {} = {} in {} = ", - state.dataIPShortCut->cAlphaFieldNames(2), - Alphas(2), - CurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("The valid name is {}", wpcName)); + std::format("GetCurveInput: Invalid {} = {} in {} = ", + state.dataIPShortCut->cAlphaFieldNames(2), + Alphas(2), + CurrentModuleObject)); + ShowContinueError(state, std::format("The valid name is {}", wpcName)); ErrorsFound = true; } @@ -2310,7 +2291,7 @@ namespace Curve { thisCurve->curveType = CurveType::BtwxtTableLookup; - thisCurve->contextString = EnergyPlus::format("Table:Lookup \"{}\"", Alphas(1)); + thisCurve->contextString = std::format("Table:Lookup \"{}\"", Alphas(1)); std::pair callbackPair{&state, thisCurve->contextString}; state.dataCurveManager->btwxtManager.setLoggingContext(&callbackPair); @@ -2326,12 +2307,12 @@ namespace Curve { int MaxTableNums = NumNumbers; if (NumNumbers != numWindDir) { - ShowSevereError(state, EnergyPlus::format("GetCurveInput: For {}: ", CurrentModuleObject)); + ShowSevereError(state, std::format("GetCurveInput: For {}: ", CurrentModuleObject)); ShowContinueError( state, - EnergyPlus::format("The number of data entries must match the number of wind directions given in the wind pressure " - "coefficient array. Number of data entries = {}", - NumNumbers)); + std::format("The number of data entries must match the number of wind directions given in the wind pressure " + "coefficient array. Number of data entries = {}", + NumNumbers)); ErrorsFound = true; } else { std::vector axis; @@ -2399,7 +2380,7 @@ namespace Curve { // Loop through independent variables in list and add them to the grid for (auto &indVar : fields.at("independent_variables")) { std::string indVarName = Util::makeUPPER(indVar.at("independent_variable_name").get()); - std::string contextString = EnergyPlus::format("Table:IndependentVariable \"{}\"", indVarName); + std::string contextString = std::format("Table:IndependentVariable \"{}\"", indVarName); std::pair callbackPair{&state, contextString}; state.dataCurveManager->btwxtManager.setLoggingContext(&callbackPair); @@ -2412,7 +2393,7 @@ namespace Curve { if (indVarInstance.count("unit_type") != 0u) { std::string unitType = indVarInstance.at("unit_type").get(); if (!IsCurveInputTypeValid(unitType)) { - ShowSevereError(state, EnergyPlus::format("{}: Unit Type [{}] is invalid", contextString, unitType)); + ShowSevereError(state, std::format("{}: Unit Type [{}] is invalid", contextString, unitType)); } } @@ -2422,14 +2403,14 @@ namespace Curve { std::string tmp = indVarInstance.at("external_file_name").get(); fs::path filePath(tmp); if (indVarInstance.count("external_file_column_number") == 0u) { - ShowSevereError(state, - EnergyPlus::format("{}: No column number defined for external file \"{}\"", contextString, filePath)); + ShowSevereError( + state, std::format("{}: No column number defined for external file \"{}\"", contextString, filePath.string())); ErrorsFound = true; } if (indVarInstance.count("external_file_starting_row_number") == 0u) { ShowSevereError( state, - EnergyPlus::format("{}: No starting row number defined for external file \"{}\"", contextString, filePath)); + std::format("{}: No starting row number defined for external file \"{}\"", contextString, filePath.string())); ErrorsFound = true; } @@ -2462,7 +2443,7 @@ namespace Curve { axis.push_back(value.at("value").get()); } } else { - ShowSevereError(state, EnergyPlus::format("{}: No values defined.", contextString)); + ShowSevereError(state, std::format("{}: No values defined.", contextString)); ErrorsFound = true; } @@ -2479,8 +2460,7 @@ namespace Curve { auto extrapIterator = indVarInstance.find("extrapolation_method"); if (extrapIterator != indVarInstance.end()) { if (extrapIterator->get() == "Unavailable") { - ShowSevereError(state, - EnergyPlus::format("{}: Extrapolation method \"Unavailable\" is not yet available.", contextString)); + ShowSevereError(state, std::format("{}: Extrapolation method \"Unavailable\" is not yet available.", contextString)); ErrorsFound = true; } else if (extrapIterator->get() == "Constant") { extrapMethod = Btwxt::ExtrapolationMethod::constant; @@ -2511,7 +2491,7 @@ namespace Curve { } else { // Independent variable does not exist - ShowSevereError(state, EnergyPlus::format("{}: No Table:IndependentVariable found.", contextString)); + ShowSevereError(state, std::format("{}: No Table:IndependentVariable found.", contextString)); ErrorsFound = true; } } @@ -2541,7 +2521,7 @@ namespace Curve { std::string indVarListName = Util::makeUPPER(fields.at("independent_variable_list_name").get()); - thisCurve->contextString = EnergyPlus::format("Table:Lookup \"{}\"", thisCurve->Name); + thisCurve->contextString = std::format("Table:Lookup \"{}\"", thisCurve->Name); std::pair callbackPair{&state, thisCurve->contextString}; state.dataCurveManager->btwxtManager.setLoggingContext(&callbackPair); @@ -2549,7 +2529,7 @@ namespace Curve { if (fields.count("output_unit_type") != 0u) { std::string unitType = fields.at("output_unit_type").get(); if (!IsCurveOutputTypeValid(unitType)) { - ShowSevereError(state, EnergyPlus::format("{}: Output Unit Type [{}] is invalid", thisCurve->contextString, unitType)); + ShowSevereError(state, std::format("{}: Output Unit Type [{}] is invalid", thisCurve->contextString, unitType)); } } @@ -2618,9 +2598,9 @@ namespace Curve { if (normalizeMethod != NM_NONE && (fields.count("normalization_divisor") != 0u)) { normalizationDivisor = fields.at("normalization_divisor").get(); if (std::abs(normalizationDivisor) < std::numeric_limits::min()) { - ShowSevereError(state, - EnergyPlus::format("Table:Lookup named \"{}\": Normalization divisor entered as zero, which is invalid", - thisCurve->Name)); + ShowSevereError( + state, + std::format("Table:Lookup named \"{}\": Normalization divisor entered as zero, which is invalid", thisCurve->Name)); ErrorsFound = true; continue; } @@ -2633,13 +2613,13 @@ namespace Curve { if (fields.count("external_file_column_number") == 0u) { ShowSevereError( - state, EnergyPlus::format("{}: No column number defined for external file \"{}\"", thisCurve->contextString, filePath)); + state, std::format("{}: No column number defined for external file \"{}\"", thisCurve->contextString, filePath.string())); ErrorsFound = true; } if (fields.count("external_file_starting_row_number") == 0u) { ShowSevereError( state, - EnergyPlus::format("{}: No starting row number defined for external file \"{}\"", thisCurve->contextString, filePath)); + std::format("{}: No starting row number defined for external file \"{}\"", thisCurve->contextString, filePath.string())); ErrorsFound = true; } @@ -2667,7 +2647,7 @@ namespace Curve { lookupValues.push_back(value.at("output_value").get() / normalizationDivisor); } } else { - ShowSevereError(state, EnergyPlus::format("{}: No values defined.", thisCurve->contextString)); + ShowSevereError(state, std::format("{}: No values defined.", thisCurve->contextString)); ErrorsFound = true; } @@ -2688,9 +2668,9 @@ namespace Curve { if (pointsSpecified && pointsUnspecified) { ShowSevereError( state, - EnergyPlus::format("{}: Table is to be normalized using AutomaticWithDivisor, but not all independent variables define a " - "normalization reference value. Make sure either:", - thisCurve->contextString)); + std::format("{}: Table is to be normalized using AutomaticWithDivisor, but not all independent variables define a " + "normalization reference value. Make sure either:", + thisCurve->contextString)); ShowContinueError(state, " Make sure either:"); ShowContinueError(state, " a) a normalization reference value is defined for each independent variable, or"); ShowContinueError(state, " b) no normalization reference values are defined."); @@ -2725,7 +2705,7 @@ namespace Curve { gridIndex = gridMap.at(indVarListName); } else { // Independent variable list does not exist - ShowSevereError(state, EnergyPlus::format("Table:Lookup \"{}\" : No Table:IndependentVariableList found.", indVarListName)); + ShowSevereError(state, std::format("Table:Lookup \"{}\" : No Table:IndependentVariableList found.", indVarListName)); ErrorsFound = true; } return gridIndex; @@ -2813,12 +2793,12 @@ namespace Curve { if (col >= numColumns) { ShowFatalError( state, - EnergyPlus::format("File \"{}\" : Requested column ({}) exceeds the number of columns ({}).", filePath, col + 1, numColumns)); + std::format("File \"{}\" : Requested column ({}) exceeds the number of columns ({}).", filePath.string(), col + 1, numColumns)); } if (row >= numRows) { ShowFatalError( state, - EnergyPlus::format("File \"{}\" : Requested starting row ({}) exceeds the number of rows ({}).", filePath, row + 1, numRows)); + std::format("File \"{}\" : Requested starting row ({}) exceeds the number of rows ({}).", filePath.string(), row + 1, numRows)); } std::vector array(numRows - row); std::transform(content.begin() + row, content.end(), array.begin(), [](std::string_view str) { @@ -2857,7 +2837,7 @@ namespace Curve { for (int dim = 1; dim <= thisCurve->numDims; ++dim) { std::string numStr = fmt::to_string(dim); SetupOutputVariable(state, - EnergyPlus::format("Performance Curve Input Variable {} Value", numStr), + std::format("Performance Curve Input Variable {} Value", numStr), Constant::Units::None, thisCurve->inputs[dim - 1], OutputProcessor::TimeStepType::System, @@ -3099,7 +3079,7 @@ namespace Curve { std::string validDimsString = fmt::to_string(validDims[0]); for (std::size_t i = 1; i < validDims.size(); i++) { - validDimsString += EnergyPlus::format(" or {}", validDims[i]); + validDimsString += std::format(" or {}", validDims[i]); } ShowSevereCurveDims(state, eoh, curveFieldText, thisCurve->Name, validDimsString, curveDim); @@ -3113,10 +3093,10 @@ namespace Curve { std::string_view const validDims, int dim) { - ShowSevereError(state, fmt::format("{}: {}=\"{}\"", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("...Invalid curve for {}.", fieldName)); - ShowContinueError(state, EnergyPlus::format("...Input curve=\"{}\" has dimension {}.", curveName, dim)); - ShowContinueError(state, EnergyPlus::format("...Curve type must have dimension {}.", validDims)); + ShowSevereError(state, std::format("{}: {}=\"{}\"", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("...Invalid curve for {}.", fieldName)); + ShowContinueError(state, std::format("...Input curve=\"{}\" has dimension {}.", curveName, dim)); + ShowContinueError(state, std::format("...Curve type must have dimension {}.", validDims)); } std::string GetCurveName(EnergyPlusData &state, int const CurveIndex) // index of curve in curve array @@ -3374,9 +3354,9 @@ namespace Curve { thisCurve->outputLimits.minPresent = true; } else { ShowSevereError(state, - EnergyPlus::format("SetCurveOutputMinValue: CurveIndex=[{}] not in range of curves=[1:{}].", - CurveIndex, - state.dataCurveManager->curves.size())); + std::format("SetCurveOutputMinValue: CurveIndex=[{}] not in range of curves=[1:{}].", + CurveIndex, + state.dataCurveManager->curves.size())); ErrorsFound = true; } } @@ -3404,9 +3384,9 @@ namespace Curve { thisCurve->outputLimits.maxPresent = true; } else { ShowSevereError(state, - EnergyPlus::format("SetCurveOutputMinMaxValues: CurveIndex=[{}] not in range of curves=[1:{}].", - CurveIndex, - state.dataCurveManager->curves.size())); + std::format("SetCurveOutputMinMaxValues: CurveIndex=[{}] not in range of curves=[1:{}].", + CurveIndex, + state.dataCurveManager->curves.size())); ErrorsFound = true; } } @@ -3511,8 +3491,8 @@ namespace Curve { PressureCurveType = DataBranchAirLoopPlant::PressureCurveType::Generic; PressureCurveIndex = TempCurveIndex; } else { - ShowSevereError(state, EnergyPlus::format("Plant Pressure Simulation: Found error for curve: {}", PressureCurveName)); - ShowContinueError(state, EnergyPlus::format("Curve type detected: {}", objectNames[static_cast(GenericCurveType)])); + ShowSevereError(state, std::format("Plant Pressure Simulation: Found error for curve: {}", PressureCurveName)); + ShowContinueError(state, std::format("Curve type detected: {}", objectNames[static_cast(GenericCurveType)])); ShowContinueError(state, "Generic curves should be single independent variable such that DeltaP = f(mdot)"); ShowContinueError(state, " Therefore they should be of type: Linear, Quadratic, Cubic, Quartic, or Exponent"); ShowFatalError(state, "Errors in pressure simulation input cause program termination"); @@ -3655,10 +3635,10 @@ namespace Curve { if (curveIndex > 0) { Real64 const CurveVal = CurveValue(state, curveIndex, Var1); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\" curve values", callingRoutineObj, objectName)); - ShowContinueError( - state, EnergyPlus::format("... {} = {} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName, cFieldValue)); - ShowContinueError(state, EnergyPlus::format("... Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, std::format("{}=\"{}\" curve values", callingRoutineObj, objectName)); + ShowContinueError(state, + std::format("... {} = {} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName, cFieldValue)); + ShowContinueError(state, std::format("... Curve output at rated conditions = {:.3f}", CurveVal)); } } } @@ -3682,10 +3662,10 @@ namespace Curve { if (curveIndex > 0) { Real64 const CurveVal = CurveValue(state, curveIndex, Var1, Var2); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\" curve values", callingRoutineObj, objectName)); - ShowContinueError( - state, EnergyPlus::format("... {} = {} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName, cFieldValue)); - ShowContinueError(state, EnergyPlus::format("... Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, std::format("{}=\"{}\" curve values", callingRoutineObj, objectName)); + ShowContinueError(state, + std::format("... {} = {} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName, cFieldValue)); + ShowContinueError(state, std::format("... Curve output at rated conditions = {:.3f}", CurveVal)); } } } diff --git a/src/EnergyPlus/DElightManagerF.cc b/src/EnergyPlus/DElightManagerF.cc index 2ac0ba73b6f..eac978bae65 100644 --- a/src/EnergyPlus/DElightManagerF.cc +++ b/src/EnergyPlus/DElightManagerF.cc @@ -55,6 +55,11 @@ #include #include +// Third Party Headers +extern "C" { +#include +} + // EnergyPlus Headers #include #include @@ -75,10 +80,6 @@ #include #include -extern "C" { -#include -} - namespace EnergyPlus { namespace DElightManagerF { diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 18e1594e6bf..985068b658c 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include #include // ObjexxFCL Headers @@ -933,7 +934,7 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.RatedCOP(1) = Numbers(3); if (thisDXCoil.RatedCOP(1) <= 0.0) { ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be > 0.0, entered value=[{:.2T}].", cNumericFields(3), Numbers(3))); + ShowContinueError(state, EnergyPlus::format("...{} must be > 0.0, entered value=[{:.2f}].", cNumericFields(3), Numbers(3))); ErrorsFound = true; } @@ -966,11 +967,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CCapFTemp(1) = GetCurveIndex(state, Alphas(5)); // convert curve name to number if (thisDXCoil.CCapFTemp(1) == 0) { if (lAlphaBlanks(5)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(5))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(5))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); } ErrorsFound = true; } else { @@ -998,11 +999,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CCapFFlow(1) = GetCurveIndex(state, Alphas(6)); // convert curve name to number if (thisDXCoil.CCapFFlow(1) == 0) { if (lAlphaBlanks(6)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(6))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(6))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); } ErrorsFound = true; } else { @@ -1024,11 +1025,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.EIRFTemp(1) = GetCurveIndex(state, Alphas(7)); // convert curve name to number if (thisDXCoil.EIRFTemp(1) == 0) { if (lAlphaBlanks(7)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(7))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(7))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(7), Alphas(7))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(7), Alphas(7))); } ErrorsFound = true; } else { @@ -1056,11 +1057,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.EIRFFlow(1) = GetCurveIndex(state, Alphas(8)); // convert curve name to number if (thisDXCoil.EIRFFlow(1) == 0) { if (lAlphaBlanks(8)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(8))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(8))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(8), Alphas(8))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(8), Alphas(8))); } ErrorsFound = true; } else { @@ -1082,11 +1083,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.PLFFPLR(1) = GetCurveIndex(state, Alphas(9)); // convert curve name to number if (thisDXCoil.PLFFPLR(1) == 0) { if (lAlphaBlanks(9)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(9))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(9))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(9), Alphas(9))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(9), Alphas(9))); } ErrorsFound = true; } else { @@ -1117,19 +1118,19 @@ void GetDXCoils(EnergyPlusData &state) CurveInput += 0.01; } if (MinCurveVal < 0.7) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\" has out of range values.", cAlphaFields(9), Alphas(9))); - ShowContinueError( - state, EnergyPlus::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{}=\"{}\" has out of range values.", cAlphaFields(9), Alphas(9))); + ShowContinueError(state, + std::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2f} is {:.3f}", MinCurvePLR, MinCurveVal)); ShowContinueError(state, "...Setting curve minimum to 0.7 and simulation continues."); Curve::SetCurveOutputMinValue(state, thisDXCoil.PLFFPLR(1), ErrorsFound, 0.7); } if (MaxCurveVal > 1.0) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} = {} has out of range value.", cAlphaFields(9), Alphas(9))); - ShowContinueError( - state, EnergyPlus::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} = {} has out of range value.", cAlphaFields(9), Alphas(9))); + ShowContinueError(state, + std::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2f} is {:.3f}", MaxCurvePLR, MaxCurveVal)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisDXCoil.PLFFPLR(1), ErrorsFound, 1.0); } @@ -1150,7 +1151,7 @@ void GetDXCoils(EnergyPlusData &state) // Numbers (7) through (11) must all be greater than zero to use the latent capacity degradation model if ((Numbers(8) > 0.0 || Numbers(9) > 0.0 || Numbers(10) > 0.0 || Numbers(11) > 0.0) && (Numbers(8) <= 0.0 || Numbers(9) <= 0.0 || Numbers(10) <= 0.0 || Numbers(11) <= 0.0)) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\":", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowWarningError(state, std::format("{}{}=\"{}\":", RoutineName, CurrentModuleObject, thisDXCoil.Name)); ShowContinueError(state, "...At least one of the four input parameters for the latent capacity degradation model"); ShowContinueError(state, "...is set to zero. Therefore, the latent degradation model will not be used for this simulation."); } @@ -1170,11 +1171,10 @@ void GetDXCoils(EnergyPlusData &state) Node::ObjectIsNotParent); if (!CheckOutAirNodeNumber(state, thisDXCoil.CondenserInletNodeNum(1))) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("{}=\"{}\", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", - cAlphaFields(10), - Alphas(10))); + ShowWarningError(state, std::format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, + std::format("{}=\"{}\", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", cAlphaFields(10), Alphas(10))); ShowContinueError( state, "This node needs to be included in an air system or the coil model will not be valid, and the simulation continues"); } @@ -1186,42 +1186,42 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CondenserType(1) = DataHeatBalance::RefrigCondenserType::Evap; thisDXCoil.ReportEvapCondVars = true; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\":", cAlphaFields(11), Alphas(11))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{}=\"{}\":", cAlphaFields(11), Alphas(11))); ShowContinueError(state, "...must be AirCooled or EvaporativelyCooled."); ErrorsFound = true; } thisDXCoil.EvapCondEffect(1) = Numbers(12); if (thisDXCoil.EvapCondEffect(1) < 0.0 || thisDXCoil.EvapCondEffect(1) > 1.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0 or > 1.0.", cNumericFields(11))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(12))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0 or > 1.0.", cNumericFields(11))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(12))); ErrorsFound = true; } thisDXCoil.EvapCondAirFlow(1) = Numbers(13); if (thisDXCoil.EvapCondAirFlow(1) < 0.0 && thisDXCoil.EvapCondAirFlow(1) != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0.", cNumericFields(12))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(13))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0.", cNumericFields(12))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(13))); ErrorsFound = true; } thisDXCoil.EvapCondPumpElecNomPower(1) = Numbers(14); if (thisDXCoil.EvapCondPumpElecNomPower(1) < 0.0 && thisDXCoil.EvapCondPumpElecNomPower(1) != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0.", cNumericFields(13))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(14))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0.", cNumericFields(13))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(14))); ErrorsFound = true; } // Set crankcase heater capacity thisDXCoil.CrankcaseHeaterCapacity = Numbers(15); if (thisDXCoil.CrankcaseHeaterCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0.", cNumericFields(14))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(15))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0.", cNumericFields(14))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(15))); ErrorsFound = true; } @@ -1236,8 +1236,8 @@ void GetDXCoils(EnergyPlusData &state) if (!lAlphaBlanks(12)) { thisDXCoil.CrankcaseHeaterCapacityCurveIndex = Curve::GetCurveIndex(state, Alphas(12)); if (thisDXCoil.CrankcaseHeaterCapacityCurveIndex == 0) { // can't find the curve - ShowSevereError( - state, EnergyPlus::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(12), Alphas(12))); + ShowSevereError(state, + std::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(12), Alphas(12))); ErrorsFound = true; } else { ErrorsFound |= Curve::CheckCurveDims(state, @@ -1284,9 +1284,9 @@ void GetDXCoils(EnergyPlusData &state) // Basin heater power as a function of temperature must be greater than or equal to 0 thisDXCoil.BasinHeaterPowerFTempDiff = Numbers(17); if (Numbers(17) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be >= 0.0.", cNumericFields(16))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(17))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be >= 0.0.", cNumericFields(16))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(17))); ErrorsFound = true; } @@ -1296,9 +1296,9 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.BasinHeaterSetPointTemp = 2.0; } if (thisDXCoil.BasinHeaterSetPointTemp < 2.0) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", freeze possible", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} is < 2 {{C}}. Freezing could occur.", cNumericFields(17))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(18))); + ShowWarningError(state, std::format("{}{}=\"{}\", freeze possible", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} is < 2 {{C}}. Freezing could occur.", cNumericFields(17))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(18))); } } @@ -1312,8 +1312,8 @@ void GetDXCoils(EnergyPlusData &state) if (!lAlphaBlanks(16) && NumAlphas > 15) { thisDXCoil.SHRFTemp(1) = GetCurveIndex(state, Alphas(16)); // convert curve name to number if (thisDXCoil.SHRFTemp(1) == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(16), Alphas(16))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(16), Alphas(16))); } else { // Verify Curve Object, only legal type is BiQuadratic ErrorsFound |= Curve::CheckCurveDims(state, @@ -1329,8 +1329,8 @@ void GetDXCoils(EnergyPlusData &state) if (!lAlphaBlanks(17) && NumAlphas > 16) { thisDXCoil.SHRFFlow(1) = GetCurveIndex(state, Alphas(17)); // convert curve name to number if (thisDXCoil.SHRFTemp(1) == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(17), Alphas(17))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(17), Alphas(17))); } else { // Verify Curve Object, only legal type is Quadratic and Cubic ErrorsFound |= Curve::CheckCurveDims(state, @@ -1368,8 +1368,8 @@ void GetDXCoils(EnergyPlusData &state) &thisDXCoil.SecCoilSensibleHeatGainRate); thisDXCoil.IsSecondaryDXCoilInZone = true; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(19), Alphas(19))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(19), Alphas(19))); } } @@ -1377,8 +1377,7 @@ void GetDXCoils(EnergyPlusData &state) if (ErrorsFound) { ShowFatalError( - state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + state, std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } // Loop over the Multimode DX Coils and get & load the data @@ -1445,8 +1444,7 @@ void GetDXCoils(EnergyPlusData &state) if (!lAlphaBlanks(5)) { thisDXCoil.CrankcaseHeaterCapacityCurveIndex = Curve::GetCurveIndex(state, Alphas(5)); if (thisDXCoil.CrankcaseHeaterCapacityCurveIndex == 0) { // can't find the curve - ShowSevereError(state, - EnergyPlus::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(5), Alphas(5))); + ShowSevereError(state, std::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(5), Alphas(5))); ErrorsFound = true; } else { ErrorsFound |= Curve::CheckCurveDims(state, @@ -1462,8 +1460,8 @@ void GetDXCoils(EnergyPlusData &state) // Set crankcase heater capacity thisDXCoil.CrankcaseHeaterCapacity = Numbers(1); if (thisDXCoil.CrankcaseHeaterCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be >= 0.0, entered value=[{:.2T}].", cNumericFields(1), Numbers(1))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be >= 0.0, entered value=[{:.2f}].", cNumericFields(1), Numbers(1))); ErrorsFound = true; } @@ -1474,9 +1472,9 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.NumCapacityStages = Numbers(3); // Check if requested number of capacity stages exceeds limits if ((thisDXCoil.NumCapacityStages > MaxCapacityStages) || (thisDXCoil.NumCapacityStages < 1)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...illegal {} = {}", cNumericFields(3), thisDXCoil.NumCapacityStages)); - ShowContinueError(state, EnergyPlus::format("...Valid range is 1 to {}", MaxCapacityStages)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...illegal {} = {}", cNumericFields(3), thisDXCoil.NumCapacityStages)); + ShowContinueError(state, std::format("...Valid range is 1 to {}", MaxCapacityStages)); ErrorsFound = true; } @@ -1484,9 +1482,9 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.NumDehumidModes = Numbers(4); // Check if requested number of enhanced dehumidification modes exceeds limits if ((thisDXCoil.NumDehumidModes > MaxDehumidModes) || (thisDXCoil.NumDehumidModes < 0)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...illegal {} = {}", cNumericFields(4), thisDXCoil.NumDehumidModes)); - ShowContinueError(state, EnergyPlus::format("...Valid range is 0 to {}", MaxDehumidModes)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...illegal {} = {}", cNumericFields(4), thisDXCoil.NumDehumidModes)); + ShowContinueError(state, std::format("...Valid range is 0 to {}", MaxDehumidModes)); ErrorsFound = true; } @@ -1502,7 +1500,7 @@ void GetDXCoils(EnergyPlusData &state) for (CapacityStageNum = 1; CapacityStageNum <= thisDXCoil.NumCapacityStages; ++CapacityStageNum) { // Check if sufficient number of fields entered if ((AlphaIndex + 1) > NumAlphas) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); ShowContinueError(state, "...not enough remaining fields for specified Number of Operating Modes."); ShowContinueError(state, "...Need additional Coil Performance Object Type and Coil Performance Object Name fields."); ErrorsFound = true; @@ -1514,8 +1512,8 @@ void GetDXCoils(EnergyPlusData &state) if (Util::SameString(PerfObjectType, "CoilPerformance:DX:Cooling")) { thisDXCoil.CoilPerformanceType_Num(PerfModeNum) = HVAC::CoilPerfDX_CoolBypassEmpirical; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...illegal {}=\"{}\".", cAlphaFields(AlphaIndex), PerfObjectType)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...illegal {}=\"{}\".", cAlphaFields(AlphaIndex), PerfObjectType)); ShowContinueError(state, "Must be \"CoilPerformance:DX:Cooling\"."); ErrorsFound = true; } @@ -1556,11 +1554,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CCapFTemp(PerfModeNum) = GetCurveIndex(state, Alphas2(2)); // convert curve name to number if (thisDXCoil.CCapFTemp(PerfModeNum) == 0) { if (lAlphaBlanks2(2)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields2(2))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields2(2))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields2(2), Alphas2(2))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields2(2), Alphas2(2))); } ErrorsFound = true; } else { @@ -1588,11 +1586,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CCapFFlow(PerfModeNum) = GetCurveIndex(state, Alphas2(3)); // convert curve name to number if (thisDXCoil.CCapFFlow(PerfModeNum) == 0) { if (lAlphaBlanks2(3)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields2(3))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields2(3))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields2(3), Alphas2(3))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields2(3), Alphas2(3))); } ErrorsFound = true; } else { @@ -1619,11 +1617,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.EIRFTemp(PerfModeNum) = GetCurveIndex(state, Alphas2(4)); // convert curve name to number if (thisDXCoil.EIRFTemp(PerfModeNum) == 0) { if (lAlphaBlanks2(4)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields2(4))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields2(4))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields2(4), Alphas2(4))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields2(4), Alphas2(4))); } ErrorsFound = true; } else { @@ -1651,11 +1649,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.EIRFFlow(PerfModeNum) = GetCurveIndex(state, Alphas2(5)); // convert curve name to number if (thisDXCoil.EIRFFlow(PerfModeNum) == 0) { if (lAlphaBlanks2(5)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields2(5))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields2(5))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields2(5), Alphas2(5))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields2(5), Alphas2(5))); } ErrorsFound = true; } else { @@ -1682,11 +1680,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.PLFFPLR(PerfModeNum) = GetCurveIndex(state, Alphas2(6)); // convert curve name to number if (thisDXCoil.PLFFPLR(PerfModeNum) == 0) { if (lAlphaBlanks2(6)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields2(6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields2(6))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields2(6), Alphas2(6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields2(6), Alphas2(6))); } ErrorsFound = true; } else { @@ -1717,23 +1715,23 @@ void GetDXCoils(EnergyPlusData &state) CurveInput += 0.01; } if (MinCurveVal < 0.7) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...{} = {} has out of range value.", cAlphaFields2(6), Alphas2(6))); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...{} = {} has out of range value.", cAlphaFields2(6), Alphas2(6))); ShowContinueError(state, - EnergyPlus::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", - MinCurvePLR, - MinCurveVal)); + std::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2f} is {:.3f}", + MinCurvePLR, + MinCurveVal)); ShowContinueError(state, "...Setting curve minimum to 0.7 and simulation continues."); Curve::SetCurveOutputMinValue(state, thisDXCoil.PLFFPLR(PerfModeNum), ErrorsFound, 0.7); } if (MaxCurveVal > 1.0) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...{} = {} has out of range value.", cAlphaFields2(6), Alphas2(6))); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...{} = {} has out of range value.", cAlphaFields2(6), Alphas2(6))); ShowContinueError(state, - EnergyPlus::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", - MaxCurvePLR, - MaxCurveVal)); + std::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2f} is {:.3f}", + MaxCurvePLR, + MaxCurveVal)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisDXCoil.PLFFPLR(PerfModeNum), ErrorsFound, 1.0); } @@ -1747,7 +1745,7 @@ void GetDXCoils(EnergyPlusData &state) // Numbers2 (6) through (9) must all be greater than zero to use the latent capacity degradation model if ((Numbers2(6) > 0.0 || Numbers2(7) > 0.0 || Numbers2(8) > 0.0 || Numbers2(9) > 0.0) && (Numbers2(6) <= 0.0 || Numbers2(7) <= 0.0 || Numbers2(8) <= 0.0 || Numbers2(9) <= 0.0)) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\":", RoutineName, PerfObjectType, PerfObjectName)); + ShowWarningError(state, std::format("{}{}=\"{}\":", RoutineName, PerfObjectType, PerfObjectName)); ShowContinueError(state, "...At least one of the four input parameters for the latent capacity degradation model"); ShowContinueError(state, "...is set to zero. Therefore, the latent degradation model will not be used for this simulation."); @@ -1768,8 +1766,8 @@ void GetDXCoils(EnergyPlusData &state) Node::CompFluidStream::Primary, Node::ObjectIsNotParent); if (!CheckOutAirNodeNumber(state, thisDXCoil.CondenserInletNodeNum(PerfModeNum))) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\":", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("may not be valid {}=\"{}\".", cAlphaFields2(7), Alphas2(7))); + ShowWarningError(state, std::format("{}{}=\"{}\":", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("may not be valid {}=\"{}\".", cAlphaFields2(7), Alphas2(7))); ShowContinueError(state, "node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); ShowContinueError(state, "This node needs to be included in an air system or the coil model will not be valid, and the " @@ -1782,33 +1780,33 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CondenserType(PerfModeNum) = DataHeatBalance::RefrigCondenserType::Evap; thisDXCoil.ReportEvapCondVars = true; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\":", cAlphaFields2(8), Alphas2(8))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...{}=\"{}\":", cAlphaFields2(8), Alphas2(8))); ShowContinueError(state, "...must be AirCooled or EvaporativelyCooled."); ErrorsFound = true; } thisDXCoil.EvapCondEffect(PerfModeNum) = Numbers2(10); if (thisDXCoil.EvapCondEffect(PerfModeNum) < 0.0 || thisDXCoil.EvapCondEffect(PerfModeNum) > 1.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0 or > 1.0.", cNumericFields2(10))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers2(10))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...{} cannot be < 0.0 or > 1.0.", cNumericFields2(10))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers2(10))); ErrorsFound = true; } thisDXCoil.EvapCondAirFlow(PerfModeNum) = Numbers2(11); if (thisDXCoil.EvapCondAirFlow(PerfModeNum) < 0.0 && thisDXCoil.EvapCondAirFlow(PerfModeNum) != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0.", cNumericFields2(11))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers2(11))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...{} cannot be < 0.0.", cNumericFields2(11))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers2(11))); ErrorsFound = true; } thisDXCoil.EvapCondPumpElecNomPower(PerfModeNum) = Numbers2(12); if (thisDXCoil.EvapCondPumpElecNomPower(PerfModeNum) < 0.0 && thisDXCoil.EvapCondAirFlow(PerfModeNum) != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be less than zero.", cNumericFields2(12))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers2(12))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, PerfObjectType, PerfObjectName)); + ShowContinueError(state, std::format("...{} cannot be less than zero.", cNumericFields2(12))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers2(12))); ErrorsFound = true; } @@ -1818,8 +1816,8 @@ void GetDXCoils(EnergyPlusData &state) if (!lAlphaBlanks2(9) && NumAlphas2 > 8) { thisDXCoil.SHRFTemp(PerfModeNum) = GetCurveIndex(state, Alphas2(9)); // convert curve name to number if (thisDXCoil.SHRFTemp(PerfModeNum) == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields2(9), Alphas2(9))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields2(9), Alphas2(9))); } else { // Verify Curve Object, only legal type is BiQuadratic ErrorsFound |= Curve::CheckCurveDims(state, @@ -1835,8 +1833,8 @@ void GetDXCoils(EnergyPlusData &state) if (!lAlphaBlanks2(10) && NumAlphas2 > 9) { thisDXCoil.SHRFFlow(PerfModeNum) = GetCurveIndex(state, Alphas2(10)); // convert curve name to number if (thisDXCoil.SHRFTemp(PerfModeNum) == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields2(10), Alphas2(10))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields2(10), Alphas2(10))); } else { // Verify Curve Object, only legal type is BiQuadratic ErrorsFound |= Curve::CheckCurveDims(state, @@ -1855,8 +1853,8 @@ void GetDXCoils(EnergyPlusData &state) } } else { // invalid performance object - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("... not found {}=\"{}\".", PerfObjectType, PerfObjectName)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("... not found {}=\"{}\".", PerfObjectType, PerfObjectName)); ErrorsFound = true; } // end of valid performance object check AlphaIndex += 2; @@ -1865,10 +1863,10 @@ void GetDXCoils(EnergyPlusData &state) // Warn if inputs entered for unused capacity stages for (CapacityStageNum = (thisDXCoil.NumCapacityStages + 1); CapacityStageNum <= MaxCapacityStages; ++CapacityStageNum) { if ((AlphaIndex <= NumAlphas) && ((!Alphas(AlphaIndex).empty()) || (!Alphas(AlphaIndex + 1).empty()))) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\":", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...Capacity Stage {} not active. Therefore,{}", CapacityStageNum, cAlphaFields(AlphaIndex))); - ShowContinueError(state, EnergyPlus::format("... and {} fields will be ignored.", cAlphaFields(AlphaIndex + 1))); + ShowWarningError(state, std::format("{}{}=\"{}\":", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + std::format("...Capacity Stage {} not active. Therefore,{}", CapacityStageNum, cAlphaFields(AlphaIndex))); + ShowContinueError(state, std::format("... and {} fields will be ignored.", cAlphaFields(AlphaIndex + 1))); } AlphaIndex += 2; } // End of unused capacity stages loop @@ -1914,9 +1912,9 @@ void GetDXCoils(EnergyPlusData &state) // Basin heater power as a function of temperature must be greater than or equal to 0 thisDXCoil.BasinHeaterPowerFTempDiff = Numbers(6); if (Numbers(6) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be >= 0.", cNumericFields(6))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be >= 0.", cNumericFields(6))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(6))); ErrorsFound = true; } @@ -1926,9 +1924,9 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.BasinHeaterSetPointTemp = 2.0; } if (thisDXCoil.BasinHeaterSetPointTemp < 2.0) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", freeze possible", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} is < 2 {{C}}. Freezing could occur.", cNumericFields(7))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(7))); + ShowWarningError(state, std::format("{}{}=\"{}\", freeze possible", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} is < 2 {{C}}. Freezing could occur.", cNumericFields(7))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(7))); } } @@ -1943,8 +1941,7 @@ void GetDXCoils(EnergyPlusData &state) if (ErrorsFound) { ShowFatalError( - state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + state, std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } //************* Read Heat Pump (DX Heating Coil) Input ********** @@ -2012,11 +2009,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CCapFTemp(1) = GetCurveIndex(state, Alphas(5)); // convert curve name to number if (thisDXCoil.CCapFTemp(1) == 0) { if (lAlphaBlanks(5)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(5))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(5))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); } ErrorsFound = true; } else { @@ -2054,11 +2051,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CCapFFlow(1) = GetCurveIndex(state, Alphas(6)); // convert curve name to number if (thisDXCoil.CCapFFlow(1) == 0) { if (lAlphaBlanks(6)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(6))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(6))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); } ErrorsFound = true; } else { @@ -2080,11 +2077,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.EIRFTemp(1) = GetCurveIndex(state, Alphas(7)); // convert curve name to number if (thisDXCoil.EIRFTemp(1) == 0) { if (lAlphaBlanks(7)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(7))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(7))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(7), Alphas(7))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(7), Alphas(7))); } ErrorsFound = true; } else { @@ -2122,11 +2119,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.EIRFFlow(1) = GetCurveIndex(state, Alphas(8)); // convert curve name to number if (thisDXCoil.EIRFFlow(1) == 0) { if (lAlphaBlanks(8)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(8))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(8))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(8), Alphas(8))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(8), Alphas(8))); } ErrorsFound = true; } else { @@ -2148,11 +2145,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.PLFFPLR(1) = GetCurveIndex(state, Alphas(9)); // convert curve name to number if (thisDXCoil.PLFFPLR(1) == 0) { if (lAlphaBlanks(9)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(9))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(9))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(9), Alphas(9))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(9), Alphas(9))); } ErrorsFound = true; } else { @@ -2183,19 +2180,19 @@ void GetDXCoils(EnergyPlusData &state) CurveInput += 0.01; } if (MinCurveVal < 0.7) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} = {} has out of range value.", cAlphaFields(9), Alphas(9))); - ShowContinueError( - state, EnergyPlus::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} = {} has out of range value.", cAlphaFields(9), Alphas(9))); + ShowContinueError(state, + std::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2f} is {:.3f}", MinCurvePLR, MinCurveVal)); ShowContinueError(state, "...Setting curve minimum to 0.7 and simulation continues."); Curve::SetCurveOutputMinValue(state, thisDXCoil.PLFFPLR(1), ErrorsFound, 0.7); } if (MaxCurveVal > 1.0) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} = {} has out of range value.", cAlphaFields(9), Alphas(9))); - ShowContinueError( - state, EnergyPlus::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} = {} has out of range value.", cAlphaFields(9), Alphas(9))); + ShowContinueError(state, + std::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2f} is {:.3f}", MaxCurvePLR, MaxCurveVal)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisDXCoil.PLFFPLR(1), ErrorsFound, 1.0); } @@ -2208,8 +2205,8 @@ void GetDXCoils(EnergyPlusData &state) if (!lAlphaBlanks(11)) { thisDXCoil.CrankcaseHeaterCapacityCurveIndex = Curve::GetCurveIndex(state, Alphas(11)); if (thisDXCoil.CrankcaseHeaterCapacityCurveIndex == 0) { // can't find the curve - ShowSevereError( - state, EnergyPlus::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(11), Alphas(11))); + ShowSevereError(state, + std::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(11), Alphas(11))); ErrorsFound = true; } else { ErrorsFound |= Curve::CheckCurveDims(state, @@ -2226,12 +2223,12 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.DefrostEIRFT == 0) { if (lAlphaBlanks(10)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(10))); - ShowContinueError(state, EnergyPlus::format("...field is required because {} is \"ReverseCycle\".", cAlphaFields(12))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(10))); + ShowContinueError(state, std::format("...field is required because {} is \"ReverseCycle\".", cAlphaFields(12))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(10), Alphas(10))); } ErrorsFound = true; } else { @@ -2265,8 +2262,8 @@ void GetDXCoils(EnergyPlusData &state) } if (thisDXCoil.DefrostStrategy == StandardRatings::DefrostStrat::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...illegal {}=\"{}\".", cAlphaFields(12), Alphas(12))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...illegal {}=\"{}\".", cAlphaFields(12), Alphas(12))); ShowContinueError(state, "...valid values for this field are ReverseCycle or Resistive."); ErrorsFound = true; } @@ -2278,8 +2275,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.DefrostControl = StandardRatings::HPdefrostControl::OnDemand; } if (thisDXCoil.DefrostControl == StandardRatings::HPdefrostControl::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...illegal {}=\"{}\".", cAlphaFields(13), Alphas(13))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...illegal {}=\"{}\".", cAlphaFields(13), Alphas(13))); ShowContinueError(state, "...valid values for this field are Timed or OnDemand."); ErrorsFound = true; } @@ -2312,9 +2309,9 @@ void GetDXCoils(EnergyPlusData &state) // Set crankcase heater capacity thisDXCoil.CrankcaseHeaterCapacity = Numbers(9); if (thisDXCoil.CrankcaseHeaterCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0.", cNumericFields(8))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(9))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0.", cNumericFields(8))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(9))); ErrorsFound = true; } @@ -2324,15 +2321,15 @@ void GetDXCoils(EnergyPlusData &state) // Set defrost time period thisDXCoil.DefrostTime = Numbers(11); if (thisDXCoil.DefrostTime == 0.0 && thisDXCoil.DefrostControl == StandardRatings::HPdefrostControl::Timed) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} = 0.0 for defrost control = TIMED.", cNumericFields(11))); + ShowWarningError(state, std::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} = 0.0 for defrost control = TIMED.", cNumericFields(11))); } // Set defrost capacity (for resistive defrost) thisDXCoil.DefrostCapacity = Numbers(12); if (thisDXCoil.DefrostCapacity == 0.0 && thisDXCoil.DefrostStrategy == StandardRatings::DefrostStrat::Resistive) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} = 0.0 for defrost strategy = RESISTIVE.", cNumericFields(12))); + ShowWarningError(state, std::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} = 0.0 for defrost strategy = RESISTIVE.", cNumericFields(12))); } // Set Region number for calculating HSPF @@ -2359,11 +2356,10 @@ void GetDXCoils(EnergyPlusData &state) Node::ObjectIsNotParent); // warn if not an outdoor node, but allow if (!CheckOutAirNodeNumber(state, thisDXCoil.CondenserInletNodeNum(1))) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("{}=\"{}\", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", - cAlphaFields(14), - Alphas(14))); + ShowWarningError(state, std::format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, + std::format("{}=\"{}\", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", cAlphaFields(14), Alphas(14))); ShowContinueError( state, "This node needs to be included in an air system or the coil model will not be valid, and the simulation continues"); } @@ -2383,8 +2379,8 @@ void GetDXCoils(EnergyPlusData &state) &thisDXCoil.SecCoilLatentHeatRemovalRate); thisDXCoil.IsSecondaryDXCoilInZone = true; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(15), Alphas(15))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(15), Alphas(15))); } } if (thisDXCoil.SecZonePtr > 0) { @@ -2406,16 +2402,16 @@ void GetDXCoils(EnergyPlusData &state) if (!lAlphaBlanks(16)) { thisDXCoil.SecCoilSHRFT = GetCurveIndex(state, Alphas(16)); if (thisDXCoil.SecCoilSHRFT == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(16), Alphas(16))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(16), Alphas(16))); } } // A17; \field Sensible Heat Ratio Function of Flow Fraction Curve Name if (!lAlphaBlanks(17)) { thisDXCoil.SecCoilSHRFF = GetCurveIndex(state, Alphas(17)); if (thisDXCoil.SecCoilSHRFF == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(17), Alphas(17))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(17), Alphas(17))); } } } @@ -2424,8 +2420,7 @@ void GetDXCoils(EnergyPlusData &state) if (ErrorsFound) { ShowFatalError( - state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + state, std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } CurrentModuleObject = HVAC::coilTypeNames[(int)HVAC::CoilType::CoolingDXTwoSpeed]; @@ -2511,11 +2506,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CCapFTemp(1) = GetCurveIndex(state, Alphas(5)); // convert curve name to number if (thisDXCoil.CCapFTemp(1) == 0) { if (lAlphaBlanks(5)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(5))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(5))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); } ErrorsFound = true; } else { @@ -2543,11 +2538,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CCapFFlow(1) = GetCurveIndex(state, Alphas(6)); // convert curve name to number if (thisDXCoil.CCapFFlow(1) == 0) { if (lAlphaBlanks(6)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(6))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(6))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); } ErrorsFound = true; } else { @@ -2569,11 +2564,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.EIRFTemp(1) = GetCurveIndex(state, Alphas(7)); // convert curve name to number if (thisDXCoil.EIRFTemp(1) == 0) { if (lAlphaBlanks(7)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(7))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(7))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(7), Alphas(7))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(7), Alphas(7))); } ErrorsFound = true; } else { @@ -2601,11 +2596,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.EIRFFlow(1) = GetCurveIndex(state, Alphas(8)); // convert curve name to number if (thisDXCoil.EIRFFlow(1) == 0) { if (lAlphaBlanks(8)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(8))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(8))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(8), Alphas(8))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(8), Alphas(8))); } ErrorsFound = true; } else { @@ -2627,11 +2622,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.PLFFPLR(1) = GetCurveIndex(state, Alphas(9)); // convert curve name to number if (thisDXCoil.PLFFPLR(1) == 0) { if (lAlphaBlanks(9)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(9))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(9))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(9), Alphas(9))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(9), Alphas(9))); } ErrorsFound = true; } else { @@ -2662,19 +2657,19 @@ void GetDXCoils(EnergyPlusData &state) CurveInput += 0.01; } if (MinCurveVal < 0.7) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} = {} has out of range value.", cAlphaFields(9), Alphas(9))); - ShowContinueError( - state, EnergyPlus::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} = {} has out of range value.", cAlphaFields(9), Alphas(9))); + ShowContinueError(state, + std::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2f} is {:.3f}", MinCurvePLR, MinCurveVal)); ShowContinueError(state, "...Setting curve minimum to 0.7 and simulation continues."); Curve::SetCurveOutputMinValue(state, thisDXCoil.PLFFPLR(1), ErrorsFound, 0.7); } if (MaxCurveVal > 1.0) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} = {} has out of range value.", cAlphaFields(9), Alphas(9))); - ShowContinueError( - state, EnergyPlus::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} = {} has out of range value.", cAlphaFields(9), Alphas(9))); + ShowContinueError(state, + std::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2f} is {:.3f}", MaxCurvePLR, MaxCurveVal)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisDXCoil.PLFFPLR(1), ErrorsFound, 1.0); } @@ -2700,11 +2695,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CCapFTemp2 = GetCurveIndex(state, Alphas(10)); // convert curve name to number if (thisDXCoil.CCapFTemp2 == 0) { if (lAlphaBlanks(10)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(10))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(10))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(10), Alphas(10))); } ErrorsFound = true; } else { @@ -2732,11 +2727,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.EIRFTemp2 = GetCurveIndex(state, Alphas(11)); // convert curve name to number if (thisDXCoil.EIRFTemp2 == 0) { if (lAlphaBlanks(11)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(11))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(11))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(11), Alphas(11))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(11), Alphas(11))); } ErrorsFound = true; } else { @@ -2775,11 +2770,10 @@ void GetDXCoils(EnergyPlusData &state) Node::CompFluidStream::Primary, Node::ObjectIsNotParent); if (!CheckOutAirNodeNumber(state, thisDXCoil.CondenserInletNodeNum(1))) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("{}=\"{}\", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", - cAlphaFields(12), - Alphas(12))); + ShowWarningError(state, std::format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, + std::format("{}=\"{}\", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", cAlphaFields(12), Alphas(12))); ShowContinueError( state, "This node needs to be included in an air system or the coil model will not be valid, and the simulation continues"); } @@ -2791,57 +2785,57 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CondenserType(1) = DataHeatBalance::RefrigCondenserType::Evap; thisDXCoil.ReportEvapCondVars = true; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\":", cAlphaFields(13), Alphas(13))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{}=\"{}\":", cAlphaFields(13), Alphas(13))); ShowContinueError(state, "...must be AirCooled or EvaporativelyCooled."); ErrorsFound = true; } thisDXCoil.EvapCondEffect(1) = Numbers(15); if (thisDXCoil.EvapCondEffect(1) < 0.0 || thisDXCoil.EvapCondEffect(1) > 1.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0 or > 1.0.", cNumericFields(15))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(15))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0 or > 1.0.", cNumericFields(15))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(15))); ErrorsFound = true; } thisDXCoil.EvapCondAirFlow(1) = Numbers(16); if (thisDXCoil.EvapCondAirFlow(1) < 0.0 && thisDXCoil.EvapCondAirFlow(1) != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0.", cNumericFields(16))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(16))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0.", cNumericFields(16))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(16))); ErrorsFound = true; } thisDXCoil.EvapCondPumpElecNomPower(1) = Numbers(17); if (thisDXCoil.EvapCondPumpElecNomPower(1) < 0.0 && thisDXCoil.EvapCondPumpElecNomPower(1) != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0.", cNumericFields(17))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(17))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0.", cNumericFields(17))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(17))); ErrorsFound = true; } thisDXCoil.EvapCondEffect2 = Numbers(18); if (thisDXCoil.EvapCondEffect2 < 0.0 || thisDXCoil.EvapCondEffect2 > 1.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be cannot be < 0.0 or > 1.0.", cNumericFields(18))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(18))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be cannot be < 0.0 or > 1.0.", cNumericFields(18))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(18))); ErrorsFound = true; } thisDXCoil.EvapCondAirFlow2 = Numbers(19); if (thisDXCoil.EvapCondAirFlow2 < 0.0 && thisDXCoil.EvapCondAirFlow2 != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0.", cNumericFields(19))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(19))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0.", cNumericFields(19))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(19))); ErrorsFound = true; } thisDXCoil.EvapCondPumpElecNomPower2 = Numbers(20); if (thisDXCoil.EvapCondPumpElecNomPower2 < 0.0 && thisDXCoil.EvapCondPumpElecNomPower2 != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0.", cNumericFields(20))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(20))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0.", cNumericFields(20))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(20))); ErrorsFound = true; } @@ -2881,9 +2875,9 @@ void GetDXCoils(EnergyPlusData &state) // Basin heater power as a function of temperature must be greater than or equal to 0 thisDXCoil.BasinHeaterPowerFTempDiff = Numbers(21); if (Numbers(21) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be >= 0.0.", cNumericFields(21))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(21))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be >= 0.0.", cNumericFields(21))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(21))); ErrorsFound = true; } @@ -2893,9 +2887,9 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.BasinHeaterSetPointTemp = 2.0; } if (thisDXCoil.BasinHeaterSetPointTemp < 2.0) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", freeze possible", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} is < 2 {{C}}. Freezing could occur.", cNumericFields(22))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(22))); + ShowWarningError(state, std::format("{}{}=\"{}\", freeze possible", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} is < 2 {{C}}. Freezing could occur.", cNumericFields(22))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(22))); } } @@ -2910,8 +2904,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.SHRFTemp(1) = GetCurveIndex(state, Alphas(17)); // convert curve name to number // DXCoil(DXCoilNum)%SHRFTemp2 = DXCoil(DXCoilNum)%SHRFTemp(1) if (thisDXCoil.SHRFTemp(1) == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(17), Alphas(17))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(17), Alphas(17))); } else { // Verify Curve Object, only legal type is BiQuadratic ErrorsFound |= Curve::CheckCurveDims(state, @@ -2928,8 +2922,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.SHRFFlow(1) = GetCurveIndex(state, Alphas(18)); // convert curve name to number // DXCoil(DXCoilNum)%SHRFFlow2 = DXCoil(DXCoilNum)%SHRFFlow(1) if (thisDXCoil.SHRFFlow(1) == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(18), Alphas(18))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(18), Alphas(18))); } else { // Verify Curve Object, only legal type is BiQuadratic ErrorsFound |= Curve::CheckCurveDims(state, @@ -2945,8 +2939,8 @@ void GetDXCoils(EnergyPlusData &state) if (!lAlphaBlanks(19) && NumAlphas > 18) { thisDXCoil.SHRFTemp2 = GetCurveIndex(state, Alphas(19)); // convert curve name to number if (thisDXCoil.SHRFTemp2 == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(19), Alphas(19))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(19), Alphas(19))); } else { // Verify Curve Object, only legal type is BiQuadratic ErrorsFound |= Curve::CheckCurveDims(state, @@ -2962,8 +2956,8 @@ void GetDXCoils(EnergyPlusData &state) if (!lAlphaBlanks(20) && NumAlphas > 19) { thisDXCoil.SHRFFlow2 = GetCurveIndex(state, Alphas(20)); // convert curve name to number if (thisDXCoil.SHRFTemp2 == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(20), Alphas(20))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(20), Alphas(20))); } else { // Verify Curve Object, only legal type is BiQuadratic ErrorsFound |= Curve::CheckCurveDims(state, @@ -2991,16 +2985,15 @@ void GetDXCoils(EnergyPlusData &state) &thisDXCoil.SecCoilSensibleHeatGainRate); thisDXCoil.IsSecondaryDXCoilInZone = true; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(21), Alphas(21))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(21), Alphas(21))); } } } if (ErrorsFound) { ShowFatalError( - state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + state, std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } // Loop over the Pumped DX Water Heater Coils and get & load the data @@ -3044,26 +3037,25 @@ void GetDXCoils(EnergyPlusData &state) constexpr std::string_view cRatedHeatingCapFieldName = "Rated Heating Capacity"; thisDXCoil.RatedTotCap2 = s_ip->getRealFieldValue(fields, schemaProps, "rated_heating_capacity"); // Numbers(1); if (thisDXCoil.RatedTotCap2 <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} must be > 0.0, entered value=[{:.2T}].", cRatedHeatingCapFieldName, thisDXCoil.RatedTotCap2)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + std::format("...{} must be > 0.0, entered value=[{:.2f}].", cRatedHeatingCapFieldName, thisDXCoil.RatedTotCap2)); ErrorsFound = true; } std::string cFieldName = "Rated COP"; thisDXCoil.RatedCOP(1) = s_ip->getRealFieldValue(fields, schemaProps, "rated_cop"); // Numbers(2); if (thisDXCoil.RatedCOP(1) <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be > 0.0, entered value=[{:.2T}].", cFieldName, thisDXCoil.RatedCOP(1))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be > 0.0, entered value=[{:.2f}].", cFieldName, thisDXCoil.RatedCOP(1))); ErrorsFound = true; } cFieldName = "Rated Sensible Heat Ratio"; thisDXCoil.RatedSHR(1) = s_ip->getRealFieldValue(fields, schemaProps, "rated_sensible_heat_ratio"); // Numbers(3); if (thisDXCoil.RatedSHR(1) <= 0.0 || thisDXCoil.RatedSHR(1) > 1.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} must be > 0 and <= 1. entered value=[{:.3T}].", cFieldName, thisDXCoil.RatedSHR(1))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be > 0 and <= 1. entered value=[{:.3f}].", cFieldName, thisDXCoil.RatedSHR(1))); ErrorsFound = true; } @@ -3072,9 +3064,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.RatedInletDBTemp = s_ip->getRealFieldValue(fields, schemaProps, "rated_evaporator_inlet_air_dry_bulb_temperature"); // Numbers(4); if (thisDXCoil.RatedInletDBTemp <= 5.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} must be > 5 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletDBTemp)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be > 5 {{C}}. entered value=[{:.1f}].", cFieldName, thisDXCoil.RatedInletDBTemp)); ErrorsFound = true; } @@ -3082,18 +3073,17 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.RatedInletWBTemp = s_ip->getRealFieldValue(fields, schemaProps, "rated_evaporator_inlet_air_wet_bulb_temperature"); // Numbers(5); if (thisDXCoil.RatedInletWBTemp <= 5.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} must be > 5 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletWBTemp)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be > 5 {{C}}. entered value=[{:.1f}].", cFieldName, thisDXCoil.RatedInletWBTemp)); ErrorsFound = true; } cFieldName = "Rated Condenser Inlet Water Temperature"; thisDXCoil.RatedInletWaterTemp = s_ip->getRealFieldValue(fields, schemaProps, "rated_condenser_inlet_water_temperature"); // Numbers(6); if (thisDXCoil.RatedInletWaterTemp <= 25.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} must be > 25 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletWaterTemp)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + std::format("...{} must be > 25 {{C}}. entered value=[{:.1f}].", cFieldName, thisDXCoil.RatedInletWaterTemp)); ErrorsFound = true; } @@ -3101,9 +3091,9 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.RatedAirVolFlowRate(1) = s_ip->getRealFieldValue(fields, schemaProps, "rated_evaporator_air_flow_rate"); // Numbers(7); if (thisDXCoil.RatedAirVolFlowRate(1) != Constant::AutoCalculate) { if (thisDXCoil.RatedAirVolFlowRate(1) <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} must be > 0.0. entered value=[{:.3T}].", cFieldName, thisDXCoil.RatedAirVolFlowRate(1))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + std::format("...{} must be > 0.0. entered value=[{:.3f}].", cFieldName, thisDXCoil.RatedAirVolFlowRate(1))); ErrorsFound = true; } } @@ -3113,24 +3103,24 @@ void GetDXCoils(EnergyPlusData &state) // move to init if (thisDXCoil.RatedHPWHCondWaterFlow != Constant::AutoCalculate) { if (thisDXCoil.RatedHPWHCondWaterFlow <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} must be > 0.0 entered value=[{:.3T}].", cFieldName, thisDXCoil.RatedHPWHCondWaterFlow)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + std::format("...{} must be > 0.0 entered value=[{:.3f}].", cFieldName, thisDXCoil.RatedHPWHCondWaterFlow)); ErrorsFound = true; } // check the range of flow rate to be >= 1 gpm/ton and <= 5 gpm/ton if (thisDXCoil.RatedHPWHCondWaterFlow / thisDXCoil.RatedTotCap2 < 1.79405e-8 || thisDXCoil.RatedHPWHCondWaterFlow / thisDXCoil.RatedTotCap2 > 8.97024e-8) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", outside range", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowWarningError(state, std::format("{}{}=\"{}\", outside range", RoutineName, CurrentModuleObject, thisDXCoil.Name)); ShowContinueError( state, - EnergyPlus::format("...{} per watt of {} is outside the recommended range of >= 1.79405E-8 m3/s/W (0.083 gpm/MBH) and <= " - "8.97024E-8 m3/s/W (0.417 gpm/MBH).", - cFieldName, - cRatedHeatingCapFieldName)); - ShowContinueError(state, - EnergyPlus::format("...Entered Flow rate per watt = [{:.10T}].", - (thisDXCoil.RatedHPWHCondWaterFlow / thisDXCoil.RatedTotCap2))); + std::format("...{} per watt of {} is outside the recommended range of >= 1.79405E-8 m3/s/W (0.083 gpm/MBH) and <= " + "8.97024E-8 m3/s/W (0.417 gpm/MBH).", + cFieldName, + cRatedHeatingCapFieldName)); + ShowContinueError( + state, + std::format("...Entered Flow rate per watt = [{:.10f}].", (thisDXCoil.RatedHPWHCondWaterFlow / thisDXCoil.RatedTotCap2))); } } @@ -3165,19 +3155,18 @@ void GetDXCoils(EnergyPlusData &state) cFieldName = "Condenser Water Pump Power"; thisDXCoil.HPWHCondPumpElecNomPower = s_ip->getRealFieldValue(fields, schemaProps, "condenser_water_pump_power"); // Numbers(9); if (thisDXCoil.HPWHCondPumpElecNomPower < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} must be >= 0.0 entered value=[{:.3T}].", cFieldName, thisDXCoil.HPWHCondPumpElecNomPower)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + std::format("...{} must be >= 0.0 entered value=[{:.3f}].", cFieldName, thisDXCoil.HPWHCondPumpElecNomPower)); ErrorsFound = true; } cFieldName = "Fraction of Condenser Pump Heat to Water"; thisDXCoil.HPWHCondPumpFracToWater = s_ip->getRealFieldValue(fields, schemaProps, "fraction_of_condenser_pump_heat_to_water"); // Numbers(10); if (thisDXCoil.HPWHCondPumpFracToWater <= 0.0 || thisDXCoil.HPWHCondPumpFracToWater > 1.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} must be >= 0 and <= 1. entered value=[{:.3T}].", cFieldName, thisDXCoil.HPWHCondPumpElecNomPower)); + state, std::format("...{} must be >= 0 and <= 1. entered value=[{:.3f}].", cFieldName, thisDXCoil.HPWHCondPumpElecNomPower)); ErrorsFound = true; } @@ -3237,9 +3226,9 @@ void GetDXCoils(EnergyPlusData &state) cFieldName = "Crankcase Heater Capacity"; thisDXCoil.CrankcaseHeaterCapacity = s_ip->getRealFieldValue(fields, schemaProps, "crankcase_heater_capacity"); // Numbers(8); if (thisDXCoil.CrankcaseHeaterCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} must be >= 0.0 entered value=[{:.1T}].", cFieldName, thisDXCoil.CrankcaseHeaterCapacity)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + std::format("...{} must be >= 0.0 entered value=[{:.1f}].", cFieldName, thisDXCoil.CrankcaseHeaterCapacity)); ErrorsFound = true; } @@ -3247,9 +3236,9 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.MaxOATCrankcaseHeater = s_ip->getRealFieldValue(fields, schemaProps, "maximum_ambient_temperature_for_crankcase_heater_operation"); // Numbers(12); if (thisDXCoil.MaxOATCrankcaseHeater < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} must be >= 0 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.MaxOATCrankcaseHeater)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + std::format("...{} must be >= 0 {{C}}. entered value=[{:.1f}].", cFieldName, thisDXCoil.MaxOATCrankcaseHeater)); ErrorsFound = true; } @@ -3278,9 +3267,9 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.InletAirTemperatureType = static_cast(getEnumValue(HVAC::oatTypeNamesUC, Util::makeUPPER(fieldValue))); if (thisDXCoil.InletAirTemperatureType == HVAC::OATType::Invalid) { // wrong temperature type selection - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be DryBulbTemperature or WetBulbTemperature.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...entered value=\"{}\".", fieldValue)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be DryBulbTemperature or WetBulbTemperature.", cFieldName)); + ShowContinueError(state, std::format("...entered value=\"{}\".", fieldValue)); ErrorsFound = true; } // set rated inlet air temperature for curve object verification @@ -3542,8 +3531,7 @@ void GetDXCoils(EnergyPlusData &state) if (ErrorsFound) { ShowFatalError( - state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + state, std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } // Loop over the Wrapped DX Water Heater Coils and get & load the data CurrentModuleObject = HVAC::coilTypeNames[(int)HVAC::CoilType::WaterHeatingDXWrapped]; @@ -3584,25 +3572,24 @@ void GetDXCoils(EnergyPlusData &state) std::string cFieldName = "Rated Heating Capacity"; thisDXCoil.RatedTotCap2 = s_ip->getRealFieldValue(fields, schemaProps, "rated_heating_capacity"); // Numbers(1); if (thisDXCoil.RatedTotCap2 <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be > 0.0, entered value=[{:.2T}].", cFieldName, thisDXCoil.RatedTotCap2)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be > 0.0, entered value=[{:.2f}].", cFieldName, thisDXCoil.RatedTotCap2)); ErrorsFound = true; } cFieldName = "Rated COP"; thisDXCoil.RatedCOP(1) = s_ip->getRealFieldValue(fields, schemaProps, "rated_cop"); // Numbers(2); if (thisDXCoil.RatedCOP(1) <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be > 0.0, entered value=[{:.2T}].", cFieldName, thisDXCoil.RatedCOP(1))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be > 0.0, entered value=[{:.2f}].", cFieldName, thisDXCoil.RatedCOP(1))); ErrorsFound = true; } cFieldName = "Rated Sensible Heat Ratio"; thisDXCoil.RatedSHR(1) = s_ip->getRealFieldValue(fields, schemaProps, "rated_sensible_heat_ratio"); // Numbers(3); if (thisDXCoil.RatedSHR(1) <= 0.0 || thisDXCoil.RatedSHR(1) > 1.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} must be > 0 and <= 1. entered value=[{:.3T}].", cFieldName, thisDXCoil.RatedSHR(1))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be > 0 and <= 1. entered value=[{:.3f}].", cFieldName, thisDXCoil.RatedSHR(1))); ErrorsFound = true; } @@ -3611,9 +3598,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.RatedInletDBTemp = s_ip->getRealFieldValue(fields, schemaProps, "rated_evaporator_inlet_air_dry_bulb_temperature"); // Numbers(4); if (thisDXCoil.RatedInletDBTemp <= 5.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} must be > 5 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletDBTemp)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be > 5 {{C}}. entered value=[{:.1f}].", cFieldName, thisDXCoil.RatedInletDBTemp)); ErrorsFound = true; } @@ -3621,18 +3607,17 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.RatedInletWBTemp = s_ip->getRealFieldValue(fields, schemaProps, "rated_evaporator_inlet_air_wet_bulb_temperature"); // Numbers(5); if (thisDXCoil.RatedInletWBTemp <= 5.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} must be > 5 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletWBTemp)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be > 5 {{C}}. entered value=[{:.1f}].", cFieldName, thisDXCoil.RatedInletWBTemp)); ErrorsFound = true; } cFieldName = "Rated Condenser Water Temperature"; thisDXCoil.RatedInletWaterTemp = s_ip->getRealFieldValue(fields, schemaProps, "rated_condenser_water_temperature"); // Numbers(6); if (thisDXCoil.RatedInletWaterTemp <= 25.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} must be > 25 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.RatedInletWaterTemp)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + std::format("...{} must be > 25 {{C}}. entered value=[{:.1f}].", cFieldName, thisDXCoil.RatedInletWaterTemp)); ErrorsFound = true; } @@ -3640,9 +3625,9 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.RatedAirVolFlowRate(1) = s_ip->getRealFieldValue(fields, schemaProps, "rated_evaporator_air_flow_rate"); // Numbers(7); if (thisDXCoil.RatedAirVolFlowRate(1) != Constant::AutoCalculate) { if (thisDXCoil.RatedAirVolFlowRate(1) <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} must be > 0.0. entered value=[{:.3T}].", cFieldName, thisDXCoil.RatedAirVolFlowRate(1))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + std::format("...{} must be > 0.0. entered value=[{:.3f}].", cFieldName, thisDXCoil.RatedAirVolFlowRate(1))); ErrorsFound = true; } } @@ -3712,9 +3697,9 @@ void GetDXCoils(EnergyPlusData &state) cFieldName = "Crankcase Heater Capacity"; thisDXCoil.CrankcaseHeaterCapacity = s_ip->getRealFieldValue(fields, schemaProps, "crankcase_heater_capacity"); // Numbers(8); if (thisDXCoil.CrankcaseHeaterCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} must be >= 0.0 entered value=[{:.1T}].", cFieldName, thisDXCoil.CrankcaseHeaterCapacity)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + std::format("...{} must be >= 0.0 entered value=[{:.1f}].", cFieldName, thisDXCoil.CrankcaseHeaterCapacity)); ErrorsFound = true; } @@ -3722,9 +3707,9 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.MaxOATCrankcaseHeater = s_ip->getRealFieldValue(fields, schemaProps, "maximum_ambient_temperature_for_crankcase_heater_operation"); // Numbers(9); if (thisDXCoil.MaxOATCrankcaseHeater < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} must be >= 0 {{C}}. entered value=[{:.1T}].", cFieldName, thisDXCoil.MaxOATCrankcaseHeater)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + std::format("...{} must be >= 0 {{C}}. entered value=[{:.1f}].", cFieldName, thisDXCoil.MaxOATCrankcaseHeater)); ErrorsFound = true; } @@ -3735,8 +3720,8 @@ void GetDXCoils(EnergyPlusData &state) if (!whCapFTCurveName.empty()) { thisDXCoil.CrankcaseHeaterCapacityCurveIndex = Curve::GetCurveIndex(state, whCapFTCurveName); if (thisDXCoil.CrankcaseHeaterCapacityCurveIndex == 0) { // can't find the curve - ShowSevereError( - state, EnergyPlus::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cFieldName, whCapFTCurveName)); + ShowSevereError(state, + std::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cFieldName, whCapFTCurveName)); ErrorsFound = true; } else { ErrorsFound |= Curve::CheckCurveDims(state, @@ -3754,9 +3739,9 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.InletAirTemperatureType = static_cast(getEnumValue(HVAC::oatTypeNamesUC, Util::makeUPPER(fieldValue))); if (thisDXCoil.InletAirTemperatureType == HVAC::OATType::Invalid) { // wrong temperature type selection - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be DryBulbTemperature or WetBulbTemperature.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...entered value=\"{}\".", fieldValue)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be DryBulbTemperature or WetBulbTemperature.", cFieldName)); + ShowContinueError(state, std::format("...entered value=\"{}\".", fieldValue)); ErrorsFound = true; } @@ -3963,8 +3948,7 @@ void GetDXCoils(EnergyPlusData &state) if (ErrorsFound) { ShowFatalError( - state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + state, std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } // DX Multispeed cooling coil @@ -4046,11 +4030,10 @@ void GetDXCoils(EnergyPlusData &state) Node::CompFluidStream::Primary, Node::ObjectIsNotParent); if (!CheckOutAirNodeNumber(state, thisDXCoil.CondenserInletNodeNum(1))) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("{}=\"{}\", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", - cAlphaFields(5), - Alphas(5))); + ShowWarningError(state, std::format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, + std::format("{}=\"{}\", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", cAlphaFields(5), Alphas(5))); ShowContinueError( state, "This node needs to be included in an air system or the coil model will not be valid, and the simulation continues"); } @@ -4062,8 +4045,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CondenserType(1) = DataHeatBalance::RefrigCondenserType::Evap; thisDXCoil.ReportEvapCondVars = true; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\":", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{}=\"{}\":", cAlphaFields(6), Alphas(6))); ShowContinueError(state, "...must be AirCooled or EvaporativelyCooled."); ErrorsFound = true; } @@ -4105,9 +4088,9 @@ void GetDXCoils(EnergyPlusData &state) // Set crankcase heater capacity thisDXCoil.CrankcaseHeaterCapacity = Numbers(2); if (thisDXCoil.CrankcaseHeaterCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0.", cNumericFields(2))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(2))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0.", cNumericFields(2))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(2))); ErrorsFound = true; } @@ -4119,8 +4102,8 @@ void GetDXCoils(EnergyPlusData &state) } else if (Util::SameString(Alphas(9), "No")) { thisDXCoil.PLRImpact = false; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format(",,,invalid choice for {}. Entered choice = {}", cAlphaFields(9), Alphas(9))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format(",,,invalid choice for {}. Entered choice = {}", cAlphaFields(9), Alphas(9))); ShowContinueError(state, "The allowed choices are Yes or No."); ErrorsFound = true; } @@ -4130,8 +4113,8 @@ void GetDXCoils(EnergyPlusData &state) } else if (Util::SameString(Alphas(10), "No")) { thisDXCoil.LatentImpact = false; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format(",,,invalid choice for {}. Entered choice = {}", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format(",,,invalid choice for {}. Entered choice = {}", cAlphaFields(10), Alphas(10))); ShowContinueError(state, "The allowed choices are Yes or No."); ErrorsFound = true; } @@ -4139,8 +4122,8 @@ void GetDXCoils(EnergyPlusData &state) // Basin heater power as a function of temperature must be greater than or equal to 0 thisDXCoil.BasinHeaterPowerFTempDiff = Numbers(4); if (Numbers(4) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be >= 0.0, entered value=[{:.3T}].", cNumericFields(4), Numbers(4))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be >= 0.0, entered value=[{:.3f}].", cNumericFields(4), Numbers(4))); ErrorsFound = true; } @@ -4150,17 +4133,17 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.BasinHeaterSetPointTemp = 2.0; } if (thisDXCoil.BasinHeaterSetPointTemp < 2.0) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", freeze possible", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} is less than 2 {{C}}. Freezing could occur.", cNumericFields(5))); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", Numbers(5))); + ShowWarningError(state, std::format("{}{}=\"{}\", freeze possible", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} is less than 2 {{C}}. Freezing could occur.", cNumericFields(5))); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", Numbers(5))); } } if (!lAlphaBlanks(11)) { thisDXCoil.CrankcaseHeaterCapacityCurveIndex = Curve::GetCurveIndex(state, Alphas(11)); if (thisDXCoil.CrankcaseHeaterCapacityCurveIndex == 0) { // can't find the curve - ShowSevereError( - state, EnergyPlus::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(11), Alphas(11))); + ShowSevereError(state, + std::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(11), Alphas(11))); ErrorsFound = true; } else { ErrorsFound |= Curve::CheckCurveDims(state, @@ -4185,8 +4168,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.NumOfSpeeds = Numbers(6); // Number of speeds if (thisDXCoil.NumOfSpeeds < 2) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be >= 2. entered number is {:.0T}", cNumericFields(6), Numbers(6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be >= 2. entered number is {:.0f}", cNumericFields(6), Numbers(6))); ErrorsFound = true; } @@ -4229,11 +4212,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.MSCCapFTemp(I) = GetCurveIndex(state, Alphas(14 + (I - 1) * 6)); // convert curve name to number if (thisDXCoil.MSCCapFTemp(I) == 0) { if (lAlphaBlanks(14 + (I - 1) * 6)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(14 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(14 + (I - 1) * 6))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(14 + (I - 1) * 6), Alphas(14 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(14 + (I - 1) * 6), Alphas(14 + (I - 1) * 6))); } ErrorsFound = true; } else { @@ -4261,11 +4244,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.MSCCapFFlow(I) = GetCurveIndex(state, Alphas(15 + (I - 1) * 6)); // convert curve name to number if (thisDXCoil.MSCCapFFlow(I) == 0) { if (lAlphaBlanks(15 + (I - 1) * 6)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(15 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(15 + (I - 1) * 6))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(15 + (I - 1) * 6), Alphas(15 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(15 + (I - 1) * 6), Alphas(15 + (I - 1) * 6))); } ErrorsFound = true; } else { @@ -4292,11 +4275,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.MSEIRFTemp(I) = GetCurveIndex(state, Alphas(16 + (I - 1) * 6)); // convert curve name to number if (thisDXCoil.MSEIRFTemp(I) == 0) { if (lAlphaBlanks(16 + (I - 1) * 6)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(16 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(16 + (I - 1) * 6))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(16 + (I - 1) * 6), Alphas(16 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(16 + (I - 1) * 6), Alphas(16 + (I - 1) * 6))); } ErrorsFound = true; } else { @@ -4324,11 +4307,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.MSEIRFFlow(I) = GetCurveIndex(state, Alphas(17 + (I - 1) * 6)); // convert curve name to number if (thisDXCoil.MSEIRFFlow(I) == 0) { if (lAlphaBlanks(17 + (I - 1) * 6)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(17 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(17 + (I - 1) * 6))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(17 + (I - 1) * 6), Alphas(17 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(17 + (I - 1) * 6), Alphas(17 + (I - 1) * 6))); } ErrorsFound = true; } else { @@ -4355,11 +4338,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.MSPLFFPLR(I) = GetCurveIndex(state, Alphas(18 + (I - 1) * 6)); // convert curve name to number if (thisDXCoil.MSPLFFPLR(I) == 0) { if (lAlphaBlanks(18 + (I - 1) * 6)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(18 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(18 + (I - 1) * 6))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(18 + (I - 1) * 6), Alphas(18 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(18 + (I - 1) * 6), Alphas(18 + (I - 1) * 6))); } ErrorsFound = true; } else { @@ -4390,25 +4373,21 @@ void GetDXCoils(EnergyPlusData &state) CurveInput += 0.01; } if (MinCurveVal < 0.7) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} = {} has out of range value.", cAlphaFields2(18 + (I - 1) * 6), Alphas2(18 + (I - 1) * 6))); + state, std::format("...{} = {} has out of range value.", cAlphaFields2(18 + (I - 1) * 6), Alphas2(18 + (I - 1) * 6))); ShowContinueError( - state, - EnergyPlus::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + state, std::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2f} is {:.3f}", MinCurvePLR, MinCurveVal)); ShowContinueError(state, "...Setting curve minimum to 0.7 and simulation continues."); Curve::SetCurveOutputMinValue(state, thisDXCoil.PLFFPLR(PerfModeNum), ErrorsFound, 0.7); } if (MaxCurveVal > 1.0) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} = {} has out of range value.", cAlphaFields2(18 + (I - 1) * 6), Alphas2(18 + (I - 1) * 6))); + state, std::format("...{} = {} has out of range value.", cAlphaFields2(18 + (I - 1) * 6), Alphas2(18 + (I - 1) * 6))); ShowContinueError( - state, - EnergyPlus::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + state, std::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2f} is {:.3f}", MaxCurvePLR, MaxCurveVal)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisDXCoil.MSPLFFPLR(I), ErrorsFound, 1.0); } @@ -4418,38 +4397,36 @@ void GetDXCoils(EnergyPlusData &state) // read data for latent degradation thisDXCoil.MSTwet_Rated(I) = Numbers(13 + (I - 1) * 14); if (thisDXCoil.MSTwet_Rated(I) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} cannot be < 0.0, entered value=[{:.4T}].", - cNumericFields(13 + (I - 1) * 14), - thisDXCoil.MSTwet_Rated(I))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, + std::format("...{} cannot be < 0.0, entered value=[{:.4f}].", cNumericFields(13 + (I - 1) * 14), thisDXCoil.MSTwet_Rated(I))); ErrorsFound = true; } thisDXCoil.MSGamma_Rated(I) = Numbers(14 + (I - 1) * 14); if (thisDXCoil.MSGamma_Rated(I) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} cannot be < 0.0, entered value=[{:.4T}].", - cNumericFields(14 + (I - 1) * 14), - thisDXCoil.MSGamma_Rated(I))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, + std::format("...{} cannot be < 0.0, entered value=[{:.4f}].", cNumericFields(14 + (I - 1) * 14), thisDXCoil.MSGamma_Rated(I))); ErrorsFound = true; } thisDXCoil.MSMaxONOFFCyclesperHour(I) = Numbers(15 + (I - 1) * 14); if (thisDXCoil.Gamma_Rated(I) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); ShowContinueError(state, - EnergyPlus::format("...{} cannot be < 0.0, entered value=[{:.2T}].", - cNumericFields(15 + (I - 1) * 14), - thisDXCoil.MSMaxONOFFCyclesperHour(I))); + std::format("...{} cannot be < 0.0, entered value=[{:.2f}].", + cNumericFields(15 + (I - 1) * 14), + thisDXCoil.MSMaxONOFFCyclesperHour(I))); ErrorsFound = true; } thisDXCoil.MSLatentCapacityTimeConstant(I) = Numbers(16 + (I - 1) * 14); if (thisDXCoil.Gamma_Rated(I) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); ShowContinueError(state, - EnergyPlus::format("...{} cannot be < 0.0, entered value=[{:.2T}].", - cNumericFields(16 + (I - 1) * 14), - thisDXCoil.MSLatentCapacityTimeConstant(I))); + std::format("...{} cannot be < 0.0, entered value=[{:.2f}].", + cNumericFields(16 + (I - 1) * 14), + thisDXCoil.MSLatentCapacityTimeConstant(I))); ErrorsFound = true; } @@ -4471,13 +4448,12 @@ void GetDXCoils(EnergyPlusData &state) if (!ErrorsFound) { CurveVal = CurveValue(state, thisDXCoil.MSWasteHeat(I), RatedOutdoorAirTemp, RatedInletAirTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", cAlphaFields(19 + (I - 1) * 6), Alphas(19 + (I - 1) * 6))); - ShowContinueError(state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", - cAlphaFields(19 + (I - 1) * 6))); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("{} = {}", cAlphaFields(19 + (I - 1) * 6), Alphas(19 + (I - 1) * 6))); + ShowContinueError( + state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cAlphaFields(19 + (I - 1) * 6))); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } @@ -4485,31 +4461,29 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.MSEvapCondEffect(I) = Numbers(18 + (I - 1) * 14); if (thisDXCoil.MSEvapCondEffect(I) < 0.0 || thisDXCoil.MSEvapCondEffect(I) > 1.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); ShowContinueError(state, - EnergyPlus::format("...{} cannot be < 0.0 or > 1.0, entered value=[{:.3T}].", - cNumericFields(18 + (I - 1) * 14), - Numbers(18 + (I - 1) * 14))); + std::format("...{} cannot be < 0.0 or > 1.0, entered value=[{:.3f}].", + cNumericFields(18 + (I - 1) * 14), + Numbers(18 + (I - 1) * 14))); ErrorsFound = true; } thisDXCoil.MSEvapCondAirFlow(I) = Numbers(19 + (I - 1) * 14); if (thisDXCoil.MSEvapCondAirFlow(I) < 0.0 && thisDXCoil.MSEvapCondAirFlow(I) != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} cannot be < 0.0, entered value=[{:.3T}].", - cNumericFields(19 + (I - 1) * 14), - Numbers(19 + (I - 1) * 14))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, + std::format("...{} cannot be < 0.0, entered value=[{:.3f}].", cNumericFields(19 + (I - 1) * 14), Numbers(19 + (I - 1) * 14))); ErrorsFound = true; } thisDXCoil.MSEvapCondPumpElecNomPower(I) = Numbers(20 + (I - 1) * 14); if (thisDXCoil.MSEvapCondPumpElecNomPower(I) < 0.0 && thisDXCoil.MSEvapCondPumpElecNomPower(I) != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} cannot be < 0.0, entered value=[{:.3T}].", - cNumericFields(20 + (I - 1) * 14), - Numbers(20 + (I - 1) * 14))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError( + state, + std::format("...{} cannot be < 0.0, entered value=[{:.3f}].", cNumericFields(20 + (I - 1) * 14), Numbers(20 + (I - 1) * 14))); ErrorsFound = true; } } @@ -4524,16 +4498,15 @@ void GetDXCoils(EnergyPlusData &state) &thisDXCoil.SecCoilSensibleHeatGainRate); thisDXCoil.IsSecondaryDXCoilInZone = true; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(38), Alphas(38))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(38), Alphas(38))); } } } if (ErrorsFound) { ShowFatalError( - state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + state, std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } // DX multispeed heating coil @@ -4611,8 +4584,8 @@ void GetDXCoils(EnergyPlusData &state) // Set crankcase heater capacity thisDXCoil.CrankcaseHeaterCapacity = Numbers(3); if (thisDXCoil.CrankcaseHeaterCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0, entered value=[{:.2T}].", cNumericFields(3), Numbers(3))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0, entered value=[{:.2f}].", cNumericFields(3), Numbers(3))); ErrorsFound = true; } @@ -4622,8 +4595,7 @@ void GetDXCoils(EnergyPlusData &state) if (!lAlphaBlanks(5)) { thisDXCoil.CrankcaseHeaterCapacityCurveIndex = Curve::GetCurveIndex(state, Alphas(5)); if (thisDXCoil.CrankcaseHeaterCapacityCurveIndex == 0) { // can't find the curve - ShowSevereError(state, - EnergyPlus::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(5), Alphas(5))); + ShowSevereError(state, std::format("{} = {}: {} not found = {}", CurrentModuleObject, thisDXCoil.Name, cAlphaFields(5), Alphas(5))); ErrorsFound = true; } else { ErrorsFound |= Curve::CheckCurveDims(state, @@ -4641,11 +4613,11 @@ void GetDXCoils(EnergyPlusData &state) if (Util::SameString(Alphas(7), "ReverseCycle")) { if (thisDXCoil.DefrostEIRFT == 0) { if (lAlphaBlanks(6)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(6))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(6))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); } ErrorsFound = true; } else { @@ -4678,8 +4650,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.DefrostStrategy = StandardRatings::DefrostStrat::Resistive; } if (thisDXCoil.DefrostStrategy == StandardRatings::DefrostStrat::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...illegal {}=\"{}\".", cAlphaFields(7), Alphas(7))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...illegal {}=\"{}\".", cAlphaFields(7), Alphas(7))); ShowContinueError(state, "...valid values for this field are ReverseCycle or Resistive."); ErrorsFound = true; } @@ -4691,8 +4663,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.DefrostControl = StandardRatings::HPdefrostControl::OnDemand; } if (thisDXCoil.DefrostControl == StandardRatings::HPdefrostControl::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...illegal {}=\"{}\".", cAlphaFields(8), Alphas(8))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...illegal {}=\"{}\".", cAlphaFields(8), Alphas(8))); ShowContinueError(state, "...valid values for this field are Timed or OnDemand."); ErrorsFound = true; } @@ -4703,15 +4675,15 @@ void GetDXCoils(EnergyPlusData &state) // Set defrost time period thisDXCoil.DefrostTime = Numbers(6); if (thisDXCoil.DefrostTime == 0.0 && thisDXCoil.DefrostControl == StandardRatings::HPdefrostControl::Timed) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} = 0.0 for defrost control = TIMED.", cNumericFields(5))); + ShowWarningError(state, std::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} = 0.0 for defrost control = TIMED.", cNumericFields(5))); } // Set defrost capacity (for resistive defrost) thisDXCoil.DefrostCapacity = Numbers(7); if (thisDXCoil.DefrostCapacity == 0.0 && thisDXCoil.DefrostStrategy == StandardRatings::DefrostStrat::Resistive) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} = 0.0 for defrost strategy = RESISTIVE.", cNumericFields(7))); + ShowWarningError(state, std::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} = 0.0 for defrost strategy = RESISTIVE.", cNumericFields(7))); } if (Util::SameString(Alphas(9), "Yes")) { @@ -4719,8 +4691,8 @@ void GetDXCoils(EnergyPlusData &state) } else if (Util::SameString(Alphas(9), "No")) { thisDXCoil.PLRImpact = false; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format(",,,invalid choice for {}. Entered choice = {}", cAlphaFields(9), Alphas(9))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format(",,,invalid choice for {}. Entered choice = {}", cAlphaFields(9), Alphas(9))); ShowContinueError(state, "The allowed choices are Yes or No."); ErrorsFound = true; } @@ -4731,8 +4703,8 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.RegionNum = Numbers(8); // Region Number for HSPF Calc thisDXCoil.NumOfSpeeds = Numbers(9); // Number of speeds if (thisDXCoil.NumOfSpeeds < 2) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be >= 2. entered number is {:.0T}", cNumericFields(9), Numbers(9))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...{} must be >= 2. entered number is {:.0f}", cNumericFields(9), Numbers(9))); ErrorsFound = true; } @@ -4773,11 +4745,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.MSCCapFTemp(I) = GetCurveIndex(state, Alphas(11 + (I - 1) * 6)); // convert curve name to number if (thisDXCoil.MSCCapFTemp(I) == 0) { ShowSevereError(state, - EnergyPlus::format("{}, \"{}\" {} not found:{}", - CurrentModuleObject, - thisDXCoil.Name, - cAlphaFields(11 + (I - 1) * 6), - Alphas(11 + (I - 1) * 6))); + std::format("{}, \"{}\" {} not found:{}", + CurrentModuleObject, + thisDXCoil.Name, + cAlphaFields(11 + (I - 1) * 6), + Alphas(11 + (I - 1) * 6))); ErrorsFound = true; } else { // only legal types are Quadratic, BiQuadratic and Cubic @@ -4814,11 +4786,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.MSCCapFFlow(I) = GetCurveIndex(state, Alphas(12 + (I - 1) * 6)); // convert curve name to number if (thisDXCoil.MSCCapFFlow(I) == 0) { if (lAlphaBlanks(12 + (I - 1) * 6)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(12 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(12 + (I - 1) * 6))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(12 + (I - 1) * 6), Alphas(12 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(12 + (I - 1) * 6), Alphas(12 + (I - 1) * 6))); } ErrorsFound = true; } else { @@ -4845,11 +4817,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.MSEIRFTemp(I) = GetCurveIndex(state, Alphas(13 + (I - 1) * 6)); // convert curve name to number if (thisDXCoil.MSEIRFTemp(I) == 0) { if (lAlphaBlanks(13 + (I - 1) * 6)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(13 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(13 + (I - 1) * 6))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(13 + (I - 1) * 6), Alphas(13 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(13 + (I - 1) * 6), Alphas(13 + (I - 1) * 6))); } ErrorsFound = true; } else { @@ -4887,11 +4859,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.MSEIRFFlow(I) = GetCurveIndex(state, Alphas(14 + (I - 1) * 6)); // convert curve name to number if (thisDXCoil.MSEIRFFlow(I) == 0) { if (lAlphaBlanks(14 + (I - 1) * 6)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(14 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(14 + (I - 1) * 6))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(14 + (I - 1) * 6), Alphas(14 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(14 + (I - 1) * 6), Alphas(14 + (I - 1) * 6))); } ErrorsFound = true; } else { @@ -4918,11 +4890,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.MSPLFFPLR(I) = GetCurveIndex(state, Alphas(15 + (I - 1) * 6)); // convert curve name to number if (thisDXCoil.MSPLFFPLR(I) == 0) { if (lAlphaBlanks(15 + (I - 1) * 6)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(15 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(15 + (I - 1) * 6))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(15 + (I - 1) * 6), Alphas(15 + (I - 1) * 6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(15 + (I - 1) * 6), Alphas(15 + (I - 1) * 6))); } ErrorsFound = true; } else { @@ -4953,25 +4925,21 @@ void GetDXCoils(EnergyPlusData &state) CurveInput += 0.01; } if (MinCurveVal < 0.7) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} = {} has out of range value.", cAlphaFields(15 + (I - 1) * 6), Alphas(15 + (I - 1) * 6))); + state, std::format("...{} = {} has out of range value.", cAlphaFields(15 + (I - 1) * 6), Alphas(15 + (I - 1) * 6))); ShowContinueError( - state, - EnergyPlus::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + state, std::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2f} is {:.3f}", MinCurvePLR, MinCurveVal)); ShowContinueError(state, "...Setting curve minimum to 0.7 and simulation continues."); Curve::SetCurveOutputMinValue(state, thisDXCoil.MSPLFFPLR(I), ErrorsFound, 0.7); } if (MaxCurveVal > 1.0) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} = {} has out of range value.", cAlphaFields(15 + (I - 1) * 6), Alphas(15 + (I - 1) * 6))); + state, std::format("...{} = {} has out of range value.", cAlphaFields(15 + (I - 1) * 6), Alphas(15 + (I - 1) * 6))); ShowContinueError( - state, - EnergyPlus::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + state, std::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2f} is {:.3f}", MaxCurvePLR, MaxCurveVal)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisDXCoil.MSPLFFPLR(I), ErrorsFound, 1.0); } @@ -5018,8 +4986,8 @@ void GetDXCoils(EnergyPlusData &state) &thisDXCoil.SecCoilLatentHeatRemovalRate); thisDXCoil.IsSecondaryDXCoilInZone = true; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(35), Alphas(35))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(35), Alphas(35))); } } if (thisDXCoil.SecZonePtr > 0) { @@ -5031,18 +4999,16 @@ void GetDXCoils(EnergyPlusData &state) if (!lAlphaBlanks(36 + (I - 1) * 2)) { thisDXCoil.MSSecCoilSHRFT(I) = GetCurveIndex(state, Alphas(36 + (I - 1) * 2)); // convert curve name to number if (thisDXCoil.MSSecCoilSHRFT(I) == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(36 + (I - 1) * 2), Alphas(36 + (I - 1) * 2))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(36 + (I - 1) * 2), Alphas(36 + (I - 1) * 2))); } } // Read SHR modifier curve function of flow fraction if (!lAlphaBlanks(36 + (I - 1) * 2)) { thisDXCoil.MSSecCoilSHRFF(I) = GetCurveIndex(state, Alphas(36 + (I - 1) * 2)); // convert curve name to number if (thisDXCoil.MSSecCoilSHRFF(I) == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(36 + (I - 1) * 2), Alphas(36 + (I - 1) * 2))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(36 + (I - 1) * 2), Alphas(36 + (I - 1) * 2))); } } } @@ -5127,11 +5093,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CCapFFlow(1) = GetCurveIndex(state, Alphas(4)); // convert curve name to number if (thisDXCoil.CCapFFlow(1) == 0) { if (lAlphaBlanks(4)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(4))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(4))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(4), Alphas(4))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(4), Alphas(4))); } ErrorsFound = true; } else { @@ -5189,8 +5155,7 @@ void GetDXCoils(EnergyPlusData &state) if (ErrorsFound) { ShowFatalError( - state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + state, std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } // Loop over the VRF Heating Coils and get & load the data @@ -5260,11 +5225,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CCapFTemp = GetCurveIndex(state, Alphas(5)); if (thisDXCoil.CCapFTemp(1) == 0) { if (lAlphaBlanks(5)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(5))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(5))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); } ErrorsFound = true; } else { @@ -5295,11 +5260,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.CCapFFlow(1) = GetCurveIndex(state, Alphas(6)); // convert curve name to number if (thisDXCoil.CCapFFlow(1) == 0) { if (lAlphaBlanks(6)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(6))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(6))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(6), Alphas(6))); } ErrorsFound = true; } else { @@ -5321,8 +5286,7 @@ void GetDXCoils(EnergyPlusData &state) if (ErrorsFound) { ShowFatalError( - state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + state, std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } // Loop over the VRF Cooling Coils for VRF FluidTCtrl Model_zrp 2015 @@ -5395,11 +5359,11 @@ void GetDXCoils(EnergyPlusData &state) // Verify curve name and type if (indexSHCurve == 0) { if (lAlphaBlanks(5)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(5))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(5))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); } ErrorsFound = true; } else { @@ -5410,12 +5374,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.C3Te = state.dataCurveManager->curves(indexSHCurve)->coeff[2]; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, - EnergyPlus::format("...illegal {} type for this object = {}", - cAlphaFields(5), - Curve::objectNames[static_cast(state.dataCurveManager->curves(indexSHCurve)->curveType)])); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + std::format("...illegal {} type for this object = {}", + cAlphaFields(5), + Curve::objectNames[static_cast(state.dataCurveManager->curves(indexSHCurve)->curveType)])); ShowContinueError(state, "... Curve type must be Quadratic."); ErrorsFound = true; } @@ -5439,8 +5402,7 @@ void GetDXCoils(EnergyPlusData &state) if (ErrorsFound) { ShowFatalError( - state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + state, std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } // Loop over the VRF Heating Coils for VRF FluidTCtrl Model_zrp 2015 @@ -5511,11 +5473,11 @@ void GetDXCoils(EnergyPlusData &state) // Verify curve name and type if (indexSCCurve == 0) { if (lAlphaBlanks(5)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", cAlphaFields(5))); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", cAlphaFields(5))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, std::format("...not found {}=\"{}\".", cAlphaFields(5), Alphas(5))); } ErrorsFound = true; } else { @@ -5526,12 +5488,11 @@ void GetDXCoils(EnergyPlusData &state) thisDXCoil.C3Tc = state.dataCurveManager->curves(indexSCCurve)->coeff[2]; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); - ShowContinueError( - state, - EnergyPlus::format("...illegal {} type for this object = {}", - cAlphaFields(5), - Curve::objectNames[static_cast(state.dataCurveManager->curves(indexSCCurve)->curveType)])); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisDXCoil.Name)); + ShowContinueError(state, + std::format("...illegal {} type for this object = {}", + cAlphaFields(5), + Curve::objectNames[static_cast(state.dataCurveManager->curves(indexSCCurve)->curveType)])); ShowContinueError(state, "... Curve type must be Quadratic."); ErrorsFound = true; } @@ -5541,8 +5502,7 @@ void GetDXCoils(EnergyPlusData &state) if (ErrorsFound) { ShowFatalError( - state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + state, std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } for (DXCoilNum = 1; DXCoilNum <= state.dataDXCoils->NumDXCoils; ++DXCoilNum) { @@ -6236,14 +6196,14 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.FuelType != Constant::eFuel::Electricity) { std::string_view sFuelType = Constant::eFuelNames[static_cast(thisDXCoil.FuelType)]; SetupOutputVariable(state, - EnergyPlus::format("Cooling Coil {} Rate", sFuelType), + std::format("Cooling Coil {} Rate", sFuelType), Constant::Units::W, thisDXCoil.FuelUsed, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, - EnergyPlus::format("Cooling Coil {} Energy", sFuelType), + std::format("Cooling Coil {} Energy", sFuelType), Constant::Units::J, thisDXCoil.FuelConsumed, OutputProcessor::TimeStepType::System, @@ -6380,14 +6340,14 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.FuelType != Constant::eFuel::Electricity) { std::string_view sFuelType = Constant::eFuelNames[static_cast(thisDXCoil.FuelType)]; SetupOutputVariable(state, - EnergyPlus::format("Heating Coil {} Rate", sFuelType), + std::format("Heating Coil {} Rate", sFuelType), Constant::Units::W, thisDXCoil.FuelUsed, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, - EnergyPlus::format("Heating Coil {} Energy", sFuelType), + std::format("Heating Coil {} Energy", sFuelType), Constant::Units::J, thisDXCoil.FuelConsumed, OutputProcessor::TimeStepType::System, @@ -6401,14 +6361,14 @@ void GetDXCoils(EnergyPlusData &state) if (thisDXCoil.FuelType != Constant::eFuel::Electricity && thisDXCoil.DefrostStrategy == StandardRatings::DefrostStrat::ReverseCycle) { std::string_view sFuelType = Constant::eFuelNames[static_cast(thisDXCoil.FuelType)]; SetupOutputVariable(state, - EnergyPlus::format("Heating Coil Defrost {} Rate", sFuelType), + std::format("Heating Coil Defrost {} Rate", sFuelType), Constant::Units::W, thisDXCoil.DefrostPower, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, thisDXCoil.Name); SetupOutputVariable(state, - EnergyPlus::format("Heating Coil Defrost {} Energy", sFuelType), + std::format("Heating Coil Defrost {} Energy", sFuelType), Constant::Units::J, thisDXCoil.DefrostConsumption, OutputProcessor::TimeStepType::System, @@ -6887,17 +6847,16 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur RatedVolFlowPerRatedTotCap = thisDXCoil.RatedAirVolFlowRate(1) / thisDXCoil.RatedTotCap2; if (((HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT] - RatedVolFlowPerRatedTotCap) > SmallDifferenceTest) || ((RatedVolFlowPerRatedTotCap - HVAC::MaxHeatVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) > SmallDifferenceTest)) { - ShowWarningError( - state, - EnergyPlus::format("{} \"{}\": Rated air volume flow rate per watt of rated total water heating capacity is out of range", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + ShowWarningError(state, + std::format("{} \"{}\": Rated air volume flow rate per watt of rated total water heating capacity is out of range", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); ShowContinueError(state, - EnergyPlus::format("Min Rated Vol Flow Per Watt=[{:.3T}], Rated Vol Flow Per Watt=[{:.3T}], Max Rated Vol Flow Per " - "Watt=[{:.3T}]. See Input-Output Reference Manual for valid range.", - HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - RatedVolFlowPerRatedTotCap, - HVAC::MaxHeatVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + std::format("Min Rated Vol Flow Per Watt=[{:.3e}], Rated Vol Flow Per Watt=[{:.3e}], Max Rated Vol Flow Per " + "Watt=[{:.3e}]. See Input-Output Reference Manual for valid range.", + HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + RatedVolFlowPerRatedTotCap, + HVAC::MaxHeatVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); } HPInletAirHumRat = PsyWFnTdbTwbPb(state, thisDXCoil.RatedInletDBTemp, thisDXCoil.RatedInletWBTemp, DataEnvironment::StdPressureSeaLevel, RoutineName); @@ -6936,7 +6895,7 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur if (thisDXCoil.MSWasteHeat(SpeedNum) == 0) { ShowWarningError( state, - EnergyPlus::format( + std::format( "GetDXCoils:{}. The value of Waste Heat Function of Temperature Curve is assumed to be 1. Simulation continues. ", thisDXCoil.Name)); break; @@ -7016,15 +6975,14 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur Mode = 1; // Check for zero capacity or zero max flow rate if (thisDXCoil.RatedTotCap(Mode) <= 0.0) { - ShowSevereError(state, - EnergyPlus::format( - "Sizing: {} {} has zero rated total capacity", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + ShowSevereError( + state, + std::format("Sizing: {} {} has zero rated total capacity", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); ErrorsFound = true; } if (thisDXCoil.RatedAirVolFlowRate(Mode) <= 0.0) { ShowSevereError( - state, - EnergyPlus::format("Sizing: {} {} has zero rated air flow rate", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + state, std::format("Sizing: {} {} has zero rated air flow rate", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); ErrorsFound = true; } if (ErrorsFound) { @@ -7039,16 +6997,15 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur ((RatedVolFlowPerRatedTotCap - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) > SmallDifferenceTest)) { ShowWarningError( state, - EnergyPlus::format("Sizing: {} \"{}\": Rated air volume flow rate per watt of rated total cooling capacity is out of range.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); - ShowContinueError( - state, - EnergyPlus::format("Min Rated Vol Flow Per Watt=[{:.3T}], Rated Vol Flow Per Watt=[{:.3T}], Max Rated Vol Flow Per " - "Watt=[{:.3T}]. See Input Output Reference Manual for valid range.", - HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - RatedVolFlowPerRatedTotCap, - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + std::format("Sizing: {} \"{}\": Rated air volume flow rate per watt of rated total cooling capacity is out of range.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); + ShowContinueError(state, + std::format("Min Rated Vol Flow Per Watt=[{:.3e}], Rated Vol Flow Per Watt=[{:.3e}], Max Rated Vol Flow Per " + "Watt=[{:.3e}]. See Input-Output Reference Manual for valid range.", + HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + RatedVolFlowPerRatedTotCap, + HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); } } @@ -7141,18 +7098,18 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur // Check for zero capacity or zero max flow rate if (thisDXCoil.RatedTotCap(Mode) <= 0.0) { ShowSevereError(state, - EnergyPlus::format("Sizing: {} {} has zero rated total capacity", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("for CoilPerformance:DX:Cooling mode: {}", thisDXCoil.CoilPerformanceName(Mode))); + std::format("Sizing: {} {} has zero rated total capacity", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); + ShowContinueError(state, std::format("for CoilPerformance:DX:Cooling mode: {}", thisDXCoil.CoilPerformanceName(Mode))); ErrorsFound = true; } if (thisDXCoil.RatedAirVolFlowRate(Mode) <= 0.0) { ShowSevereError(state, - EnergyPlus::format("Sizing: {} {} has zero rated air flow rate", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("for CoilPerformance:DX:Cooling mode: {}", thisDXCoil.CoilPerformanceName(Mode))); + std::format("Sizing: {} {} has zero rated air flow rate", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); + ShowContinueError(state, std::format("for CoilPerformance:DX:Cooling mode: {}", thisDXCoil.CoilPerformanceName(Mode))); ErrorsFound = true; } if (ErrorsFound) { @@ -7164,18 +7121,17 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur ((RatedVolFlowPerRatedTotCap - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) > SmallDifferenceTest)) { ShowWarningError( state, - EnergyPlus::format( - "Sizing: {} \"{}\": Rated air volume flow rate per watt of rated total cooling capacity is out of range.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("Sizing: {} \"{}\": Rated air volume flow rate per watt of rated total cooling capacity is out of range.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); ShowContinueError( state, - EnergyPlus::format("Min Rated Vol Flow Per Watt=[{:.3T}], Rated Vol Flow Per Watt=[{:.3T}], Max Rated Vol Flow Per " - "Watt=[{:.3T}]. See Input Output Reference Manual for valid range.", - HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - RatedVolFlowPerRatedTotCap, - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); - ShowContinueError(state, EnergyPlus::format("for CoilPerformance:DX:Cooling mode: {}", thisDXCoil.CoilPerformanceName(Mode))); + std::format("Min Rated Vol Flow Per Watt=[{:.3e}], Rated Vol Flow Per Watt=[{:.3e}], Max Rated Vol Flow Per " + "Watt=[{:.3e}]. See Input-Output Reference Manual for valid range.", + HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + RatedVolFlowPerRatedTotCap, + HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + ShowContinueError(state, std::format("for CoilPerformance:DX:Cooling mode: {}", thisDXCoil.CoilPerformanceName(Mode))); } thisDXCoil.RatedAirMassFlowRate(Mode) = thisDXCoil.RatedAirVolFlowRate(Mode) * @@ -7198,15 +7154,14 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur Mode = 1; if (thisDXCoil.RatedTotCap(Mode) <= 0.0) { - ShowSevereError(state, - EnergyPlus::format( - "Sizing: {} {} has zero rated total capacity", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + ShowSevereError( + state, + std::format("Sizing: {} {} has zero rated total capacity", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); ErrorsFound = true; } if (thisDXCoil.RatedAirVolFlowRate(Mode) <= 0.0) { ShowSevereError( - state, - EnergyPlus::format("Sizing: {} {} has zero rated air flow rate", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + state, std::format("Sizing: {} {} has zero rated air flow rate", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); ErrorsFound = true; } if (ErrorsFound) { @@ -7226,16 +7181,15 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur ((RatedVolFlowPerRatedTotCap - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) > SmallDifferenceTest)) { ShowWarningError( state, - EnergyPlus::format("Sizing: {} {}: Rated air volume flow rate per watt of rated total heating capacity is out of range.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); - ShowContinueError( - state, - EnergyPlus::format("Min Rated Vol Flow Per Watt=[{:.3T}], Rated Vol Flow Per Watt=[{:.3T}], Max Rated Vol Flow Per " - "Watt=[{:.3T}]. See Input-Output Reference Manual for valid range.", - HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - RatedVolFlowPerRatedTotCap, - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + std::format("Sizing: {} {}: Rated air volume flow rate per watt of rated total heating capacity is out of range.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); + ShowContinueError(state, + std::format("Min Rated Vol Flow Per Watt=[{:.3e}], Rated Vol Flow Per Watt=[{:.3e}], Max Rated Vol Flow Per " + "Watt=[{:.3e}]. See Input-Output Reference Manual for valid range.", + HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + RatedVolFlowPerRatedTotCap, + HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); } } @@ -7312,15 +7266,15 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur ((RatedVolFlowPerRatedTotCap - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) > SmallDifferenceTest)) { ShowWarningError( state, - EnergyPlus::format("Coil:Cooling:DX:TwoSpeed \"{}\": At low speed rated air volume flow rate per watt of rated total cooling " - "capacity is out of range.", - thisDXCoil.Name)); + std::format("Coil:Cooling:DX:TwoSpeed \"{}\": At low speed rated air volume flow rate per watt of rated total cooling " + "capacity is out of range.", + thisDXCoil.Name)); ShowContinueError(state, - EnergyPlus::format("Min Rated Vol Flow Per Watt=[{:.3T}], Rated Vol Flow Per Watt=[{:.3T}], Max Rated Vol Flow Per " - "Watt=[{:.3T}]. See Input-Output Reference Manual for valid range.", - HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - RatedVolFlowPerRatedTotCap, - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + std::format("Min Rated Vol Flow Per Watt=[{:.3e}], Rated Vol Flow Per Watt=[{:.3e}], Max Rated Vol Flow Per " + "Watt=[{:.3e}]. See Input-Output Reference Manual for valid range.", + HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + RatedVolFlowPerRatedTotCap, + HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); } thisDXCoil.RatedAirMassFlowRate2 = @@ -7348,18 +7302,18 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur // Check for zero capacity or zero max flow rate if (thisDXCoil.MSRatedTotCap(Mode) <= 0.0) { ShowSevereError(state, - EnergyPlus::format("Sizing: {} {} has zero rated total capacity at speed {}", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - Mode)); + std::format("Sizing: {} {} has zero rated total capacity at speed {}", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + Mode)); ErrorsFound = true; } if (thisDXCoil.MSRatedAirVolFlowRate(Mode) <= 0.0) { ShowSevereError(state, - EnergyPlus::format("Sizing: {} {} has zero rated air flow rate at speed {}", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - Mode)); + std::format("Sizing: {} {} has zero rated air flow rate at speed {}", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + Mode)); ErrorsFound = true; } if (ErrorsFound) { @@ -7371,18 +7325,17 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur ((RatedVolFlowPerRatedTotCap - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) > SmallDifferenceTest)) { ShowWarningError( state, - EnergyPlus::format( + std::format( "Sizing: {} \"{}\": Rated air volume flow rate per watt of rated total cooling capacity is out of range at speed {}", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name, Mode)); - ShowContinueError( - state, - EnergyPlus::format("Min Rated Vol Flow Per Watt=[{:.3T}], Rated Vol Flow Per Watt=[{:.3T}], Max Rated Vol Flow Per " - "Watt=[{:.3T}]. See Input Output Reference Manual for valid range.", - HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - RatedVolFlowPerRatedTotCap, - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + ShowContinueError(state, + std::format("Min Rated Vol Flow Per Watt=[{:.3e}], Rated Vol Flow Per Watt=[{:.3e}], Max Rated Vol Flow Per " + "Watt=[{:.3e}]. See Input-Output Reference Manual for valid range.", + HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + RatedVolFlowPerRatedTotCap, + HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); } thisDXCoil.MSRatedAirMassFlowRate(Mode) = thisDXCoil.MSRatedAirVolFlowRate(Mode) * @@ -7412,19 +7365,17 @@ void InitDXCoil(EnergyPlusData &state, int const DXCoilNum) // number of the cur RatedVolFlowPerRatedTotCap = thisDXCoil.MSRatedAirVolFlowRate(Mode) / thisDXCoil.MSRatedTotCap(Mode); if (((HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT] - RatedVolFlowPerRatedTotCap) > SmallDifferenceTest) || ((RatedVolFlowPerRatedTotCap - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) > SmallDifferenceTest)) { - ShowWarningError( - state, - EnergyPlus::format("Coil:Heating:DX:MultiSpeed {}: Rated air volume flow rate per watt of rated total heating capacity " - "is out of range at speed {}", - thisDXCoil.Name, - Mode)); - ShowContinueError( - state, - EnergyPlus::format("Min Rated Vol Flow Per Watt=[{:.3T}], Rated Vol Flow Per Watt=[{:.3T}], Max Rated Vol Flow Per " - "Watt=[{:.3T}]. See Input Output Reference Manual for valid range.", - HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], - RatedVolFlowPerRatedTotCap, - HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); + ShowWarningError(state, + std::format("Coil:Heating:DX:MultiSpeed {}: Rated air volume flow rate per watt of rated total heating capacity " + "is out of range at speed {}", + thisDXCoil.Name, + Mode)); + ShowContinueError(state, + std::format("Min Rated Vol Flow Per Watt=[{:.3e}], Rated Vol Flow Per Watt=[{:.3e}], Max Rated Vol Flow Per " + "Watt=[{:.3e}]. See Input-Output Reference Manual for valid range.", + HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT], + RatedVolFlowPerRatedTotCap, + HVAC::MaxRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT])); } } } @@ -7908,9 +7859,9 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(SecCoilAirFlowDes - SecCoilAirFlowUser) / SecCoilAirFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeDxCoil: Potential issue with equipment sizing for {} {}", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("SizeDxCoil: Potential issue with equipment sizing for {} {}", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Secondary Coil Air Flow Rate of {:.5R} [m3/s]", SecCoilAirFlowUser)); ShowContinueError( @@ -8020,10 +7971,9 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) if (thisDXCoil.EvapCondAirFlow2 > thisDXCoil.EvapCondAirFlow(Mode)) { ShowSevereError( state, - EnergyPlus::format( - "SizeDXCoil: {} {}, Evaporative Condenser low speed air flow must be less than or equal to high speed air flow.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("SizeDXCoil: {} {}, Evaporative Condenser low speed air flow must be less than or equal to high speed air flow.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); ShowContinueError(state, EnergyPlus::format("Instead, {:.2R} > {:.2R}", thisDXCoil.EvapCondAirFlow2, thisDXCoil.EvapCondAirFlow(Mode))); ShowFatalError(state, "Preceding conditions cause termination."); @@ -8032,7 +7982,7 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) if (thisDXCoil.EvapCondPumpElecNomPower2 > thisDXCoil.EvapCondPumpElecNomPower(Mode)) { ShowSevereError( state, - EnergyPlus::format( + std::format( "SizeDXCoil: {} {}, Evaporative Condenser low speed pump power must be less than or equal to high speed pump power.", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); @@ -8046,10 +7996,10 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) if (thisDXCoil.RatedTotCap2 > thisDXCoil.RatedTotCap(Mode)) { ShowSevereError( state, - EnergyPlus::format("SizeDXCoil: {} {}, Rated Total Cooling Capacity, Low Speed must be less than or equal to Rated Total " - "Cooling Capacity, High Speed.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("SizeDXCoil: {} {}, Rated Total Cooling Capacity, Low Speed must be less than or equal to Rated Total " + "Cooling Capacity, High Speed.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); ShowContinueError(state, EnergyPlus::format("Instead, {:.2R} > {:.2R}", thisDXCoil.RatedTotCap2, thisDXCoil.RatedTotCap(Mode))); ShowFatalError(state, "Preceding conditions cause termination."); } @@ -8057,10 +8007,10 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) if (thisDXCoil.RatedAirVolFlowRate2 > thisDXCoil.RatedAirVolFlowRate(Mode)) { ShowFatalError( state, - EnergyPlus::format("SizeDXCoil: {} {}, Rated Air Volume Flow Rate, low speed must be less than or equal to Rated Air Volume " - "Flow Rate, high speed.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("SizeDXCoil: {} {}, Rated Air Volume Flow Rate, low speed must be less than or equal to Rated Air Volume " + "Flow Rate, high speed.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); ShowContinueError( state, EnergyPlus::format("Instead, {:.2R} > {:.2R}", thisDXCoil.RatedAirVolFlowRate2, thisDXCoil.RatedAirVolFlowRate(Mode))); ShowFatalError(state, "Preceding conditions cause termination."); @@ -8180,11 +8130,11 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) if (thisDXCoil.MSRatedAirVolFlowRate(Mode) > thisDXCoil.MSRatedAirVolFlowRate(Mode + 1)) { ShowWarningError( state, - EnergyPlus::format("SizeDXCoil: {} {}, Speed {} Rated Air Flow Rate must be less than or equal to Speed {} Rated Air Flow Rate.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - Mode, - Mode + 1)); + std::format("SizeDXCoil: {} {}, Speed {} Rated Air Flow Rate must be less than or equal to Speed {} Rated Air Flow Rate.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + Mode, + Mode + 1)); ShowContinueError(state, EnergyPlus::format("Instead, {:.2R} > {:.2R}", thisDXCoil.MSRatedAirVolFlowRate(Mode), @@ -8270,14 +8220,13 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) // Ensure capacity at lower speed must be lower or equal to the capacity at higher speed. for (Mode = 1; Mode <= thisDXCoil.NumOfSpeeds - 1; ++Mode) { if (thisDXCoil.MSRatedTotCap(Mode) > thisDXCoil.MSRatedTotCap(Mode + 1)) { - ShowWarningError( - state, - EnergyPlus::format("SizeDXCoil: {} {}, Speed {} Rated Total Cooling Capacity must be less than or equal to Speed {} Rated " - "Total Cooling Capacity.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - Mode, - Mode + 1)); + ShowWarningError(state, + std::format("SizeDXCoil: {} {}, Speed {} Rated Total Cooling Capacity must be less than or equal to Speed {} Rated " + "Total Cooling Capacity.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + Mode, + Mode + 1)); ShowContinueError(state, EnergyPlus::format("Instead, {:.2R} > {:.2R}", thisDXCoil.MSRatedTotCap(Mode), thisDXCoil.MSRatedTotCap(Mode + 1))); ShowFatalError(state, "Preceding conditions cause termination."); @@ -8342,7 +8291,7 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) BaseSizer::reportSizerOutput(state, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name, - EnergyPlus::format("Design Size Speed {} Evaporative Condenser Air Flow Rate [m3/s]", Mode), + std::format("Design Size Speed {} Evaporative Condenser Air Flow Rate [m3/s]", Mode), MSEvapCondAirFlowDes); } else { if (thisDXCoil.MSEvapCondAirFlow(Mode) > 0.0 && MSEvapCondAirFlowDes > 0.0 && !HardSizeNoDesRun) { @@ -8350,17 +8299,17 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) BaseSizer::reportSizerOutput(state, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name, - EnergyPlus::format("Design Size Speed {} Evaporative Condenser Air Flow Rate [m3/s]", Mode), + std::format("Design Size Speed {} Evaporative Condenser Air Flow Rate [m3/s]", Mode), MSEvapCondAirFlowDes, - EnergyPlus::format("User-Specified Speed {} Evaporative Condenser Air Flow Rate [m3/s]", Mode), + std::format("User-Specified Speed {} Evaporative Condenser Air Flow Rate [m3/s]", Mode), MSEvapCondAirFlowUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MSEvapCondAirFlowDes - MSEvapCondAirFlowUser) / MSEvapCondAirFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeDxCoil: Potential issue with equipment sizing for {} {}", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("SizeDxCoil: Potential issue with equipment sizing for {} {}", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Evaporative Condenser Air Flow Rate of {:.5R} [m3/s]", MSEvapCondAirFlowUser)); @@ -8378,14 +8327,13 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) // Ensure evaporative condenser airflow rate at lower speed must be lower or equal to one at higher speed. for (Mode = 1; Mode <= thisDXCoil.NumOfSpeeds - 1; ++Mode) { if (thisDXCoil.MSEvapCondAirFlow(Mode) > thisDXCoil.MSEvapCondAirFlow(Mode + 1)) { - ShowWarningError( - state, - EnergyPlus::format("SizeDXCoil: {} {}, Speed {} Evaporative Condenser Air Flow Rate must be less than or equal to Speed {} " - "Evaporative Condenser Air Flow Rate.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - Mode, - Mode + 1)); + ShowWarningError(state, + std::format("SizeDXCoil: {} {}, Speed {} Evaporative Condenser Air Flow Rate must be less than or equal to Speed {} " + "Evaporative Condenser Air Flow Rate.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + Mode, + Mode + 1)); ShowContinueError( state, EnergyPlus::format("Instead, {:.2R} > {:.2R}", thisDXCoil.MSEvapCondAirFlow(Mode), thisDXCoil.MSEvapCondAirFlow(Mode + 1))); @@ -8413,26 +8361,25 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) BaseSizer::reportSizerOutput(state, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name, - EnergyPlus::format("Design Size Speed {} Rated Evaporative Condenser Pump Power Consumption [W]", Mode), + std::format("Design Size Speed {} Rated Evaporative Condenser Pump Power Consumption [W]", Mode), MSEvapCondPumpElecNomPowerDes); } else { if (thisDXCoil.MSEvapCondPumpElecNomPower(Mode) > 0.0 && MSEvapCondPumpElecNomPowerDes > 0.0 && !HardSizeNoDesRun) { MSEvapCondPumpElecNomPowerUser = thisDXCoil.MSEvapCondPumpElecNomPower(Mode); - BaseSizer::reportSizerOutput( - state, - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - EnergyPlus::format("Design Size Speed {} Rated Evaporative Condenser Pump Power Consumption [W]", Mode), - MSEvapCondPumpElecNomPowerDes, - EnergyPlus::format("User-Specified Speed {} Rated Evaporative Condenser Pump Power Consumption [W]", Mode), - MSEvapCondPumpElecNomPowerUser); + BaseSizer::reportSizerOutput(state, + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + std::format("Design Size Speed {} Rated Evaporative Condenser Pump Power Consumption [W]", Mode), + MSEvapCondPumpElecNomPowerDes, + std::format("User-Specified Speed {} Rated Evaporative Condenser Pump Power Consumption [W]", Mode), + MSEvapCondPumpElecNomPowerUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MSEvapCondPumpElecNomPowerDes - MSEvapCondPumpElecNomPowerUser) / MSEvapCondPumpElecNomPowerUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeDxCoil: Potential issue with equipment sizing for {} {}", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("SizeDxCoil: Potential issue with equipment sizing for {} {}", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Evaporative Condenser Pump Rated Power Consumption of {:.2R} [W]", MSEvapCondPumpElecNomPowerUser)); @@ -8451,14 +8398,13 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) // Ensure evaporative condenser pump power at lower speed must be lower or equal to one at higher speed. for (Mode = 1; Mode <= thisDXCoil.NumOfSpeeds - 1; ++Mode) { if (thisDXCoil.MSEvapCondPumpElecNomPower(Mode) > thisDXCoil.MSEvapCondPumpElecNomPower(Mode + 1)) { - ShowWarningError( - state, - EnergyPlus::format("SizeDXCoil: {} {}, Speed {} Rated Evaporative Condenser Pump Power Consumption must be less than or " - "equal to Speed {} Rated Evaporative Condenser Pump Power Consumption.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - Mode, - Mode + 1)); + ShowWarningError(state, + std::format("SizeDXCoil: {} {}, Speed {} Rated Evaporative Condenser Pump Power Consumption must be less than or " + "equal to Speed {} Rated Evaporative Condenser Pump Power Consumption.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + Mode, + Mode + 1)); ShowContinueError(state, EnergyPlus::format("Instead, {:.2R} > {:.2R}", thisDXCoil.MSEvapCondPumpElecNomPower(Mode), @@ -8535,11 +8481,11 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) if (thisDXCoil.MSRatedAirVolFlowRate(Mode) > thisDXCoil.MSRatedAirVolFlowRate(Mode + 1)) { ShowWarningError( state, - EnergyPlus::format("SizeDXCoil: {} {}, Speed {} Rated Air Flow Rate must be less than or equal to Speed {} Rated Air Flow Rate.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - Mode, - Mode + 1)); + std::format("SizeDXCoil: {} {}, Speed {} Rated Air Flow Rate must be less than or equal to Speed {} Rated Air Flow Rate.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + Mode, + Mode + 1)); ShowContinueError(state, EnergyPlus::format("Instead, {:.2R} > {:.2R}", thisDXCoil.MSRatedAirVolFlowRate(Mode), @@ -8561,7 +8507,7 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) BaseSizer::reportSizerOutput(state, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name, - EnergyPlus::format("Design Size Speed {} Secondary Coil Air Flow Rate [m3/s]", Mode), + std::format("Design Size Speed {} Secondary Coil Air Flow Rate [m3/s]", Mode), SecCoilAirFlowDes); } else { if (thisDXCoil.MSSecCoilAirFlow(Mode) > 0.0 && SecCoilAirFlowDes > 0.0 && !HardSizeNoDesRun) { @@ -8569,16 +8515,16 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) BaseSizer::reportSizerOutput(state, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name, - EnergyPlus::format("Design Size Speed {} Secondary Coil Air Flow Rate [m3/s]", Mode), + std::format("Design Size Speed {} Secondary Coil Air Flow Rate [m3/s]", Mode), SecCoilAirFlowDes, - EnergyPlus::format("User-Specified Speed {} Secondary Coil Air Flow Rate [m3/s]", Mode), + std::format("User-Specified Speed {} Secondary Coil Air Flow Rate [m3/s]", Mode), SecCoilAirFlowUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(SecCoilAirFlowDes - SecCoilAirFlowUser) / SecCoilAirFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeDxCoil: Potential issue with equipment sizing for {} {}", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("SizeDxCoil: Potential issue with equipment sizing for {} {}", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Secondary Coil Air Flow Rate of {:.5R} [m3/s]", SecCoilAirFlowUser)); ShowContinueError( @@ -8676,14 +8622,13 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) // Ensure capacity at lower speed must be lower or equal to the capacity at higher speed. for (Mode = 1; Mode <= thisDXCoil.NumOfSpeeds - 1; ++Mode) { if (thisDXCoil.MSRatedTotCap(Mode) > thisDXCoil.MSRatedTotCap(Mode + 1)) { - ShowWarningError( - state, - EnergyPlus::format("SizeDXCoil: {} {}, Speed {} Rated Total Heating Capacity must be less than or equal to Speed {} Rated " - "Total Heating Capacity.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - Mode, - Mode + 1)); + ShowWarningError(state, + std::format("SizeDXCoil: {} {}, Speed {} Rated Total Heating Capacity must be less than or equal to Speed {} Rated " + "Total Heating Capacity.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + Mode, + Mode + 1)); ShowContinueError(state, EnergyPlus::format("Instead, {:.2R} > {:.2R}", thisDXCoil.MSRatedTotCap(Mode), thisDXCoil.MSRatedTotCap(Mode + 1))); ShowFatalError(state, "Preceding conditions cause termination."); @@ -8721,9 +8666,9 @@ void SizeDXCoil(EnergyPlusData &state, int const DXCoilNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(DefrostCapacityDes - DefrostCapacityUser) / DefrostCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowWarningMessage(state, - EnergyPlus::format("SizeDxCoil: Potential issue with equipment sizing for {} {}", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("SizeDxCoil: Potential issue with equipment sizing for {} {}", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Resistive Defrost Heater Capacity of {:.2R}[W]", DefrostCapacityUser)); ShowContinueError( @@ -8999,27 +8944,25 @@ void CalcHPWHDXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (HeatCapFTemp < 0.0) { if (Coil.HCapFTempErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", HVAC::coilTypeNames[(int)Coil.coilType], Coil.Name)); + ShowWarningMessage(state, std::format("{} \"{}\":", HVAC::coilTypeNames[(int)Coil.coilType], Coil.Name)); ShowContinueError( - state, - EnergyPlus::format(" HPWH Heating Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", HeatCapFTemp)); + state, std::format(" HPWH Heating Capacity Modifier curve (function of temperature) output is negative ({:.3f}).", HeatCapFTemp)); if (state.dataCurveManager->curves(Coil.HCapFTemp)->numDims == 2) { - ShowContinueError(state, - EnergyPlus::format( - " Negative value occurs using an inlet air temperature of {:.1T} and an inlet water temperature of {:.1T}.", - InletAirTemp, - InletWaterTemp)); + ShowContinueError( + state, + std::format(" Negative value occurs using an inlet air temperature of {:.1f} and an inlet water temperature of {:.1f}.", + InletAirTemp, + InletWaterTemp)); } else { - ShowContinueError(state, EnergyPlus::format(" Negative value occurs using an inlet air temperature of {:.1T}.", InletAirTemp)); + ShowContinueError(state, std::format(" Negative value occurs using an inlet air temperature of {:.1f}.", InletAirTemp)); } ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{} \"{}\": HPWH Heating Capacity Modifier curve (function of temperature) output is negative warning continues...", - HVAC::coilTypeNames[(int)Coil.coilType], - Coil.Name), + std::format("{} \"{}\": HPWH Heating Capacity Modifier curve (function of temperature) output is negative warning continues...", + HVAC::coilTypeNames[(int)Coil.coilType], + Coil.Name), Coil.HCapFTempErrorIndex, HeatCapFTemp, HeatCapFTemp, @@ -9041,26 +8984,25 @@ void CalcHPWHDXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (HeatCOPFTemp < 0.0) { if (Coil.HCOPFTempErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", HVAC::coilTypeNames[(int)Coil.coilType], Coil.Name)); + ShowWarningMessage(state, std::format("{} \"{}\":", HVAC::coilTypeNames[(int)Coil.coilType], Coil.Name)); ShowContinueError( - state, - EnergyPlus::format(" HPWH Heating COP Modifier curve (function of temperature) output is negative ({:.3T}).", HeatCOPFTemp)); + state, std::format(" HPWH Heating COP Modifier curve (function of temperature) output is negative ({:.3f}).", HeatCOPFTemp)); if (state.dataCurveManager->curves(Coil.HCOPFTemp)->numDims == 2) { - ShowContinueError(state, - EnergyPlus::format( - " Negative value occurs using an inlet air temperature of {:.1T} and an inlet water temperature of {:.1T}.", - InletAirTemp, - InletWaterTemp)); + ShowContinueError( + state, + std::format(" Negative value occurs using an inlet air temperature of {:.1f} and an inlet water temperature of {:.1f}.", + InletAirTemp, + InletWaterTemp)); } else { - ShowContinueError(state, EnergyPlus::format(" Negative value occurs using an inlet air temperature of {:.1T}.", InletAirTemp)); + ShowContinueError(state, std::format(" Negative value occurs using an inlet air temperature of {:.1f}.", InletAirTemp)); } ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\": HPWH Heating COP Modifier curve (function of temperature) output is negative warning continues...", - HVAC::coilTypeNames[(int)Coil.coilType], - Coil.Name), + std::format("{} \"{}\": HPWH Heating COP Modifier curve (function of temperature) output is negative warning continues...", + HVAC::coilTypeNames[(int)Coil.coilType], + Coil.Name), Coil.HCOPFTempErrorIndex, HeatCOPFTemp, HeatCOPFTemp, @@ -9079,20 +9021,18 @@ void CalcHPWHDXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (HeatCapFAirFlow < 0.0) { if (Coil.HCapFAirFlowErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", HVAC::coilTypeNames[(int)Coil.coilType], Coil.Name)); - ShowContinueError( - state, - EnergyPlus::format(" HPWH Heating Capacity Modifier curve (function of air flow fraction) output is negative ({:.3T}).", - HeatCapFAirFlow)); - ShowContinueError(state, EnergyPlus::format(" Negative value occurs using an air flow fraction of {:.3T}.", AirFlowRateRatio)); + ShowWarningMessage(state, std::format("{} \"{}\":", HVAC::coilTypeNames[(int)Coil.coilType], Coil.Name)); + ShowContinueError(state, + std::format(" HPWH Heating Capacity Modifier curve (function of air flow fraction) output is negative ({:.3f}).", + HeatCapFAirFlow)); + ShowContinueError(state, std::format(" Negative value occurs using an air flow fraction of {:.3f}.", AirFlowRateRatio)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{} \"{}\": HPWH Heating Capacity Modifier curve (function of air flow fraction) output is negative warning continues...", - HVAC::coilTypeNames[(int)Coil.coilType], - Coil.Name), + std::format("{} \"{}\": HPWH Heating Capacity Modifier curve (function of air flow fraction) output is negative warning continues...", + HVAC::coilTypeNames[(int)Coil.coilType], + Coil.Name), Coil.HCapFAirFlowErrorIndex, HeatCapFAirFlow, @@ -9109,19 +9049,18 @@ void CalcHPWHDXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (HeatCOPFAirFlow < 0.0) { if (Coil.HCOPFAirFlowErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", HVAC::coilTypeNames[(int)Coil.coilType], Coil.Name)); - ShowContinueError(state, - EnergyPlus::format(" HPWH Heating COP Modifier curve (function of air flow fraction) output is negative ({:.3T}).", - HeatCOPFAirFlow)); - ShowContinueError(state, EnergyPlus::format(" Negative value occurs using an air flow fraction of {:.3T}.", AirFlowRateRatio)); + ShowWarningMessage(state, std::format("{} \"{}\":", HVAC::coilTypeNames[(int)Coil.coilType], Coil.Name)); + ShowContinueError( + state, + std::format(" HPWH Heating COP Modifier curve (function of air flow fraction) output is negative ({:.3f}).", HeatCOPFAirFlow)); + ShowContinueError(state, std::format(" Negative value occurs using an air flow fraction of {:.3f}.", AirFlowRateRatio)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{} \"{}\": HPWH Heating COP Modifier curve (function of air flow fraction) output is negative warning continues...", - HVAC::coilTypeNames[(int)Coil.coilType], - Coil.Name), + std::format("{} \"{}\": HPWH Heating COP Modifier curve (function of air flow fraction) output is negative warning continues...", + HVAC::coilTypeNames[(int)Coil.coilType], + Coil.Name), Coil.HCOPFAirFlowErrorIndex, HeatCOPFAirFlow, HeatCOPFAirFlow); @@ -9137,17 +9076,16 @@ void CalcHPWHDXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (HeatCapFWaterFlow < 0.0) { if (Coil.HCapFWaterFlowErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", HVAC::coilTypeNames[(int)Coil.coilType], Coil.Name)); - ShowContinueError( - state, - EnergyPlus::format(" HPWH Heating Capacity Modifier curve (function of water flow fraction) output is negative ({:.3T}).", - HeatCapFWaterFlow)); - ShowContinueError(state, EnergyPlus::format(" Negative value occurs using a water flow fraction of {:.3T}.", WaterFlowRateRatio)); + ShowWarningMessage(state, std::format("{} \"{}\":", HVAC::coilTypeNames[(int)Coil.coilType], Coil.Name)); + ShowContinueError(state, + std::format(" HPWH Heating Capacity Modifier curve (function of water flow fraction) output is negative ({:.3f}).", + HeatCapFWaterFlow)); + ShowContinueError(state, std::format(" Negative value occurs using a water flow fraction of {:.3f}.", WaterFlowRateRatio)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\": HPWH Heating Capacity Modifier curve (function of water flow fraction) output is negative warning continues...", HVAC::coilTypeNames[(int)Coil.coilType], Coil.Name), @@ -9166,20 +9104,18 @@ void CalcHPWHDXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (HeatCOPFWaterFlow < 0.0) { if (Coil.HCOPFWaterFlowErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", HVAC::coilTypeNames[(int)Coil.coilType], Coil.Name)); - ShowContinueError( - state, - EnergyPlus::format(" HPWH Heating COP Modifier curve (function of water flow fraction) output is negative ({:.3T}).", - HeatCOPFWaterFlow)); - ShowContinueError(state, EnergyPlus::format(" Negative value occurs using a water flow fraction of {:.3T}.", WaterFlowRateRatio)); + ShowWarningMessage(state, std::format("{} \"{}\":", HVAC::coilTypeNames[(int)Coil.coilType], Coil.Name)); + ShowContinueError(state, + std::format(" HPWH Heating COP Modifier curve (function of water flow fraction) output is negative ({:.3f}).", + HeatCOPFWaterFlow)); + ShowContinueError(state, std::format(" Negative value occurs using a water flow fraction of {:.3f}.", WaterFlowRateRatio)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{} \"{}\": HPWH Heating COP Modifier curve (function of water flow fraction) output is negative warning continues...", - HVAC::coilTypeNames[(int)Coil.coilType], - Coil.Name), + std::format("{} \"{}\": HPWH Heating COP Modifier curve (function of water flow fraction) output is negative warning continues...", + HVAC::coilTypeNames[(int)Coil.coilType], + Coil.Name), Coil.HCOPFWaterFlowErrorIndex, HeatCOPFWaterFlow, HeatCOPFWaterFlow); @@ -9546,17 +9482,17 @@ void CalcDoe2DXCoil(EnergyPlusData &state, if (thisDXCoil.PrintLowAmbMessage) { // .AND. & if (state.dataDXCoils->CurrentEndTime > thisDXCoil.CurrentEndTimeLast && TimeStepSys >= thisDXCoil.TimeStepSysLast) { if (thisDXCoil.LowAmbErrIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{}{}", RoutineName, thisDXCoil.LowAmbBuffer1)); + ShowWarningMessage(state, std::format("{}{}", RoutineName, thisDXCoil.LowAmbBuffer1)); ShowContinueError(state, thisDXCoil.LowAmbBuffer2); ShowContinueError(state, "... Operation at low ambient temperatures may require special performance curves."); } if (thisDXCoil.CondenserType(Mode) == DataHeatBalance::RefrigCondenserType::Air) { ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{}{}=\"{}\" - Low condenser dry-bulb temperature error continues...", + std::format("{}{}=\"{}\" - Low condenser dry-bulb temperature error continues...", - RoutineName, - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name), + RoutineName, + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name), thisDXCoil.LowAmbErrIndex, thisDXCoil.LowTempLast, thisDXCoil.LowTempLast, @@ -9565,10 +9501,10 @@ void CalcDoe2DXCoil(EnergyPlusData &state, "[C]"); } else { ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{}{}=\"{}\" - Low condenser wet-bulb temperature error continues...", - RoutineName, - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name), + std::format("{}{}=\"{}\" - Low condenser wet-bulb temperature error continues...", + RoutineName, + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name), thisDXCoil.LowAmbErrIndex, thisDXCoil.LowTempLast, thisDXCoil.LowTempLast, @@ -9582,23 +9518,23 @@ void CalcDoe2DXCoil(EnergyPlusData &state, if (thisDXCoil.PrintLowOutTempMessage) { if (state.dataDXCoils->CurrentEndTime > thisDXCoil.CurrentEndTimeLast && TimeStepSys >= thisDXCoil.TimeStepSysLast) { if (thisDXCoil.LowOutletTempIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{}{}", RoutineName, thisDXCoil.LowOutTempBuffer1)); + ShowWarningMessage(state, std::format("{}{}", RoutineName, thisDXCoil.LowOutTempBuffer1)); ShowContinueError(state, thisDXCoil.LowOutTempBuffer2); ShowContinueError(state, "... Possible reasons for low outlet air dry-bulb temperatures are: This DX coil"); ShowContinueError(state, - EnergyPlus::format(" 1) may have a low inlet air dry-bulb temperature. Inlet air temperature = {:.3T} C.", - thisDXCoil.FullLoadInletAirTempLast)); + std::format(" 1) may have a low inlet air dry-bulb temperature. Inlet air temperature = {:.3f} C.", + thisDXCoil.FullLoadInletAirTempLast)); ShowContinueError(state, " 2) may have a low air flow rate per watt of cooling capacity. Check inputs."); ShowContinueError(state, " 3) is used as part of a HX assisted cooling coil which uses a high sensible effectiveness. Check inputs."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{}{}=\"{}\" - Full load outlet temperature indicates a possibility of frost/freeze error continues. " - "Outlet air temperature statistics follow:", - RoutineName, - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name), + std::format("{}{}=\"{}\" - Full load outlet temperature indicates a possibility of frost/freeze error continues. " + "Outlet air temperature statistics follow:", + RoutineName, + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name), thisDXCoil.LowOutletTempIndex, thisDXCoil.FullLoadOutAirTempLast, thisDXCoil.FullLoadOutAirTempLast); @@ -9633,10 +9569,10 @@ void CalcDoe2DXCoil(EnergyPlusData &state, // AirVolumeFlowRate = AirMassFlow/ PsyRhoAirFnPbTdbW(InletAirPressure,InletAirDryBulbTemp, InletAirHumRat) if (thisDXCoil.RatedTotCap(Mode) <= 0.0) { ShowFatalError(state, - EnergyPlus::format("{}{}=\"{}\" - Rated total cooling capacity is zero or less.", - RoutineName, - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("{}{}=\"{}\" - Rated total cooling capacity is zero or less.", + RoutineName, + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); } if (thisDXCoil.coilType == HVAC::CoilType::WaterHeatingDXPumped || thisDXCoil.coilType == HVAC::CoilType::WaterHeatingDXWrapped) { VolFlowperRatedTotCap = AirVolumeFlowRate / thisDXCoil.RatedTotCap2; @@ -9666,10 +9602,10 @@ void CalcDoe2DXCoil(EnergyPlusData &state, } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{}{}=\"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range error continues...", - RoutineName, - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name), + std::format("{}{}=\"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range error continues...", + RoutineName, + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name), thisDXCoil.ErrIndex1, VolFlowperRatedTotCap, VolFlowperRatedTotCap); @@ -9697,11 +9633,10 @@ void CalcDoe2DXCoil(EnergyPlusData &state, } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{}{}=\"{}\" - Air volume flow rate per watt of rated total water heating capacity is out of range error continues...", - RoutineName, - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name), + std::format("{}{}=\"{}\" - Air volume flow rate per watt of rated total water heating capacity is out of range error continues...", + RoutineName, + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name), thisDXCoil.ErrIndex1, VolFlowperRatedTotCap, VolFlowperRatedTotCap); @@ -9772,32 +9707,29 @@ void CalcDoe2DXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (TotCapTempModFac < 0.0) { if (thisDXCoil.CCapFTempErrorIndex == 0) { - ShowWarningMessage( - state, EnergyPlus::format("{}{} \"{}\":", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); - ShowContinueError( - state, - EnergyPlus::format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", - TotCapTempModFac)); + ShowWarningMessage(state, + std::format("{}{} \"{}\":", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + ShowContinueError(state, + std::format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3f}).", + TotCapTempModFac)); if (state.dataCurveManager->curves(thisDXCoil.CCapFTemp(Mode))->numDims == 2) { - ShowContinueError( - state, - EnergyPlus::format(" Negative value occurs using a condenser inlet air temperature of {:.1T} and an inlet air " - "wet-bulb temperature of {:.1T}.", - CondInletTemp, - InletAirWetBulbC)); + ShowContinueError(state, + std::format(" Negative value occurs using a condenser inlet air temperature of {:.1f} and an inlet air " + "wet-bulb temperature of {:.1f}.", + CondInletTemp, + InletAirWetBulbC)); } else { ShowContinueError( - state, - EnergyPlus::format(" Negative value occurs using a condenser inlet air temperature of {:.1T}.", CondInletTemp)); + state, std::format(" Negative value occurs using a condenser inlet air temperature of {:.1f}.", CondInletTemp)); } if (Mode > 1) { - ShowContinueError(state, EnergyPlus::format(" Negative output results from stage {} compressor operation.", Mode)); + ShowContinueError(state, std::format(" Negative output results from stage {} compressor operation.", Mode)); } ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\": Total Cooling Capacity Modifier curve (function of temperature) output is negative warning continues...", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], @@ -9813,22 +9745,21 @@ void CalcDoe2DXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (TotCapFlowModFac < 0.0) { if (thisDXCoil.CCapFFlowErrorIndex == 0) { - ShowWarningMessage( - state, EnergyPlus::format("{}{} \"{}\":", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + ShowWarningMessage(state, + std::format("{}{} \"{}\":", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); ShowContinueError( state, - EnergyPlus::format(" Total Cooling Capacity Modifier curve (function of flow fraction) output is negative ({:.3T}).", - TotCapFlowModFac)); - ShowContinueError(state, - EnergyPlus::format(" Negative value occurs using an air flow fraction of {:.3T}.", AirMassFlowRatio)); + std::format(" Total Cooling Capacity Modifier curve (function of flow fraction) output is negative ({:.3f}).", + TotCapFlowModFac)); + ShowContinueError(state, std::format(" Negative value occurs using an air flow fraction of {:.3f}.", AirMassFlowRatio)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); if (Mode > 1) { - ShowContinueError(state, EnergyPlus::format(" Negative output results from stage {} compressor operation.", Mode)); + ShowContinueError(state, std::format(" Negative output results from stage {} compressor operation.", Mode)); } } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\": Total Cooling Capacity Modifier curve (function of flow fraction) output is negative warning continues...", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], @@ -9898,36 +9829,34 @@ void CalcDoe2DXCoil(EnergyPlusData &state, if (thisDXCoil.coilType == HVAC::CoilType::WaterHeatingDXPumped || thisDXCoil.coilType == HVAC::CoilType::WaterHeatingDXWrapped) { ShowWarningMessage( state, - EnergyPlus::format( - "{}{}=\"{}\", PLF curve value", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("The PLF curve value = {:.3T} for part-load ratio = {:.3T}", PLF, PartLoadRatio)); + std::format("{}{}=\"{}\", PLF curve value", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + ShowContinueError(state, std::format("The PLF curve value = {:.3f} for part-load ratio = {:.3f}", PLF, PartLoadRatio)); ShowContinueErrorTimeStamp(state, "PLF curve values must be >= 0.7. PLF has been reset to 0.7 and simulation is continuing."); - ShowContinueError(state, - EnergyPlus::format("Check the IO reference manual for PLF curve guidance [{}].", - HVAC::coilTypeNames[(int)thisDXCoil.coilType])); + ShowContinueError( + state, + std::format("Check the IO reference manual for PLF curve guidance [{}].", HVAC::coilTypeNames[(int)thisDXCoil.coilType])); } else { ShowWarningMessage( state, - EnergyPlus::format( - "{}{}=\"{}\", PLF curve value", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("The PLF curve value = {:.3T} for part-load ratio = {:.3T}", PLF, PartLoadRatio)); + std::format("{}{}=\"{}\", PLF curve value", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + ShowContinueError(state, std::format("The PLF curve value = {:.3f} for part-load ratio = {:.3f}", PLF, PartLoadRatio)); ShowContinueErrorTimeStamp(state, "PLF curve values must be >= 0.7. PLF has been reset to 0.7 and simulation is continuing."); - ShowContinueError(state, - EnergyPlus::format("Check the IO reference manual for PLF curve guidance [{}].", - HVAC::coilTypeNames[(int)thisDXCoil.coilType])); + ShowContinueError( + state, + std::format("Check the IO reference manual for PLF curve guidance [{}].", HVAC::coilTypeNames[(int)thisDXCoil.coilType])); } } if (thisDXCoil.coilType == HVAC::CoilType::WaterHeatingDXPumped || thisDXCoil.coilType == HVAC::CoilType::WaterHeatingDXWrapped) { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{}, {} PLF curve < 0.7 warning continues...", thisDXCoil.Name, HVAC::coilTypeNames[(int)thisDXCoil.coilType]), + std::format("{}, {} PLF curve < 0.7 warning continues...", thisDXCoil.Name, HVAC::coilTypeNames[(int)thisDXCoil.coilType]), thisDXCoil.ErrIndex2, PLF, PLF); } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{}, {} PLF curve < 0.7 warning continues...", thisDXCoil.Name, HVAC::coilTypeNames[(int)thisDXCoil.coilType]), + std::format("{}, {} PLF curve < 0.7 warning continues...", thisDXCoil.Name, HVAC::coilTypeNames[(int)thisDXCoil.coilType]), thisDXCoil.ErrIndex2, PLF, PLF); @@ -9942,45 +9871,41 @@ void CalcDoe2DXCoil(EnergyPlusData &state, if (thisDXCoil.coilType == HVAC::CoilType::WaterHeatingDXPumped || thisDXCoil.coilType == HVAC::CoilType::WaterHeatingDXWrapped) { ShowWarningMessage( state, - EnergyPlus::format( - "{}{}=\"{}\", runtime fraction", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + std::format("{}{}=\"{}\", runtime fraction", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); ShowWarningMessage(state, EnergyPlus::format("The runtime fraction exceeded 1.0. [{:.4R}].", thisDXCoil.CoolingCoilRuntimeFraction)); ShowContinueError(state, "Runtime fraction reset to 1 and the simulation will continue."); - ShowContinueError(state, - EnergyPlus::format("Check the IO reference manual for PLF curve guidance [{}].", - HVAC::coilTypeNames[(int)thisDXCoil.coilType])); + ShowContinueError( + state, + std::format("Check the IO reference manual for PLF curve guidance [{}].", HVAC::coilTypeNames[(int)thisDXCoil.coilType])); ShowContinueErrorTimeStamp(state, ""); } else { ShowWarningMessage( state, - EnergyPlus::format( - "{}{}=\"{}\", runtime fraction", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + std::format("{}{}=\"{}\", runtime fraction", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); ShowWarningMessage(state, EnergyPlus::format("The runtime fraction exceeded 1.0. [{:.4R}].", thisDXCoil.CoolingCoilRuntimeFraction)); ShowContinueError(state, "Runtime fraction reset to 1 and the simulation will continue."); - ShowContinueError(state, - EnergyPlus::format("Check the IO reference manual for PLF curve guidance [{}].", - HVAC::coilTypeNames[(int)thisDXCoil.coilType])); + ShowContinueError( + state, + std::format("Check the IO reference manual for PLF curve guidance [{}].", HVAC::coilTypeNames[(int)thisDXCoil.coilType])); ShowContinueErrorTimeStamp(state, ""); } } if (thisDXCoil.coilType == HVAC::CoilType::WaterHeatingDXPumped || thisDXCoil.coilType == HVAC::CoilType::WaterHeatingDXWrapped) { - ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{}, {} runtime fraction > 1.0 warning continues...", - thisDXCoil.Name, - HVAC::coilTypeNames[(int)thisDXCoil.coilType]), - thisDXCoil.ErrIndex3, - thisDXCoil.CoolingCoilRuntimeFraction, - thisDXCoil.CoolingCoilRuntimeFraction); + ShowRecurringWarningErrorAtEnd( + state, + std::format("{}, {} runtime fraction > 1.0 warning continues...", thisDXCoil.Name, HVAC::coilTypeNames[(int)thisDXCoil.coilType]), + thisDXCoil.ErrIndex3, + thisDXCoil.CoolingCoilRuntimeFraction, + thisDXCoil.CoolingCoilRuntimeFraction); } else { - ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{}, {} runtime fraction > 1.0 warning continues...", - thisDXCoil.Name, - HVAC::coilTypeNames[(int)thisDXCoil.coilType]), - thisDXCoil.ErrIndex3, - thisDXCoil.CoolingCoilRuntimeFraction, - thisDXCoil.CoolingCoilRuntimeFraction); + ShowRecurringWarningErrorAtEnd( + state, + std::format("{}, {} runtime fraction > 1.0 warning continues...", thisDXCoil.Name, HVAC::coilTypeNames[(int)thisDXCoil.coilType]), + thisDXCoil.ErrIndex3, + thisDXCoil.CoolingCoilRuntimeFraction, + thisDXCoil.CoolingCoilRuntimeFraction); } thisDXCoil.CoolingCoilRuntimeFraction = 1.0; // Reset coil runtime fraction to 1.0 } else if (thisDXCoil.CoolingCoilRuntimeFraction > 1.0) { @@ -10197,34 +10122,32 @@ void CalcDoe2DXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (EIRTempModFac < 0.0) { if (thisDXCoil.EIRFTempErrorIndex == 0) { - ShowWarningMessage( - state, EnergyPlus::format("{}{}=\"{}\":", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format(" Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3T}).", - EIRTempModFac)); + ShowWarningMessage(state, + std::format("{}{}=\"{}\":", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + ShowContinueError( + state, + std::format(" Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3f}).", EIRTempModFac)); if (state.dataCurveManager->curves(thisDXCoil.EIRFTemp(Mode))->numDims == 2) { - ShowContinueError( - state, - EnergyPlus::format(" Negative value occurs using a condenser inlet air temperature of {:.1T} and an inlet air " - "wet-bulb temperature of {:.1T}.", - CondInletTemp, - InletAirWetBulbC)); + ShowContinueError(state, + std::format(" Negative value occurs using a condenser inlet air temperature of {:.1f} and an inlet air " + "wet-bulb temperature of {:.1f}.", + CondInletTemp, + InletAirWetBulbC)); } else { - ShowContinueError( - state, EnergyPlus::format(" Negative value occurs using a condenser inlet air temperature of {:.1T}.", CondInletTemp)); + ShowContinueError(state, + std::format(" Negative value occurs using a condenser inlet air temperature of {:.1f}.", CondInletTemp)); } if (Mode > 1) { - ShowContinueError(state, EnergyPlus::format(" Negative output results from stage {} compressor operation.", Mode)); + ShowContinueError(state, std::format(" Negative output results from stage {} compressor operation.", Mode)); } ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{}{}=\"{}\": Energy Input Ratio Modifier curve (function of temperature) output is negative warning continues...", - RoutineName, - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name), + std::format("{}{}=\"{}\": Energy Input Ratio Modifier curve (function of temperature) output is negative warning continues...", + RoutineName, + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name), thisDXCoil.EIRFTempErrorIndex, EIRTempModFac, @@ -10237,25 +10160,23 @@ void CalcDoe2DXCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (EIRFlowModFac < 0.0) { if (thisDXCoil.EIRFFlowErrorIndex == 0) { - ShowWarningMessage( - state, EnergyPlus::format("{}{}=\"{}\":", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + ShowWarningMessage(state, + std::format("{}{}=\"{}\":", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); ShowContinueError( state, - EnergyPlus::format(" Energy Input Ratio Modifier curve (function of flow fraction) output is negative ({:.3T}).", - EIRFlowModFac)); - ShowContinueError(state, EnergyPlus::format(" Negative value occurs using an air flow fraction of {:.3T}.", AirMassFlowRatio)); + std::format(" Energy Input Ratio Modifier curve (function of flow fraction) output is negative ({:.3f}).", EIRFlowModFac)); + ShowContinueError(state, std::format(" Negative value occurs using an air flow fraction of {:.3f}.", AirMassFlowRatio)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); if (Mode > 1) { - ShowContinueError(state, EnergyPlus::format(" Negative output results from stage {} compressor operation.", Mode)); + ShowContinueError(state, std::format(" Negative output results from stage {} compressor operation.", Mode)); } } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{}{}=\"{}\": Energy Input Ratio Modifier curve (function of flow fraction) output is negative warning continues...", - RoutineName, - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name), + std::format("{}{}=\"{}\": Energy Input Ratio Modifier curve (function of flow fraction) output is negative warning continues...", + RoutineName, + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name), thisDXCoil.EIRFFlowErrorIndex, EIRFlowModFac, EIRFlowModFac); @@ -10617,9 +10538,9 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, ShowContinueError(state, "... Operation at low inlet temperatures may require special performance curves."); } ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{} \"{}\" - Low condenser inlet temperature error continues...", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name), + std::format("{} \"{}\" - Low condenser inlet temperature error continues...", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name), thisDXCoil.LowAmbErrIndex, thisDXCoil.LowTempLast, thisDXCoil.LowTempLast, @@ -10637,9 +10558,9 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, ShowContinueError(state, "... Operation at high inlet temperatures may require special performance curves."); } ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{} \"{}\" - High condenser inlet temperature error continues...", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name), + std::format("{} \"{}\" - High condenser inlet temperature error continues...", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name), thisDXCoil.HighAmbErrIndex, thisDXCoil.HighTempLast, thisDXCoil.HighTempLast, @@ -10656,18 +10577,18 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, ShowContinueError(state, thisDXCoil.LowOutTempBuffer2); ShowContinueError(state, "... Possible reasons for low outlet air dry-bulb temperatures are: This DX coil"); ShowContinueError(state, - EnergyPlus::format(" 1) may have a low inlet air dry-bulb temperature. Inlet air temperature = {:.3T} C.", - thisDXCoil.FullLoadInletAirTempLast)); + std::format(" 1) may have a low inlet air dry-bulb temperature. Inlet air temperature = {:.3f} C.", + thisDXCoil.FullLoadInletAirTempLast)); ShowContinueError(state, " 2) may have a low air flow rate per watt of cooling capacity. Check inputs."); ShowContinueError(state, " 3) is used as part of a HX assisted cooling coil which uses a high sensible effectiveness. Check inputs."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Full load outlet temperature indicates a possibility of frost/freeze error continues. " - "Outlet air temperature statistics follow:", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name), + std::format("{} \"{}\" - Full load outlet temperature indicates a possibility of frost/freeze error continues. " + "Outlet air temperature statistics follow:", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name), thisDXCoil.LowOutletTempIndex, thisDXCoil.FullLoadOutAirTempLast, thisDXCoil.FullLoadOutAirTempLast); @@ -10701,9 +10622,9 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, if (thisDXCoil.RatedTotCap(Mode) <= 0.0) { ShowFatalError(state, - EnergyPlus::format("{} \"{}\" - Rated total cooling capacity is zero or less.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("{} \"{}\" - Rated total cooling capacity is zero or less.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); } if (!FirstHVACIteration && !state.dataGlobal->WarmupFlag && @@ -10740,9 +10661,9 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range error continues...", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name), + std::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range error continues...", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name), thisDXCoil.ErrIndex1, VolFlowperRatedTotCap, VolFlowperRatedTotCap); @@ -10813,27 +10734,26 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (TotCapTempModFac < 0.0) { if (thisDXCoil.CCapFTempErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); - ShowContinueError(state, - EnergyPlus::format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", - TotCapTempModFac)); + ShowWarningMessage(state, std::format("{} \"{}\":", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); ShowContinueError( state, - EnergyPlus::format( - " Negative value occurs using a condenser inlet temperature of {:.1T} and an inlet air wet-bulb temperature of {:.1T}.", + std::format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3f}).", TotCapTempModFac)); + ShowContinueError( + state, + std::format( + " Negative value occurs using a condenser inlet temperature of {:.1f} and an inlet air wet-bulb temperature of {:.1f}.", CondInletTemp, InletAirWetBulbC)); if (Mode > 1) { - ShowContinueError(state, EnergyPlus::format(" Negative output results from stage {} compressor operation.", Mode)); + ShowContinueError(state, std::format(" Negative output results from stage {} compressor operation.", Mode)); } ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{} \"{}\": Total Cooling Capacity Modifier curve (function of temperature) output is negative warning continues...", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name), + std::format("{} \"{}\": Total Cooling Capacity Modifier curve (function of temperature) output is negative warning continues...", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name), thisDXCoil.CCapFTempErrorIndex, TotCapTempModFac, TotCapTempModFac); @@ -10847,23 +10767,21 @@ void CalcVRFCoolingCoil(EnergyPlusData &state, // Warn user if curve output goes negative if (TotCapFlowModFac < 0.0) { if (thisDXCoil.CCapFFlowErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} \"{}\":", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + ShowWarningMessage(state, std::format("{} \"{}\":", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); ShowContinueError( state, - EnergyPlus::format(" Total Cooling Capacity Modifier curve (function of flow fraction) output is negative ({:.3T}).", - TotCapFlowModFac)); - ShowContinueError(state, EnergyPlus::format(" Negative value occurs using an air flow fraction of {:.3T}.", AirMassFlowRatio)); + std::format(" Total Cooling Capacity Modifier curve (function of flow fraction) output is negative ({:.3f}).", TotCapFlowModFac)); + ShowContinueError(state, std::format(" Negative value occurs using an air flow fraction of {:.3f}.", AirMassFlowRatio)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); if (Mode > 1) { - ShowContinueError(state, EnergyPlus::format(" Negative output results from stage {} compressor operation.", Mode)); + ShowContinueError(state, std::format(" Negative output results from stage {} compressor operation.", Mode)); } } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{} \"{}\": Total Cooling Capacity Modifier curve (function of flow fraction) output is negative warning continues...", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name), + std::format("{} \"{}\": Total Cooling Capacity Modifier curve (function of flow fraction) output is negative warning continues...", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name), thisDXCoil.CCapFFlowErrorIndex, TotCapFlowModFac, TotCapFlowModFac); @@ -11317,9 +11235,9 @@ void CalcDXHeatingCoil(EnergyPlusData &state, } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range error continues...", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name), + std::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range error continues...", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name), thisDXCoil.ErrIndex1, VolFlowperRatedTotCap, VolFlowperRatedTotCap); @@ -11371,8 +11289,8 @@ void CalcDXHeatingCoil(EnergyPlusData &state, "TotCapTempModFac curve value must be > 0. TotCapTempModFac curve value has been reset to 0.0 and " "simulation is continuing."); ShowContinueError(state, - EnergyPlus::format("Check the IO reference manual for TotCapTempModFac curve guidance [ {} ].", - HVAC::coilTypeNames[(int)thisDXCoil.coilType])); + std::format("Check the IO reference manual for TotCapTempModFac curve guidance [ {} ].", + HVAC::coilTypeNames[(int)thisDXCoil.coilType])); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, @@ -11416,9 +11334,9 @@ void CalcDXHeatingCoil(EnergyPlusData &state, if (thisDXCoil.FrostHeatingCapacityMultiplierEMSOverrideOn || thisDXCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { ShowWarningMessage( state, - EnergyPlus::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " - "actuator must be both provided for DX heating coil {}", - thisDXCoil.Name)); + std::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " + "actuator must be both provided for DX heating coil {}", + thisDXCoil.Name)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -11432,11 +11350,10 @@ void CalcDXHeatingCoil(EnergyPlusData &state, HeatingCapacityMultiplier = 0.875 * (1.0 - FractionalDefrostTime); InputPowerMultiplier = 0.954 * (1.0 - FractionalDefrostTime); if (thisDXCoil.FrostHeatingCapacityMultiplierEMSOverrideOn || thisDXCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { - ShowWarningMessage( - state, - EnergyPlus::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " - "actuator must be both provided for DX heating coil {}", - thisDXCoil.Name)); + ShowWarningMessage(state, + std::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " + "actuator must be both provided for DX heating coil {}", + thisDXCoil.Name)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -11515,8 +11432,8 @@ void CalcDXHeatingCoil(EnergyPlusData &state, ShowContinueError( state, "EIRTempModFac curve value must be > 0. EIRTempModFac curve value has been reset to 0.0 and simulation is continuing."); ShowContinueError(state, - EnergyPlus::format("Check the IO reference manual for EIRTempModFac curve guidance [ {} ].", - HVAC::coilTypeNames[(int)thisDXCoil.coilType])); + std::format("Check the IO reference manual for EIRTempModFac curve guidance [ {} ].", + HVAC::coilTypeNames[(int)thisDXCoil.coilType])); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, @@ -12316,7 +12233,7 @@ Real64 CalcCBF(EnergyPlusData &state, OutletAirTemp = PsyTdbFnHW(OutletAirEnthalpy, OutletAirHumRat); OutletAirDPTemp = PsyTdpFnWPb(state, OutletAirHumRat, DataEnvironment::StdPressureSeaLevel); if (OutletAirTemp < OutletAirDPTemp) { - ShowSevereError(state, EnergyPlus::format("For object = {}, name = \"{}\"", UnitType, UnitName)); + ShowSevereError(state, std::format("For object = {}, name = \"{}\"", UnitType, UnitName)); ShowContinueError(state, "Calculated outlet air temperature is lower than the dew point temperature at the same humidity ratio."); ShowContinueError(state, EnergyPlus::format("...Inlet Air Temperature = {:.2R} C", InletAirTemp)); ShowContinueError(state, EnergyPlus::format("...Outlet Air Temperature = {:.2R} C", OutletAirTemp)); @@ -12337,7 +12254,7 @@ Real64 CalcCBF(EnergyPlusData &state, // Pressure will have to be pass into this subroutine to fix this one OutletAirRH = PsyRhFnTdbWPb(state, OutletAirTemp, OutletAirHumRat, DataEnvironment::StdPressureSeaLevel, RoutineName); if (OutletAirRH >= 1.0 && PrintFlag) { - ShowWarningError(state, EnergyPlus::format("For object = {}, name = \"{}\"", UnitType, UnitName)); + ShowWarningError(state, std::format("For object = {}, name = \"{}\"", UnitType, UnitName)); ShowContinueError(state, "Calculated outlet air relative humidity greater than 1. The combination of"); ShowContinueError(state, "rated air volume flow rate, total cooling capacity and sensible heat ratio yields coil exiting"); ShowContinueError(state, "air conditions above the saturation curve. Possible fixes are to reduce the rated total cooling"); @@ -12375,7 +12292,7 @@ Real64 CalcCBF(EnergyPlusData &state, } DeltaT = InletAirTemp - OutletAirTemp; if (DeltaT <= 0.0) { - ShowSevereError(state, EnergyPlus::format("For object = {}, name = \"{}\"", UnitType, UnitName)); + ShowSevereError(state, std::format("For object = {}, name = \"{}\"", UnitType, UnitName)); ShowContinueError(state, "Calculated coil delta T is less than or equal to 0. The combination of"); ShowContinueError(state, "rated air volume flow rate, total cooling capacity and sensible heat ratio yields coil exiting"); ShowContinueError(state, "air conditions that are not reasonable. Possible fixes are to adjust the rated total cooling"); @@ -12410,7 +12327,7 @@ Real64 CalcCBF(EnergyPlusData &state, if (SlopeAtConds < 0.0 || OutletAirHumRat <= 0.0) { // Invalid conditions, slope can't be less than zero (SHR > 1) or // outlet air humidity ratio can't be less than zero. - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", UnitType, UnitName)); + ShowSevereError(state, std::format("{} \"{}\"", UnitType, UnitName)); ShowContinueError(state, "...Invalid slope or outlet air condition when calculating cooling coil bypass factor."); ShowContinueError(state, EnergyPlus::format("...Slope = {:.8R}", SlopeAtConds)); ShowContinueError(state, EnergyPlus::format("...Inlet Air Temperature = {:.2R} C", InletAirTemp)); @@ -12484,8 +12401,8 @@ Real64 CalcCBF(EnergyPlusData &state, ADPEnthalpy = PsyHFnTdbW(ADPTemp, ADPHumRat); CBF = min(1.0, (OutletAirEnthalpy - ADPEnthalpy) / (InletAirEnthalpy - ADPEnthalpy)); if (Iter > IterMax && PrintFlag) { - ShowSevereError( - state, EnergyPlus::format("{} \"{}\" -- coil bypass factor calculation did not converge after max iterations.", UnitType, UnitName)); + ShowSevereError(state, + std::format("{} \"{}\" -- coil bypass factor calculation did not converge after max iterations.", UnitType, UnitName)); ShowContinueError(state, EnergyPlus::format("The RatedSHR of [{:.3R}], entered by the user or autosized (see *.eio file),", SHR)); ShowContinueError(state, "may be causing this. The line defined by the coil rated inlet air conditions"); ShowContinueError(state, "(26.7C drybulb and 19.4C wetbulb) and the RatedSHR (i.e., slope of the line) must intersect"); @@ -12499,7 +12416,7 @@ Real64 CalcCBF(EnergyPlusData &state, CBFErrors = true; // Didn't converge within MaxIter iterations } if (CBF < 0.0 && PrintFlag) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\" -- negative coil bypass factor calculated.", UnitType, UnitName)); + ShowSevereError(state, std::format("{} \"{}\" -- negative coil bypass factor calculated.", UnitType, UnitName)); ShowContinueErrorTimeStamp(state, ""); CBFErrors = true; // Negative CBF not valid } @@ -12507,7 +12424,7 @@ Real64 CalcCBF(EnergyPlusData &state, // Show fatal error for specific coil that caused a CBF error if (CBFErrors) { - ShowFatalError(state, EnergyPlus::format("{} \"{}\" Errors found in calculating coil bypass factors", UnitType, UnitName)); + ShowFatalError(state, std::format("{} \"{}\" Errors found in calculating coil bypass factors", UnitType, UnitName)); } return CBF; @@ -12575,7 +12492,7 @@ Real64 ValidateADP(EnergyPlusData &state, Real64 enthalpyTempinHumRatADP = PsyHFnTdbW(RatedInletAirTemp, humRatADP); Real64 shrADPMax = (enthalpyTempinHumRatADP - enthalpyMaxADP) / (InletAirEnthalpy - enthalpyMaxADP); if (shrADPMax > 1.0) { - ShowWarningError(state, EnergyPlus::format("ValidateADP: Sensible heat ratio (SHR) calculation error for {} \"{} ", UnitType, UnitName)); + ShowWarningError(state, std::format("ValidateADP: Sensible heat ratio (SHR) calculation error for {} \"{} ", UnitType, UnitName)); ShowContinueError(state, "The maximum design SHR calculated based on the design total cooling capacity and flow rate is greater than 1.0."); ShowContinueError(state, EnergyPlus::format("...Total Cooling Capacity = {:.2R} W", TotCap)); ShowContinueError(state, EnergyPlus::format("...Mass Flow Rate = {:.6R} kg/s", AirMassFlow)); @@ -13094,9 +13011,9 @@ void CalcMultiSpeedDXCoilCooling(EnergyPlusData &state, AirMassFlowRatioHS = MSHPMassFlowRateHigh / thisDXCoil.MSRatedAirMassFlowRate(SpeedNumHS); if ((AirMassFlow > 0.0) && (CycRatio > 0.0) && (MSHPMassFlowRateHigh == 0.0)) { ShowSevereError(state, - EnergyPlus::format("CalcMultiSpeedDXCoilCooling: {} \"{} Developer error - inconsistent airflow rates.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("CalcMultiSpeedDXCoilCooling: {} \"{} Developer error - inconsistent airflow rates.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); if (MSHPMassFlowRateLow == 0.0 && SpeedNum > 1) { ShowContinueError(state, "When AirMassFlow > 0.0 and CycRatio > 0.0 and SpeedNum > 1, then MSHPMassFlowRateLow and MSHPMassFlowRateHigh " @@ -13121,9 +13038,9 @@ void CalcMultiSpeedDXCoilCooling(EnergyPlusData &state, } } else if (CycRatio > 1.0 || SpeedRatio > 1.0) { ShowSevereError(state, - EnergyPlus::format("CalcMultiSpeedDXCoilCooling: {} \"{} Developer error - inconsistent speed ratios.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("CalcMultiSpeedDXCoilCooling: {} \"{} Developer error - inconsistent speed ratios.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); ShowContinueError(state, "CycRatio and SpeedRatio must be between 0.0 and 1.0"); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, EnergyPlus::format("CycRatio={:.1R}, SpeedRatio = {:.1R}", CycRatio, SpeedRatio)); @@ -13173,10 +13090,10 @@ void CalcMultiSpeedDXCoilCooling(EnergyPlusData &state, if (thisDXCoil.MSErrIndex(SpeedNumLS) == 0) { ShowWarningMessage( state, - EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at speed {}.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - SpeedNumLS)); + std::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at speed {}.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + SpeedNumLS)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError( state, @@ -13189,11 +13106,11 @@ void CalcMultiSpeedDXCoilCooling(EnergyPlusData &state, } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range " - "at speed {} error continues...", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - SpeedNumLS), + std::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range " + "at speed {} error continues...", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + SpeedNumLS), thisDXCoil.MSErrIndex(SpeedNumLS), VolFlowperRatedTotCap, VolFlowperRatedTotCap); @@ -13210,10 +13127,10 @@ void CalcMultiSpeedDXCoilCooling(EnergyPlusData &state, if (thisDXCoil.MSErrIndex(SpeedNumHS) == 0) { ShowWarningMessage( state, - EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at speed {}.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - SpeedNumHS)); + std::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at speed {}.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + SpeedNumHS)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError( state, @@ -13226,11 +13143,11 @@ void CalcMultiSpeedDXCoilCooling(EnergyPlusData &state, } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range " - "at speed {} error continues...", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - SpeedNumHS), + std::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range " + "at speed {} error continues...", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + SpeedNumHS), thisDXCoil.MSErrIndex(SpeedNumHS), VolFlowperRatedTotCap, VolFlowperRatedTotCap); @@ -13523,10 +13440,10 @@ void CalcMultiSpeedDXCoilCooling(EnergyPlusData &state, if (thisDXCoil.MSErrIndex(SpeedNum) == 0) { ShowWarningMessage( state, - EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at speed {}.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - SpeedNum)); + std::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range at speed {}.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + SpeedNum)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError( state, @@ -13539,11 +13456,11 @@ void CalcMultiSpeedDXCoilCooling(EnergyPlusData &state, } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range " - "at speed {} error continues...", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - SpeedNumHS), + std::format("{} \"{}\" - Air volume flow rate per watt of rated total cooling capacity is out of range " + "at speed {} error continues...", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + SpeedNumHS), thisDXCoil.MSErrIndex(SpeedNumHS), VolFlowperRatedTotCap, VolFlowperRatedTotCap); @@ -13927,9 +13844,9 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, AirMassFlowRatioHS = MSHPMassFlowRateHigh / thisDXCoil.MSRatedAirMassFlowRate(SpeedNumHS); if ((AirMassFlow > 0.0) && (CycRatio > 0.0) && (MSHPMassFlowRateHigh == 0.0)) { ShowSevereError(state, - EnergyPlus::format("CalcMultiSpeedDXCoilHeating: {} \"{} Developer error - inconsistent airflow rates.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("CalcMultiSpeedDXCoilHeating: {} \"{} Developer error - inconsistent airflow rates.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); if (MSHPMassFlowRateLow == 0.0 && SpeedNum > 1) { ShowContinueError(state, "When AirMassFlow > 0.0 and CycRatio > 0.0 and SpeedNum > 1, then MSHPMassFlowRateLow and MSHPMassFlowRateHigh " @@ -13954,9 +13871,9 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, } } else if (CycRatio > 1.0 || SpeedRatio > 1.0) { ShowSevereError(state, - EnergyPlus::format("CalcMultiSpeedDXCoilHeating: {} \"{} Developer error - inconsistent speed ratios.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("CalcMultiSpeedDXCoilHeating: {} \"{} Developer error - inconsistent speed ratios.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); ShowContinueError(state, "CycRatio and SpeedRatio must be between 0.0 and 1.0"); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, EnergyPlus::format("CycRatio={:.1R}, SpeedRatio = {:.1R}", CycRatio, SpeedRatio)); @@ -14035,10 +13952,10 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, if (thisDXCoil.MSErrIndex(SpeedNumLS) == 0) { ShowWarningMessage( state, - EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range at speed {}.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - SpeedNumLS)); + std::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range at speed {}.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + SpeedNumLS)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError( state, @@ -14051,11 +13968,11 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range " - "at speed {} error continues...", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - SpeedNumLS), + std::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range " + "at speed {} error continues...", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + SpeedNumLS), thisDXCoil.MSErrIndex(SpeedNumLS), VolFlowperRatedTotCap, VolFlowperRatedTotCap); @@ -14071,10 +13988,10 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, if (thisDXCoil.MSErrIndex(SpeedNumHS) == 0) { ShowWarningMessage( state, - EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range at speed {}.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - SpeedNumHS)); + std::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range at speed {}.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + SpeedNumHS)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError( state, @@ -14087,11 +14004,11 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range " - "at speed {} error continues...", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name, - SpeedNumHS), + std::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range " + "at speed {} error continues...", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name, + SpeedNumHS), thisDXCoil.MSErrIndex(SpeedNumHS), VolFlowperRatedTotCap, VolFlowperRatedTotCap); @@ -14171,9 +14088,9 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, if (thisDXCoil.FrostHeatingCapacityMultiplierEMSOverrideOn || thisDXCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { ShowWarningMessage( state, - EnergyPlus::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " - "actuator must be both provided for DX heating coil {}", - thisDXCoil.Name)); + std::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " + "actuator must be both provided for DX heating coil {}", + thisDXCoil.Name)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -14189,9 +14106,9 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, if (thisDXCoil.FrostHeatingCapacityMultiplierEMSOverrideOn || thisDXCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { ShowWarningMessage( state, - EnergyPlus::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " - "actuator must be both provided for DX heating coil {}", - thisDXCoil.Name)); + std::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " + "actuator must be both provided for DX heating coil {}", + thisDXCoil.Name)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -14355,9 +14272,9 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, if (thisDXCoil.ErrIndex1 == 0) { ShowWarningMessage( state, - EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range at speed 1.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range at speed 1.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError( state, @@ -14370,7 +14287,7 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\" - Air volume flow rate per watt of rated total heating capacity is out of range error continues at speed 1...", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name), @@ -14422,9 +14339,9 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, if (thisDXCoil.FrostHeatingCapacityMultiplierEMSOverrideOn || thisDXCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { ShowWarningMessage( state, - EnergyPlus::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " - "actuator must be both provided for DX heating coil {}", - thisDXCoil.Name)); + std::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " + "actuator must be both provided for DX heating coil {}", + thisDXCoil.Name)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -14440,9 +14357,9 @@ void CalcMultiSpeedDXCoilHeating(EnergyPlusData &state, if (thisDXCoil.FrostHeatingCapacityMultiplierEMSOverrideOn || thisDXCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { ShowWarningMessage( state, - EnergyPlus::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " - "actuator must be both provided for DX heating coil {}", - thisDXCoil.Name)); + std::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " + "actuator must be both provided for DX heating coil {}", + thisDXCoil.Name)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -14913,9 +14830,9 @@ void CalcTwoSpeedDXCoilStandardRating(EnergyPlusData &state, int const DXCoilNum thisDXCoil.RateWithInternalStaticAndFanObject = false; ShowWarningError( state, - EnergyPlus::format("CalcTwoSpeedDXCoilStandardRating: Did not find an appropriate fan associated with DX coil named = \"{}\". Standard " - "Ratings will not be calculated.", - thisDXCoil.Name)); + std::format("CalcTwoSpeedDXCoilStandardRating: Did not find an appropriate fan associated with DX coil named = \"{}\". Standard " + "Ratings will not be calculated.", + thisDXCoil.Name)); return; } bool saveTurnFansOn = state.dataHVACGlobal->TurnFansOn; @@ -15171,18 +15088,17 @@ void CalcTwoSpeedDXCoilStandardRating(EnergyPlusData &state, int const DXCoilNum // Warn user if curve output goes negative if (TotCapFlowModFac < 0.0) { if (thisDXCoil.CCapFFlowErrorIndex == 0) { - ShowWarningMessage( - state, EnergyPlus::format("{}{} \"{}\":", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); - ShowContinueError( - state, - EnergyPlus::format(" Total Cooling Capacity Modifier curve (function of flow fraction) output is negative ({:.3T}).", - TotCapFlowModFac)); - ShowContinueError(state, EnergyPlus::format(" Negative value occurs using an air flow fraction of {:.3T}.", AirMassFlowRatio)); + ShowWarningMessage(state, + std::format("{}{} \"{}\":", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + ShowContinueError(state, + std::format(" Total Cooling Capacity Modifier curve (function of flow fraction) output is negative ({:.3f}).", + TotCapFlowModFac)); + ShowContinueError(state, std::format(" Negative value occurs using an air flow fraction of {:.3f}.", AirMassFlowRatio)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{}{}\"{}\": Total Cooling Capacity Modifier curve (function of flow fraction) output is negative warning continues...", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], @@ -15198,23 +15114,22 @@ void CalcTwoSpeedDXCoilStandardRating(EnergyPlusData &state, int const DXCoilNum // Warn user if curve output goes negative if (TotCapTempModFac < 0.0) { if (thisDXCoil.CCapFTempErrorIndex == 0) { - ShowWarningMessage( - state, EnergyPlus::format("{}{} \"{}\":", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); - ShowContinueError( - state, - EnergyPlus::format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", - TotCapTempModFac)); + ShowWarningMessage(state, + std::format("{}{} \"{}\":", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + ShowContinueError(state, + std::format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3f}).", + TotCapTempModFac)); ShowContinueError( state, - EnergyPlus::format(" Negative value occurs using a coil inlet wet-bulb temperature of {:.1T} and an outdoor unit inlet air " - "dry-bulb temperature of {:.1T}.", - CoolingCoilInletAirWetBulbTempRated, - OutdoorUnitInletAirDryBulbTempPLTestPoint(PartLoadTestPoint))); + std::format(" Negative value occurs using a coil inlet wet-bulb temperature of {:.1f} and an outdoor unit inlet air " + "dry-bulb temperature of {:.1f}.", + CoolingCoilInletAirWetBulbTempRated, + OutdoorUnitInletAirDryBulbTempPLTestPoint(PartLoadTestPoint))); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{}{} \"{}\": Total Cooling Capacity Modifier curve (function of temperature) output is negative warning continues...", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], @@ -15244,23 +15159,22 @@ void CalcTwoSpeedDXCoilStandardRating(EnergyPlusData &state, int const DXCoilNum // Warn user if curve output goes negative if (TotCapTempModFac < 0.0) { if (thisDXCoil.CCapFTempErrorIndex == 0) { - ShowWarningMessage( - state, EnergyPlus::format("{}{} \"{}\":", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); - ShowContinueError( - state, - EnergyPlus::format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", - TotCapTempModFac)); + ShowWarningMessage(state, + std::format("{}{} \"{}\":", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name)); + ShowContinueError(state, + std::format(" Total Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3f}).", + TotCapTempModFac)); ShowContinueError( state, - EnergyPlus::format(" Negative value occurs using a coil inlet wet-bulb temperature of {:.1T} and an outdoor unit inlet air " - "dry-bulb temperature of {:.1T}.", - CoolingCoilInletAirWetBulbTempRated, - OutdoorUnitInletAirDryBulbTempPLTestPoint(PartLoadTestPoint))); + std::format(" Negative value occurs using a coil inlet wet-bulb temperature of {:.1f} and an outdoor unit inlet air " + "dry-bulb temperature of {:.1f}.", + CoolingCoilInletAirWetBulbTempRated, + OutdoorUnitInletAirDryBulbTempPLTestPoint(PartLoadTestPoint))); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{}{} \"{}\": Total Cooling Capacity Modifier curve (function of temperature) output is negative warning continues...", RoutineName, HVAC::coilTypeNames[(int)thisDXCoil.coilType], @@ -15579,9 +15493,9 @@ void GetDXCoilIndex(EnergyPlusData &state, if (!SuppressWarning) { // No warning printed if only searching for the existence of a DX Coil if (!ThisObjectType.empty()) { - ShowSevereError(state, fmt::format("{}, GetDXCoilIndex: DX Coil not found={}", ThisObjectType, DXCoilName)); + ShowSevereError(state, std::format("{}, GetDXCoilIndex: DX Coil not found={}", ThisObjectType, DXCoilName)); } else { - ShowSevereError(state, EnergyPlus::format("GetDXCoilIndex: DX Coil not found={}", DXCoilName)); + ShowSevereError(state, std::format("GetDXCoilIndex: DX Coil not found={}", DXCoilName)); } } ErrorsFound = true; @@ -15609,7 +15523,7 @@ GetDXCoilName(EnergyPlusData &state, int &DXCoilIndex, bool &ErrorsFound, std::s if (!SuppressWarning) { // No warning printed if only searching for the existence of a DX Coil if (!ThisObjectType.empty()) { - ShowSevereError(state, fmt::format("{}, GetDXCoilIndex: DX Coil not found ", ThisObjectType)); + ShowSevereError(state, std::format("{}, GetDXCoilIndex: DX Coil not found ", ThisObjectType)); } else { ShowSevereError(state, "GetDXCoilIndex: DX Coil not found "); } @@ -15673,7 +15587,7 @@ Real64 GetCoilCapacity(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format("GetCoilCapacity: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilCapacity: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ShowContinueError(state, "... returning capacity as -1000."); ErrorsFound = true; CoilCapacity = -1000.0; @@ -15776,7 +15690,7 @@ HVAC::CoilType GetCoilTypeNum(EnergyPlusData &state, coilType = state.dataDXCoils->DXCoil(WhichCoil).coilType; } else { if (PrintMessage) { - ShowSevereError(state, EnergyPlus::format("GetCoilTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", coilTypeName, CoilName)); + ShowSevereError(state, std::format("GetCoilTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", coilTypeName, CoilName)); } ErrorsFound = true; coilType = HVAC::CoilType::Invalid; @@ -15838,7 +15752,7 @@ int GetCoilInletNode(EnergyPlusData &state, if (WhichCoil != 0) { NodeNumber = state.dataDXCoils->DXCoil(WhichCoil).AirInNode; } else { - ShowSevereError(state, EnergyPlus::format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -15904,9 +15818,9 @@ int GetCoilOutletNode(EnergyPlusData &state, NodeNumber = state.dataDXCoils->DXCoil(WhichCoil).AirOutNode; } else { ShowSevereError(state, - EnergyPlus::format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil outlet node number.", - CoilType, - CoilName)); + std::format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil outlet node number.", + CoilType, + CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -15970,7 +15884,7 @@ int GetCoilCondenserInletNode(EnergyPlusData &state, if (WhichCoil != 0) { CondNode = state.dataDXCoils->DXCoil(WhichCoil).CondenserInletNodeNum(1); } else { - ShowSevereError(state, EnergyPlus::format("GetCoilCondenserInletNode: Invalid DX Coil, Type= \"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilCondenserInletNode: Invalid DX Coil, Type= \"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; CondNode = 0; } @@ -16010,7 +15924,7 @@ Real64 GetDXCoilBypassedFlowFrac(EnergyPlusData &state, if (WhichCoil != 0) { BypassFraction = state.dataDXCoils->DXCoil(WhichCoil).BypassedFlowFrac(1); } else { - ShowSevereError(state, EnergyPlus::format("GetDXCoilBypassedFlowFrac: Invalid DX Coil Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetDXCoilBypassedFlowFrac: Invalid DX Coil Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; BypassFraction = 0.0; } @@ -16107,9 +16021,9 @@ int GetHPCoolingCoilIndex(EnergyPlusData &state, } else { // ErrorFound, Coil:Heating:DX:SingleSpeed is used in wrong type of parent object (should never get here) ShowSevereError(state, - EnergyPlus::format("Configuration error in {}\"{}\"", - Node::ConnectionObjectTypeNames[static_cast(CompSetsParentType)], - CompSetsParentName)); + std::format("Configuration error in {}\"{}\"", + Node::ConnectionObjectTypeNames[static_cast(CompSetsParentType)], + CompSetsParentName)); ShowContinueError(state, "DX heating coil not allowed in this configuration."); ShowFatalError(state, "Preceding condition(s) causes termination."); } @@ -16124,13 +16038,12 @@ int GetHPCoolingCoilIndex(EnergyPlusData &state, if (thisDXCoolingCoil.CrankcaseHeaterCapacity != thisDXHeatingCoil.CrankcaseHeaterCapacity || thisDXCoolingCoil.MaxOATCrankcaseHeater != thisDXHeatingCoil.MaxOATCrankcaseHeater) { ShowWarningError(state, "Crankcase heater capacity or max outdoor temp for crankcase heater operation specified in"); - ShowContinueError(state, EnergyPlus::format("{} = {}", HVAC::coilTypeNames[(int)thisDXCoolingCoil.coilType], thisDXCoolingCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("is different than that specified in Coil:Heating:DX:SingleSpeed = {}.", HeatingCoilName)); + ShowContinueError(state, std::format("{} = {}", HVAC::coilTypeNames[(int)thisDXCoolingCoil.coilType], thisDXCoolingCoil.Name)); + ShowContinueError(state, std::format("is different than that specified in Coil:Heating:DX:SingleSpeed = {}.", HeatingCoilName)); ShowContinueError(state, - EnergyPlus::format("Both of these DX coils are part of {}={}.", - Node::ConnectionObjectTypeNames[static_cast(CompSetsParentType)], - CompSetsParentName)); + std::format("Both of these DX coils are part of {}={}.", + Node::ConnectionObjectTypeNames[static_cast(CompSetsParentType)], + CompSetsParentName)); ShowContinueError(state, "The value specified in the DX heating coil will be used and the simulation continues..."); } } @@ -16170,7 +16083,7 @@ int GetDXCoilNumberOfSpeeds(EnergyPlusData &state, if (WhichCoil != 0) { NumberOfSpeeds = state.dataDXCoils->DXCoil(WhichCoil).NumOfSpeeds; } else { - ShowSevereError(state, EnergyPlus::format("GetDXCoilNumberOfSpeeds: Invalid DX Coil Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetDXCoilNumberOfSpeeds: Invalid DX Coil Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NumberOfSpeeds = 0; } @@ -16222,9 +16135,9 @@ Sched::Schedule *GetDXCoilAvailSched(EnergyPlusData &state, if (!present(CoilIndex)) { ShowSevereError( state, - EnergyPlus::format("GetDXCoilAvailSch: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil availability schedule index.", - CoilType, - CoilName)); + std::format("GetDXCoilAvailSch: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil availability schedule index.", + CoilType, + CoilName)); } ErrorsFound = true; return nullptr; @@ -16272,18 +16185,17 @@ Real64 GetDXCoilAirFlow(EnergyPlusData &state, AirFlow = state.dataDXCoils->DXCoil(WhichCoil).MSRatedAirVolFlowRate(1); } break; default: { - ShowSevereError(state, - EnergyPlus::format("GetDXCoilAirFlow: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil air flow rate.", - CoilType, - CoilName)); + ShowSevereError( + state, + std::format("GetDXCoilAirFlow: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil air flow rate.", CoilType, CoilName)); ErrorsFound = true; AirFlow = -1.0; } break; } } else { - ShowSevereError(state, - EnergyPlus::format( - "GetDXCoilAirFlow: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil air flow rate.", CoilType, CoilName)); + ShowSevereError( + state, + std::format("GetDXCoilAirFlow: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil air flow rate.", CoilType, CoilName)); ErrorsFound = true; AirFlow = -1.0; } @@ -16395,9 +16307,9 @@ void SetDXCoolingCoilData( if (DXCoilNum <= 0 || DXCoilNum > state.dataDXCoils->NumDXCoils) { ShowSevereError(state, - EnergyPlus::format("SetDXCoolingCoilData: called with DX Cooling Coil Number out of range={} should be >0 and <{}", - DXCoilNum, - state.dataDXCoils->NumDXCoils)); + std::format("SetDXCoolingCoilData: called with DX Cooling Coil Number out of range={} should be >0 and <{}", + DXCoilNum, + state.dataDXCoils->NumDXCoils)); ErrorsFound = true; return; } @@ -16530,7 +16442,7 @@ void SetCoilSystemHeatingDXFlag(EnergyPlusData &state, if (WhichCoil != 0) { state.dataDXCoils->DXCoil(WhichCoil).FindCompanionUpStreamCoil = false; } else { - ShowSevereError(state, EnergyPlus::format("SetCoilSystemHeatingDXFlag: Could not find Coil, Type=\"{}\"Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("SetCoilSystemHeatingDXFlag: Could not find Coil, Type=\"{}\"Name=\"{}\"", CoilType, CoilName)); } } @@ -16558,7 +16470,7 @@ void SetCoilSystemCoolingData(EnergyPlusData &state, if (WhichCoil != 0) { state.dataDXCoils->DXCoil(WhichCoil).CoilSystemName = CoilSystemName; } else { - ShowSevereError(state, EnergyPlus::format("SetCoilSystemCoolingData: Could not find Coil \"Name=\"{}\"", CoilName)); + ShowSevereError(state, std::format("SetCoilSystemCoolingData: Could not find Coil \"Name=\"{}\"", CoilName)); } } @@ -16652,7 +16564,7 @@ void SetDXCoilTypeData(EnergyPlusData &state, std::string const &CoilName) // mu } else { // DXCoil(WhichCoil)%ISHundredPercentDOASDXCoil = .FALSE. //Autodesk:BoundsViolation DXCoil(0): DXCoil is not allocated with a 0 // element: Commented out - ShowSevereError(state, EnergyPlus::format("SetDXCoilTypeData: Could not find Coil \"Name=\"{}\"", CoilName)); + ShowSevereError(state, std::format("SetDXCoilTypeData: Could not find Coil \"Name=\"{}\"", CoilName)); } } @@ -17234,18 +17146,18 @@ void CalcVRFCoolingCoil_FluidTCtrl(EnergyPlusData &state, ShowContinueError(state, thisDXCoil.LowOutTempBuffer2); ShowContinueError(state, "... Possible reasons for low outlet air dry-bulb temperatures are: This DX coil"); ShowContinueError(state, - EnergyPlus::format(" 1) may have a low inlet air dry-bulb temperature. Inlet air temperature = {:.3T} C.", - thisDXCoil.FullLoadInletAirTempLast)); + std::format(" 1) may have a low inlet air dry-bulb temperature. Inlet air temperature = {:.3f} C.", + thisDXCoil.FullLoadInletAirTempLast)); ShowContinueError(state, " 2) may have a low air flow rate per watt of cooling capacity. Check inputs."); ShowContinueError(state, " 3) is used as part of a HX assisted cooling coil which uses a high sensible effectiveness. Check inputs."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Full load outlet temperature indicates a possibility of frost/freeze error continues. " - "Outlet air temperature statistics follow:", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name), + std::format("{} \"{}\" - Full load outlet temperature indicates a possibility of frost/freeze error continues. " + "Outlet air temperature statistics follow:", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name), thisDXCoil.LowOutletTempIndex, thisDXCoil.FullLoadOutAirTempLast, thisDXCoil.FullLoadOutAirTempLast); @@ -17263,9 +17175,9 @@ void CalcVRFCoolingCoil_FluidTCtrl(EnergyPlusData &state, if (thisDXCoil.RatedTotCap(Mode) <= 0.0) { ShowFatalError(state, - EnergyPlus::format("{} \"{}\" - Rated total cooling capacity is zero or less.", - HVAC::coilTypeNames[(int)thisDXCoil.coilType], - thisDXCoil.Name)); + std::format("{} \"{}\" - Rated total cooling capacity is zero or less.", + HVAC::coilTypeNames[(int)thisDXCoil.coilType], + thisDXCoil.Name)); } TotCap = min(MaxCoolCap, thisDXCoil.RatedTotCap(Mode)); @@ -18344,7 +18256,7 @@ void SetDXCoilAirLoopNumber(EnergyPlusData &state, std::string const &CoilName, if (WhichCoil != 0) { state.dataDXCoils->DXCoil(WhichCoil).AirLoopNum = AirLoopNum; } else { - ShowSevereError(state, EnergyPlus::format("SetDXCoilAirLoopNumber: Could not find Coil \"Name=\"{}\"", CoilName)); + ShowSevereError(state, std::format("SetDXCoilAirLoopNumber: Could not find Coil \"Name=\"{}\"", CoilName)); } } // must match coil names for the coil type diff --git a/src/EnergyPlus/Data/EnergyPlusData.cc b/src/EnergyPlus/Data/EnergyPlusData.cc index 55bf055e2a6..88993f7289d 100644 --- a/src/EnergyPlus/Data/EnergyPlusData.cc +++ b/src/EnergyPlus/Data/EnergyPlusData.cc @@ -45,11 +45,13 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + +// EnergyPlus Headers #include #include -#include - namespace EnergyPlus { EnergyPlusData::EnergyPlusData() diff --git a/src/EnergyPlus/DataHeatBalance.cc b/src/EnergyPlus/DataHeatBalance.cc index ee47698626c..f7856b90626 100644 --- a/src/EnergyPlus/DataHeatBalance.cc +++ b/src/EnergyPlus/DataHeatBalance.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -572,8 +573,8 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, ++GlassLayNum; if (GlassLayNum < TotGlassLayers && matGlass->SolarDiffusing) { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("CheckAndSetConstructionProperties: Window construction={}", thisConstruct.Name)); - ShowContinueError(state, EnergyPlus::format("has diffusing glass={} that is not the innermost glass layer.", matGlass->Name)); + ShowSevereError(state, std::format("CheckAndSetConstructionProperties: Window construction={}", thisConstruct.Name)); + ShowContinueError(state, std::format("has diffusing glass={} that is not the innermost glass layer.", matGlass->Name)); } } } @@ -667,8 +668,8 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, assert(matBlind != nullptr); if ((matGapL->Thickness + matGapR->Thickness) < matBlind->SlatWidth) { ErrorsFound = true; - ShowSevereError( - state, EnergyPlus::format("CheckAndSetConstructionProperties: For window construction {}", thisConstruct.Name)); + ShowSevereError(state, + std::format("CheckAndSetConstructionProperties: For window construction {}", thisConstruct.Name)); ShowContinueError(state, "the slat width of the between-glass blind is greater than"); ShowContinueError(state, "the sum of the widths of the gas layers adjacent to the blind."); } @@ -690,14 +691,14 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, auto const *mat = s_mat->materials(MaterNum); if (mat->group == Material::Group::Glass) { ErrorsFound = true; - ShowSevereError( - state, EnergyPlus::format("CheckAndSetConstructionProperties: Error in window construction {}--", thisConstruct.Name)); + ShowSevereError(state, + std::format("CheckAndSetConstructionProperties: Error in window construction {}--", thisConstruct.Name)); ShowContinueError(state, "For simple window constructions, no other glazing layers are allowed."); } if (mat->group == Material::Group::Gas) { ErrorsFound = true; - ShowSevereError( - state, EnergyPlus::format("CheckAndSetConstructionProperties: Error in window construction {}--", thisConstruct.Name)); + ShowSevereError(state, + std::format("CheckAndSetConstructionProperties: Error in window construction {}--", thisConstruct.Name)); ShowContinueError(state, "For simple window constructions, no other gas layers are allowed."); } } @@ -705,7 +706,7 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, } if (WrongWindowLayering) { - ShowSevereError(state, EnergyPlus::format("CheckAndSetConstructionProperties: Error in window construction {}--", thisConstruct.Name)); + ShowSevereError(state, std::format("CheckAndSetConstructionProperties: Error in window construction {}--", thisConstruct.Name)); ShowContinueError(state, " For multi-layer window constructions the following rules apply:"); ShowContinueError(state, " --The first and last layer must be a solid layer (glass or shade/screen/blind),"); ShowContinueError(state, " --Adjacent glass layers must be separated by one and only one gas layer,"); @@ -758,15 +759,14 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, thisConstruct.OutsideRoughness = matOutside->Roughness; if (matOutside->group == Material::Group::AirGap) { - ShowSevereError(state, EnergyPlus::format("CheckAndSetConstructionProperties: Outside Layer is Air for construction {}", thisConstruct.Name)); - ShowContinueError(state, EnergyPlus::format(" Error in material {}", matOutside->Name)); + ShowSevereError(state, std::format("CheckAndSetConstructionProperties: Outside Layer is Air for construction {}", thisConstruct.Name)); + ShowContinueError(state, std::format(" Error in material {}", matOutside->Name)); ErrorsFound = true; } if (InsideLayer > 0) { if (matInside->group == Material::Group::AirGap) { - ShowSevereError(state, - EnergyPlus::format("CheckAndSetConstructionProperties: Inside Layer is Air for construction {}", thisConstruct.Name)); - ShowContinueError(state, EnergyPlus::format(" Error in material {}", matInside->Name)); + ShowSevereError(state, std::format("CheckAndSetConstructionProperties: Inside Layer is Air for construction {}", thisConstruct.Name)); + ShowContinueError(state, std::format(" Error in material {}", matInside->Name)); ErrorsFound = true; } } @@ -776,10 +776,9 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, // need to check EcoRoof is not non-outside layer for (int Layer = 2; Layer <= TotLayers; ++Layer) { if (s_mat->materials(thisConstruct.LayerPoint(Layer))->group == Material::Group::EcoRoof) { - ShowSevereError( - state, - EnergyPlus::format("CheckAndSetConstructionProperties: Interior Layer is EcoRoof for construction {}", thisConstruct.Name)); - ShowContinueError(state, EnergyPlus::format(" Error in material {}", s_mat->materials(thisConstruct.LayerPoint(Layer))->Name)); + ShowSevereError(state, + std::format("CheckAndSetConstructionProperties: Interior Layer is EcoRoof for construction {}", thisConstruct.Name)); + ShowContinueError(state, std::format(" Error in material {}", s_mat->materials(thisConstruct.LayerPoint(Layer))->Name)); ErrorsFound = true; } } @@ -789,8 +788,8 @@ void CheckAndSetConstructionProperties(EnergyPlusData &state, thisConstruct.TypeIsIRT = true; if (thisConstruct.TotLayers != 1) { ShowSevereError(state, - EnergyPlus::format("CheckAndSetConstructionProperties: Infrared Transparent (IRT) Construction is limited to 1 layer {}", - thisConstruct.Name)); + std::format("CheckAndSetConstructionProperties: Infrared Transparent (IRT) Construction is limited to 1 layer {}", + thisConstruct.Name)); ShowContinueError(state, " Too many layers in referenced construction."); ErrorsFound = true; } diff --git a/src/EnergyPlus/DataLoopNode.hh b/src/EnergyPlus/DataLoopNode.hh index ea9ebab71f4..2f22fee1bed 100644 --- a/src/EnergyPlus/DataLoopNode.hh +++ b/src/EnergyPlus/DataLoopNode.hh @@ -152,7 +152,7 @@ namespace Node { AirLoopHVACDedicatedOutdoorAirSystem, AirLoopHVACExhaustSystem, AirLoopHVACMixer, - AirLoopHVACOutdoorAirsystem, + AirLoopHVACOutdoorAirSystem, AirLoopHVACReturnPath, AirLoopHVACReturnPlenum, AirLoopHVACSplitter, diff --git a/src/EnergyPlus/DataSurfaceLists.cc b/src/EnergyPlus/DataSurfaceLists.cc index 6a1365c515f..8744806d4c7 100644 --- a/src/EnergyPlus/DataSurfaceLists.cc +++ b/src/EnergyPlus/DataSurfaceLists.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // EnergyPlus Headers #include @@ -156,7 +157,7 @@ void GetSurfaceListsInputs(EnergyPlusData &state) if (SurfList(Item).SurfPtr(SurfNum) == 0) { ShowSevereError( state, - fmt::format( + EnergyPlus::format( "{} in {} statement not found = {}", surfaceNameFieldName, CurrentModuleObject1, SurfList(Item).SurfName(SurfNum))); ErrorsFound = true; } else { // Make sure that all of the surfaces are located in the same zone @@ -264,7 +265,8 @@ void GetSurfaceListsInputs(EnergyPlusData &state) if (SlabList(Item).ZonePtr(SurfNum) == 0) { ShowSevereError( state, - fmt::format("{} in {} Zone not found = {}", zoneNameFieldName, CurrentModuleObject2, SlabList(Item).ZoneName(SurfNum))); + EnergyPlus::format( + "{} in {} Zone not found = {}", zoneNameFieldName, CurrentModuleObject2, SlabList(Item).ZoneName(SurfNum))); ErrorsFound = true; } @@ -273,10 +275,10 @@ void GetSurfaceListsInputs(EnergyPlusData &state) SlabList(Item).SurfPtr(SurfNum) = Util::FindItemInList(SlabList(Item).SurfName(SurfNum), state.dataSurface->Surface); if (SlabList(Item).SurfPtr(SurfNum) == 0) { ShowSevereError(state, - fmt::format("{} in {} statement not found = {}", - slabSurfaceNameFieldName, - CurrentModuleObject2, - SlabList(Item).SurfName(SurfNum))); + EnergyPlus::format("{} in {} statement not found = {}", + slabSurfaceNameFieldName, + CurrentModuleObject2, + SlabList(Item).SurfName(SurfNum))); ErrorsFound = true; } for (int SrfList = 1; SrfList <= NumOfSurfaceLists; ++SrfList) { diff --git a/src/EnergyPlus/DataSystemVariables.cc b/src/EnergyPlus/DataSystemVariables.cc index f8946e2d29b..abf0e899b6c 100644 --- a/src/EnergyPlus/DataSystemVariables.cc +++ b/src/EnergyPlus/DataSystemVariables.cc @@ -46,11 +46,11 @@ // POSSIBILITY OF SUCH DAMAGE. // C++ Headers +#include #include // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include @@ -193,7 +193,7 @@ namespace DataSystemVariables { } // If we get here, we didn't find the file - ShowSevereError(state, EnergyPlus::format("{}\"{}\" not found.", contextString, originalInputFilePath)); + ShowSevereError(state, EnergyPlus::format("{}\"{}\" not found.", contextString, originalInputFilePath.string())); ShowContinueError(state, " Paths searched:"); for (auto &path : pathsChecked) { ShowContinueError(state, EnergyPlus::format(" {}: \"{}\"", path.second, path.first)); diff --git a/src/EnergyPlus/DataZoneEnergyDemands.cc b/src/EnergyPlus/DataZoneEnergyDemands.cc index 6b2e6cd089e..3679f58124e 100644 --- a/src/EnergyPlus/DataZoneEnergyDemands.cc +++ b/src/EnergyPlus/DataZoneEnergyDemands.cc @@ -45,6 +45,9 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + // EnergyPlus Headers #include #include @@ -265,7 +268,7 @@ void ZoneSystemMoistureDemand::setUpOutputVars(EnergyPlusData &state, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - EnergyPlus::format("{} Air Vapor Pressure Difference", prefix), + std::format("{} Air Vapor Pressure Difference", prefix), Constant::Units::Pa, this->vaporPressureDifference, OutputProcessor::TimeStepType::System, @@ -276,21 +279,21 @@ void ZoneSystemMoistureDemand::setUpOutputVars(EnergyPlusData &state, // There are two sets of data available: one where zone and group multipliers have been applied and another where the multipliers have // not. First, these report variables are NOT multiplied by zone and group multipliers SetupOutputVariable(state, - EnergyPlus::format("{} Predicted Moisture Load Moisture Transfer Rate", prefix), + std::format("{} Predicted Moisture Load Moisture Transfer Rate", prefix), Constant::Units::kgWater_s, this->predictedRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - EnergyPlus::format("{} Predicted Moisture Load to Humidifying Setpoint Moisture Transfer Rate", prefix), + std::format("{} Predicted Moisture Load to Humidifying Setpoint Moisture Transfer Rate", prefix), Constant::Units::kgWater_s, this->predictedHumSPRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - EnergyPlus::format("{} Predicted Moisture Load to Dehumidifying Setpoint Moisture Transfer Rate", prefix), + std::format("{} Predicted Moisture Load to Dehumidifying Setpoint Moisture Transfer Rate", prefix), Constant::Units::kgWater_s, this->predictedDehumSPRate, OutputProcessor::TimeStepType::System, @@ -298,21 +301,21 @@ void ZoneSystemMoistureDemand::setUpOutputVars(EnergyPlusData &state, name); // Second, these report variable ARE multiplied by zone and group multipliers SetupOutputVariable(state, - EnergyPlus::format("{} System Predicted Moisture Load Moisture Transfer Rate", prefix), + std::format("{} System Predicted Moisture Load Moisture Transfer Rate", prefix), Constant::Units::kgWater_s, this->TotalOutputRequired, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - EnergyPlus::format("{} System Predicted Moisture Load to Humidifying Setpoint Moisture Transfer Rate", prefix), + std::format("{} System Predicted Moisture Load to Humidifying Setpoint Moisture Transfer Rate", prefix), Constant::Units::kgWater_s, this->OutputRequiredToHumidifyingSP, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - EnergyPlus::format("{} System Predicted Moisture Load to Dehumidifying Setpoint Moisture Transfer Rate", prefix), + std::format("{} System Predicted Moisture Load to Dehumidifying Setpoint Moisture Transfer Rate", prefix), Constant::Units::kgWater_s, this->OutputRequiredToDehumidifyingSP, OutputProcessor::TimeStepType::System, diff --git a/src/EnergyPlus/DataZoneEquipment.cc b/src/EnergyPlus/DataZoneEquipment.cc index 68c205c89c0..c4979b71b8e 100644 --- a/src/EnergyPlus/DataZoneEquipment.cc +++ b/src/EnergyPlus/DataZoneEquipment.cc @@ -45,6 +45,9 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + // ObjexxFCL Headers #include #include @@ -102,16 +105,16 @@ constexpr std::array(ZoneEquipType::Num)> zon "DUMMY", // DUMMY, "ZONEHVAC:FOURPIPEFANCOIL", // FanCoilFourPipe - "ZONEHVAC:PACKAGEDTERMINALHEATPUMP", // PackagedTerminalHeatPump - "ZONEHVAC:PACKAGEDTERMINALAIRCONDITIONER", // PackagedTerminalAirConditioner - "ZONEHVAC:WATERTOAIRHEATPUMP", // PackagedTerminalHeatPumpWaterToAir - "ZONEHVAC:WINDOWAIRCONDITIONER", // WindowAirConditioner - "ZONEHVAC:UNITHEATER", // UnitHeater - "ZONEHVAC:UNITVENTILATOR", // UnitVentilator + "ZONEHVAC:PACKAGEDTERMINALHEATPUMP", // PackagedTerminalHeatPump + "ZONEHVAC:PACKAGEDTERMINALAIRCONDITIONER", // PackagedTerminalAirConditioner + "ZONEHVAC:WATERTOAIRHEATPUMP", // PackagedTerminalHeatPumpWaterToAir + "ZONEHVAC:WINDOWAIRCONDITIONER", // WindowAirConditioner + "ZONEHVAC:UNITHEATER", // UnitHeater + "ZONEHVAC:UNITVENTILATOR", // UnitVentilator "ZONEHVAC:ENERGYRECOVERYVENTILATOR", // EnergyRecoveryVentilator "ZONEHVAC:VENTILATEDSLAB", // VentilatedSlab "ZONEHVAC:OUTDOORAIRUNIT", // OutdoorAirUnit - "ZONEHVAC:TERMINALUNIT:VARIABLEREFRIGERANTFLOW", // VariableRefrigerantFlowTerminal + "ZONEHVAC:TERMINALUNIT:VARIABLEREFRIGERANTFLOW", // VariableRefrigerantFlowTerminal "ZONEHVAC:IDEALLOADSAIRSYSTEM", // IdealLoadsAirSystem "ZONEHVAC:EVAPORATIVECOOLERUNIT", // EvaporativeCooler "ZONEHVAC:HYBRIDUNITARYHVAC", // HybridEvaporativeCooler, @@ -493,11 +496,11 @@ void GetZoneEquipmentData(EnergyPlusData &state) ShowContinueError( state, EnergyPlus::format("Equipment: Type={}, Name={}", ZoneEquipListAcct(Loop1).ObjectType, ZoneEquipListAcct(Loop1).ObjectName)); - ShowContinueError( - state, EnergyPlus::format("Found on List=\"{}\".", state.dataZoneEquip->ZoneEquipList(ZoneEquipListAcct(Loop1).OnListNum).Name)); ShowContinueError(state, - EnergyPlus::format("Equipment Duplicated on List=\"{}\".", - state.dataZoneEquip->ZoneEquipList(ZoneEquipListAcct(Loop2).OnListNum).Name)); + std::format("Found on List=\"{}\".", state.dataZoneEquip->ZoneEquipList(ZoneEquipListAcct(Loop1).OnListNum).Name)); + ShowContinueError( + state, + std::format("Equipment Duplicated on List=\"{}\".", state.dataZoneEquip->ZoneEquipList(ZoneEquipListAcct(Loop2).OnListNum).Name)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } } @@ -524,10 +527,9 @@ void GetZoneEquipmentData(EnergyPlusData &state) if (!state.dataHeatBal->doSpaceHeatBalanceSimulation) { ShowWarningError( state, - EnergyPlus::format( - "{} requires \"Do Space Heat Balance for Simulation = Yes\" in ZoneAirHeatBalanceAlgorithm. {} objects will be ignored.", - CurrentModuleObject, - CurrentModuleObject)); + std::format("{} requires \"Do Space Heat Balance for Simulation = Yes\" in ZoneAirHeatBalanceAlgorithm. {} objects will be ignored.", + CurrentModuleObject, + CurrentModuleObject)); } else { auto const &objectSchemaProps = ip->getObjectSchemaProps(state, CurrentModuleObject); auto &instancesValue = instances.value(); @@ -545,18 +547,17 @@ void GetZoneEquipmentData(EnergyPlusData &state) std::string zoneName = ip->getAlphaFieldValue(objectFields, objectSchemaProps, "zone_name"); int zoneNum = Util::FindItemInList(zoneName, state.dataHeatBal->Zone); if (zoneNum == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqSplitter.Name)); - ShowContinueError(state, - EnergyPlus::format("..Zone Name={} not found, remaining items for this object not processed.", zoneName)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqSplitter.Name)); + ShowContinueError(state, std::format("..Zone Name={} not found, remaining items for this object not processed.", zoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; continue; } if (!state.dataHeatBal->Zone(zoneNum).IsControlled) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqSplitter.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqSplitter.Name)); ShowContinueError( state, - EnergyPlus::format( - "..Zone Name={} is not a controlled zone. A ZoneHVAC:EquipmentConnections object is required for this zone.", zoneName)); + std::format("..Zone Name={} is not a controlled zone. A ZoneHVAC:EquipmentConnections object is required for this zone.", + zoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; continue; } @@ -572,10 +573,9 @@ void GetZoneEquipmentData(EnergyPlusData &state) if (!state.dataHeatBal->doSpaceHeatBalanceSimulation) { ShowWarningError( state, - EnergyPlus::format( - "{} requires \"Do Space Heat Balance for Simulation = Yes\" in ZoneAirHeatBalanceAlgorithm. {} objects will be ignored.", - CurrentModuleObject, - CurrentModuleObject)); + std::format("{} requires \"Do Space Heat Balance for Simulation = Yes\" in ZoneAirHeatBalanceAlgorithm. {} objects will be ignored.", + CurrentModuleObject, + CurrentModuleObject)); } else { auto const &objectSchemaProps = ip->getObjectSchemaProps(state, CurrentModuleObject); auto &instancesValue = instances.value(); @@ -593,18 +593,17 @@ void GetZoneEquipmentData(EnergyPlusData &state) std::string zoneName = ip->getAlphaFieldValue(objectFields, objectSchemaProps, "zone_name"); int zoneNum = Util::FindItemInList(zoneName, state.dataHeatBal->Zone); if (zoneNum == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqMixer.Name)); - ShowContinueError(state, - EnergyPlus::format("..Zone Name={} not found, remaining items for this object not processed.", zoneName)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqMixer.Name)); + ShowContinueError(state, std::format("..Zone Name={} not found, remaining items for this object not processed.", zoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; continue; } if (!state.dataHeatBal->Zone(zoneNum).IsControlled) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqMixer.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZeqMixer.Name)); ShowContinueError( state, - EnergyPlus::format( - "..Zone Name={} is not a controlled zone. A ZoneHVAC:EquipmentConnections object is required for this zone.", zoneName)); + std::format("..Zone Name={} is not a controlled zone. A ZoneHVAC:EquipmentConnections object is required for this zone.", + zoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; continue; } @@ -620,10 +619,9 @@ void GetZoneEquipmentData(EnergyPlusData &state) if (!state.dataHeatBal->doSpaceHeatBalanceSimulation) { ShowWarningError( state, - EnergyPlus::format( - "{} requires \"Do Space Heat Balance for Simulation = Yes\" in ZoneAirHeatBalanceAlgorithm. {} objects will be ignored.", - CurrentModuleObject, - CurrentModuleObject)); + std::format("{} requires \"Do Space Heat Balance for Simulation = Yes\" in ZoneAirHeatBalanceAlgorithm. {} objects will be ignored.", + CurrentModuleObject, + CurrentModuleObject)); } else { auto const &objectSchemaProps = ip->getObjectSchemaProps(state, CurrentModuleObject); auto &instancesValue = instances.value(); @@ -641,18 +639,17 @@ void GetZoneEquipmentData(EnergyPlusData &state) std::string zoneName = ip->getAlphaFieldValue(objectFields, objectSchemaProps, "zone_name"); int zoneNum = Util::FindItemInList(zoneName, state.dataHeatBal->Zone); if (zoneNum == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZretMixer.Name)); - ShowContinueError(state, - EnergyPlus::format("..Zone Name={} not found, remaining items for this object not processed.", zoneName)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZretMixer.Name)); + ShowContinueError(state, std::format("..Zone Name={} not found, remaining items for this object not processed.", zoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; continue; } if (!state.dataHeatBal->Zone(zoneNum).IsControlled) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZretMixer.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisZretMixer.Name)); ShowContinueError( state, - EnergyPlus::format( - "..Zone Name={} is not a controlled zone. A ZoneHVAC:EquipmentConnections object is required for this zone.", zoneName)); + std::format("..Zone Name={} is not a controlled zone. A ZoneHVAC:EquipmentConnections object is required for this zone.", + zoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; continue; } @@ -717,9 +714,8 @@ void GetZoneEquipmentData(EnergyPlusData &state) state.dataZoneEquip->SupplyAirPath(PathNum).ComponentTypeEnum(CompNum) = (AirLoopHVACZone)getEnumValue(AirLoopHVACTypeNamesUC, AlphArray(Counter)); } else { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\"", RoutineName, cAlphaFields(1), state.dataZoneEquip->SupplyAirPath(PathNum).Name)); - ShowContinueError(state, EnergyPlus::format("Unhandled component type =\"{}\".", AlphArray(Counter))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, cAlphaFields(1), state.dataZoneEquip->SupplyAirPath(PathNum).Name)); + ShowContinueError(state, std::format("Unhandled component type =\"{}\".", AlphArray(Counter))); ShowContinueError(state, R"(Must be "AirLoopHVAC:ZoneSplitter" or "AirLoopHVAC:SupplyPlenum")"); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -781,15 +777,14 @@ void GetZoneEquipmentData(EnergyPlusData &state) IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("In {} = {}", CurrentModuleObject, state.dataZoneEquip->ReturnAirPath(PathNum).Name)); + ShowContinueError(state, std::format("In {} = {}", CurrentModuleObject, state.dataZoneEquip->ReturnAirPath(PathNum).Name)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } state.dataZoneEquip->ReturnAirPath(PathNum).ComponentTypeEnum(CompNum) = static_cast(getEnumValue(AirLoopHVACTypeNamesUC, AlphArray(Counter))); } else { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\"", RoutineName, cAlphaFields(1), state.dataZoneEquip->ReturnAirPath(PathNum).Name)); - ShowContinueError(state, EnergyPlus::format("Unhandled component type =\"{}\".", AlphArray(Counter))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, cAlphaFields(1), state.dataZoneEquip->ReturnAirPath(PathNum).Name)); + ShowContinueError(state, std::format("Unhandled component type =\"{}\".", AlphArray(Counter))); ShowContinueError(state, R"(Must be "AirLoopHVAC:ZoneMixer" or "AirLoopHVAC:ReturnPlenum")"); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -807,7 +802,7 @@ void GetZoneEquipmentData(EnergyPlusData &state) lNumericBlanks.deallocate(); if (state.dataZoneEquip->GetZoneEquipmentDataErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in getting Zone Equipment input.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in getting Zone Equipment input.", RoutineName)); } } @@ -840,7 +835,7 @@ void processZoneEquipmentInput(EnergyPlusData &state, GlobalNames::IntraObjUniquenessCheck( state, AlphArray(2), zoneEqModuleObject, cAlphaFields(2), state.dataZoneEquip->UniqueZoneEquipListNames, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("..another Controlled Zone has been assigned that {}.", cAlphaFields(2))); + ShowContinueError(state, std::format("..another Controlled Zone has been assigned that {}.", cAlphaFields(2))); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } thisEquipConfig.EquipListName = AlphArray(2); // the name of the list containing all the zone eq. @@ -856,8 +851,8 @@ void processZoneEquipmentInput(EnergyPlusData &state, Node::CompFluidStream::Primary, Node::ObjectIsNotParent); // all zone air state variables are if (thisEquipConfig.ZoneNode == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}: {}=\"{}\", invalid", RoutineName, zoneEqModuleObject, cAlphaFields(1), AlphArray(1))); - ShowContinueError(state, EnergyPlus::format("{} must be present.", cAlphaFields(5 + spaceFieldShift))); + ShowSevereError(state, std::format("{}{}: {}=\"{}\", invalid", RoutineName, zoneEqModuleObject, cAlphaFields(1), AlphArray(1))); + ShowContinueError(state, std::format("{} must be present.", cAlphaFields(5 + spaceFieldShift))); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } else { bool UniqueNodeError = false; @@ -887,8 +882,8 @@ void processZoneEquipmentInput(EnergyPlusData &state, int ZoneEquipListNum = ip->getObjectItemNum(state, CurrentModuleObject, thisEquipConfig.EquipListName); if (ZoneEquipListNum <= 0) { - ShowSevereError(state, EnergyPlus::format("{}{} not found = {}", RoutineName, CurrentModuleObject, thisEquipConfig.EquipListName)); - ShowContinueError(state, EnergyPlus::format("In ZoneHVAC:EquipmentConnections object, for Zone = {}", thisEquipConfig.ZoneName)); + ShowSevereError(state, std::format("{}{} not found = {}", RoutineName, CurrentModuleObject, thisEquipConfig.EquipListName)); + ShowContinueError(state, std::format("In ZoneHVAC:EquipmentConnections object, for Zone = {}", thisEquipConfig.ZoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } else { auto const &epListFields = ip->getJSONObjectItem(state, CurrentModuleObject, thisEquipConfig.EquipListName); @@ -903,9 +898,8 @@ void processZoneEquipmentInput(EnergyPlusData &state, thisZoneEquipList.LoadDistScheme = static_cast(getEnumValue(DataZoneEquipment::LoadDistNamesUC, Util::makeUPPER(loadDistName))); if (thisZoneEquipList.LoadDistScheme == DataZoneEquipment::LoadDist::Invalid) { - ShowSevereError(state, - EnergyPlus::format("{}{} = \"{}, Invalid choice\".", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); - ShowContinueError(state, EnergyPlus::format("...load_distribution_scheme=\"{}\".", loadDistName)); + ShowSevereError(state, std::format("{}{} = \"{}, Invalid choice\".", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); + ShowContinueError(state, std::format("...load_distribution_scheme=\"{}\".", loadDistName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -962,7 +956,7 @@ void processZoneEquipmentInput(EnergyPlusData &state, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("In {}={}", CurrentModuleObject, thisZoneEquipList.Name)); + ShowContinueError(state, std::format("In {}={}", CurrentModuleObject, thisZoneEquipList.Name)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -972,13 +966,12 @@ void processZoneEquipmentInput(EnergyPlusData &state, if ((thisZoneEquipList.CoolingPriority(ZoneEquipTypeNum) < 0) || (thisZoneEquipList.CoolingPriority(ZoneEquipTypeNum) > thisZoneEquipList.NumOfEquipTypes)) { - ShowSevereError(state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); + ShowSevereError(state, std::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); ShowContinueError( - state, - EnergyPlus::format("invalid zone_equipment_cooling_sequence=[{}].", thisZoneEquipList.CoolingPriority(ZoneEquipTypeNum))); + state, std::format("invalid zone_equipment_cooling_sequence=[{}].", thisZoneEquipList.CoolingPriority(ZoneEquipTypeNum))); ShowContinueError(state, "equipment sequence must be > 0 and <= number of equipment in the list."); if (thisZoneEquipList.CoolingPriority(ZoneEquipTypeNum) > 0) { - ShowContinueError(state, EnergyPlus::format("only {} in the list.", thisZoneEquipList.NumOfEquipTypes)); + ShowContinueError(state, std::format("only {} in the list.", thisZoneEquipList.NumOfEquipTypes)); } state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -987,13 +980,12 @@ void processZoneEquipmentInput(EnergyPlusData &state, ip->getIntFieldValue(extensibleInstance, extensionSchemaProps, "zone_equipment_heating_or_no_load_sequence"); if ((thisZoneEquipList.HeatingPriority(ZoneEquipTypeNum) < 0) || (thisZoneEquipList.HeatingPriority(ZoneEquipTypeNum) > thisZoneEquipList.NumOfEquipTypes)) { - ShowSevereError(state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); + ShowSevereError(state, std::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); ShowContinueError( - state, - EnergyPlus::format("invalid zone_equipment_heating_sequence=[{}].", thisZoneEquipList.HeatingPriority(ZoneEquipTypeNum))); + state, std::format("invalid zone_equipment_heating_sequence=[{}].", thisZoneEquipList.HeatingPriority(ZoneEquipTypeNum))); ShowContinueError(state, "equipment sequence must be > 0 and <= number of equipment in the list."); if (thisZoneEquipList.HeatingPriority(ZoneEquipTypeNum) > 0) { - ShowContinueError(state, EnergyPlus::format("only {} in the list.", thisZoneEquipList.NumOfEquipTypes)); + ShowContinueError(state, std::format("only {} in the list.", thisZoneEquipList.NumOfEquipTypes)); } state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -1047,7 +1039,7 @@ void processZoneEquipmentInput(EnergyPlusData &state, } if (thisZoneEquipList.EquipType(ZoneEquipTypeNum) == ZoneEquipType::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); + ShowSevereError(state, std::format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); ShowContinueError(state, EnergyPlus::format("..Invalid Equipment Type = {}", thisZoneEquipList.EquipType(ZoneEquipTypeNum))); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -1057,35 +1049,33 @@ void processZoneEquipmentInput(EnergyPlusData &state, // Check for multiple assignments for (int ZoneEquipTypeNum = 1; ZoneEquipTypeNum <= thisZoneEquipList.NumOfEquipTypes; ++ZoneEquipTypeNum) { if (count_eq(thisZoneEquipList.CoolingPriority, ZoneEquipTypeNum) > 1) { - ShowSevereError(state, EnergyPlus::format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); + ShowSevereError(state, std::format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); ShowContinueError( state, - EnergyPlus::format("...multiple assignments for Zone Equipment Cooling Sequence={}, must be 1-1 correspondence between " - "sequence assignments and number of equipment.", - ZoneEquipTypeNum)); + std::format("...multiple assignments for Zone Equipment Cooling Sequence={}, must be 1-1 correspondence between " + "sequence assignments and number of equipment.", + ZoneEquipTypeNum)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } else if (count_eq(thisZoneEquipList.CoolingPriority, ZoneEquipTypeNum) == 0) { - ShowWarningError(state, EnergyPlus::format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); - ShowContinueError( - state, - EnergyPlus::format("...zero assigned to Zone Equipment Cooling Sequence={}, apparent gap in sequence assignments in " - "this equipment list.", - ZoneEquipTypeNum)); + ShowWarningError(state, std::format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); + ShowContinueError(state, + std::format("...zero assigned to Zone Equipment Cooling Sequence={}, apparent gap in sequence assignments in " + "this equipment list.", + ZoneEquipTypeNum)); } if (count_eq(thisZoneEquipList.HeatingPriority, ZoneEquipTypeNum) > 1) { - ShowSevereError(state, EnergyPlus::format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); + ShowSevereError(state, std::format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); ShowContinueError(state, - EnergyPlus::format("...multiple assignments for Zone Equipment Heating or No-Load Sequence={}, must be 1-1 " - "correspondence between sequence assignments and number of equipment.", - ZoneEquipTypeNum)); + std::format("...multiple assignments for Zone Equipment Heating or No-Load Sequence={}, must be 1-1 " + "correspondence between sequence assignments and number of equipment.", + ZoneEquipTypeNum)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } else if (count_eq(thisZoneEquipList.HeatingPriority, ZoneEquipTypeNum) == 0) { - ShowWarningError(state, EnergyPlus::format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); - ShowContinueError( - state, - EnergyPlus::format("...zero assigned to Zone Equipment Heating or No-Load Sequence={}, apparent gap in sequence " - "assignments in this equipment list.", - ZoneEquipTypeNum)); + ShowWarningError(state, std::format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name)); + ShowContinueError(state, + std::format("...zero assigned to Zone Equipment Heating or No-Load Sequence={}, apparent gap in sequence " + "assignments in this equipment list.", + ZoneEquipTypeNum)); } } } // End ZoneHVAC:EquipmentList @@ -1134,8 +1124,8 @@ void processZoneEquipmentInput(EnergyPlusData &state, } } else { ShowContinueError(state, - EnergyPlus::format("Invalid Zone Air Inlet Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone = {}", - thisEquipConfig.ZoneName)); + std::format("Invalid Zone Air Inlet Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone = {}", + thisEquipConfig.ZoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -1168,8 +1158,8 @@ void processZoneEquipmentInput(EnergyPlusData &state, } } else { ShowContinueError(state, - EnergyPlus::format("Invalid Zone Air Exhaust Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone={}", - thisEquipConfig.ZoneName)); + std::format("Invalid Zone Air Exhaust Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone={}", + thisEquipConfig.ZoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -1223,8 +1213,8 @@ void processZoneEquipmentInput(EnergyPlusData &state, } } else { ShowContinueError(state, - EnergyPlus::format("Invalid Zone Return Air Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone={}", - thisEquipConfig.ZoneName)); + std::format("Invalid Zone Return Air Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone={}", + thisEquipConfig.ZoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -1252,9 +1242,8 @@ void processZoneEquipmentInput(EnergyPlusData &state, } else { ShowContinueError( state, - EnergyPlus::format( - "Invalid Zone Return Air Node 1 Flow Rate Basis Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone={}", - thisEquipConfig.ZoneName)); + std::format("Invalid Zone Return Air Node 1 Flow Rate Basis Node or NodeList Name in ZoneHVAC:EquipmentConnections object, for Zone={}", + thisEquipConfig.ZoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } } @@ -1273,8 +1262,8 @@ void processZoneEquipSplitterInput(EnergyPlusData &state, std::string const zeqTypeName = ip->getAlphaFieldValue(objectFields, objectSchemaProps, "zone_equipment_object_type"); thisZeqSplitter.zoneEquipType = DataZoneEquipment::ZoneEquipType(getEnumValue(zoneEquipTypeNamesUC, zeqTypeName)); if (thisZeqSplitter.zoneEquipType == ZoneEquipType::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}{} = {}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); - ShowContinueError(state, EnergyPlus::format("..Invalid Equipment Type = {}", zeqTypeName)); + ShowSevereError(state, std::format("{}{} = {}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); + ShowContinueError(state, std::format("..Invalid Equipment Type = {}", zeqTypeName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -1296,11 +1285,10 @@ void processZoneEquipSplitterInput(EnergyPlusData &state, } } if (!found) { - ShowSevereError(state, EnergyPlus::format("{}{} = {}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); + ShowSevereError(state, std::format("{}{} = {}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); ShowContinueError( - state, - EnergyPlus::format(".. Zone Equipment Object Type={} and Zone Equipment Name={} not found", zeqTypeName, thisZeqSplitter.zoneEquipName)); - ShowContinueError(state, EnergyPlus::format(".. in ZoneHVAC:EquipmentList={}", thisZoneEqList.Name)); + state, std::format(".. Zone Equipment Object Type={} and Zone Equipment Name={} not found", zeqTypeName, thisZeqSplitter.zoneEquipName)); + ShowContinueError(state, std::format(".. in ZoneHVAC:EquipmentList={}", thisZoneEqList.Name)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; return; } @@ -1323,8 +1311,8 @@ void processZoneEquipSplitterInput(EnergyPlusData &state, std::string spaceName = ip->getAlphaFieldValue(objectFields, objectSchemaProps, "control_space_name"); thisZeqSplitter.controlSpaceIndex = Util::FindItemInList(spaceName, state.dataHeatBal->space); if (thisZeqSplitter.controlSpaceIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); - ShowContinueError(state, EnergyPlus::format("Space Name={} not found.", spaceName)); + ShowSevereError(state, std::format("{}{}={}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); + ShowContinueError(state, std::format("Space Name={} not found.", spaceName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } } @@ -1344,8 +1332,8 @@ void processZoneEquipSplitterInput(EnergyPlusData &state, std::string const spaceName = ip->getAlphaFieldValue(extensibleInstance, extensionSchemaProps, "space_name"); thisZeqSpace.spaceIndex = Util::FindItemInList(spaceName, state.dataHeatBal->space); if (thisZeqSpace.spaceIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); - ShowContinueError(state, EnergyPlus::format("Space Name={} not found.", spaceName)); + ShowSevereError(state, std::format("{}{}={}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name)); + ShowContinueError(state, std::format("Space Name={} not found.", spaceName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } else { thisZeqSpace.fraction = ip->getRealFieldValue(extensibleInstance, extensionSchemaProps, "space_fraction"); @@ -1397,11 +1385,11 @@ void processZoneEquipMixerInput(EnergyPlusData &state, } } if (!found) { - ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZeqMixer.Name)); + ShowSevereError(state, std::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZeqMixer.Name)); ShowContinueError(state, - EnergyPlus::format("Zone Equipment Inlet Node Name={} is not an exhaust node for ZoneHVAC:EquipmentConnections={}.", - state.dataLoopNodes->NodeID(thisZeqMixer.outletNodeNum), - thisZoneEquipConfig.ZoneName)); + std::format("Zone Equipment Inlet Node Name={} is not an exhaust node for ZoneHVAC:EquipmentConnections={}.", + state.dataLoopNodes->NodeID(thisZeqMixer.outletNodeNum), + thisZoneEquipConfig.ZoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -1421,8 +1409,8 @@ void processZoneEquipMixerInput(EnergyPlusData &state, std::string const spaceName = ip->getAlphaFieldValue(extensibleInstance, extensionSchemaProps, "space_name"); thisZeqSpace.spaceIndex = Util::FindItemInList(spaceName, state.dataHeatBal->space); if (thisZeqSpace.spaceIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZeqMixer.Name)); - ShowContinueError(state, EnergyPlus::format("Space Name={} not found.", spaceName)); + ShowSevereError(state, std::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZeqMixer.Name)); + ShowContinueError(state, std::format("Space Name={} not found.", spaceName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } else { thisZeqSpace.fraction = ip->getRealFieldValue(extensibleInstance, extensionSchemaProps, "space_fraction"); @@ -1445,11 +1433,11 @@ void processZoneEquipMixerInput(EnergyPlusData &state, } } if (!found) { - ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZeqMixer.Name)); + ShowSevereError(state, std::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZeqMixer.Name)); ShowContinueError(state, - EnergyPlus::format("Space Node Name={} is not an exhaust node for SpaceHVAC:EquipmentConnections={}.", - state.dataLoopNodes->NodeID(thisZeqSpace.spaceNodeNum), - thisSpaceEquipConfig.ZoneName)); + std::format("Space Node Name={} is not an exhaust node for SpaceHVAC:EquipmentConnections={}.", + state.dataLoopNodes->NodeID(thisZeqSpace.spaceNodeNum), + thisSpaceEquipConfig.ZoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } } @@ -1492,11 +1480,11 @@ void processZoneReturnMixerInput(EnergyPlusData &state, } } if (!found) { - ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZretMixer.Name)); + ShowSevereError(state, std::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZretMixer.Name)); ShowContinueError(state, - EnergyPlus::format("Zone Equipment Return Air Node Name={} is not a return air node for ZoneHVAC:EquipmentConnections={}.", - state.dataLoopNodes->NodeID(thisZretMixer.outletNodeNum), - thisZoneEquipConfig.ZoneName)); + std::format("Zone Equipment Return Air Node Name={} is not a return air node for ZoneHVAC:EquipmentConnections={}.", + state.dataLoopNodes->NodeID(thisZretMixer.outletNodeNum), + thisZoneEquipConfig.ZoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } @@ -1513,8 +1501,8 @@ void processZoneReturnMixerInput(EnergyPlusData &state, std::string const spaceName = ip->getAlphaFieldValue(extensibleInstance, extensionSchemaProps, "space_name"); thisZeqSpace.spaceIndex = Util::FindItemInList(spaceName, state.dataHeatBal->space); if (thisZeqSpace.spaceIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZretMixer.Name)); - ShowContinueError(state, EnergyPlus::format("Space Name={} not found.", spaceName)); + ShowSevereError(state, std::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZretMixer.Name)); + ShowContinueError(state, std::format("Space Name={} not found.", spaceName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } else { thisZeqSpace.spaceNodeNum = @@ -1537,12 +1525,11 @@ void processZoneReturnMixerInput(EnergyPlusData &state, } } if (!found) { - ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZretMixer.Name)); - ShowContinueError( - state, - EnergyPlus::format("Space Return Air Node Name={} is not a return air node for SpaceHVAC:EquipmentConnections={}.", - state.dataLoopNodes->NodeID(thisZeqSpace.spaceNodeNum), - thisSpaceEquipConfig.ZoneName)); + ShowSevereError(state, std::format("{}{}={}", RoutineName, zeqMixerModuleObject, thisZretMixer.Name)); + ShowContinueError(state, + std::format("Space Return Air Node Name={} is not a return air node for SpaceHVAC:EquipmentConnections={}.", + state.dataLoopNodes->NodeID(thisZeqSpace.spaceNodeNum), + thisSpaceEquipConfig.ZoneName)); state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true; } } @@ -1698,12 +1685,11 @@ int GetReturnAirNodeForZone(EnergyPlusData &state, ReturnAirNodeNumber = thisZoneEquip.ReturnNode(1); if (thisZoneEquip.NumReturnNodes > 1) { ShowWarningError( - state, - EnergyPlus::format("GetReturnAirNodeForZone: {}, request for zone return node is ambiguous.", calledFromDescription)); + state, std::format("GetReturnAirNodeForZone: {}, request for zone return node is ambiguous.", calledFromDescription)); ShowContinueError(state, - EnergyPlus::format("Zone={} has {} return nodes. First return node will be used.", - thisZoneEquip.ZoneName, - thisZoneEquip.NumReturnNodes)); + std::format("Zone={} has {} return nodes. First return node will be used.", + thisZoneEquip.ZoneName, + thisZoneEquip.NumReturnNodes)); } } else { for (int nodeCount = 1; nodeCount <= thisZoneEquip.NumReturnNodes; ++nodeCount) { @@ -1831,7 +1817,7 @@ int GetZoneEquipControlledZoneNum(EnergyPlusData &state, DataZoneEquipment::Zone } } ShowSevereError(state, - fmt::format("{}{}=\"{}\" is not on any ZoneHVAC:Equipmentlist. It will not be simulated.", + std::format("{}{}=\"{}\" is not on any ZoneHVAC:Equipmentlist. It will not be simulated.", RoutineName, zoneEquipTypeNamesUC[(int)zoneEquipType], EquipmentName)); @@ -1912,10 +1898,10 @@ void ZoneEquipmentSplitterMixer::size(EnergyPlusData &state) if (!state.dataHeatBal->doSpaceHeatBalanceSizing && (this->spaceSizingBasis == DataZoneEquipment::SpaceEquipSizingBasis::DesignCoolingLoad || (this->spaceSizingBasis == DataZoneEquipment::SpaceEquipSizingBasis::DesignHeatingLoad))) { ShowSevereError(state, - EnergyPlus::format("ZoneEquipmentSplitterMixer::size: {} is unknown for {}={}. Unable to autosize Space Fractions.", - DataZoneEquipment::spaceEquipSizingBasisNamesUC[(int)this->spaceSizingBasis], - Node::ConnectionObjectTypeNames[(int)this->spaceEquipType], - this->Name)); + std::format("ZoneEquipmentSplitterMixer::size: {} is unknown for {}={}. Unable to autosize Space Fractions.", + DataZoneEquipment::spaceEquipSizingBasisNamesUC[(int)this->spaceSizingBasis], + Node::ConnectionObjectTypeNames[(int)this->spaceEquipType], + this->Name)); ShowFatalError(state, "Set \"Do Space Heat Balance for Sizing\" to Yes in ZoneAirHeatBalanceAlgorithm or choose a different Space Fraction Method."); return; @@ -1958,12 +1944,12 @@ void ZoneEquipmentSplitterMixer::size(EnergyPlusData &state) if (spacesTotal < 0.00001) { ShowSevereError(state, - EnergyPlus::format("ZoneEquipmentSplitterMixer::size: Total {} is zero for {}={}. Unable to autosize Space Fractions.", - DataZoneEquipment::spaceEquipSizingBasisNamesUC[(int)this->spaceSizingBasis], - Node::ConnectionObjectTypeNames[(int)this->spaceEquipType], - this->Name)); + std::format("ZoneEquipmentSplitterMixer::size: Total {} is zero for {}={}. Unable to autosize Space Fractions.", + DataZoneEquipment::spaceEquipSizingBasisNamesUC[(int)this->spaceSizingBasis], + Node::ConnectionObjectTypeNames[(int)this->spaceEquipType], + this->Name)); Real64 spaceFrac = 1.0 / (int)this->spaces.size(); - ShowContinueError(state, EnergyPlus::format("Setting space fractions to 1/number of spaces = {}.", spaceFrac)); + ShowContinueError(state, std::format("Setting space fractions to 1/number of spaces = {}.", spaceFrac)); for (auto &thisSpace : this->spaces) { thisSpace.fraction = spaceFrac; } @@ -2000,7 +1986,7 @@ void ZoneEquipmentSplitterMixer::size(EnergyPlusData &state) BaseSizer::reportSizerOutput(state, Node::ConnectionObjectTypeNames[(int)this->spaceEquipType], this->Name, - EnergyPlus::format("Space {} Fraction", spaceCounter), + std::format("Space {} Fraction", spaceCounter), thisSpace.fraction); } } diff --git a/src/EnergyPlus/DaylightingDevices.cc b/src/EnergyPlus/DaylightingDevices.cc index 11105ad6958..68d55908662 100644 --- a/src/EnergyPlus/DaylightingDevices.cc +++ b/src/EnergyPlus/DaylightingDevices.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -662,9 +663,9 @@ namespace Dayltg { Util::FindItemInList(ipsc->cAlphaArgs(4), state.dataConstruction->Construct); if (state.dataDaylightingDevicesData->TDDPipe(PipeNum).Construction == 0) { - ShowSevereError(state, - EnergyPlus::format( - "{} = {}: Pipe construction {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(4))); + ShowSevereError( + state, + std::format("{} = {}: Pipe construction {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(4))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } else { state.dataConstruction->Construct(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Construction).IsUsed = true; @@ -673,8 +674,8 @@ namespace Dayltg { if (ipsc->rNumericArgs(1) > 0) { state.dataDaylightingDevicesData->TDDPipe(PipeNum).Diameter = ipsc->rNumericArgs(1); } else { - ShowSevereError( - state, EnergyPlus::format("{} = {}: Pipe diameter must be greater than zero.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, + std::format("{} = {}: Pipe diameter must be greater than zero.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -685,9 +686,9 @@ namespace Dayltg { std::abs(PipeArea - state.dataSurface->Surface(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome).Area), state.dataSurface->Surface(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome).Area) > 0.1) { // greater than 10% ShowSevereError(state, - EnergyPlus::format("{} = {}: Pipe and dome/diffuser areas are significantly different (>10%).", - cCurrentModuleObject, - ipsc->cAlphaArgs(1))); + std::format("{} = {}: Pipe and dome/diffuser areas are significantly different (>10%).", + cCurrentModuleObject, + ipsc->cAlphaArgs(1))); ShowContinueError( state, EnergyPlus::format("...Pipe Area=[{:.4R}]; Dome/Diffuser Area=[{:.4R}].", @@ -695,9 +696,9 @@ namespace Dayltg { state.dataSurface->Surface(state.dataDaylightingDevicesData->TDDPipe(PipeNum).Dome).Area)); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } else { - ShowWarningError(state, - EnergyPlus::format( - "{} = {}: Pipe and dome/diffuser areas differ by > .1 m2.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowWarningError( + state, + std::format("{} = {}: Pipe and dome/diffuser areas differ by > .1 m2.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError( state, EnergyPlus::format("...Pipe Area=[{:.4R}]; Dome/Diffuser Area=[{:.4R}].", @@ -709,8 +710,8 @@ namespace Dayltg { if (ipsc->rNumericArgs(2) > 0) { state.dataDaylightingDevicesData->TDDPipe(PipeNum).TotLength = ipsc->rNumericArgs(2); } else { - ShowSevereError( - state, EnergyPlus::format("{} = {}: Pipe length must be greater than zero.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, + std::format("{} = {}: Pipe length must be greater than zero.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -718,9 +719,9 @@ namespace Dayltg { state.dataDaylightingDevicesData->TDDPipe(PipeNum).Reff = ipsc->rNumericArgs(3); } else { ShowSevereError(state, - EnergyPlus::format("{} = {}: Effective thermal resistance (R value) must be greater than zero.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1))); + std::format("{} = {}: Effective thermal resistance (R value) must be greater than zero.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } @@ -729,13 +730,12 @@ namespace Dayltg { if (state.dataDaylightingDevicesData->TDDPipe(PipeNum).NumOfTZones < 1) { ShowWarningError(state, - EnergyPlus::format("{} = {}: No transition zones specified. All pipe absorbed solar goes to exterior.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1))); + std::format("{} = {}: No transition zones specified. All pipe absorbed solar goes to exterior.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1))); } else if (state.dataDaylightingDevicesData->TDDPipe(PipeNum).NumOfTZones > MaxTZones) { - ShowSevereError( - state, - EnergyPlus::format("{} = {}: Maximum number of transition zones exceeded.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, + std::format("{} = {}: Maximum number of transition zones exceeded.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } else { state.dataDaylightingDevicesData->TDDPipe(PipeNum).TZone.allocate(state.dataDaylightingDevicesData->TDDPipe(PipeNum).NumOfTZones); @@ -753,18 +753,17 @@ namespace Dayltg { state.dataDaylightingDevicesData->TDDPipe(PipeNum).TZone(TZoneNum) = Util::FindItemInList(TZoneName, state.dataHeatBal->Zone); if (state.dataDaylightingDevicesData->TDDPipe(PipeNum).TZone(TZoneNum) == 0) { ShowSevereError( - state, - EnergyPlus::format("{} = {}: Transition zone {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), TZoneName)); + state, std::format("{} = {}: Transition zone {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), TZoneName)); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } state.dataDaylightingDevicesData->TDDPipe(PipeNum).TZoneLength(TZoneNum) = ipsc->rNumericArgs(TZoneNum + 3); if (state.dataDaylightingDevicesData->TDDPipe(PipeNum).TZoneLength(TZoneNum) < 0) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Transition zone length for {} must be zero or greater.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - TZoneName)); + std::format("{} = {}: Transition zone length for {} must be zero or greater.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + TZoneName)); state.dataDaylightingDevices->GetTDDInputErrorsFound = true; } } // TZoneNum @@ -833,59 +832,58 @@ namespace Dayltg { int SurfNum = Util::FindItemInList(ipsc->cAlphaArgs(2), state.dataSurface->Surface); if (SurfNum == 0) { - ShowSevereError( - state, EnergyPlus::format("{} = {}: Window {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(2))); + ShowSevereError(state, + std::format("{} = {}: Window {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } else { if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Window) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Window {} is not of surface type WINDOW.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + std::format("{} = {}: Window {} is not of surface type WINDOW.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } if (state.dataSurface->SurfDaylightingShelfInd(SurfNum) > 0) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Window {} is referenced by more than one shelf.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + std::format("{} = {}: Window {} is referenced by more than one shelf.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } if (state.dataSurface->Surface(SurfNum).HasShadeControl) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Window {} must not have a shading control.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + std::format("{} = {}: Window {} must not have a shading control.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } if (state.dataSurface->Surface(SurfNum).FrameDivider > 0) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Window {} must not have a frame/divider.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + std::format("{} = {}: Window {} must not have a frame/divider.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } if (state.dataSurface->Surface(SurfNum).Sides != 4) { ShowSevereError( state, - EnergyPlus::format( - "{} = {}: Window {} must have 4 sides.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(2))); + std::format("{} = {}: Window {} must have 4 sides.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } if (state.dataConstruction->Construct(state.dataSurface->Surface(SurfNum).Construction).WindowTypeEQL) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Window {} Equivalent Layer Window is not supported.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(2))); + std::format("{} = {}: Window {} Equivalent Layer Window is not supported.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(2))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } @@ -898,26 +896,26 @@ namespace Dayltg { SurfNum = Util::FindItemInList(ipsc->cAlphaArgs(3), state.dataSurface->Surface); if (SurfNum == 0) { - ShowSevereError(state, - EnergyPlus::format( - "{} = {}: Inside shelf {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(3))); + ShowSevereError( + state, + std::format("{} = {}: Inside shelf {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } else { // No error if shelf belongs to more than one window, e.g. concave corners if (state.dataSurface->Surface(SurfNum).ExtBoundCond != SurfNum) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Inside shelf {} must be its own Outside Boundary Condition Object.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(3))); + std::format("{} = {}: Inside shelf {} must be its own Outside Boundary Condition Object.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } if (state.dataSurface->Surface(SurfNum).Sides != 4) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = {}: Inside shelf {} must have 4 sides.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(3))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } @@ -931,35 +929,35 @@ namespace Dayltg { SurfNum = Util::FindItemInList(ipsc->cAlphaArgs(4), state.dataSurface->Surface); if (SurfNum == 0) { - ShowSevereError(state, - EnergyPlus::format( - "{} = {}: Outside shelf {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(4))); + ShowSevereError( + state, + std::format("{} = {}: Outside shelf {} not found.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(4))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } else { // No error if shelf belongs to more than one window, e.g. concave corners if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Shading) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Outside shelf {} is not a Shading:Zone:Detailed object.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(4))); + std::format("{} = {}: Outside shelf {} is not a Shading:Zone:Detailed object.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(4))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } if (state.dataSurface->Surface(SurfNum).shadowSurfSched != nullptr) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Outside shelf {} must not have a transmittance schedule.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(4))); + std::format("{} = {}: Outside shelf {} must not have a transmittance schedule.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(4))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } if (state.dataSurface->Surface(SurfNum).Sides != 4) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = {}: Outside shelf {} must have 4 sides.", cCurrentModuleObject, ipsc->cAlphaArgs(1), ipsc->cAlphaArgs(4))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } @@ -971,17 +969,17 @@ namespace Dayltg { if (ConstrNum == 0) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Outside shelf construction {} not found.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(5))); + std::format("{} = {}: Outside shelf construction {} not found.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(5))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } else if (state.dataConstruction->Construct(ConstrNum).TypeIsWindow) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Outside shelf construction {} must not have WindowMaterial:Glazing.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cAlphaArgs(5))); + std::format("{} = {}: Outside shelf construction {} must not have WindowMaterial:Glazing.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cAlphaArgs(5))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } else { state.dataDaylightingDevicesData->Shelf(ShelfNum).Construction = ConstrNum; @@ -989,9 +987,9 @@ namespace Dayltg { } } else { ShowSevereError(state, - EnergyPlus::format("{} = {}: Outside shelf requires an outside shelf construction to be specified.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1))); + std::format("{} = {}: Outside shelf requires an outside shelf construction to be specified.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1))); state.dataDaylightingDevices->GetShelfInputErrorsFound = true; } @@ -1000,11 +998,10 @@ namespace Dayltg { state.dataDaylightingDevicesData->Shelf(ShelfNum).ViewFactor = ipsc->rNumericArgs(1); if (ipsc->rNumericArgs(1) == 0.0) { - ShowWarningError( - state, - EnergyPlus::format("{} = {}: View factor to outside shelf is zero. Shelf does not reflect on window.", - cCurrentModuleObject, - ipsc->cAlphaArgs(1))); + ShowWarningError(state, + std::format("{} = {}: View factor to outside shelf is zero. Shelf does not reflect on window.", + cCurrentModuleObject, + ipsc->cAlphaArgs(1))); } } else { state.dataDaylightingDevicesData->Shelf(ShelfNum).ViewFactor = @@ -1027,8 +1024,7 @@ namespace Dayltg { if (state.dataDaylightingDevicesData->Shelf(ShelfNum).InSurf == 0 && state.dataDaylightingDevicesData->Shelf(ShelfNum).OutSurf == 0) { ShowWarningError( - state, - EnergyPlus::format("{} = {}: No inside shelf or outside shelf was specified.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); + state, std::format("{} = {}: No inside shelf or outside shelf was specified.", cCurrentModuleObject, ipsc->cAlphaArgs(1))); } } // ShelfNum @@ -1487,9 +1483,9 @@ namespace Dayltg { if ((int)state.dataDaylightingDevicesData->TDDPipe.size() <= 0) { ShowFatalError(state, - EnergyPlus::format("FindTDDPipe: Surface={}, TDD:Dome object does not reference a valid Diffuser object....needs " - "DaylightingDevice:Tubular of same name as Surface.", - state.dataSurface->Surface(WinNum).Name)); + std::format("FindTDDPipe: Surface={}, TDD:Dome object does not reference a valid Diffuser object....needs " + "DaylightingDevice:Tubular of same name as Surface.", + state.dataSurface->Surface(WinNum).Name)); } for (PipeNum = 1; PipeNum <= (int)state.dataDaylightingDevicesData->TDDPipe.size(); ++PipeNum) { @@ -1608,8 +1604,8 @@ namespace Dayltg { L = state.dataSurface->Surface(state.dataDaylightingDevicesData->Shelf(ShelfNum).OutSurf).Width; } else { ShowFatalError(state, - EnergyPlus::format("DaylightingDevice:Shelf = {}: Width of window and outside shelf do not match.", - state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); + std::format("DaylightingDevice:Shelf = {}: Width of window and outside shelf do not match.", + state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); } // Error if more or less than two vertices match @@ -1626,13 +1622,13 @@ namespace Dayltg { if (NumMatch < 2) { ShowWarningError( state, - EnergyPlus::format( + std::format( "DaylightingDevice:Shelf = {}: Window and outside shelf must share two vertices. View factor calculation may be inaccurate.", state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); } else if (NumMatch > 2) { ShowFatalError(state, - EnergyPlus::format("DaylightingDevice:Shelf = {}: Window and outside shelf share too many vertices.", - state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); + std::format("DaylightingDevice:Shelf = {}: Window and outside shelf share too many vertices.", + state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); } // Calculate exact analytical view factor from window to outside shelf @@ -1660,10 +1656,9 @@ namespace Dayltg { viewFactorToGround = 0.0; } if (viewFactorToShelf <= 0.0) { // No shelf impact for which to account - ShowWarningError( - state, - EnergyPlus::format("DaylightingDevice:Shelf = {}: Window view factor to shelf was less than 0. This should not happen.", - state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); + ShowWarningError(state, + std::format("DaylightingDevice:Shelf = {}: Window view factor to shelf was less than 0. This should not happen.", + state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); ShowContinueError(state, "The view factor has been reset to zero."); viewFactorToShelf = 0.0; if ((viewFactorToGround + viewFactorToSky) > 1.0) { // This data came in incorrect, fix by proportional reduction @@ -1671,9 +1666,9 @@ namespace Dayltg { viewFactorToSky = 1.0 - viewFactorToGround; ShowWarningError( state, - EnergyPlus::format("DaylightingDevice:Shelf = {}: The sum of the window view factors to ground and sky were greater than 1. " - "This should not happen.", - state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); + std::format("DaylightingDevice:Shelf = {}: The sum of the window view factors to ground and sky were greater than 1. " + "This should not happen.", + state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); ShowContinueError( state, "The view factors have been reset to so that they do not exceed 1. Check/fix your input file data to avoid this issue."); } @@ -1683,10 +1678,9 @@ namespace Dayltg { return; // nothing wrong here } if (viewFactorToShelf >= 1.0) { // Don't allow shelf view of greater than 1 (zero out other views) - ShowWarningError( - state, - EnergyPlus::format("DaylightingDevice:Shelf = {}: Window view factor to shelf was greater than 1. This should not happen.", - state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); + ShowWarningError(state, + std::format("DaylightingDevice:Shelf = {}: Window view factor to shelf was greater than 1. This should not happen.", + state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); ShowContinueError(state, "The view factor has been reset to 1 and the other view factors to sky and ground have been set to 0."); viewFactorToShelf = 1.0; viewFactorToGround = 0.0; @@ -1820,11 +1814,10 @@ namespace Dayltg { viewFactorToGround = vfGroundAdjustMin + heightRatio * (vfGroundAdjustMax - vfGroundAdjustMin); viewFactorToSky = leftoverViewFactor - viewFactorToGround; } - ShowWarningError( - state, - EnergyPlus::format("DaylightingDevice:Shelf = {}: As a result of user input (see previous messages), at least one view factor but " - "possibly more than one was reduced.", - state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); + ShowWarningError(state, + std::format("DaylightingDevice:Shelf = {}: As a result of user input (see previous messages), at least one view factor but " + "possibly more than one was reduced.", + state.dataDaylightingDevicesData->Shelf(ShelfNum).Name)); ShowContinueError(state, "These include the view factors to the ground, the sky, and the exterior light shelf. Note that views to other exterior " "surfaces could further complicated this."); diff --git a/src/EnergyPlus/DaylightingManager.cc b/src/EnergyPlus/DaylightingManager.cc index 6410aceec2d..fd59eff02b4 100644 --- a/src/EnergyPlus/DaylightingManager.cc +++ b/src/EnergyPlus/DaylightingManager.cc @@ -49,6 +49,7 @@ #include #include #include +#include #include // ObjexxFCL Headers @@ -3931,10 +3932,10 @@ void GetDaylightingParametersInput(EnergyPlusData &state) if (s_surf->Surface(intWin).Class == SurfaceClass::Window && SurfNumAdj > 0) { auto &adjSurfEnclosure(state.dataViewFactor->EnclSolInfo(s_surf->Surface(SurfNumAdj).SolarEnclIndex)); if (adjSurfEnclosure.TotalEnclosureDaylRefPoints > 0) { - ShowSevereError(state, EnergyPlus::format("Window={} has Window Shading Control with", surf.Name)); + ShowSevereError(state, std::format("Window={} has Window Shading Control with", surf.Name)); ShowContinueError(state, "MeetDaylightIlluminanceSetpoint and is in a Daylighting zone or enclosure"); ShowContinueError(state, "that shares an interior window with another Daylighting zone or enclosure"); - ShowContinueError(state, EnergyPlus::format("Adjacent Zone or enclosure indicated={}", adjSurfEnclosure.Name)); + ShowContinueError(state, std::format("Adjacent Zone or enclosure indicated={}", adjSurfEnclosure.Name)); ErrorsFound = true; } } @@ -3958,14 +3959,14 @@ void GetDaylightingParametersInput(EnergyPlusData &state) for (int refPtNum = 1; refPtNum <= enclSol.TotalEnclosureDaylRefPoints; ++refPtNum) { auto &refPt = surfWin.refPts(refPtNum); SetupOutputVariable(state, - EnergyPlus::format("Daylighting Window Reference Point {} Illuminance", refPtNum), + std::format("Daylighting Window Reference Point {} Illuminance", refPtNum), Constant::Units::lux, refPt.illumFromWinRep, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, surf.Name); SetupOutputVariable(state, - EnergyPlus::format("Daylighting Window Reference Point {} View Luminance", refPtNum), + std::format("Daylighting Window Reference Point {} View Luminance", refPtNum), Constant::Units::cd_m2, refPt.lumWinRep, OutputProcessor::TimeStepType::Zone, @@ -3999,8 +4000,7 @@ void GetDaylightingParametersInput(EnergyPlusData &state) for (int refPtNum = 1; refPtNum <= control.TotalDaylRefPoints; ++refPtNum) { ++refPtCount; // Count reference points across each daylighting control in the same enclosure auto &refPt = surfWindow.refPts(refPtCount); - std::string varKey = - EnergyPlus::format("{} to {}", surf.Name, state.dataDayltg->DaylRefPt(control.refPts(refPtNum).num).Name); + std::string varKey = std::format("{} to {}", surf.Name, state.dataDayltg->DaylRefPt(control.refPts(refPtNum).num).Name); SetupOutputVariable(state, "Daylighting Window Reference Point Illuminance", Constant::Units::lux, @@ -4172,12 +4172,12 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) if (enclNum != state.dataHeatBal->space(spaceNum).solarEnclosureNum) { ShowSevereError( state, - EnergyPlus::format("{}=\"{}\" All spaces in the zone must be in the same enclosure for daylighting illuminance maps.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("Zone=\"{}\" spans multiple enclosures. Use a Space Name instead.", - state.dataHeatBal->Zone(zoneNum).Name)); + std::format("{}=\"{}\" All spaces in the zone must be in the same enclosure for daylighting illuminance maps.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); + ShowContinueError( + state, + std::format("Zone=\"{}\" spans multiple enclosures. Use a Space Name instead.", state.dataHeatBal->Zone(zoneNum).Name)); ErrorsFound = true; break; } @@ -4186,11 +4186,11 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) int const spaceNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataHeatBal->space); if (spaceNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } else { illumMap.spaceIndex = spaceNum; @@ -4204,7 +4204,7 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) illumMap.Xmin = s_ipsc->rNumericArgs(2); illumMap.Xmax = s_ipsc->rNumericArgs(3); if (s_ipsc->rNumericArgs(2) > s_ipsc->rNumericArgs(3)) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid entry.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", invalid entry.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("...{} {:.2R} must be <= {} {:.2R}.", s_ipsc->cNumericFieldNames(2), @@ -4219,7 +4219,7 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) illumMap.Ymin = s_ipsc->rNumericArgs(5); illumMap.Ymax = s_ipsc->rNumericArgs(6); if (s_ipsc->rNumericArgs(5) > s_ipsc->rNumericArgs(6)) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid entry.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", invalid entry.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("...{} {:.2R} must be <= {} {:.2R}.", s_ipsc->cNumericFieldNames(5), @@ -4232,16 +4232,15 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) illumMap.Yinc = (illumMap.Ynum != 1) ? ((illumMap.Ymax - illumMap.Ymin) / (illumMap.Ynum - 1)) : 0.0; if (illumMap.Xnum * illumMap.Ynum > MaxMapRefPoints) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", too many map points specified.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", too many map points specified.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - EnergyPlus::format("...{}[{}] * {}[{}].= [{}] must be <= [{}].", - s_ipsc->cNumericFieldNames(4), - illumMap.Xnum, - s_ipsc->cNumericFieldNames(7), - illumMap.Ynum, - illumMap.Xnum * illumMap.Ynum, - MaxMapRefPoints)); + std::format("...{}[{}] * {}[{}].= [{}] must be <= [{}].", + s_ipsc->cNumericFieldNames(4), + illumMap.Xnum, + s_ipsc->cNumericFieldNames(7), + illumMap.Ynum, + illumMap.Xnum * illumMap.Ynum, + MaxMapRefPoints)); ErrorsFound = true; } } // MapNum @@ -4273,10 +4272,10 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) } else { dl->MapColSep = DataStringGlobals::CharComma; // comma ShowWarningError(state, - EnergyPlus::format("{}: invalid {}=\"{}\", Commas will be used to separate fields.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(1), - s_ipsc->cAlphaArgs(1))); + std::format("{}: invalid {}=\"{}\", Commas will be used to separate fields.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(1), + s_ipsc->cAlphaArgs(1))); s_ipsc->cAlphaArgs(1) = "COMMA"; } } @@ -4312,11 +4311,11 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) if (illumMap.TotalMapRefPoints > MaxMapRefPoints) { ShowSevereError(state, "GetDaylighting Parameters: Total Map Reference points entered is greater than maximum allowed."); - ShowContinueError(state, EnergyPlus::format("Occurs in Zone={}", zone.Name)); + ShowContinueError(state, std::format("Occurs in Zone={}", zone.Name)); ShowContinueError(state, - EnergyPlus::format("Maximum reference points allowed={}, entered amount ( when error first occurred )={}", - MaxMapRefPoints, - illumMap.TotalMapRefPoints)); + std::format("Maximum reference points allowed={}, entered amount ( when error first occurred )={}", + MaxMapRefPoints, + illumMap.TotalMapRefPoints)); ErrorsFound = true; break; } @@ -4397,10 +4396,9 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) } if (refPt.absCoords.x < zone.MinimumX || refPt.absCoords.x > zone.MaximumX) { - ShowWarningError(state, - EnergyPlus::format("GetInputIlluminanceMap: Reference Map point #[{}], X Value outside Zone Min/Max X, Zone={}", - iRefPt, - zone.Name)); + ShowWarningError( + state, + std::format("GetInputIlluminanceMap: Reference Map point #[{}], X Value outside Zone Min/Max X, Zone={}", iRefPt, zone.Name)); ShowContinueError(state, EnergyPlus::format("...X Reference Point= {:.2R}, Zone Minimum X= {:.2R}, Zone Maximum X= {:.2R}", refPt.absCoords.x, @@ -4412,10 +4410,9 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) : (refPt.absCoords.x - zone.MaximumX))); } if (refPt.absCoords.y < zone.MinimumY || refPt.absCoords.y > zone.MaximumY) { - ShowWarningError(state, - EnergyPlus::format("GetInputIlluminanceMap: Reference Map point #[{}], Y Value outside Zone Min/Max Y, Zone={}", - iRefPt, - zone.Name)); + ShowWarningError( + state, + std::format("GetInputIlluminanceMap: Reference Map point #[{}], Y Value outside Zone Min/Max Y, Zone={}", iRefPt, zone.Name)); ShowContinueError(state, EnergyPlus::format("...Y Reference Point= {:.2R}, Zone Minimum Y= {:.2R}, Zone Maximum Y= {:.2R}", refPt.absCoords.y, @@ -4427,10 +4424,9 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) : (refPt.absCoords.y - zone.MaximumY))); } if (refPt.absCoords.z < zone.MinimumZ || refPt.absCoords.z > zone.MaximumZ) { - ShowWarningError(state, - EnergyPlus::format("GetInputIlluminanceMap: Reference Map point #[{}], Z Value outside Zone Min/Max Z, Zone={}", - iRefPt, - zone.Name)); + ShowWarningError( + state, + std::format("GetInputIlluminanceMap: Reference Map point #[{}], Z Value outside Zone Min/Max Z, Zone={}", iRefPt, zone.Name)); ShowContinueError(state, EnergyPlus::format("...Z Reference Point= {:.2R}, Zone Minimum Z= {:.2R}, Zone Maximum Z= {:.2R}", refPt.absCoords.z, @@ -4453,8 +4449,8 @@ void GetInputIlluminanceMap(EnergyPlusData &state, bool &ErrorsFound) int enclNum = illumMap.enclIndex; if (!dl->enclDaylight(enclNum).hasSplitFluxDaylighting && !ZoneMsgDone(illumMap.zoneIndex)) { ShowSevereError(state, - EnergyPlus::format("Zone Name in Output:IlluminanceMap is not used for Daylighting:Controls={}", - state.dataHeatBal->Zone(illumMap.zoneIndex).Name)); + std::format("Zone Name in Output:IlluminanceMap is not used for Daylighting:Controls={}", + state.dataHeatBal->Zone(illumMap.zoneIndex).Name)); ErrorsFound = true; } } @@ -4551,10 +4547,10 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) int zoneSpaceNum = state.dataHeatBal->Zone(zoneNum).spaceIndexes(spaceCounter); if (daylightControl.enclIndex != state.dataHeatBal->space(zoneSpaceNum).solarEnclosureNum) { ShowSevereError(state, - EnergyPlus::format("{}: invalid {}=\"{}\" All spaces in the zone must be in the same enclosure for daylighting.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}: invalid {}=\"{}\" All spaces in the zone must be in the same enclosure for daylighting.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; break; } @@ -4563,11 +4559,11 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) // Check if this is a duplicate if (spaceHasDaylightingControl(zoneSpaceNum)) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\" Space=\"{}\" already has a {} object assigned to it.", - s_ipsc->cCurrentModuleObject, - daylightControl.Name, - state.dataHeatBal->space(zoneSpaceNum).Name, - s_ipsc->cCurrentModuleObject)); + std::format("{}=\"{}\" Space=\"{}\" already has a {} object assigned to it.", + s_ipsc->cCurrentModuleObject, + daylightControl.Name, + state.dataHeatBal->space(zoneSpaceNum).Name, + s_ipsc->cCurrentModuleObject)); ShowContinueError(state, "This control will override the lighting power factor for this space."); } spaceHasDaylightingControl(zoneSpaceNum) = true; @@ -4576,8 +4572,7 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) int const spaceNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataHeatBal->space); if (spaceNum == 0) { ShowSevereError( - state, - EnergyPlus::format("{}: invalid {}=\"{}\".", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + state, std::format("{}: invalid {}=\"{}\".", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); ErrorsFound = true; continue; } @@ -4587,11 +4582,11 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) // Check if this is a duplicate if (spaceHasDaylightingControl(spaceNum)) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\" Space=\"{}\" already has a {} object assigned to it.", - s_ipsc->cCurrentModuleObject, - daylightControl.Name, - state.dataHeatBal->space(spaceNum).Name, - s_ipsc->cCurrentModuleObject)); + std::format("{}=\"{}\" Space=\"{}\" already has a {} object assigned to it.", + s_ipsc->cCurrentModuleObject, + daylightControl.Name, + state.dataHeatBal->space(spaceNum).Name, + s_ipsc->cCurrentModuleObject)); ShowContinueError(state, "This control will override the lighting power factor for this space."); } spaceHasDaylightingControl(spaceNum) = true; @@ -4609,12 +4604,12 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) if (daylightControl.DaylightMethod == DaylightingMethod::Invalid) { daylightControl.DaylightMethod = DaylightingMethod::SplitFlux; ShowWarningError(state, - EnergyPlus::format("Invalid {} = {}, occurs in {}object for {}=\"{}", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3), - s_ipsc->cCurrentModuleObject, - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + std::format("Invalid {} = {}, occurs in {}object for {}=\"{}", + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3), + s_ipsc->cCurrentModuleObject, + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "SplitFlux assumed, and the simulation continues."); } } @@ -4649,16 +4644,16 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) &RefPointData::Name); // Field: Glare Calculation Daylighting Reference Point Name if (daylightControl.glareRefPtNumber == 0) { ShowSevereError(state, - EnergyPlus::format("{}: invalid {}=\"{}\" for object named: {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(6), - s_ipsc->cAlphaArgs(6), - s_ipsc->cAlphaArgs(1))); + std::format("{}: invalid {}=\"{}\" for object named: {}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(6), + s_ipsc->cAlphaArgs(6), + s_ipsc->cAlphaArgs(1))); ErrorsFound = true; continue; } } else if (daylightControl.DaylightMethod == DaylightingMethod::SplitFlux) { - ShowWarningError(state, EnergyPlus::format("No {} provided for object named: {}", s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("No {} provided for object named: {}", s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "No glare calculation performed, and the simulation continues."); } @@ -4675,14 +4670,13 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) dl->maxControlRefPoints = max(dl->maxControlRefPoints, curTotalDaylRefPts); if ((NumNumber - 7) / 2 != daylightControl.TotalDaylRefPoints) { ShowSevereError(state, - EnergyPlus::format("{}The number of extensible numeric fields and alpha fields is inconsistent for: {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); - ShowContinueError( - state, - EnergyPlus::format("For each field: {} there needs to be the following fields: Fraction Controlled by Reference Point and " - "Illuminance Setpoint at Reference Point", - s_ipsc->cAlphaFieldNames(NumAlpha))); + std::format("{}The number of extensible numeric fields and alpha fields is inconsistent for: {}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, + std::format("For each field: {} there needs to be the following fields: Fraction Controlled by Reference Point and " + "Illuminance Setpoint at Reference Point", + s_ipsc->cAlphaFieldNames(NumAlpha))); ErrorsFound = true; } @@ -4699,11 +4693,11 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) Util::FindItemInList(s_ipsc->cAlphaArgs(6 + refPtNum), dl->DaylRefPt, &RefPointData::Name); // Field: Daylighting Reference Point Name if (refPt.num == 0) { ShowSevereError(state, - EnergyPlus::format("{}: invalid {}=\"{}\" for object named: {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(6 + refPtNum), - s_ipsc->cAlphaArgs(6 + refPtNum), - s_ipsc->cAlphaArgs(1))); + std::format("{}: invalid {}=\"{}\" for object named: {}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(6 + refPtNum), + s_ipsc->cAlphaArgs(6 + refPtNum), + s_ipsc->cAlphaArgs(1))); ErrorsFound = true; continue; } @@ -4714,28 +4708,28 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) if (daylightControl.DaylightMethod == DaylightingMethod::SplitFlux) { SetupOutputVariable(state, - EnergyPlus::format("Daylighting Reference Point {} Illuminance", refPtNum), + std::format("Daylighting Reference Point {} Illuminance", refPtNum), Constant::Units::lux, refPt.lums[iLum_Illum], OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, daylightControl.Name); SetupOutputVariable(state, - EnergyPlus::format("Daylighting Reference Point {} Daylight Illuminance Setpoint Exceeded Time", refPtNum), + std::format("Daylighting Reference Point {} Daylight Illuminance Setpoint Exceeded Time", refPtNum), Constant::Units::hr, refPt.timeExceedingDaylightIlluminanceSetPoint, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Sum, daylightControl.Name); SetupOutputVariable(state, - EnergyPlus::format("Daylighting Reference Point {} Glare Index", refPtNum), + std::format("Daylighting Reference Point {} Glare Index", refPtNum), Constant::Units::None, refPt.glareIndex, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, daylightControl.Name); SetupOutputVariable(state, - EnergyPlus::format("Daylighting Reference Point {} Glare Index Setpoint Exceeded Time", refPtNum), + std::format("Daylighting Reference Point {} Glare Index Setpoint Exceeded Time", refPtNum), Constant::Units::hr, refPt.timeExceedingGlareIndexSetPoint, OutputProcessor::TimeStepType::Zone, @@ -4746,8 +4740,7 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) // Register Error if 0 DElight RefPts have been input for valid DElight object if (countRefPts < 1) { - ShowSevereError(state, - EnergyPlus::format("No Reference Points input for {} zone ={}", s_ipsc->cCurrentModuleObject, daylightControl.ZoneName)); + ShowSevereError(state, std::format("No Reference Points input for {} zone ={}", s_ipsc->cCurrentModuleObject, daylightControl.ZoneName)); ErrorsFound = true; } @@ -4776,8 +4769,8 @@ void GetDaylightingControls(EnergyPlusData &state, bool &ErrorsFound) if (daylightControl.LightControlType == LtgCtrlType::Stepped && daylightControl.LightControlSteps <= 0) { ShowWarningError(state, "GetDaylightingControls: For Stepped Control, the number of steps must be > 0"); - ShowContinueError( - state, EnergyPlus::format("..discovered in \"{}\" for Zone=\"{}\", will use 1", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(2))); + ShowContinueError(state, + std::format("..discovered in \"{}\" for Zone=\"{}\", will use 1", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(2))); daylightControl.LightControlSteps = 1; } SetupOutputVariable(state, @@ -4875,8 +4868,8 @@ void GeometryTransformForDaylighting(EnergyPlusData &state) if (refPt.absCoords.x < zone.MinimumX || refPt.absCoords.x > zone.MaximumX) { refPt.inBounds = false; - ShowWarningError( - state, EnergyPlus::format("GeometryTransformForDaylighting: Reference point X Value outside Zone Min/Max X, Zone={}", zone.Name)); + ShowWarningError(state, + std::format("GeometryTransformForDaylighting: Reference point X Value outside Zone Min/Max X, Zone={}", zone.Name)); ShowContinueError(state, EnergyPlus::format("...X Reference Point= {:.2R}, Zone Minimum X= {:.2R}, Zone Maximum X= {:.2R}", refPt.absCoords.x, @@ -4889,8 +4882,8 @@ void GeometryTransformForDaylighting(EnergyPlusData &state) } if (refPt.absCoords.y < zone.MinimumY || refPt.absCoords.y > zone.MaximumY) { refPt.inBounds = false; - ShowWarningError( - state, EnergyPlus::format("GeometryTransformForDaylighting: Reference point Y Value outside Zone Min/Max Y, Zone={}", zone.Name)); + ShowWarningError(state, + std::format("GeometryTransformForDaylighting: Reference point Y Value outside Zone Min/Max Y, Zone={}", zone.Name)); ShowContinueError(state, EnergyPlus::format("...Y Reference Point= {:.2R}, Zone Minimum Y= {:.2R}, Zone Maximum Y= {:.2R}", refPt.absCoords.x, @@ -4903,8 +4896,8 @@ void GeometryTransformForDaylighting(EnergyPlusData &state) } if (refPt.absCoords.z < zone.MinimumZ || refPt.absCoords.z > zone.MaximumZ) { refPt.inBounds = false; - ShowWarningError( - state, EnergyPlus::format("GeometryTransformForDaylighting: Reference point Z Value outside Zone Min/Max Z, Zone={}", zone.Name)); + ShowWarningError(state, + std::format("GeometryTransformForDaylighting: Reference point Z Value outside Zone Min/Max Z, Zone={}", zone.Name)); ShowContinueError(state, EnergyPlus::format("...Z Reference Point= {:.2R}, Zone Minimum Z= {:.2R}, Zone Maximum Z= {:.2R}", refPt.absCoords.z, @@ -4955,11 +4948,11 @@ void GetInputDayliteRefPt(EnergyPlusData &state, bool &ErrorsFound) int spaceNum = Util::FindItemInList(s_ipsc->cAlphaArgs(2), state.dataHeatBal->space); if (spaceNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } else { pt.ZoneNum = state.dataHeatBal->space(spaceNum).zoneNum; @@ -5008,13 +5001,13 @@ void CheckTDDsAndLightShelvesInDaylitZones(EnergyPlusData &state) if (state.dataViewFactor->EnclSolInfo(pipeEnclNum).TotalEnclosureDaylRefPoints == 0) { ShowWarningError( state, - EnergyPlus::format("DaylightingDevice:Tubular = {}: is not connected to a Zone that has Daylighting, no visible transmittance " - "will be modeled through the daylighting device.", - pipe.Name)); + std::format("DaylightingDevice:Tubular = {}: is not connected to a Zone that has Daylighting, no visible transmittance " + "will be modeled through the daylighting device.", + pipe.Name)); } } else { // SurfNum == 0 // should not come here (would have already been caught in TDD get input), but is an error - ShowSevereError(state, EnergyPlus::format("DaylightingDevice:Tubular = {}: Diffuser surface not found ", pipe.Name)); + ShowSevereError(state, std::format("DaylightingDevice:Tubular = {}: Diffuser surface not found ", pipe.Name)); ErrorsFound = true; } } // for (pipe) @@ -5022,7 +5015,7 @@ void CheckTDDsAndLightShelvesInDaylitZones(EnergyPlusData &state) for (auto const &shelf : state.dataDaylightingDevicesData->Shelf) { if (shelf.Window == 0) { // should not come here (would have already been caught in shelf get input), but is an error - ShowSevereError(state, EnergyPlus::format("DaylightingDevice:Shelf = {}: window not found ", shelf.Name)); + ShowSevereError(state, std::format("DaylightingDevice:Shelf = {}: window not found ", shelf.Name)); ErrorsFound = true; } } // for (shelf) @@ -5053,9 +5046,9 @@ void AssociateWindowShadingControlWithDaylighting(EnergyPlusData &state) } else { ShowWarningError(state, "AssociateWindowShadingControlWithDaylighting: Daylighting object name used in WindowShadingControl not found."); ShowContinueError(state, - EnergyPlus::format("..The WindowShadingControl object=\"{}\" and references an object named: \"{}\"", - winShadeControl.Name, - winShadeControl.DaylightingControlName)); + std::format("..The WindowShadingControl object=\"{}\" and references an object named: \"{}\"", + winShadeControl.Name, + winShadeControl.DaylightingControlName)); } } } // AssociateWindowShadingControlWithDaylighting() @@ -5114,8 +5107,7 @@ void GetLightWellData(EnergyPlusData &state, bool &ErrorsFound) // If errors fou if (SurfNum == 0) { ShowSevereError( state, - EnergyPlus::format( - "{}: invalid {}=\"{}\" not found.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); + std::format("{}: invalid {}=\"{}\" not found.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); ErrorsFound = true; continue; } @@ -5126,10 +5118,10 @@ void GetLightWellData(EnergyPlusData &state, bool &ErrorsFound) // If errors fou // True if associated surface is not an exterior window if (surf.Class != SurfaceClass::Window && surf.ExtBoundCond != ExternalEnvironment) { ShowSevereError(state, - EnergyPlus::format("{}: invalid {}=\"{}\" - not an exterior window.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(1), - s_ipsc->cAlphaArgs(1))); + std::format("{}: invalid {}=\"{}\" - not an exterior window.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(1), + s_ipsc->cAlphaArgs(1))); ErrorsFound = true; continue; } @@ -5143,9 +5135,9 @@ void GetLightWellData(EnergyPlusData &state, bool &ErrorsFound) // If errors fou // Warning if light well area is less than window area if (AreaWell < (surf.Area + s_surf->SurfWinDividerArea(SurfNum) - 0.1)) { - ShowSevereError(state, - EnergyPlus::format( - "{}: invalid {}=\"{}\" - Areas.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); + ShowSevereError( + state, + std::format("{}: invalid {}=\"{}\" - Areas.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("has Area of Bottom of Well={:.1R} that is less than window area={:.1R}", surf.Area, AreaWell)); } @@ -9221,7 +9213,7 @@ void ReportIllumMap(EnergyPlusData &state, int const MapNum) int linelen = 0; // Write X scale column header - std::string mapLine = EnergyPlus::format(" {} {:02}:00", dl->SavedMnDy(MapNum), state.dataGlobal->HourOfDay); + std::string mapLine = std::format(" {} {:02}:00", dl->SavedMnDy(MapNum), state.dataGlobal->HourOfDay); if (illumMap.HeaderXLineLengthNeeded) { linelen = int(len(mapLine)); } @@ -9239,13 +9231,11 @@ void ReportIllumMap(EnergyPlusData &state, int const MapNum) if (illumMap.HeaderXLineLengthNeeded) { illumMap.HeaderXLineLength = linelen; if (static_cast(illumMap.HeaderXLineLength) > len(mapLine)) { - ShowWarningError( - state, - EnergyPlus::format("ReportIllumMap: Map=\"{}\" -- the X Header overflows buffer -- will be truncated at {} characters.", - illumMap.Name, - int(len(mapLine)))); - ShowContinueError(state, - EnergyPlus::format("...needed {} characters. Please contact EnergyPlus support.", illumMap.HeaderXLineLength)); + ShowWarningError(state, + std::format("ReportIllumMap: Map=\"{}\" -- the X Header overflows buffer -- will be truncated at {} characters.", + illumMap.Name, + int(len(mapLine)))); + ShowContinueError(state, std::format("...needed {} characters. Please contact EnergyPlus support.", illumMap.HeaderXLineLength)); } illumMap.HeaderXLineLengthNeeded = false; } @@ -9345,7 +9335,7 @@ void CloseReportIllumMaps(EnergyPlusData &state) const std::vector mapLines = illumMap.mapFile->getLines(); if (mapLines.empty()) { - ShowSevereError(state, EnergyPlus::format("CloseReportIllumMaps: IllumMap=\"{}\" is empty.", illumMap.Name)); + ShowSevereError(state, std::format("CloseReportIllumMaps: IllumMap=\"{}\" is empty.", illumMap.Name)); break; } for (const std::string &mapLine : mapLines) { @@ -9863,14 +9853,14 @@ void MapShadeDeploymentOrderToLoopNumber(EnergyPlusData &state, int const enclNu ++count; if (count > thisEnclDaylight.NumOfDayltgExtWins) { if (showOnce) { - ShowWarningError(state, - EnergyPlus::format("MapShadeDeploymentOrderToLoopNumber: too many controlled shaded windows in enclosure {}", - thisEnclSol.Name)); + ShowWarningError( + state, + std::format("MapShadeDeploymentOrderToLoopNumber: too many controlled shaded windows in enclosure {}", thisEnclSol.Name)); ShowContinueError(state, "Check the Zone Name in the WindowShadingControl that references the following fenestration surfaces:"); showOnce = false; } - ShowContinueError(state, EnergyPlus::format(" - {}", s_surf->Surface(IWinShdOrd).Name)); + ShowContinueError(state, std::format(" - {}", s_surf->Surface(IWinShdOrd).Name)); } for (int loop = 1; loop <= thisEnclDaylight.NumOfDayltgExtWins; ++loop) { int IWinLoop = thisEnclDaylight.DayltgExtWinSurfNums(loop); @@ -10085,8 +10075,7 @@ void CheckForGeometricTransform(EnergyPlusData &state, bool &doTransform, Real64 NewAspectRatio = rNumerics(2); std::string transformPlane = cAlphas(1); if (transformPlane != "XY") { - ShowWarningError(state, - EnergyPlus::format("{}: invalid {}=\"{}...ignored.", CurrentModuleObject, s_ipsc->cAlphaFieldNames(1), cAlphas(1))); + ShowWarningError(state, std::format("{}: invalid {}=\"{}...ignored.", CurrentModuleObject, s_ipsc->cAlphaFieldNames(1), cAlphas(1))); } doTransform = true; s_surf->AspectTransform = true; @@ -10116,7 +10105,7 @@ void WriteDaylightMapTitle(EnergyPlusData &state, // must add correct number of commas at end auto &dl = state.dataDayltg; - std::string fullmapName = fmt::format("{}:{}:{} Illuminance [lux] (Hourly)", state.dataHeatBal->Zone(ZoneNum).Name, environmentName, mapName); + std::string fullmapName = std::format("{}:{}:{} Illuminance [lux] (Hourly)", state.dataHeatBal->Zone(ZoneNum).Name, environmentName, mapName); print(mapFile, "Date/Time{}{}{}{}{}{}\n", dl->MapColSep, fullmapName, dl->MapColSep, refPts, dl->MapColSep, dl->MapColSep); if (state.dataSQLiteProcedures->sqlite) { diff --git a/src/EnergyPlus/DesiccantDehumidifiers.cc b/src/EnergyPlus/DesiccantDehumidifiers.cc index 19288837ade..cae66d11393 100644 --- a/src/EnergyPlus/DesiccantDehumidifiers.cc +++ b/src/EnergyPlus/DesiccantDehumidifiers.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -467,7 +468,7 @@ namespace DesiccantDehumidifiers { errFlag = false; desicDehum.CoilControlNode = SteamCoils::GetCoilSteamInletNode(state, "Coil:Heating:Steam", RegenCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -483,7 +484,7 @@ namespace DesiccantDehumidifiers { int RegenCoilAirInletNode = SteamCoils::GetCoilAirInletNode(state, desicDehum.RegenCoilIndex, RegenCoilName, errFlag); desicDehum.RegenCoilInletNode = RegenCoilAirInletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -492,13 +493,13 @@ namespace DesiccantDehumidifiers { int RegenCoilAirOutletNode = SteamCoils::GetCoilAirOutletNode(state, desicDehum.RegenCoilIndex, RegenCoilName, errFlag); desicDehum.RegenCoilOutletNode = RegenCoilAirOutletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } } } else { - ShowSevereError(state, EnergyPlus::format("{}{} = {}", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(8), Alphas(8))); + ShowSevereError(state, std::format("{}{} = {}", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(8), Alphas(8))); ErrorsFound = true; } @@ -517,46 +518,46 @@ namespace DesiccantDehumidifiers { desicDehum.PerformanceModel_Num = PerformanceModel::UserCurves; desicDehum.ProcDryBulbCurvefTW = Curve::GetCurveIndex(state, Alphas(13)); if (desicDehum.ProcDryBulbCurvefTW == 0) { - ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(13))); + ShowSevereError(state, std::format("{}Curve object={} not found.", RoutineName, Alphas(13))); ErrorsFound2 = true; } desicDehum.ProcDryBulbCurvefV = Curve::GetCurveIndex(state, Alphas(14)); if (desicDehum.ProcDryBulbCurvefV == 0) { - ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(14))); + ShowSevereError(state, std::format("{}Curve object={} not found.", RoutineName, Alphas(14))); ErrorsFound2 = true; } desicDehum.ProcHumRatCurvefTW = Curve::GetCurveIndex(state, Alphas(15)); if (desicDehum.ProcHumRatCurvefTW == 0) { - ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(15))); + ShowSevereError(state, std::format("{}Curve object={} not found.", RoutineName, Alphas(15))); ErrorsFound2 = true; } desicDehum.ProcHumRatCurvefV = Curve::GetCurveIndex(state, Alphas(16)); if (desicDehum.ProcHumRatCurvefV == 0) { - ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(16))); + ShowSevereError(state, std::format("{}Curve object={} not found.", RoutineName, Alphas(16))); ErrorsFound2 = true; } desicDehum.RegenEnergyCurvefTW = Curve::GetCurveIndex(state, Alphas(17)); if (desicDehum.RegenEnergyCurvefTW == 0) { - ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(17))); + ShowSevereError(state, std::format("{}Curve object={} not found.", RoutineName, Alphas(17))); ErrorsFound2 = true; } desicDehum.RegenEnergyCurvefV = Curve::GetCurveIndex(state, Alphas(18)); if (desicDehum.RegenEnergyCurvefV == 0) { - ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(18))); + ShowSevereError(state, std::format("{}Curve object={} not found.", RoutineName, Alphas(18))); ErrorsFound2 = true; } desicDehum.RegenVelCurvefTW = Curve::GetCurveIndex(state, Alphas(19)); if (desicDehum.RegenVelCurvefTW == 0) { - ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(19))); + ShowSevereError(state, std::format("{}Curve object={} not found.", RoutineName, Alphas(19))); ErrorsFound2 = true; } desicDehum.RegenVelCurvefV = Curve::GetCurveIndex(state, Alphas(20)); if (desicDehum.RegenVelCurvefV == 0) { - ShowSevereError(state, EnergyPlus::format("{}Curve object={} not found.", RoutineName, Alphas(20))); + ShowSevereError(state, std::format("{}Curve object={} not found.", RoutineName, Alphas(20))); ErrorsFound2 = true; } if (ErrorsFound2) { - ShowSevereError(state, EnergyPlus::format("{}{} = {}", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}{} = {}", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Errors found in getting performance curves."); ErrorsFound = true; } @@ -574,8 +575,8 @@ namespace DesiccantDehumidifiers { ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); ErrorsFound = true; } } else { @@ -589,17 +590,17 @@ namespace DesiccantDehumidifiers { // If DEFAULT performance model, warn if curve names and nominal regen temp have values if ((!lAlphaBlanks(13)) || (!lAlphaBlanks(14)) || (!lAlphaBlanks(15)) || (!lAlphaBlanks(16)) || (!lAlphaBlanks(17)) || (!lAlphaBlanks(18)) || (!lAlphaBlanks(19)) || (!lAlphaBlanks(20))) { - ShowWarningError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "DEFAULT performance selected, curve names and nominal regen temp will be ignored."); } if (desicDehum.NomProcAirVel > 4.064) { - ShowWarningError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, EnergyPlus::format("{} > 4.064 m/s.; Value in input={:.3R}", cNumericFields(3), desicDehum.NomProcAirVel)); ShowContinueError(state, "DEFAULT performance curves not valid outside 2.032 to 4.064 m/s (400 to 800 fpm)."); } if (desicDehum.NomProcAirVel < 2.032) { - ShowWarningError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, EnergyPlus::format("{} < 2.032 m/s.; Value in input={:.3R}", cNumericFields(3), desicDehum.NomProcAirVel)); ShowContinueError(state, "DEFAULT performance curves not valid outside 2.032 to 4.064 m/s (400 to 800 fpm)."); @@ -615,8 +616,8 @@ namespace DesiccantDehumidifiers { ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); ShowContinueError(state, "For DEFAULT performance model, the regen fan type must be Fan:VariableVolume"); ErrorsFound = true; } @@ -667,7 +668,7 @@ namespace DesiccantDehumidifiers { ErrorsFound2 = false; ValidateComponent(state, desicDehum.DehumType, desicDehum.Name, ErrorsFound2, desicDehum.DehumType + " = \"" + desicDehum.Name + "\""); if (ErrorsFound2) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\" is not unique", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, std::format("{} \"{}\" is not unique", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } @@ -683,8 +684,8 @@ namespace DesiccantDehumidifiers { desicDehum.HXName = Alphas(4); if (!Util::SameString(desicDehum.HXType, "HeatExchanger:Desiccant:BalancedFlow")) { - ShowWarningError(state, EnergyPlus::format("{} = \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("Invalid {} = {}", cAlphaFields(3), desicDehum.HXType)); + ShowWarningError(state, std::format("{} = \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("Invalid {} = {}", cAlphaFields(3), desicDehum.HXType)); ErrorsFoundGeneric = true; } else { desicDehum.HXTypeNum = BalancedHX; @@ -699,7 +700,7 @@ namespace DesiccantDehumidifiers { ErrorsFound2 = false; desicDehum.HXProcInNode = HeatRecovery::GetSecondaryInletNode(state, desicDehum.HXName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } @@ -718,7 +719,7 @@ namespace DesiccantDehumidifiers { ErrorsFound2 = false; desicDehum.HXProcOutNode = HeatRecovery::GetSecondaryOutletNode(state, desicDehum.HXName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } @@ -739,14 +740,14 @@ namespace DesiccantDehumidifiers { ErrorsFound2 = false; desicDehum.HXRegenInNode = HeatRecovery::GetSupplyInletNode(state, desicDehum.HXName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } ErrorsFound2 = false; desicDehum.HXRegenOutNode = HeatRecovery::GetSupplyOutletNode(state, desicDehum.HXName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } @@ -761,8 +762,8 @@ namespace DesiccantDehumidifiers { Node::ObjectIsNotParent); if (desicDehum.ControlNodeNum == 0) { - ShowSevereError(state, EnergyPlus::format("{} = \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("{} must be specified.", cAlphaFields(5))); + ShowSevereError(state, std::format("{} = \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("{} must be specified.", cAlphaFields(5))); ErrorsFoundGeneric = true; } @@ -783,8 +784,8 @@ namespace DesiccantDehumidifiers { ErrorsFoundGeneric = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(6), HVAC::fanTypeNamesUC[(int)desicDehum.regenFanType])); + ShowSevereError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(6), HVAC::fanTypeNamesUC[(int)desicDehum.regenFanType])); ErrorsFoundGeneric = true; } @@ -824,50 +825,50 @@ namespace DesiccantDehumidifiers { } if (desicDehum.RegenSetPointTemp <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", cNumericFields(1))); + ShowSevereError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("{} must be greater than 0.", cNumericFields(1))); ErrorsFoundGeneric = true; } ErrorsFound2 = false; desicDehum.RegenCoilInletNode = HeatingCoils::GetCoilInletNode(state, Alphas(9), RegenCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } ErrorsFound2 = false; desicDehum.RegenCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, Alphas(9), RegenCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } ErrorsFound2 = false; HeatingCoils::GetCoilIndex(state, RegenCoilName, desicDehum.RegenCoilIndex, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } ErrorsFound2 = false; RegenCoilControlNodeNum = HeatingCoils::GetCoilControlNodeNum(state, Alphas(9), RegenCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } if (RegenCoilControlNodeNum > 0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ShowContinueError( state, EnergyPlus::format("{} is specified as {:.3R} C in this object.", cNumericFields(1), desicDehum.RegenSetPointTemp)); ShowContinueError(state, " Do not specify a coil temperature setpoint node name in the regeneration air heater object."); - ShowContinueError(state, EnergyPlus::format("...{} = {}", cAlphaFields(9), Alphas(9))); - ShowContinueError(state, EnergyPlus::format("...{} = {}", cAlphaFields(10), desicDehum.RegenCoilName)); - ShowContinueError(state, - EnergyPlus::format("...heating coil temperature setpoint node = {}", - state.dataLoopNodes->NodeID(RegenCoilControlNodeNum))); + ShowContinueError(state, std::format("...{} = {}", cAlphaFields(9), Alphas(9))); + ShowContinueError(state, std::format("...{} = {}", cAlphaFields(10), desicDehum.RegenCoilName)); + ShowContinueError( + state, + std::format("...heating coil temperature setpoint node = {}", state.dataLoopNodes->NodeID(RegenCoilControlNodeNum))); ShowContinueError(state, "...leave the heating coil temperature setpoint node name blank in the regen heater object."); ErrorsFoundGeneric = true; } @@ -875,7 +876,7 @@ namespace DesiccantDehumidifiers { RegairHeatingCoilFlag = true; HeatingCoils::SetHeatingCoilData(state, desicDehum.RegenCoilIndex, ErrorsFound2, RegairHeatingCoilFlag, DesicDehumNum); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } @@ -883,20 +884,20 @@ namespace DesiccantDehumidifiers { desicDehum.regenCoilType = HVAC::CoilType::HeatingWater; ValidateComponent(state, Alphas(9), RegenCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object errFlag = false; desicDehum.RegenCoilIndex = WaterCoils::GetWaterCoilIndex(state, "COIL:HEATING:WATER", RegenCoilName, errFlag); if (desicDehum.RegenCoilIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(9), RegenCoilName)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowSevereError(state, std::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(9), RegenCoilName)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } if (desicDehum.RegenSetPointTemp <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", cNumericFields(1))); + ShowSevereError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("{} must be greater than 0.", cNumericFields(1))); ErrorsFoundGeneric = true; } @@ -904,7 +905,7 @@ namespace DesiccantDehumidifiers { errFlag = false; desicDehum.CoilControlNode = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", RegenCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -912,7 +913,7 @@ namespace DesiccantDehumidifiers { errFlag = false; desicDehum.MaxCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", RegenCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -921,7 +922,7 @@ namespace DesiccantDehumidifiers { int RegenCoilAirInletNode = WaterCoils::GetCoilInletNode(state, "Coil:Heating:Water", RegenCoilName, errFlag); desicDehum.RegenCoilInletNode = RegenCoilAirInletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -930,14 +931,14 @@ namespace DesiccantDehumidifiers { int RegenCoilAirOutletNode = WaterCoils::GetCoilOutletNode(state, "Coil:Heating:Water", RegenCoilName, errFlag); desicDehum.RegenCoilOutletNode = RegenCoilAirOutletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } RegairHeatingCoilFlag = true; WaterCoils::SetWaterCoilData(state, desicDehum.RegenCoilIndex, ErrorsFound2, RegairHeatingCoilFlag, DesicDehumNum); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } } @@ -945,20 +946,20 @@ namespace DesiccantDehumidifiers { desicDehum.regenCoilType = HVAC::CoilType::HeatingSteam; ValidateComponent(state, Alphas(9), RegenCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from the regeneration heating coil object if (desicDehum.RegenSetPointTemp <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", cNumericFields(1))); + ShowSevereError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("{} must be greater than 0.", cNumericFields(1))); ErrorsFoundGeneric = true; } errFlag = false; desicDehum.RegenCoilIndex = SteamCoils::GetSteamCoilIndex(state, "COIL:HEATING:STEAM", RegenCoilName, errFlag); if (desicDehum.RegenCoilIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(9), RegenCoilName)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowSevereError(state, std::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(9), RegenCoilName)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -966,7 +967,7 @@ namespace DesiccantDehumidifiers { errFlag = false; desicDehum.CoilControlNode = SteamCoils::GetCoilSteamInletNode(state, "Coil:Heating:Steam", RegenCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -982,7 +983,7 @@ namespace DesiccantDehumidifiers { int RegenCoilAirInletNode = SteamCoils::GetCoilAirInletNode(state, desicDehum.RegenCoilIndex, RegenCoilName, errFlag); desicDehum.RegenCoilInletNode = RegenCoilAirInletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } @@ -991,7 +992,7 @@ namespace DesiccantDehumidifiers { int RegenCoilAirOutletNode = SteamCoils::GetCoilAirOutletNode(state, desicDehum.RegenCoilIndex, RegenCoilName, errFlag); desicDehum.RegenCoilOutletNode = RegenCoilAirOutletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, desicDehum.Name)); ErrorsFound = true; } } @@ -1000,21 +1001,21 @@ namespace DesiccantDehumidifiers { RegenCoilControlNodeNum = SteamCoils::GetSteamCoilControlNodeNum(state, Alphas(9), RegenCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } if (RegenCoilControlNodeNum > 0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ShowContinueError( state, EnergyPlus::format("{} is specified as {:.3R} C in this object.", cNumericFields(1), desicDehum.RegenSetPointTemp)); ShowContinueError(state, " Do not specify a coil temperature setpoint node name in the regeneration air heater object."); - ShowContinueError(state, EnergyPlus::format("...{} = {}", cAlphaFields(9), Alphas(9))); - ShowContinueError(state, EnergyPlus::format("...{} = {}", cAlphaFields(10), desicDehum.RegenCoilName)); - ShowContinueError(state, - EnergyPlus::format("...heating coil temperature setpoint node = {}", - state.dataLoopNodes->NodeID(RegenCoilControlNodeNum))); + ShowContinueError(state, std::format("...{} = {}", cAlphaFields(9), Alphas(9))); + ShowContinueError(state, std::format("...{} = {}", cAlphaFields(10), desicDehum.RegenCoilName)); + ShowContinueError( + state, + std::format("...heating coil temperature setpoint node = {}", state.dataLoopNodes->NodeID(RegenCoilControlNodeNum))); ShowContinueError(state, "...leave the heating coil temperature setpoint node name blank in the regen heater object."); ErrorsFoundGeneric = true; } @@ -1022,13 +1023,13 @@ namespace DesiccantDehumidifiers { RegairHeatingCoilFlag = true; SteamCoils::SetSteamCoilData(state, desicDehum.RegenCoilIndex, ErrorsFound2, RegairHeatingCoilFlag, DesicDehumNum); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(9), Alphas(9))); + ShowSevereError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(9), Alphas(9))); ErrorsFoundGeneric = true; } } @@ -1088,37 +1089,36 @@ namespace DesiccantDehumidifiers { Node::ObjectIsParent); if (!lAlphaBlanks(10)) { if (desicDehum.RegenFanOutNode != desicDehum.RegenCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ShowContinueError(state, "Regen fan outlet node name and regen heater inlet node name do not match for fan placement: Blow Through"); - ShowContinueError( - state, EnergyPlus::format("...Regen fan outlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenFanOutNode))); - ShowContinueError( - state, EnergyPlus::format("...Regen heater inlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenCoilInletNode))); + ShowContinueError(state, + std::format("...Regen fan outlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenFanOutNode))); + ShowContinueError(state, + std::format("...Regen heater inlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenCoilInletNode))); ErrorsFoundGeneric = true; } if (desicDehum.RegenCoilOutletNode != desicDehum.HXRegenInNode) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ShowContinueError(state, "Regen heater outlet node name and desiccant heat exchanger regen inlet node name do not match for fan " "placement: Blow Through"); ShowContinueError( - state, - EnergyPlus::format("...Regen heater outlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenCoilOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...HX regen inlet node = {}", state.dataLoopNodes->NodeID(desicDehum.HXRegenInNode))); + state, std::format("...Regen heater outlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenCoilOutletNode))); + ShowContinueError(state, + std::format("...HX regen inlet node = {}", state.dataLoopNodes->NodeID(desicDehum.HXRegenInNode))); ErrorsFoundGeneric = true; } } else { if (desicDehum.RegenFanOutNode != desicDehum.HXRegenInNode) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ShowContinueError( state, "Regen fan outlet node name and desiccant heat exchanger inlet node name do not match for fan placement: Blow Through"); - ShowContinueError( - state, EnergyPlus::format("...Regen fan outlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenFanOutNode))); - ShowContinueError( - state, EnergyPlus::format("...Desiccant HX inlet node = {}", state.dataLoopNodes->NodeID(desicDehum.HXRegenInNode))); + ShowContinueError(state, + std::format("...Regen fan outlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenFanOutNode))); + ShowContinueError(state, + std::format("...Desiccant HX inlet node = {}", state.dataLoopNodes->NodeID(desicDehum.HXRegenInNode))); ErrorsFoundGeneric = true; } } @@ -1143,15 +1143,14 @@ namespace DesiccantDehumidifiers { Node::CompFluidStream::Primary, Node::ObjectIsParent); if (desicDehum.RegenCoilOutletNode != desicDehum.HXRegenInNode) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ShowContinueError(state, "Regen heater outlet node name and desiccant heat exchanger regen inlet node name do not match for fan " "placement: Draw Through"); ShowContinueError( - state, - EnergyPlus::format("...Regen heater outlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenCoilOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...HX regen inlet node = {}", state.dataLoopNodes->NodeID(desicDehum.HXRegenInNode))); + state, std::format("...Regen heater outlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenCoilOutletNode))); + ShowContinueError(state, + std::format("...HX regen inlet node = {}", state.dataLoopNodes->NodeID(desicDehum.HXRegenInNode))); ErrorsFoundGeneric = true; } } else { @@ -1166,14 +1165,12 @@ namespace DesiccantDehumidifiers { Node::ObjectIsParent); } if (desicDehum.RegenFanInNode != desicDehum.HXRegenOutNode) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ShowContinueError( state, "Regen fan inlet node name and desiccant heat exchanger regen outlet node name do not match for fan placement: Draw Through"); - ShowContinueError(state, - EnergyPlus::format("...Regen fan inlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenFanInNode))); - ShowContinueError(state, - EnergyPlus::format("...HX regen outlet node = {}", state.dataLoopNodes->NodeID(desicDehum.HXRegenOutNode))); + ShowContinueError(state, std::format("...Regen fan inlet node = {}", state.dataLoopNodes->NodeID(desicDehum.RegenFanInNode))); + ShowContinueError(state, std::format("...HX regen outlet node = {}", state.dataLoopNodes->NodeID(desicDehum.HXRegenOutNode))); ErrorsFoundGeneric = true; } } @@ -1204,8 +1201,8 @@ namespace DesiccantDehumidifiers { } } else { - ShowSevereError(state, EnergyPlus::format("{}={}", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(11), desicDehum.CoolingCoilType)); + ShowSevereError(state, std::format("{}={}", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(11), desicDehum.CoolingCoilType)); ErrorsFoundGeneric = true; } @@ -1217,13 +1214,13 @@ namespace DesiccantDehumidifiers { desicDehum.CompanionCoilCapacity = DXCoils::GetCoilCapacity(state, desicDehum.CoolingCoilType, desicDehum.CoolingCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); } ErrorsFound2 = false; DXCoils::GetDXCoilIndex(state, desicDehum.CoolingCoilName, desicDehum.DXCoilIndex, ErrorsFound2, desicDehum.CoolingCoilType); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); } } else if (desicDehum.coolCoilType == HVAC::CoilType::CoolingDXVariableSpeed) { ErrorsFound2 = false; @@ -1233,13 +1230,13 @@ namespace DesiccantDehumidifiers { desicDehum.CompanionCoilCapacity = VariableSpeedCoils::GetCoilCapacityVariableSpeed(state, desicDehum.CoolingCoilType, desicDehum.CoolingCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); } ErrorsFound2 = false; desicDehum.DXCoilIndex = VariableSpeedCoils::GetCoilIndexVariableSpeed(state, desicDehum.CoolingCoilType, desicDehum.CoolingCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); } } @@ -1252,8 +1249,8 @@ namespace DesiccantDehumidifiers { } else if (Util::SameString(Alphas(13), "No")) { desicDehum.CoilUpstreamOfProcessSide = Selection::No; } else { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("Invalid choice for {} = {}", cAlphaFields(13), Alphas(13))); + ShowWarningError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("Invalid choice for {} = {}", cAlphaFields(13), Alphas(13))); ShowContinueError(state, "...resetting to the default value of No"); desicDehum.CoilUpstreamOfProcessSide = Selection::No; } @@ -1265,8 +1262,8 @@ namespace DesiccantDehumidifiers { } else if (lAlphaBlanks(14)) { desicDehum.Preheat = Selection::No; } else { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("Invalid choice for {} = {}", cAlphaFields(14), Alphas(14))); + ShowWarningError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("Invalid choice for {} = {}", cAlphaFields(14), Alphas(14))); ShowContinueError(state, "...resetting to the default value of NO"); desicDehum.Preheat = Selection::No; } @@ -1278,20 +1275,19 @@ namespace DesiccantDehumidifiers { DesuperHeaterIndex = HeatingCoils::GetHeatReclaimSourceIndex(state, desicDehum.CoolingCoilType, desicDehum.CoolingCoilName, ErrorsFound2); if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ErrorsFoundGeneric = true; } if (DesuperHeaterIndex > 0) { - ShowWarningError(state, EnergyPlus::format("{}={}", desicDehum.DehumType, desicDehum.Name)); + ShowWarningError(state, std::format("{}={}", desicDehum.DehumType, desicDehum.Name)); ShowContinueError(state, "A Coil:Heating:Desuperheater object should not be used when condenser waste heat is reclaimed for " "desiccant regeneration."); - ShowContinueError( - state, - EnergyPlus::format("A Coil:Heating:Desuperheater object was found using waste heat from the {} \"{}\" object.", - desicDehum.CoolingCoilType, - desicDehum.CoolingCoilName)); + ShowContinueError(state, + std::format("A Coil:Heating:Desuperheater object was found using waste heat from the {} \"{}\" object.", + desicDehum.CoolingCoilType, + desicDehum.CoolingCoilName)); // ErrorsFoundGeneric = .TRUE. } } @@ -1316,28 +1312,26 @@ namespace DesiccantDehumidifiers { Node::ObjectIsNotParent); OutAirNodeManager::CheckAndAddAirNodeNumber(state, desicDehum.CondenserInletNode, OANodeError); if (!OANodeError) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowWarningError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ShowContinueError( state, - EnergyPlus::format("The {} input is specified as Yes and a condenser air inlet node name was not specified for the " - "companion cooling coil.", - cAlphaFields(14))); - ShowContinueError(state, - EnergyPlus::format("Adding condenser inlet air node for {} \"{}\"", - desicDehum.CoolingCoilType, - desicDehum.CoolingCoilName)); + std::format("The {} input is specified as Yes and a condenser air inlet node name was not specified for the " + "companion cooling coil.", + cAlphaFields(14))); ShowContinueError( state, - EnergyPlus::format("...condenser inlet air node name = {}", state.dataLoopNodes->NodeID(desicDehum.CondenserInletNode))); + std::format("Adding condenser inlet air node for {} \"{}\"", desicDehum.CoolingCoilType, desicDehum.CoolingCoilName)); + ShowContinueError( + state, std::format("...condenser inlet air node name = {}", state.dataLoopNodes->NodeID(desicDehum.CondenserInletNode))); ShowContinueError(state, "...this node name will be specified as an outdoor air node."); } } else if (desicDehum.Preheat == Selection::Yes) { if (!OutAirNodeManager::CheckOutAirNodeNumber(state, desicDehum.CondenserInletNode)) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, - EnergyPlus::format( - "The regeneration air inlet node must be specified as an outdoor air node when {} is specified as Yes.", - cAlphaFields(14))); + ShowSevereError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError( + state, + std::format("The regeneration air inlet node must be specified as an outdoor air node when {} is specified as Yes.", + cAlphaFields(14))); ErrorsFoundGeneric = true; } } @@ -1348,12 +1342,12 @@ namespace DesiccantDehumidifiers { } if (desicDehum.DXCoilIndex == 0 && desicDehum.Preheat == Selection::Yes) { - ShowWarningError(state, EnergyPlus::format("{}={}", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, - EnergyPlus::format("A valid {} must be used when condenser waste heat is reclaimed for desiccant regeneration.", - cAlphaFields(12))); - ShowContinueError(state, EnergyPlus::format("... {} = {}", cAlphaFields(11), desicDehum.CoolingCoilType)); - ShowContinueError(state, EnergyPlus::format("... {} = {}", cAlphaFields(12), desicDehum.CoolingCoilName)); + ShowWarningError(state, std::format("{}={}", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError( + state, + std::format("A valid {} must be used when condenser waste heat is reclaimed for desiccant regeneration.", cAlphaFields(12))); + ShowContinueError(state, std::format("... {} = {}", cAlphaFields(11), desicDehum.CoolingCoilType)); + ShowContinueError(state, std::format("... {} = {}", cAlphaFields(12), desicDehum.CoolingCoilName)); ErrorsFoundGeneric = true; } @@ -1368,56 +1362,53 @@ namespace DesiccantDehumidifiers { CoilBypassedFlowFrac = 0.0; // bypass flow fraction not in VS coil model } if (ErrorsFound2) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", desicDehum.DehumType, desicDehum.CoolingCoilName)); } if (CoilBypassedFlowFrac > 0.0) { - ShowWarningError(state, EnergyPlus::format("{}={}", desicDehum.DehumType, desicDehum.Name)); + ShowWarningError(state, std::format("{}={}", desicDehum.DehumType, desicDehum.Name)); ShowContinueError( state, - EnergyPlus::format( - "A DX coil bypassed air flow fraction greater than 0 may not be used when the input for {} is specified as Yes.", - cAlphaFields(13))); - ShowContinueError( - state, - EnergyPlus::format("A DX coil with a bypassed air flow fraction greater than 0 may be upstream of the process inlet " - "however the input for {} must be specified as No.", - cAlphaFields(13))); - ShowContinueError(state, EnergyPlus::format("... {} = {}", cAlphaFields(11), desicDehum.CoolingCoilType)); - ShowContinueError(state, EnergyPlus::format("... {} = {}", cAlphaFields(12), desicDehum.CoolingCoilName)); + std::format("A DX coil bypassed air flow fraction greater than 0 may not be used when the input for {} is specified as Yes.", + cAlphaFields(13))); + ShowContinueError(state, + std::format("A DX coil with a bypassed air flow fraction greater than 0 may be upstream of the process inlet " + "however the input for {} must be specified as No.", + cAlphaFields(13))); + ShowContinueError(state, std::format("... {} = {}", cAlphaFields(11), desicDehum.CoolingCoilType)); + ShowContinueError(state, std::format("... {} = {}", cAlphaFields(12), desicDehum.CoolingCoilName)); ErrorsFoundGeneric = true; } } else if (desicDehum.DXCoilIndex == 0 && desicDehum.CoilUpstreamOfProcessSide == Selection::Yes) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, - EnergyPlus::format("A valid companion coil must be specified when {} is specified as Yes.", cAlphaFields(13))); + ShowSevereError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("A valid companion coil must be specified when {} is specified as Yes.", cAlphaFields(13))); ErrorsFoundGeneric = true; } if (!desicDehum.RegenInletIsOutsideAirNode && desicDehum.Preheat == Selection::Yes) { - ShowWarningError(state, EnergyPlus::format("{}={}", desicDehum.DehumType, desicDehum.Name)); + ShowWarningError(state, std::format("{}={}", desicDehum.DehumType, desicDehum.Name)); ShowContinueError( state, - EnergyPlus::format( + std::format( "The desiccant dehumidifier regeneration air inlet must be specified as an outdoor air node when {} is specified as Yes.", cAlphaFields(14))); ShowContinueError(state, - EnergyPlus::format("... desiccant dehumidifier regeneration air inlet node name = {}", - state.dataLoopNodes->NodeID(desicDehum.RegenAirInNode))); + std::format("... desiccant dehumidifier regeneration air inlet node name = {}", + state.dataLoopNodes->NodeID(desicDehum.RegenAirInNode))); ErrorsFoundGeneric = true; } if (desicDehum.CoilUpstreamOfProcessSide == Selection::Yes) { if (desicDehum.ProcAirInNode != desicDehum.CoolingCoilOutletNode) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, std::format("For {} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ShowContinueError(state, "Node names are inconsistent in companion cooling coil and desiccant heat exchanger objects."); - ShowContinueError( - state, EnergyPlus::format("For companion cooling coil = {} \"{}\"", desicDehum.CoolingCoilType, desicDehum.CoolingCoilName)); ShowContinueError(state, - EnergyPlus::format("The outlet node name in cooling coil = {}", - state.dataLoopNodes->NodeID(desicDehum.CoolingCoilOutletNode))); - ShowContinueError(state, EnergyPlus::format("For desiccant heat exchanger = {} \"{}\"", desicDehum.HXType, desicDehum.HXName)); + std::format("For companion cooling coil = {} \"{}\"", desicDehum.CoolingCoilType, desicDehum.CoolingCoilName)); ShowContinueError( - state, EnergyPlus::format("The process air inlet node name = {}", state.dataLoopNodes->NodeID(desicDehum.ProcAirInNode))); + state, + std::format("The outlet node name in cooling coil = {}", state.dataLoopNodes->NodeID(desicDehum.CoolingCoilOutletNode))); + ShowContinueError(state, std::format("For desiccant heat exchanger = {} \"{}\"", desicDehum.HXType, desicDehum.HXName)); + ShowContinueError(state, + std::format("The process air inlet node name = {}", state.dataLoopNodes->NodeID(desicDehum.ProcAirInNode))); ShowFatalError(state, "...previous error causes program termination."); } } @@ -1446,17 +1437,16 @@ namespace DesiccantDehumidifiers { ErrorsFound2 = true; } if (ErrorsFound2) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowSevereError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); ShowContinueError( state, - EnergyPlus::format( - "{} and {} must be defined if {} field is \"Yes\".", cNumericFields(2), cNumericFields(3), cAlphaFields(14))); + std::format("{} and {} must be defined if {} field is \"Yes\".", cNumericFields(2), cNumericFields(3), cAlphaFields(14))); } } else if (desicDehum.Preheat == Selection::No) { if (desicDehum.ExhaustFanMaxVolFlowRate > 0.0) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("{} should be 0 if {} field is \"No\".", cNumericFields(2), cAlphaFields(14))); - ShowContinueError(state, EnergyPlus::format("...{} will not be used and is reset to 0.", cNumericFields(2))); + ShowWarningError(state, std::format("{} \"{}\"", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("{} should be 0 if {} field is \"No\".", cNumericFields(2), cAlphaFields(14))); + ShowContinueError(state, std::format("...{} will not be used and is reset to 0.", cNumericFields(2))); desicDehum.ExhaustFanMaxVolFlowRate = 0.0; } } @@ -1726,8 +1716,8 @@ namespace DesiccantDehumidifiers { if (state.dataLoopNodes->Node(ControlNode).HumRatMax == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, "Missing humidity ratio setpoint (HumRatMax) for "); - ShowContinueError(state, EnergyPlus::format("Dehumidifier:Desiccant:NoFans: {}", desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("Node Referenced={}", state.dataLoopNodes->NodeID(ControlNode))); + ShowContinueError(state, std::format("Dehumidifier:Desiccant:NoFans: {}", desicDehum.Name)); + ShowContinueError(state, std::format("Node Referenced={}", state.dataLoopNodes->NodeID(ControlNode))); ShowContinueError(state, "use a Setpoint Manager to establish a setpoint at the process air outlet node."); state.dataHVACGlobal->SetPointErrorFlag = true; } else { @@ -1735,8 +1725,8 @@ namespace DesiccantDehumidifiers { state, ControlNode, HVAC::CtrlVarType::MaxHumRat, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, "Missing humidity ratio setpoint (HumRatMax) for "); - ShowContinueError(state, EnergyPlus::format("Dehumidifier:Desiccant:NoFans: {}", desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("Node Referenced={}", state.dataLoopNodes->NodeID(ControlNode))); + ShowContinueError(state, std::format("Dehumidifier:Desiccant:NoFans: {}", desicDehum.Name)); + ShowContinueError(state, std::format("Node Referenced={}", state.dataLoopNodes->NodeID(ControlNode))); ShowContinueError(state, "use a Setpoint Manager to establish a setpoint at the process air outlet node."); ShowContinueError(state, "Or use EMS Actuator to establish a setpoint at the process air outlet node."); } @@ -1821,8 +1811,8 @@ namespace DesiccantDehumidifiers { if (state.dataLoopNodes->Node(ControlNode).HumRatMax == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, "Missing maximum humidity ratio setpoint (MaxHumRat) for "); - ShowContinueError(state, EnergyPlus::format("{}: {}", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("Node Referenced={}", state.dataLoopNodes->NodeID(ControlNode))); + ShowContinueError(state, std::format("{}: {}", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("Node Referenced={}", state.dataLoopNodes->NodeID(ControlNode))); ShowContinueError(state, "use a Setpoint Manager to establish a \"MaxHumRat\" setpoint at the process air control node."); state.dataHVACGlobal->SetPointErrorFlag = true; } else { @@ -1830,8 +1820,8 @@ namespace DesiccantDehumidifiers { state, ControlNode, HVAC::CtrlVarType::MaxHumRat, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, "Missing maximum humidity ratio setpoint (MaxHumRat) for "); - ShowContinueError(state, EnergyPlus::format("{}: {}", desicDehum.DehumType, desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("Node Referenced={}", state.dataLoopNodes->NodeID(ControlNode))); + ShowContinueError(state, std::format("{}: {}", desicDehum.DehumType, desicDehum.Name)); + ShowContinueError(state, std::format("Node Referenced={}", state.dataLoopNodes->NodeID(ControlNode))); ShowContinueError(state, "use a Setpoint Manager to establish a \"MaxHumRat\" setpoint at the process air control node."); ShowContinueError(state, "Or use EMS Actuator to establish a setpoint at the process air outlet node."); @@ -1922,8 +1912,8 @@ namespace DesiccantDehumidifiers { case DesicDehumCtrlType::FixedHumratBypass: { HumRatNeeded = desicDehum.HumRatSet; if (HumRatNeeded <= 0.0) { - ShowSevereError(state, EnergyPlus::format("Dehumidifier:Desiccant:NoFans: {}", desicDehum.Name)); - ShowContinueError(state, EnergyPlus::format("Invalid Leaving Max Humidity Ratio Setpoint={:.8T}", HumRatNeeded)); + ShowSevereError(state, std::format("Dehumidifier:Desiccant:NoFans: {}", desicDehum.Name)); + ShowContinueError(state, std::format("Invalid Leaving Max Humidity Ratio Setpoint={:.8f}", HumRatNeeded)); ShowFatalError(state, "must be > 0.0"); } } break; @@ -1931,7 +1921,7 @@ namespace DesiccantDehumidifiers { HumRatNeeded = state.dataLoopNodes->Node(desicDehum.ProcAirOutNode).HumRatMax; } break; default: { - ShowFatalError(state, EnergyPlus::format("Invalid control type in desiccant dehumidifier = {}", desicDehum.Name)); + ShowFatalError(state, std::format("Invalid control type in desiccant dehumidifier = {}", desicDehum.Name)); } break; } @@ -2328,7 +2318,7 @@ namespace DesiccantDehumidifiers { ShowRecurringContinueErrorAtEnd(state, desicDehum.DehumType + '=' + desicDehum.Name, desicDehum.RegenFanErrorIndex2); ShowRecurringContinueErrorAtEnd( state, - EnergyPlus::format("Flow requested [m3/s] from {} = {}", HVAC::fanTypeNames[(int)desicDehum.regenFanType], desicDehum.RegenFanName), + std::format("Flow requested [m3/s] from {} = {}", HVAC::fanTypeNames[(int)desicDehum.regenFanType], desicDehum.RegenFanName), desicDehum.RegenFanErrorIndex3, (RegenAirMassFlowRate / state.dataEnvrn->StdRhoAir)); ShowRecurringContinueErrorAtEnd( @@ -2348,7 +2338,7 @@ namespace DesiccantDehumidifiers { ShowRecurringContinueErrorAtEnd(state, desicDehum.DehumType + '=' + desicDehum.Name, desicDehum.RegenCapErrorIndex2); ShowRecurringContinueErrorAtEnd( state, - EnergyPlus::format("Load requested [W] from {} = {}", HVAC::coilTypeNames[(int)desicDehum.regenCoilType], desicDehum.RegenCoilName), + std::format("Load requested [W] from {} = {}", HVAC::coilTypeNames[(int)desicDehum.regenCoilType], desicDehum.RegenCoilName), desicDehum.RegenCapErrorIndex3, QRegen); ShowRecurringContinueErrorAtEnd(state, "Load request exceeded delivered by [W]", desicDehum.RegenCapErrorIndex4, (QRegen - QDelivered)); @@ -2823,16 +2813,15 @@ namespace DesiccantDehumidifiers { if (!state.dataGlobal->WarmupFlag && (VolFlowPerRatedTotQ < MinVolFlowPerRatedTotQ)) { ++desicDehum.ErrCount; if (desicDehum.ErrCount < 2) { - ShowWarningError( - state, - EnergyPlus::format("{} \"{}\" - Air volume flow rate per watt of total condenser waste heat is below the minimum " - "recommended at {:G} m3/s/W.", - desicDehum.DehumType, - desicDehum.Name, - VolFlowPerRatedTotQ)); + ShowWarningError(state, + std::format("{} \"{}\" - Air volume flow rate per watt of total condenser waste heat is below the minimum " + "recommended at {:G} m3/s/W.", + desicDehum.DehumType, + desicDehum.Name, + VolFlowPerRatedTotQ)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError( - state, EnergyPlus::format("Expected minimum for VolumeFlowperRatedTotalCondenserWasteHeat = [{:G}]", MinVolFlowPerRatedTotQ)); + ShowContinueError(state, + std::format("Expected minimum for VolumeFlowperRatedTotalCondenserWasteHeat = [{:G}]", MinVolFlowPerRatedTotQ)); ShowContinueError(state, "Possible causes include inconsistent air flow rates in system components "); ShowContinueError(state, "on the regeneration side of the desiccant dehumidifier."); } else { @@ -3018,27 +3007,26 @@ namespace DesiccantDehumidifiers { if (SolFlag == -1) { if (desicDehum.HotWaterCoilMaxIterIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", - desicDehum.DehumType, - desicDehum.Name)); + std::format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", + desicDehum.DehumType, + desicDehum.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError( - state, EnergyPlus::format("...Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); + ShowContinueError(state, + std::format("...Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed (iteration limit [{}]) for {}=\"{}\"", - SolveMaxIter, - desicDehum.DehumType, - desicDehum.Name), + std::format("CalcNonDXHeatingCoils: Hot water coil control failed (iteration limit [{}]) for {}=\"{}\"", + SolveMaxIter, + desicDehum.DehumType, + desicDehum.Name), desicDehum.HotWaterCoilMaxIterIndex); } else if (SolFlag == -2) { if (desicDehum.HotWaterCoilMaxIterIndex2 == 0) { - ShowWarningMessage( - state, - EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", - desicDehum.DehumType, - desicDehum.Name)); + ShowWarningMessage(state, + std::format("CalcNonDXHeatingCoils: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", + desicDehum.DehumType, + desicDehum.Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "...Bad hot water maximum flow rate limits"); ShowContinueError(state, EnergyPlus::format("...Given minimum water flow rate={:.3R} kg/s", MinWaterFlow)); @@ -3123,7 +3111,7 @@ namespace DesiccantDehumidifiers { if (WhichDesicDehum != 0) { return state.dataDesiccantDehumidifiers->DesicDehum(WhichDesicDehum).ProcAirInNode; } - ShowSevereError(state, EnergyPlus::format("GetProcAirInletNodeNum: Could not find Desciccant Dehumidifier = \"{}\"", DesicDehumName)); + ShowSevereError(state, std::format("GetProcAirInletNodeNum: Could not find Desciccant Dehumidifier = \"{}\"", DesicDehumName)); ErrorsFound = true; return 0; } @@ -3148,7 +3136,7 @@ namespace DesiccantDehumidifiers { if (WhichDesicDehum != 0) { return state.dataDesiccantDehumidifiers->DesicDehum(WhichDesicDehum).ProcAirOutNode; } - ShowSevereError(state, EnergyPlus::format("GetProcAirInletNodeNum: Could not find Desciccant Dehumidifier = \"{}\"", DesicDehumName)); + ShowSevereError(state, std::format("GetProcAirInletNodeNum: Could not find Desciccant Dehumidifier = \"{}\"", DesicDehumName)); ErrorsFound = true; return 0; } diff --git a/src/EnergyPlus/DisplacementVentMgr.cc b/src/EnergyPlus/DisplacementVentMgr.cc index 61bffe853d2..e0af76e7c55 100644 --- a/src/EnergyPlus/DisplacementVentMgr.cc +++ b/src/EnergyPlus/DisplacementVentMgr.cc @@ -53,8 +53,10 @@ #include #include -// EnergyPlus Headers +// Local Headers #include + +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/DualDuct.cc b/src/EnergyPlus/DualDuct.cc index 1a5dae44184..4d0bad68342 100644 --- a/src/EnergyPlus/DualDuct.cc +++ b/src/EnergyPlus/DualDuct.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include #include // ObjexxFCL Headers @@ -694,12 +695,12 @@ namespace DualDuct { // do nothing, okay since no per person requirement involved } else if ((DummyOAFlow > 0.0) && (lAlphaBlanks(7))) { // missing input ShowSevereError(state, EnergyPlus::format("{} was blank.", cAlphaFields(7))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCMO_DDVarVolOA, thisDD.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCMO_DDVarVolOA, thisDD.Name)); ShowContinueError(state, R"(Valid choices are "CurrentOccupancy" or "DesignOccupancy")"); ErrorsFound = true; } else if ((DummyOAFlow > 0.0) && !(lAlphaBlanks(7))) { // incorrect input - ShowSevereError(state, EnergyPlus::format("{} = {} not a valid key choice.", cAlphaFields(7), AlphArray(7))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCMO_DDVarVolOA, thisDD.Name)); + ShowSevereError(state, std::format("{} = {} not a valid key choice.", cAlphaFields(7), AlphArray(7))); + ShowContinueError(state, std::format("Occurs in {} = {}", cCMO_DDVarVolOA, thisDD.Name)); ShowContinueError(state, R"(Valid choices are "CurrentOccupancy" or "DesignOccupancy")"); ErrorsFound = true; } @@ -732,7 +733,7 @@ namespace DualDuct { } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } } @@ -772,18 +773,16 @@ namespace DualDuct { continue; } ShowSevereError(state, - EnergyPlus::format("InitDualDuct: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", - state.dataDefineEquipment->AirDistUnit(this->ADUNum).Name)); + std::format("InitDualDuct: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", + state.dataDefineEquipment->AirDistUnit(this->ADUNum).Name)); if (this->DamperType == DualDuctDamper::ConstantVolume) { - ShowContinueError(state, - EnergyPlus::format("...Dual Duct Damper=[{},{}] will not be simulated.", cCMO_DDConstantVolume, this->Name)); + ShowContinueError(state, std::format("...Dual Duct Damper=[{},{}] will not be simulated.", cCMO_DDConstantVolume, this->Name)); } else if (this->DamperType == DualDuctDamper::VariableVolume) { - ShowContinueError(state, - EnergyPlus::format("...Dual Duct Damper=[{},{}] will not be simulated.", cCMO_DDVariableVolume, this->Name)); + ShowContinueError(state, std::format("...Dual Duct Damper=[{},{}] will not be simulated.", cCMO_DDVariableVolume, this->Name)); } else if (this->DamperType == DualDuctDamper::OutdoorAir) { - ShowContinueError(state, EnergyPlus::format("...Dual Duct Damper=[{},{}] will not be simulated.", cCMO_DDVarVolOA, this->Name)); + ShowContinueError(state, std::format("...Dual Duct Damper=[{},{}] will not be simulated.", cCMO_DDVarVolOA, this->Name)); } else { - ShowContinueError(state, EnergyPlus::format("...Dual Duct Damper=[unknown/invalid,{}] will not be simulated.", this->Name)); + ShowContinueError(state, std::format("...Dual Duct Damper=[unknown/invalid,{}] will not be simulated.", this->Name)); } } } @@ -1716,8 +1715,7 @@ namespace DualDuct { if (this->NoOAFlowInputFromUser) { ShowSevereError( state, - EnergyPlus::format("CalcOAOnlyMassFlow: Problem in AirTerminal:DualDuct:VAV:OutdoorAir = {}, check outdoor air specification", - this->Name)); + std::format("CalcOAOnlyMassFlow: Problem in AirTerminal:DualDuct:VAV:OutdoorAir = {}, check outdoor air specification", this->Name)); if (present(MaxOAVolFlow)) { MaxOAVolFlow = 0.0; } diff --git a/src/EnergyPlus/DuctLoss.cc b/src/EnergyPlus/DuctLoss.cc index 0429aa80fe8..c90b56293d2 100644 --- a/src/EnergyPlus/DuctLoss.cc +++ b/src/EnergyPlus/DuctLoss.cc @@ -48,8 +48,10 @@ // C++ Headers #include -// EnergyPlus Headers +// Local Headers #include + +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/EMSManager.cc b/src/EnergyPlus/EMSManager.cc index 3b48a3022bc..be760cca6df 100644 --- a/src/EnergyPlus/EMSManager.cc +++ b/src/EnergyPlus/EMSManager.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -60,7 +61,6 @@ #include #include #include -#include #include #include #include @@ -229,7 +229,7 @@ namespace EMSManager { General::ScanForReports(state, "EnergyManagementSystem", state.dataRuntimeLang->OutputEDDFile); if (state.dataRuntimeLang->OutputEDDFile) { - // open up output file for EMS EDD file EMS Data and Debug + // open up output file for EMS EDD file EMS Data and Debug state.files.edd.ensure_open(state, "CheckIFAnyEMS", state.files.outputControl.edd); } } else { @@ -980,21 +980,20 @@ namespace EMSManager { ShowSevereError(state, EnergyPlus::format("Invalid Output:Variable or Output:Meter Name ={}", state.dataRuntimeLang->Sensor(SensorNum).OutputVarName)); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->Sensor(SensorNum).Name)); + ShowContinueError(state, + std::format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->Sensor(SensorNum).Name)); ShowContinueError(state, "Output:Variable Name not found"); ErrorsFound = true; } } else if (VarIndex == -1) { if (reportErrors) { ShowSevereError(state, - EnergyPlus::format("Invalid Output:Variable or Output:Meter Index Key Name ={}", - state.dataRuntimeLang->Sensor(SensorNum).UniqueKeyName)); - ShowContinueError( - state, - EnergyPlus::format("For Output:Variable or Output:Meter = {}", state.dataRuntimeLang->Sensor(SensorNum).OutputVarName)); + std::format("Invalid Output:Variable or Output:Meter Index Key Name ={}", + state.dataRuntimeLang->Sensor(SensorNum).UniqueKeyName)); ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->Sensor(SensorNum).Name)); + state, std::format("For Output:Variable or Output:Meter = {}", state.dataRuntimeLang->Sensor(SensorNum).OutputVarName)); + ShowContinueError(state, + std::format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->Sensor(SensorNum).Name)); ShowContinueError(state, "Unique Key Name not found."); ErrorsFound = true; } @@ -1010,14 +1009,13 @@ namespace EMSManager { state.dataRuntimeLang->Sensor(SensorNum).CheckedOkay = false; if (reportErrors) { ShowSevereError(state, - EnergyPlus::format("Invalid Output:Variable or Output:Meter Index Key Name ={}", - state.dataRuntimeLang->Sensor(SensorNum).UniqueKeyName)); - ShowContinueError(state, - EnergyPlus::format("For Output:Variable or Output:Meter = {}", - state.dataRuntimeLang->Sensor(SensorNum).OutputVarName)); + std::format("Invalid Output:Variable or Output:Meter Index Key Name ={}", + state.dataRuntimeLang->Sensor(SensorNum).UniqueKeyName)); ShowContinueError( state, - EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->Sensor(SensorNum).Name)); + std::format("For Output:Variable or Output:Meter = {}", state.dataRuntimeLang->Sensor(SensorNum).OutputVarName)); + ShowContinueError( + state, std::format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->Sensor(SensorNum).Name)); ShowContinueError(state, "Schedule Name not found."); ErrorsFound = true; } @@ -1059,12 +1057,12 @@ namespace EMSManager { std::make_tuple(actuatorUsed.ComponentTypeName, actuatorUsed.UniqueIDName, actuatorUsed.ControlTypeName)); if (found == s_lang->EMSActuatorAvailableMap.end()) { if (reportErrors) { - ShowSevereError(state, EnergyPlus::format("Actuator {} = {} not found.", cCurrentModuleObject, actuatorUsed.Name)); + ShowSevereError(state, std::format("Actuator {} = {} not found.", cCurrentModuleObject, actuatorUsed.Name)); ShowContinueError(state, - EnergyPlus::format("Combination of ObjectType = {}, ObjectName = {}, and ControlType = {} not available.", - actuatorUsed.ComponentTypeName, - actuatorUsed.UniqueIDName, - actuatorUsed.ControlTypeName)); + std::format("Combination of ObjectType = {}, ObjectName = {}, and ControlType = {} not available.", + actuatorUsed.ComponentTypeName, + actuatorUsed.UniqueIDName, + actuatorUsed.ControlTypeName)); if (state.dataRuntimeLang->OutputEDDFile) { ShowContinueError(state, "Review .edd file for valid component types."); } else { @@ -1078,13 +1076,13 @@ namespace EMSManager { actuatorUsed.CheckedOkay = true; int nHandle = s_lang->EMSActuatorAvailable(found->second).handleCount; if (nHandle > 0) { - EnergyPlus::ShowWarningError( - state, EnergyPlus::format("Seems like you already tried to get a Handle on this Actuator {}times.", nHandle)); + EnergyPlus::ShowWarningError(state, + std::format("Seems like you already tried to get a Handle on this Actuator {}times.", nHandle)); EnergyPlus::ShowContinueError(state, - EnergyPlus::format("Occurred for componentType='{}', controlType='{}', uniqueKey='{}'.", - actuatorUsed.ComponentTypeName, - actuatorUsed.ControlTypeName, - actuatorUsed.UniqueIDName)); + std::format("Occurred for componentType='{}', controlType='{}', uniqueKey='{}'.", + actuatorUsed.ComponentTypeName, + actuatorUsed.ControlTypeName, + actuatorUsed.UniqueIDName)); EnergyPlus::ShowContinueError(state, "You should take note that there is a risk of overwriting."); } ++s_lang->EMSActuatorAvailable(found->second).handleCount; @@ -1096,7 +1094,7 @@ namespace EMSManager { if (state.dataSurface->Surface(actuatedSurfNum).IsAirBoundarySurf) { ShowWarningError( state, - EnergyPlus::format( + std::format( "GetEMSInput: EnergyManagementSystem:Actuator={} actuates an opening attached to an air boundary surface.", actuatorUsed.Name)); } @@ -1126,12 +1124,11 @@ namespace EMSManager { if (!FoundObjectType) { if (reportErrors) { - ShowSevereError(state, - EnergyPlus::format("Invalid Internal Data Type ={}", - state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).InternalDataTypeName)); - ShowContinueError( + ShowSevereError( state, - EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).Name)); + std::format("Invalid Internal Data Type ={}", state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).InternalDataTypeName)); + ShowContinueError( + state, std::format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).Name)); ShowContinueError(state, "Internal data type name not found"); ErrorsFound = true; } @@ -1140,11 +1137,10 @@ namespace EMSManager { if (!FoundObjectName) { if (reportErrors) { ShowSevereError(state, - EnergyPlus::format("Invalid Internal Data Index Key Name ={}", - state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).UniqueIDName)); + std::format("Invalid Internal Data Index Key Name ={}", + state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).UniqueIDName)); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).Name)); + state, std::format("Entered in {}={}", cCurrentModuleObject, state.dataRuntimeLang->EMSInternalVarsUsed(InternVarNum).Name)); ShowContinueError(state, "Internal data unique identifier not found"); ErrorsFound = true; } @@ -1516,10 +1512,9 @@ namespace EMSManager { } } if (!FoundControl) { - ShowWarningError(state, - EnergyPlus::format("Missing '{}' for node named named '{}'.", - controlTypeNames[(int)ctrlVar], - state.dataLoopNodes->NodeID(NodeNum))); + ShowWarningError( + state, + std::format("Missing '{}' for node named named '{}'.", controlTypeNames[(int)ctrlVar], state.dataLoopNodes->NodeID(NodeNum))); } } else { for (int Loop = 1; Loop <= state.dataRuntimeLang->numActuatorsUsed + state.dataRuntimeLang->NumExternalInterfaceActuatorsUsed; ++Loop) { @@ -1723,9 +1718,9 @@ namespace EMSManager { DataSurfaces::WinShadingType::SwitchableGlazing) { ShowSevereError( state, - EnergyPlus::format("Missing shade or blind layer in window construction name = '{}', surface name = '{}'.", - state.dataConstruction->Construct(state.dataSurface->Surface(loopSurfNum).activeShadedConstruction).Name, - state.dataSurface->Surface(loopSurfNum).Name)); + std::format("Missing shade or blind layer in window construction name = '{}', surface name = '{}'.", + state.dataConstruction->Construct(state.dataSurface->Surface(loopSurfNum).activeShadedConstruction).Name, + state.dataSurface->Surface(loopSurfNum).Name)); ShowContinueError(state, "...'Control Status' or 'Slat Angle' EMS Actuator cannot be set for a construction that does not have a shade " "or a blind layer."); @@ -1999,17 +1994,15 @@ namespace EMSManager { "checkForUnusedActuatorsAtEnd: Unused EMS Actuator detected, suggesting possible unintended programming error or " "spelling mistake."); ShowContinueError(state, - EnergyPlus::format("Check Erl programs related to EMS actuator variable name = {}", - state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).Name)); + std::format("Check Erl programs related to EMS actuator variable name = {}", + state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).Name)); ShowContinueError( - state, - EnergyPlus::format("EMS Actuator type name = {}", state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).ComponentTypeName)); - ShowContinueError(state, - EnergyPlus::format("EMS Actuator unique component name = {}", - state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).UniqueIDName)); + state, std::format("EMS Actuator type name = {}", state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).ComponentTypeName)); ShowContinueError( state, - EnergyPlus::format("EMS Actuator control type = {}", state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).ControlTypeName)); + std::format("EMS Actuator unique component name = {}", state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).UniqueIDName)); + ShowContinueError( + state, std::format("EMS Actuator control type = {}", state.dataRuntimeLang->EMSActuatorUsed(actuatorUsedLoop).ControlTypeName)); } } } @@ -2202,7 +2195,7 @@ void SetupEMSInternalVariable( if (FoundDuplicate) { ShowSevereError(state, "Duplicate internal variable was sent to SetupEMSInternalVariable."); - ShowContinueError(state, EnergyPlus::format("Internal variable type = {} ; name = {}", cDataTypeName, cUniqueIDName)); + ShowContinueError(state, std::format("Internal variable type = {} ; name = {}", cDataTypeName, cUniqueIDName)); ShowContinueError(state, "Called from SetupEMSInternalVariable."); } else { // add new internal data variable @@ -2251,7 +2244,7 @@ void SetupEMSInternalVariable( if (FoundDuplicate) { ShowSevereError(state, "Duplicate internal variable was sent to SetupEMSInternalVariable."); - ShowContinueError(state, EnergyPlus::format("Internal variable type = {} ; name = {}", cDataTypeName, cUniqueIDName)); + ShowContinueError(state, std::format("Internal variable type = {} ; name = {}", cDataTypeName, cUniqueIDName)); ShowContinueError(state, "called from SetupEMSInternalVariable"); } else { // add new internal data variable diff --git a/src/EnergyPlus/EconomicLifeCycleCost.cc b/src/EnergyPlus/EconomicLifeCycleCost.cc index 3247a1e18b3..7983c9a8001 100644 --- a/src/EnergyPlus/EconomicLifeCycleCost.cc +++ b/src/EnergyPlus/EconomicLifeCycleCost.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -413,24 +414,24 @@ void GetInputLifeCycleCostParameters(EnergyPlusData &state) elcc->depreciationMethod = DeprMethod::None; if (state.dataIPShortCut->lAlphaFieldBlanks(6)) { ShowWarningError(state, - EnergyPlus::format("{}: The input field {}is blank. \"None\" will be used.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(6))); + std::format("{}: The input field {}is blank. \"None\" will be used.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(6))); } else { ShowWarningError(state, - EnergyPlus::format("{}: Invalid {}=\"{}{}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(6), - AlphaArray(6), - R"(". "None" will be used.)")); + std::format("{}: Invalid {}=\"{}{}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(6), + AlphaArray(6), + R"(". "None" will be used.)")); } } // compute derived variables elcc->lastDateYear = elcc->baseDateYear + elcc->lengthStudyYears - 1; } else { - ShowWarningError(state, - EnergyPlus::format("{}: Only one instance of this object is allowed. No life-cycle cost reports will be generated.", - CurrentModuleObject)); + ShowWarningError( + state, + std::format("{}: Only one instance of this object is allowed. No life-cycle cost reports will be generated.", CurrentModuleObject)); elcc->LCCparamPresent = false; } } @@ -484,9 +485,9 @@ void GetInputLifeCycleCostRecurringCosts(EnergyPlusData &state) for (jFld = 1; jFld <= NumAlphas; ++jFld) { if (hasi(AlphaArray(jFld), "LifeCycleCost:")) { ShowWarningError(state, - EnergyPlus::format("In {} named {} a field was found containing LifeCycleCost: which may indicate a missing comma.", - CurrentModuleObject, - AlphaArray(1))); + std::format("In {} named {} a field was found containing LifeCycleCost: which may indicate a missing comma.", + CurrentModuleObject, + AlphaArray(1))); } } // start to extract values from input array into appropriate fields @@ -514,10 +515,10 @@ void GetInputLifeCycleCostRecurringCosts(EnergyPlusData &state) if (isNotRecurringCost) { elcc->RecurringCosts[iInObj].category = CostCategory::Maintenance; ShowWarningError(state, - EnergyPlus::format("{}: Invalid {}=\"{}\". The category of Maintenance will be used.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2), - AlphaArray(2))); + std::format("{}: Invalid {}=\"{}\". The category of Maintenance will be used.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(2), + AlphaArray(2))); } // N1, \field Cost // \type real @@ -531,10 +532,10 @@ void GetInputLifeCycleCostRecurringCosts(EnergyPlusData &state) if (elcc->RecurringCosts[iInObj].startOfCosts == StartCosts::Invalid) { elcc->RecurringCosts[iInObj].startOfCosts = StartCosts::ServicePeriod; ShowWarningError(state, - EnergyPlus::format("{}: Invalid {}=\"{}\". The start of the service period will be used.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - AlphaArray(3))); + std::format("{}: Invalid {}=\"{}\". The start of the service period will be used.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(3), + AlphaArray(3))); } // N2, \field Years from Start // \type integer @@ -544,18 +545,18 @@ void GetInputLifeCycleCostRecurringCosts(EnergyPlusData &state) if (elcc->RecurringCosts[iInObj].yearsFromStart > 100) { ShowWarningError( state, - EnergyPlus::format("{}: Invalid value in field {}. This value is the number of years from the start so a value greater than 100 is " - "not reasonable for an economic evaluation. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(2))); + std::format("{}: Invalid value in field {}. This value is the number of years from the start so a value greater than 100 is " + "not reasonable for an economic evaluation. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(2))); } if (elcc->RecurringCosts[iInObj].yearsFromStart < 0) { ShowWarningError( state, - EnergyPlus::format("{}: Invalid value in field {}. This value is the number of years from the start so a value less than 0 is not " - "reasonable for an economic evaluation. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(2))); + std::format("{}: Invalid value in field {}. This value is the number of years from the start so a value less than 0 is not " + "reasonable for an economic evaluation. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(2))); } // N3, \field Months from Start // \type integer @@ -565,18 +566,18 @@ void GetInputLifeCycleCostRecurringCosts(EnergyPlusData &state) if (elcc->RecurringCosts[iInObj].monthsFromStart > 1200) { ShowWarningError( state, - EnergyPlus::format("{}: Invalid value in field {}. This value is the number of months from the start so a value greater than 1200 " - "is not reasonable for an economic evaluation. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(3))); + std::format("{}: Invalid value in field {}. This value is the number of months from the start so a value greater than 1200 " + "is not reasonable for an economic evaluation. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(3))); } if (elcc->RecurringCosts[iInObj].monthsFromStart < 0) { ShowWarningError( state, - EnergyPlus::format("{}: Invalid value in field {}. This value is the number of months from the start so a value less than 0 is not " - "reasonable for an economic evaluation. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(3))); + std::format("{}: Invalid value in field {}. This value is the number of months from the start so a value less than 0 is not " + "reasonable for an economic evaluation. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(3))); } // N4, \field Repeat Period Years // \type integer @@ -586,18 +587,18 @@ void GetInputLifeCycleCostRecurringCosts(EnergyPlusData &state) if (elcc->RecurringCosts[iInObj].repeatPeriodYears > 100) { ShowWarningError( state, - EnergyPlus::format("{}: Invalid value in field {}. This value is the number of years between occurrences of the cost so a value " - "greater than 100 is not reasonable for an economic evaluation. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(4))); + std::format("{}: Invalid value in field {}. This value is the number of years between occurrences of the cost so a value " + "greater than 100 is not reasonable for an economic evaluation. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(4))); } if (elcc->RecurringCosts[iInObj].repeatPeriodYears < 1) { ShowWarningError( state, - EnergyPlus::format("{}: Invalid value in field {}. This value is the number of years between occurrences of the cost so a value " - "less than 1 is not reasonable for an economic evaluation. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(4))); + std::format("{}: Invalid value in field {}. This value is the number of years between occurrences of the cost so a value " + "less than 1 is not reasonable for an economic evaluation. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(4))); } // N5, \field Repeat Period Months // \type integer @@ -607,25 +608,25 @@ void GetInputLifeCycleCostRecurringCosts(EnergyPlusData &state) if (elcc->RecurringCosts[iInObj].repeatPeriodMonths > 1200) { ShowWarningError( state, - EnergyPlus::format("{}: Invalid value in field {}. This value is the number of months between occurrences of the cost so a value " - "greater than 1200 is not reasonable for an economic evaluation. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(5))); + std::format("{}: Invalid value in field {}. This value is the number of months between occurrences of the cost so a value " + "greater than 1200 is not reasonable for an economic evaluation. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(5))); } if (elcc->RecurringCosts[iInObj].repeatPeriodMonths < 0) { ShowWarningError( state, - EnergyPlus::format("{}: Invalid value in field {}. This value is the number of months between occurrences of the cost so a value " - "less than 0 is not reasonable for an economic evaluation. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(5))); + std::format("{}: Invalid value in field {}. This value is the number of months between occurrences of the cost so a value " + "less than 0 is not reasonable for an economic evaluation. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(5))); } if ((elcc->RecurringCosts[iInObj].repeatPeriodMonths == 0) && (elcc->RecurringCosts[iInObj].repeatPeriodYears == 0)) { ShowWarningError(state, - EnergyPlus::format("{}: Invalid value in fields {} and {}. The repeat period must not be zero months and zero years. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(5), - state.dataIPShortCut->cNumericFieldNames(4))); + std::format("{}: Invalid value in fields {} and {}. The repeat period must not be zero months and zero years. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(5), + state.dataIPShortCut->cNumericFieldNames(4))); } // N6; \field Annual escalation rate // \type real @@ -633,18 +634,18 @@ void GetInputLifeCycleCostRecurringCosts(EnergyPlusData &state) if (elcc->RecurringCosts[iInObj].annualEscalationRate > 0.30) { ShowWarningError( state, - EnergyPlus::format("{}: Invalid value in field {}. This value is the decimal value for the annual escalation so most values are " - "between 0.02 and 0.15. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(6))); + std::format("{}: Invalid value in field {}. This value is the decimal value for the annual escalation so most values are " + "between 0.02 and 0.15. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(6))); } if (elcc->RecurringCosts[iInObj].annualEscalationRate < -0.30) { ShowWarningError( state, - EnergyPlus::format("{}: Invalid value in field {}. This value is the decimal value for the annual escalation so most values are " - "between 0.02 and 0.15. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(6))); + std::format("{}: Invalid value in field {}. This value is the decimal value for the annual escalation so most values are " + "between 0.02 and 0.15. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(6))); } // express the years and months fields in total months elcc->RecurringCosts[iInObj].totalMonthsFromStart = @@ -709,9 +710,9 @@ void GetInputLifeCycleCostNonrecurringCost(EnergyPlusData &state) for (jFld = 1; jFld <= NumAlphas; ++jFld) { if (hasi(AlphaArray(jFld), "LifeCycleCost:")) { ShowWarningError(state, - EnergyPlus::format("In {} named {} a field was found containing LifeCycleCost: which may indicate a missing comma.", - CurrentModuleObject, - AlphaArray(1))); + std::format("In {} named {} a field was found containing LifeCycleCost: which may indicate a missing comma.", + CurrentModuleObject, + AlphaArray(1))); } } // start to extract values from input array into appropriate fields @@ -732,10 +733,10 @@ void GetInputLifeCycleCostNonrecurringCost(EnergyPlusData &state) if (isNotNonRecurringCost) { elcc->NonrecurringCost[iInObj].category = CostCategory::Construction; ShowWarningError(state, - EnergyPlus::format("{}: Invalid {}=\"{}\". The category of Construction will be used.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2), - AlphaArray(2))); + std::format("{}: Invalid {}=\"{}\". The category of Construction will be used.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(2), + AlphaArray(2))); } // N1, \field Cost // \type real @@ -749,10 +750,10 @@ void GetInputLifeCycleCostNonrecurringCost(EnergyPlusData &state) if (elcc->NonrecurringCost[iInObj].startOfCosts == StartCosts::Invalid) { elcc->NonrecurringCost[iInObj].startOfCosts = StartCosts::ServicePeriod; ShowWarningError(state, - EnergyPlus::format("{}: Invalid {}=\"{}\". The start of the service period will be used.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - AlphaArray(3))); + std::format("{}: Invalid {}=\"{}\". The start of the service period will be used.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(3), + AlphaArray(3))); } // N2, \field Years from Start // \type integer @@ -762,18 +763,18 @@ void GetInputLifeCycleCostNonrecurringCost(EnergyPlusData &state) if (elcc->NonrecurringCost[iInObj].yearsFromStart > 100) { ShowWarningError( state, - EnergyPlus::format("{}: Invalid value in field {}. This value is the number of years from the start so a value greater than 100 is " - "not reasonable for an economic evaluation. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(2))); + std::format("{}: Invalid value in field {}. This value is the number of years from the start so a value greater than 100 is " + "not reasonable for an economic evaluation. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(2))); } if (elcc->NonrecurringCost[iInObj].yearsFromStart < 0) { ShowWarningError( state, - EnergyPlus::format("{}: Invalid value in field {}. This value is the number of years from the start so a value less than 0 is not " - "reasonable for an economic evaluation. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(2))); + std::format("{}: Invalid value in field {}. This value is the number of years from the start so a value less than 0 is not " + "reasonable for an economic evaluation. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(2))); } // N3; \field Months from Start // \type integer @@ -783,18 +784,18 @@ void GetInputLifeCycleCostNonrecurringCost(EnergyPlusData &state) if (elcc->NonrecurringCost[iInObj].monthsFromStart > 1200) { ShowWarningError( state, - EnergyPlus::format("{}: Invalid value in field {}. This value is the number of months from the start so a value greater than 1200 " - "is not reasonable for an economic evaluation. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(3))); + std::format("{}: Invalid value in field {}. This value is the number of months from the start so a value greater than 1200 " + "is not reasonable for an economic evaluation. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(3))); } if (elcc->NonrecurringCost[iInObj].monthsFromStart < 0) { ShowWarningError( state, - EnergyPlus::format("{}: Invalid value in field {}. This value is the number of months from the start so a value less than 0 is not " - "reasonable for an economic evaluation. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(3))); + std::format("{}: Invalid value in field {}. This value is the number of months from the start so a value less than 0 is not " + "reasonable for an economic evaluation. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(3))); } // express the years and months fields in total months elcc->NonrecurringCost[iInObj].totalMonthsFromStart = @@ -853,11 +854,10 @@ void GetInputLifeCycleCostUsePriceEscalation(EnergyPlusData &state) // check to make sure none of the values are another life cycle cost object for (int jFld = 1; jFld <= NumAlphas; ++jFld) { if (hasi(AlphaArray(jFld), "LifeCycleCost:")) { - ShowWarningError( - state, - EnergyPlus::format("In {} named {} a field was found containing LifeCycleCost: which may indicate a missing comma.", - CurrentModuleObject, - AlphaArray(1))); + ShowWarningError(state, + std::format("In {} named {} a field was found containing LifeCycleCost: which may indicate a missing comma.", + CurrentModuleObject, + AlphaArray(1))); } } // start to extract values from input array into appropriate fields @@ -882,7 +882,7 @@ void GetInputLifeCycleCostUsePriceEscalation(EnergyPlusData &state) // \key OtherFuel2 elcc->UsePriceEscalation(iInObj).resource = static_cast(getEnumValue(Constant::eResourceNamesUC, AlphaArray(2))); if (NumAlphas > 3) { - ShowWarningError(state, EnergyPlus::format("In {} contains more alpha fields than expected.", CurrentModuleObject)); + ShowWarningError(state, std::format("In {} contains more alpha fields than expected.", CurrentModuleObject)); } // N1, \field Escalation Start Year // \type integer @@ -891,15 +891,15 @@ void GetInputLifeCycleCostUsePriceEscalation(EnergyPlusData &state) elcc->UsePriceEscalation(iInObj).escalationStartYear = int(NumArray(1)); if (elcc->UsePriceEscalation(iInObj).escalationStartYear > 2100) { ShowWarningError(state, - EnergyPlus::format("{}: Invalid value in field {}. Value greater than 2100 yet it is representing a year. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(1))); + std::format("{}: Invalid value in field {}. Value greater than 2100 yet it is representing a year. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(1))); } if (elcc->UsePriceEscalation(iInObj).escalationStartYear < 1900) { ShowWarningError(state, - EnergyPlus::format("{}: Invalid value in field {}. Value less than 1900 yet it is representing a year. ", - CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(1))); + std::format("{}: Invalid value in field {}. Value less than 1900 yet it is representing a year. ", + CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(1))); } // A3, \field Escalation Start Month // \type choice @@ -920,10 +920,10 @@ void GetInputLifeCycleCostUsePriceEscalation(EnergyPlusData &state) if (elcc->UsePriceEscalation(iInObj).escalationStartMonth == -1) { elcc->UsePriceEscalation(iInObj).escalationStartMonth = 0; ShowWarningError(state, - EnergyPlus::format("{}: Invalid month entered in field {}. Using January instead of \"{}\"", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - AlphaArray(3))); + std::format("{}: Invalid month entered in field {}. Using January instead of \"{}\"", + CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(3), + AlphaArray(3))); } // N2, \field Year 1 Escalation // \type real @@ -1005,11 +1005,10 @@ void GetInputLifeCycleCostUseAdjustment(EnergyPlusData &state) // check to make sure none of the values are another life cycle cost object for (int jFld = 1; jFld <= NumAlphas; ++jFld) { if (hasi(AlphaArray(jFld), "LifeCycleCost:")) { - ShowWarningError( - state, - EnergyPlus::format("In {} named {} a field was found containing LifeCycleCost: which may indicate a missing comma.", - CurrentModuleObject, - AlphaArray(1))); + ShowWarningError(state, + std::format("In {} named {} a field was found containing LifeCycleCost: which may indicate a missing comma.", + CurrentModuleObject, + AlphaArray(1))); } } // start to extract values from input array into appropriate fields @@ -1034,7 +1033,7 @@ void GetInputLifeCycleCostUseAdjustment(EnergyPlusData &state) // \key OtherFuel2 elcc->UseAdjustment(iInObj).resource = static_cast(getEnumValue(Constant::eResourceNamesUC, AlphaArray(2))); if (NumAlphas > 2) { - ShowWarningError(state, EnergyPlus::format("In {} contains more alpha fields than expected.", CurrentModuleObject)); + ShowWarningError(state, std::format("In {} contains more alpha fields than expected.", CurrentModuleObject)); } // N1, \field Year 1 Multiplier // \type real @@ -1193,10 +1192,9 @@ void ExpressAsCashFlows(EnergyPlusData &state) if ((month >= 1) && (month <= elcc->lengthStudyTotalMonths)) { elcc->CashFlow[offset + jCost].mnAmount(month) = elcc->NonrecurringCost[jCost].cost * monthlyInflationFactor(month); } else { - ShowWarningError( - state, - EnergyPlus::format("For life cycle costing a nonrecurring cost named {} contains a cost which is not within the study period.", - elcc->NonrecurringCost[jCost].name)); + ShowWarningError(state, + std::format("For life cycle costing a nonrecurring cost named {} contains a cost which is not within the study period.", + elcc->NonrecurringCost[jCost].name)); } } // Put recurring costs into cashflows @@ -1225,9 +1223,8 @@ void ExpressAsCashFlows(EnergyPlusData &state) } else { ShowWarningError( state, - EnergyPlus::format( - "For life cycle costing the recurring cost named {} has the first year of the costs that is not within the study period.", - elcc->RecurringCosts[jCost].name)); + std::format("For life cycle costing the recurring cost named {} has the first year of the costs that is not within the study period.", + elcc->RecurringCosts[jCost].name)); } } // Put resource costs into cashflows @@ -1360,8 +1357,8 @@ void ExpressAsCashFlows(EnergyPlusData &state) Constant::eResource curResource = elcc->UsePriceEscalation(nUsePriceEsc).resource; if (!resourceCostNotZero[static_cast(curResource)] && state.dataGlobal->DoWeathSim) { ShowWarningError(state, - EnergyPlus::format("The resource referenced by LifeCycleCost:UsePriceEscalation= \"{}\" has no energy cost. ", - elcc->UsePriceEscalation(nUsePriceEsc).name)); + std::format("The resource referenced by LifeCycleCost:UsePriceEscalation= \"{}\" has no energy cost. ", + elcc->UsePriceEscalation(nUsePriceEsc).name)); ShowContinueError(state, "... It is likely that the wrong resource is used. The resource should match the meter used in Utility:Tariff."); } } @@ -1747,8 +1744,8 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) } else { tableBody(1, 6) = "-- N/A --"; } - tableBody(1, 7) = EnergyPlus::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear); - tableBody(1, 8) = EnergyPlus::format("{} {}", Util::MonthNamesCC[static_cast(elcc->serviceDateMonth)], elcc->serviceDateYear); + tableBody(1, 7) = std::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear); + tableBody(1, 8) = std::format("{} {}", Util::MonthNamesCC[static_cast(elcc->serviceDateMonth)], elcc->serviceDateYear); tableBody(1, 9) = fmt::to_string(elcc->lengthStudyYears); tableBody(1, 10) = OutputReportTabular::RealToStr(currentStyle.formatReals, elcc->taxRate, 4); tableBody(1, 11) = DeprMethodNames[static_cast(elcc->depreciationMethod)]; @@ -1791,9 +1788,9 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) for (int jObj = 1; jObj <= elcc->numUsePriceEscalation; ++jObj) { // loop through objects not columns to add names columnHead(jObj) = elcc->UsePriceEscalation(jObj).name; tableBody(jObj, 1) = Constant::eResourceNames[static_cast(elcc->UsePriceEscalation(jObj).resource)]; - tableBody(jObj, 2) = EnergyPlus::format("{} {}", - Util::MonthNamesCC[static_cast(elcc->UsePriceEscalation(jObj).escalationStartMonth)], - elcc->UsePriceEscalation(jObj).escalationStartYear); + tableBody(jObj, 2) = std::format("{} {}", + Util::MonthNamesCC[static_cast(elcc->UsePriceEscalation(jObj).escalationStartMonth)], + elcc->UsePriceEscalation(jObj).escalationStartYear); } for (int jObj = 1; jObj <= elcc->numUsePriceEscalation; ++jObj) { for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { @@ -1834,7 +1831,7 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) rowHead(1) = ""; for (int iYear = 1; iYear <= numYears; ++iYear) { rowHead(iYear + 1) = - EnergyPlus::format("{} {}", Util::MonthNamesCC[static_cast(elcc->serviceDateMonth)], elcc->serviceDateYear + iYear - 1); + std::format("{} {}", Util::MonthNamesCC[static_cast(elcc->serviceDateMonth)], elcc->serviceDateYear + iYear - 1); } for (int jObj = 1; jObj <= elcc->numUseAdjustment; ++jObj) { // loop through objects not columns to add names columnHead(jObj) = elcc->UseAdjustment(jObj).name; @@ -1876,8 +1873,7 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) tableBody = ""; rowHead(1) = ""; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear + 1) = - EnergyPlus::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear + 1) = std::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); } for (int jObj = 0; jObj < (elcc->numRecurringCosts + elcc->numNonrecurringCost); ++jObj) { int curCashFlow = CostCategory::Num + jObj; @@ -1928,8 +1924,7 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) tableBody.allocate(numColumns, elcc->lengthStudyYears); tableBody = ""; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear) = - EnergyPlus::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear) = std::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); } for (int jObj = 0; jObj < elcc->numResourcesUsed; ++jObj) { int curCashFlow = CostCategory::Num + elcc->numRecurringCosts + elcc->numNonrecurringCost + jObj; @@ -1983,8 +1978,7 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) tableBody.allocate(numColumns, elcc->lengthStudyYears); tableBody = ""; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear) = - EnergyPlus::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear) = std::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); } for (int jObj = 0; jObj < elcc->numResourcesUsed; ++jObj) { int curCashFlow = CostCategory::Num + elcc->numRecurringCosts + elcc->numNonrecurringCost + jObj; @@ -2050,8 +2044,7 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) } columnHead(4) = Total; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear) = - EnergyPlus::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear) = std::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); for (int CostCategory = CostCategory::Construction, tableColumnIndex = 1; CostCategory <= CostCategory::TotCaptl; ++tableColumnIndex, ++CostCategory) { tableBody(tableColumnIndex, iYear) = @@ -2101,8 +2094,7 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) columnHead(10) = Total; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear) = - EnergyPlus::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear) = std::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); for (int CashFlowCostCategory = CostCategory::Maintenance; CashFlowCostCategory <= CostCategory::TotOper; ++CashFlowCostCategory) { tableBody(CashFlowCostCategory + 1, iYear) = OutputReportTabular::RealToStr(currentStyle.formatReals, elcc->CashFlow[CashFlowCostCategory].yrAmount(iYear), 2); @@ -2151,8 +2143,7 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) columnHead(10) = Total; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear) = - EnergyPlus::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear) = std::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); for (int CashFlowCostCategory = CostCategory::Maintenance; CashFlowCostCategory <= CostCategory::Water; ++CashFlowCostCategory) { tableBody(CashFlowCostCategory + 1, iYear) = OutputReportTabular::RealToStr(currentStyle.formatReals, elcc->CashFlow[CashFlowCostCategory].yrAmount(iYear), 2); @@ -2427,8 +2418,7 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) totalPV = 0.0; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear) = - EnergyPlus::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear) = std::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); tableBody(1, iYear) = OutputReportTabular::RealToStr(currentStyle.formatReals, elcc->CashFlow[CostCategory::TotGrand].yrAmount(iYear), 2); // adjust for escalated energy costs @@ -2479,8 +2469,7 @@ void WriteTabularLifeCycleCostReport(EnergyPlusData &state) totalPV = 0.0; for (int iYear = 1; iYear <= elcc->lengthStudyYears; ++iYear) { - rowHead(iYear) = - EnergyPlus::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); + rowHead(iYear) = std::format("{} {}", Util::MonthNamesCC[static_cast(elcc->baseDateMonth)], elcc->baseDateYear + iYear - 1); tableBody(1, iYear) = OutputReportTabular::RealToStr(currentStyle.formatReals, elcc->DepreciatedCapital(iYear), 2); tableBody(2, iYear) = OutputReportTabular::RealToStr(currentStyle.formatReals, elcc->TaxableIncome(iYear), 2); tableBody(3, iYear) = OutputReportTabular::RealToStr(currentStyle.formatReals, elcc->Taxes(iYear), 2); diff --git a/src/EnergyPlus/EconomicTariff.cc b/src/EnergyPlus/EconomicTariff.cc index 404ca397f41..0d88522cf90 100644 --- a/src/EnergyPlus/EconomicTariff.cc +++ b/src/EnergyPlus/EconomicTariff.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -966,7 +967,7 @@ void GetInputEconomicsChargeSimple(EnergyPlusData &state, bool &ErrorsFound) // // check to make sure none of the values are another economic object for (int jFld = 1; jFld <= NumAlphas; ++jFld) { if (hasi(s_ipsc->cAlphaArgs(jFld), "UtilityCost:")) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "... a field was found containing UtilityCost: which may indicate a missing comma."); } } @@ -989,9 +990,9 @@ void GetInputEconomicsChargeSimple(EnergyPlusData &state, bool &ErrorsFound) // if (chargeSimple.season != Season::Annual) { if (chargeSimple.tariffIndx != 0) { if (s_econ->tariff(chargeSimple.tariffIndx).seasonSched == nullptr) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\" invalid data", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4))); + ShowWarningError(state, + std::format("{}{}=\"{}\" invalid data", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4))); ShowContinueError(state, " a Season other than Annual is used but no Season Schedule Name is specified in the UtilityCost:Tariff."); } @@ -1051,7 +1052,7 @@ void GetInputEconomicsChargeBlock(EnergyPlusData &state, bool &ErrorsFound) // t // check to make sure none of the values are another economic object for (int jFld = 1; jFld <= NumAlphas; ++jFld) { if (hasi(s_ipsc->cAlphaArgs(jFld), "UtilityCost:")) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "... a field was found containing UtilityCost: which may indicate a missing comma."); } } @@ -1074,9 +1075,9 @@ void GetInputEconomicsChargeBlock(EnergyPlusData &state, bool &ErrorsFound) // t if (chargeBlock.season != Season::Annual) { if (chargeBlock.tariffIndx != 0) { if (s_econ->tariff(chargeBlock.tariffIndx).seasonSched == nullptr) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\" invalid data", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4))); + ShowWarningError(state, + std::format("{}{}=\"{}\" invalid data", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4))); ShowContinueError(state, " a Season other than Annual is used but no Season Schedule Name is specified in the UtilityCost:Tariff."); } @@ -1174,7 +1175,7 @@ void GetInputEconomicsRatchet(EnergyPlusData &state, bool &ErrorsFound) // true // check to make sure none of the values are another economic object for (int jFld = 1; jFld <= NumAlphas; ++jFld) { if (hasi(s_ipsc->cAlphaArgs(jFld), "UtilityCost:")) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "... a field was found containing UtilityCost: which may indicate a missing comma."); } } @@ -1250,7 +1251,7 @@ void GetInputEconomicsVariable(EnergyPlusData &state, bool &ErrorsFound) // true // check to make sure none of the values are another economic object for (int jFld = 1; jFld <= NumAlphas; ++jFld) { if (hasi(s_ipsc->cAlphaArgs(jFld), "UtilityCost:")) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "... a field was found containing UtilityCost: which may indicate a missing comma."); } } @@ -1323,7 +1324,7 @@ void GetInputEconomicsComputation(EnergyPlusData &state, bool &ErrorsFound) // t // check to make sure none of the values are another economic object for (int jFld = 1; jFld <= NumAlphas; ++jFld) { if (hasi(s_ipsc->cAlphaArgs(jFld), "UtilityCost:")) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}{}=\"{}\".", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "... a field was found containing UtilityCost: which may indicate a missing comma."); } } @@ -1345,16 +1346,15 @@ void GetInputEconomicsComputation(EnergyPlusData &state, bool &ErrorsFound) // t computation.firstStep = 0; computation.lastStep = -1; computation.isUserDef = false; - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" invalid data.", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid data.", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "... No lines in the computation can be interpreted "); ErrorsFound = true; } else { computation.isUserDef = true; } } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid data.", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("... not found {}=\"{}\".", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid data.", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("... not found {}=\"{}\".", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } } @@ -1405,14 +1405,13 @@ void GetInputEconomicsCurrencyType(EnergyPlusData &state, bool &ErrorsFound) // } } if (state.dataCostEstimateManager->selectedMonetaryUnit == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid data.", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("... invalid {}.", s_ipsc->cAlphaFieldNames(1))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid data.", RoutineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("... invalid {}.", s_ipsc->cAlphaFieldNames(1))); ErrorsFound = true; } } else if (NumCurrencyType > 1) { ShowWarningError( - state, - EnergyPlus::format("{}{} Only one instance of this object is allowed. USD will be used.", RoutineName, s_ipsc->cCurrentModuleObject)); + state, std::format("{}{} Only one instance of this object is allowed. USD will be used.", RoutineName, s_ipsc->cCurrentModuleObject)); state.dataCostEstimateManager->selectedMonetaryUnit = 1; // USD - U.S. Dollar } } @@ -1460,8 +1459,8 @@ void parseComputeLine(EnergyPlusData &state, std::string const &lineOfCompute, i // if a token is found then put it into step array if (varNum == 0) { - ShowWarningError(state, EnergyPlus::format("In UtilityCost:Computation line: {}", lineOfCompute)); - ShowContinueError(state, EnergyPlus::format(" Do not recognize: {} Will skip.", word)); + ShowWarningError(state, std::format("In UtilityCost:Computation line: {}", lineOfCompute)); + ShowContinueError(state, std::format(" Do not recognize: {} Will skip.", word)); } else { incrementSteps(state); s_econ->steps(s_econ->numSteps).type = StepType::Var; @@ -1914,8 +1913,8 @@ int FindTariffIndex( if (found > 0) { FindTariffIndex = found; } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid tariff referenced", nameOfCurObj, nameOfReferingObj)); - ShowContinueError(state, EnergyPlus::format("not found UtilityCost:Tariff=\"{}\".", nameOfTariff)); + ShowSevereError(state, std::format("{}=\"{}\" invalid tariff referenced", nameOfCurObj, nameOfReferingObj)); + ShowContinueError(state, std::format("not found UtilityCost:Tariff=\"{}\".", nameOfTariff)); ErrorsFound = true; FindTariffIndex = 0; } @@ -1942,13 +1941,11 @@ void warnIfNativeVarname( auto &s_econ = state.dataEconTariff; ErrorsFound = true; if (curTariffIndex >= 1 && curTariffIndex <= s_econ->numTariff) { - ShowSevereError(state, - EnergyPlus::format("UtilityCost:Tariff=\"{}\" invalid referenced name", s_econ->tariff(curTariffIndex).tariffName)); - ShowContinueError( - state, EnergyPlus::format("{}=\"{}\" You cannot name an object using the same name as a native variable.", curobjName, objName)); + ShowSevereError(state, std::format("UtilityCost:Tariff=\"{}\" invalid referenced name", s_econ->tariff(curTariffIndex).tariffName)); + ShowContinueError(state, + std::format("{}=\"{}\" You cannot name an object using the same name as a native variable.", curobjName, objName)); } else { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" You cannot name an object using the same name as a native variable.", curobjName, objName)); + ShowSevereError(state, std::format("{}=\"{}\" You cannot name an object using the same name as a native variable.", curobjName, objName)); } } } @@ -2109,8 +2106,8 @@ std::string RemoveSpaces(EnergyPlusData &state, std::string_view const StringIn) } } if (foundSpaces) { - ShowWarningError(state, EnergyPlus::format("UtilityCost: Spaces were removed from the variable=\"{}\".", StringIn)); - ShowContinueError(state, EnergyPlus::format("...Resultant variable=\"{}\".", StringOut)); + ShowWarningError(state, std::format("UtilityCost: Spaces were removed from the variable=\"{}\".", StringIn)); + ShowContinueError(state, std::format("...Resultant variable=\"{}\".", StringOut)); } return StringOut; } @@ -2328,7 +2325,7 @@ void CreateDefaultComputation(EnergyPlusData &state) } // make sure no computation is already user defined if (computation.firstStep != 0) { - ShowWarningError(state, EnergyPlus::format("In UtilityCost:Tariff: Overwriting user defined tariff {}", tariff.tariffName)); + ShowWarningError(state, std::format("In UtilityCost:Tariff: Overwriting user defined tariff {}", tariff.tariffName)); } // initialize the computation computation.computeName = "Autogenerated - " + tariff.tariffName; @@ -2409,8 +2406,8 @@ void CreateDefaultComputation(EnergyPlusData &state) ++loopCount; } if (loopCount >= 100000) { - ShowWarningError( - state, EnergyPlus::format("UtilityCost:Tariff: Loop count exceeded when counting dependencies in tariff: {}", tariff.tariffName)); + ShowWarningError(state, + std::format("UtilityCost:Tariff: Loop count exceeded when counting dependencies in tariff: {}", tariff.tariffName)); } // make sure that all variables associated with the tariff are included bool remainingVarFlag = false; @@ -2422,16 +2419,15 @@ void CreateDefaultComputation(EnergyPlusData &state) if (remainingVarFlag) { ShowWarningError( state, - EnergyPlus::format("CreateDefaultComputation: In UtilityCost:Computation: Circular or invalid dependencies found in tariff: {}", - tariff.tariffName)); + std::format("CreateDefaultComputation: In UtilityCost:Computation: Circular or invalid dependencies found in tariff: {}", + tariff.tariffName)); ShowContinueError(state, " UtilityCost variables that may have invalid dependencies and the variables they are dependent on."); for (int iVar = 1; iVar <= s_econ->numEconVar; ++iVar) { if (s_econ->econVar(iVar).tariffIndx == iTariff) { if (s_econ->econVar(iVar).activeNow) { - ShowContinueError(state, EnergyPlus::format(" {}", s_econ->econVar(iVar).name)); + ShowContinueError(state, std::format(" {}", s_econ->econVar(iVar).name)); for (int kOperand = s_econ->econVar(iVar).firstOperand; kOperand <= s_econ->econVar(iVar).lastOperand; ++kOperand) { - ShowContinueError(state, - EnergyPlus::format(" -> {}", s_econ->econVar(s_econ->operands(kOperand).varNum).name)); + ShowContinueError(state, std::format(" -> {}", s_econ->econVar(s_econ->operands(kOperand).varNum).name)); } } } @@ -2444,9 +2440,9 @@ void CreateDefaultComputation(EnergyPlusData &state) computation.lastStep = -1; ShowWarningError( state, - EnergyPlus::format("CreateDefaultComputation: In UtilityCost:Computation: No lines in the auto-generated computation can be " - "interpreted in tariff: {}", - tariff.tariffName)); + std::format("CreateDefaultComputation: In UtilityCost:Computation: No lines in the auto-generated computation can be " + "interpreted in tariff: {}", + tariff.tariffName)); } } } @@ -2597,7 +2593,7 @@ void GatherForEconomics(EnergyPlusData &state) tariff.gatherDemand(curMonth)[(int)curPeriod] = curDemand; } } else { - ShowWarningError(state, EnergyPlus::format("UtilityCost:Tariff: While gathering for: {}", tariff.tariffName)); + ShowWarningError(state, std::format("UtilityCost:Tariff: While gathering for: {}", tariff.tariffName)); ShowContinueError(state, "Invalid schedule values - outside of range"); } // Real Time Pricing @@ -3112,8 +3108,8 @@ void pushStack(EnergyPlusData &state, Array1A const monthlyArray, int co evaluateQualify(state, variablePointer); break; case ObjType::Invalid: - ShowWarningError(state, EnergyPlus::format("UtilityCost variable not defined: {}", econVar(variablePointer).name)); - ShowContinueError(state, EnergyPlus::format(" In tariff: {}", tariff(econVar(variablePointer).tariffIndx).tariffName)); + ShowWarningError(state, std::format("UtilityCost variable not defined: {}", econVar(variablePointer).name)); + ShowContinueError(state, std::format(" In tariff: {}", tariff(econVar(variablePointer).tariffIndx).tariffName)); ShowContinueError(state, " This may be the result of a misspelled variable name in the UtilityCost:Computation object."); ShowContinueError(state, " All zero values will be assumed for this variable."); break; @@ -3167,8 +3163,8 @@ void popStack(EnergyPlusData &state, Array1A monthlyArray, int &variable monthlyArray = stack(s_econ->topOfStack).values; } else { ShowWarningError(state, - EnergyPlus::format("UtilityCost:Tariff: stack underflow in calculation of utility bills. On variable: {}", - s_econ->econVar(variablePointer).name)); + std::format("UtilityCost:Tariff: stack underflow in calculation of utility bills. On variable: {}", + s_econ->econVar(variablePointer).name)); variablePointer = 0; monthlyArray = {0.0}; s_econ->topOfStack = 0; @@ -3195,13 +3191,13 @@ void evaluateChargeSimple(EnergyPlusData &state, int const usingVariable) // check the tariff - make sure they match if (chargeSimple.namePt != usingVariable) { ShowWarningError(state, "UtilityCost:Tariff Debugging issue. ChargeSimple index does not match variable pointer."); - ShowContinueError(state, EnergyPlus::format(" Between: {}", s_econ->econVar(usingVariable).name)); - ShowContinueError(state, EnergyPlus::format(" And: {}", s_econ->econVar(chargeSimple.namePt).name)); + ShowContinueError(state, std::format(" Between: {}", s_econ->econVar(usingVariable).name)); + ShowContinueError(state, std::format(" And: {}", s_econ->econVar(chargeSimple.namePt).name)); } if (chargeSimple.tariffIndx != curTariff) { ShowWarningError(state, "UtilityCost:Tariff Debugging issue. ChargeSimple index does not match tariff index."); - ShowContinueError(state, EnergyPlus::format(" Between: {}", tariff.tariffName)); - ShowContinueError(state, EnergyPlus::format(" And: {}", s_econ->tariff(chargeSimple.tariffIndx).tariffName)); + ShowContinueError(state, std::format(" Between: {}", tariff.tariffName)); + ShowContinueError(state, std::format(" And: {}", s_econ->tariff(chargeSimple.tariffIndx).tariffName)); } // data from the Charge:Simple sourceVals = s_econ->econVar(chargeSimple.sourcePt).values; @@ -3255,13 +3251,13 @@ void evaluateChargeBlock(EnergyPlusData &state, int const usingVariable) // check the tariff - make sure they match if (chargeBlock.namePt != usingVariable) { ShowWarningError(state, "UtilityCost:Tariff Debugging issue. chargeBlock index does not match variable pointer."); - ShowContinueError(state, EnergyPlus::format(" Between: {}", s_econ->econVar(usingVariable).name)); - ShowContinueError(state, EnergyPlus::format(" And: {}", s_econ->econVar(chargeBlock.namePt).name)); + ShowContinueError(state, std::format(" Between: {}", s_econ->econVar(usingVariable).name)); + ShowContinueError(state, std::format(" And: {}", s_econ->econVar(chargeBlock.namePt).name)); } if (chargeBlock.tariffIndx != curTariff) { ShowWarningError(state, "UtilityCost:Tariff Debugging issue. chargeBlock index does not match tariff index."); - ShowContinueError(state, EnergyPlus::format(" Between: {}", tariff.tariffName)); - ShowContinueError(state, EnergyPlus::format(" And: {}", s_econ->tariff(chargeBlock.tariffIndx).tariffName)); + ShowContinueError(state, std::format(" Between: {}", tariff.tariffName)); + ShowContinueError(state, std::format(" And: {}", s_econ->tariff(chargeBlock.tariffIndx).tariffName)); } // data from the chargeBlock sourceVals = s_econ->econVar(chargeBlock.sourcePt).values; @@ -3331,9 +3327,9 @@ void evaluateChargeBlock(EnergyPlusData &state, int const usingVariable) } } if (!flagAllZero) { - ShowWarningError(state, - EnergyPlus::format("UtilityCost:Tariff Not all energy or demand was assigned in the block charge: {}", - s_econ->econVar(usingVariable).name)); + ShowWarningError( + state, + std::format("UtilityCost:Tariff Not all energy or demand was assigned in the block charge: {}", s_econ->econVar(usingVariable).name)); } } // store the cost in the name of the variable @@ -3368,13 +3364,13 @@ void evaluateRatchet(EnergyPlusData &state, int const usingVariable) // check the tariff - make sure they match if (ratchet.namePt != usingVariable) { ShowWarningError(state, "UtilityCost:Tariff Debugging issue. Ratchet index does not match variable pointer."); - ShowContinueError(state, EnergyPlus::format(" Between: {}", s_econ->econVar(usingVariable).name)); - ShowContinueError(state, EnergyPlus::format(" And: {}", s_econ->econVar(ratchet.namePt).name)); + ShowContinueError(state, std::format(" Between: {}", s_econ->econVar(usingVariable).name)); + ShowContinueError(state, std::format(" And: {}", s_econ->econVar(ratchet.namePt).name)); } if (ratchet.tariffIndx != curTariff) { ShowWarningError(state, "UtilityCost:Tariff Debugging issue. Ratchet index does not match tariff index."); - ShowContinueError(state, EnergyPlus::format(" Between: {}", tariff.tariffName)); - ShowContinueError(state, EnergyPlus::format(" And: {}", s_econ->tariff(ratchet.tariffIndx).tariffName)); + ShowContinueError(state, std::format(" Between: {}", tariff.tariffName)); + ShowContinueError(state, std::format(" And: {}", s_econ->tariff(ratchet.tariffIndx).tariffName)); } // data from the Ratchet baselineVals = s_econ->econVar(ratchet.baselinePt).values; @@ -3485,13 +3481,13 @@ void evaluateQualify(EnergyPlusData &state, int const usingVariable) // check the tariff - make sure they match if (qualify.namePt != usingVariable) { ShowWarningError(state, "UtilityCost:Tariff Debugging issue. Qualify index does not match variable pointer."); - ShowContinueError(state, EnergyPlus::format(" Between: {}", econVar.name)); - ShowContinueError(state, EnergyPlus::format(" And: {}", s_econ->econVar(qualify.namePt).name)); + ShowContinueError(state, std::format(" Between: {}", econVar.name)); + ShowContinueError(state, std::format(" And: {}", s_econ->econVar(qualify.namePt).name)); } if (qualify.tariffIndx != curTariff) { ShowWarningError(state, "UtilityCost:Tariff Debugging issue. Qualify index does not match tariff index."); - ShowContinueError(state, EnergyPlus::format(" Between: {}", tariff.tariffName)); - ShowContinueError(state, EnergyPlus::format(" And: {}", s_econ->tariff(qualify.tariffIndx).tariffName)); + ShowContinueError(state, std::format(" Between: {}", tariff.tariffName)); + ShowContinueError(state, std::format(" And: {}", s_econ->tariff(qualify.tariffIndx).tariffName)); } // data from the Qualify sourceVals = s_econ->econVar(qualify.sourcePt).values; @@ -3615,8 +3611,8 @@ void addMonthlyCharge(EnergyPlusData &state, int const usingVariable) // check the tariff - make sure they match if (tariff.cats[(int)Cat::ServiceCharges] != usingVariable) { ShowWarningError(state, "UtilityCost:Tariff Debugging issue. Tariff index for service charge does not match variable pointer."); - ShowContinueError(state, EnergyPlus::format(" Between: {}", tariff.tariffName)); - ShowContinueError(state, EnergyPlus::format(" And: {}", s_econ->tariff(tariff.cats[(int)Cat::ServiceCharges]).tariffName)); + ShowContinueError(state, std::format(" Between: {}", tariff.tariffName)); + ShowContinueError(state, std::format(" And: {}", s_econ->tariff(tariff.cats[(int)Cat::ServiceCharges]).tariffName)); } if (tariff.monthChgPt != 0) { s_econ->econVar(usingVariable).values += s_econ->econVar(tariff.monthChgPt).values; @@ -3996,27 +3992,25 @@ void LEEDtariffReporting(EnergyPlusData &state) } // units OutputReportPredefined::PreDefTableEntry( - state, s_orp->pdchLeedEtsEneUnt, "Electricity", EnergyPlus::format("{}", convEnergyStrings[(int)elecUnits])); - OutputReportPredefined::PreDefTableEntry( - state, s_orp->pdchLeedEtsEneUnt, "Natural Gas", EnergyPlus::format("{}", convEnergyStrings[(int)gasUnits])); + state, s_orp->pdchLeedEtsEneUnt, "Electricity", std::format("{}", convEnergyStrings[(int)elecUnits])); + OutputReportPredefined::PreDefTableEntry(state, s_orp->pdchLeedEtsEneUnt, "Natural Gas", std::format("{}", convEnergyStrings[(int)gasUnits])); + OutputReportPredefined::PreDefTableEntry(state, s_orp->pdchLeedEtsEneUnt, "Other", std::format("{}", convEnergyStrings[(int)othrUnits])); OutputReportPredefined::PreDefTableEntry( - state, s_orp->pdchLeedEtsEneUnt, "Other", EnergyPlus::format("{}", convEnergyStrings[(int)othrUnits])); - OutputReportPredefined::PreDefTableEntry( - state, s_orp->pdchLeedEtsDemUnt, "Electricity", EnergyPlus::format("{}", convDemandStrings[(int)elecUnits])); + state, s_orp->pdchLeedEtsDemUnt, "Electricity", std::format("{}", convDemandStrings[(int)elecUnits])); OutputReportPredefined::PreDefTableEntry( state, s_orp->pdchLeedEtsDemUnt, "Natural Gas", - EnergyPlus::format("{}{}", - convDemandStrings[(int)gasUnits], - (gasDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)gasDemWindowUnits])); + std::format("{}{}", + convDemandStrings[(int)gasUnits], + (gasDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)gasDemWindowUnits])); OutputReportPredefined::PreDefTableEntry( state, s_orp->pdchLeedEtsDemUnt, "Other", - EnergyPlus::format("{}{}", - convDemandStrings[(int)othrUnits], - (othrDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)othrDemWindowUnits])); + std::format("{}{}", + convDemandStrings[(int)othrUnits], + (othrDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)othrDemWindowUnits])); // total cost OutputReportPredefined::PreDefTableEntry(state, s_orp->pdchLeedEcsTotal, "Electricity", elecTotalCost, 2); @@ -4026,44 +4020,42 @@ void LEEDtariffReporting(EnergyPlusData &state) if (distCoolTotalEne != 0) { OutputReportPredefined::PreDefTableEntry(state, s_orp->pdchLeedEtsVirt, "District Cooling", distCoolTotalCost / distCoolTotalEne, 3); OutputReportPredefined::PreDefTableEntry( - state, s_orp->pdchLeedEtsEneUnt, "District Cooling", EnergyPlus::format("{}", convEnergyStrings[(int)distCoolUnits])); + state, s_orp->pdchLeedEtsEneUnt, "District Cooling", std::format("{}", convEnergyStrings[(int)distCoolUnits])); OutputReportPredefined::PreDefTableEntry( state, s_orp->pdchLeedEtsDemUnt, "District Cooling", - EnergyPlus::format("{}{}", - convDemandStrings[(int)distCoolUnits], - (distCoolDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)distCoolDemWindowUnits])); + std::format("{}{}", + convDemandStrings[(int)distCoolUnits], + (distCoolDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)distCoolDemWindowUnits])); OutputReportPredefined::PreDefTableEntry(state, s_orp->pdchLeedEcsTotal, "District Cooling", distCoolTotalCost, 2); } if (distHeatWaterTotalEne != 0) { OutputReportPredefined::PreDefTableEntry( state, s_orp->pdchLeedEtsVirt, "District Heating Water", distHeatWaterTotalCost / distHeatWaterTotalEne, 3); OutputReportPredefined::PreDefTableEntry( - state, s_orp->pdchLeedEtsEneUnt, "District Heating Water", EnergyPlus::format("{}", convEnergyStrings[(int)distHeatWaterUnits])); - OutputReportPredefined::PreDefTableEntry(state, - s_orp->pdchLeedEtsDemUnt, - "District Heating Water", - EnergyPlus::format("{}{}", - convDemandStrings[(int)distHeatWaterUnits], - (distHeatWaterDemWindowUnits == DemandWindow::Invalid) - ? "" - : demandWindowStrings[(int)distHeatWaterDemWindowUnits])); + state, s_orp->pdchLeedEtsEneUnt, "District Heating Water", std::format("{}", convEnergyStrings[(int)distHeatWaterUnits])); + OutputReportPredefined::PreDefTableEntry( + state, + s_orp->pdchLeedEtsDemUnt, + "District Heating Water", + std::format("{}{}", + convDemandStrings[(int)distHeatWaterUnits], + (distHeatWaterDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)distHeatWaterDemWindowUnits])); OutputReportPredefined::PreDefTableEntry(state, s_orp->pdchLeedEcsTotal, "District Heating Water", distHeatWaterTotalCost, 2); } if (distHeatSteamTotalEne != 0) { OutputReportPredefined::PreDefTableEntry( state, s_orp->pdchLeedEtsVirt, "District Heating Steam", distHeatSteamTotalCost / distHeatSteamTotalEne, 3); OutputReportPredefined::PreDefTableEntry( - state, s_orp->pdchLeedEtsEneUnt, "District Heating Steam", EnergyPlus::format("{}", convEnergyStrings[(int)distHeatSteamUnits])); - OutputReportPredefined::PreDefTableEntry(state, - s_orp->pdchLeedEtsDemUnt, - "District Heating Steam", - EnergyPlus::format("{}{}", - convDemandStrings[(int)distHeatSteamUnits], - (distHeatSteamDemWindowUnits == DemandWindow::Invalid) - ? "" - : demandWindowStrings[(int)distHeatSteamDemWindowUnits])); + state, s_orp->pdchLeedEtsEneUnt, "District Heating Steam", std::format("{}", convEnergyStrings[(int)distHeatSteamUnits])); + OutputReportPredefined::PreDefTableEntry( + state, + s_orp->pdchLeedEtsDemUnt, + "District Heating Steam", + std::format("{}{}", + convDemandStrings[(int)distHeatSteamUnits], + (distHeatSteamDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)distHeatSteamDemWindowUnits])); OutputReportPredefined::PreDefTableEntry(state, s_orp->pdchLeedEcsTotal, "District Heating Steam", distHeatSteamTotalCost, 2); } // save the total costs for later to compute process fraction @@ -4480,7 +4472,7 @@ void WriteTabularTariffReports(EnergyPlusData &state) } else if (step.type == StepType::Var) { outString = econVar(step.varNum).name + ' ' + outString; } else if (step.type == StepType::Op) { - outString = EnergyPlus::format("{} {}", opNamesUC[(int)step.op], outString); + outString = std::format("{} {}", opNamesUC[(int)step.op], outString); } } } @@ -4504,12 +4496,12 @@ void showWarningsBasedOnTotal(EnergyPlusData &state) if (tariff.buyOrSell == BuySell::BuyFromUtility) { if (tariff.totalAnnualCost < 0) { ShowWarningError(state, "UtilityCost:Tariff: A negative annual total cost when buying electricity from a utility is unusual. "); - ShowContinueError(state, EnergyPlus::format(" In UtilityCost:Tariff named {}", tariff.tariffName)); + ShowContinueError(state, std::format(" In UtilityCost:Tariff named {}", tariff.tariffName)); } } else if (tariff.buyOrSell == BuySell::SellToUtility) { if (tariff.totalAnnualCost > 0) { ShowWarningError(state, "UtilityCost:Tariff: A positive annual total cost when selling electricity to a utility is unusual. "); - ShowContinueError(state, EnergyPlus::format(" In UtilityCost:Tariff named {}", tariff.tariffName)); + ShowContinueError(state, std::format(" In UtilityCost:Tariff named {}", tariff.tariffName)); } } } diff --git a/src/EnergyPlus/ElectricBaseboardRadiator.cc b/src/EnergyPlus/ElectricBaseboardRadiator.cc index 5d2d45ea7cf..b438abd3374 100644 --- a/src/EnergyPlus/ElectricBaseboardRadiator.cc +++ b/src/EnergyPlus/ElectricBaseboardRadiator.cc @@ -45,6 +45,9 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + // ObjexxFCL Headers #include @@ -261,7 +264,7 @@ namespace ElectricBaseboardRadiator { if (elecBaseboard.ScaledHeatingCapacity < 0.0 && elecBaseboard.ScaledHeatingCapacity != DataSizing::AutoSize) { ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, elecBaseboard.EquipName)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", + EnergyPlus::format("Illegal {} = {:.7f}", numericFieldNames[iHeatDesignCapacityNumericNum - 1], elecBaseboard.ScaledHeatingCapacity)); ErrorsFound = true; @@ -285,7 +288,7 @@ namespace ElectricBaseboardRadiator { ShowContinueError( state, EnergyPlus::format("Input for {} = {}", heatingDesignCapacityMethodFieldName, heatingDesignCapacityMethod)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", + EnergyPlus::format("Illegal {} = {:.7f}", numericFieldNames[iHeatCapacityPerFloorAreaNumericNum - 1], elecBaseboard.ScaledHeatingCapacity)); ErrorsFound = true; @@ -314,7 +317,7 @@ namespace ElectricBaseboardRadiator { if (elecBaseboard.ScaledHeatingCapacity < 0.0) { ShowSevereError(state, cCurrentModuleObject + " = " + elecBaseboard.EquipName); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", + EnergyPlus::format("Illegal {} = {:.7f}", numericFieldNames[iHeatFracOfAutosizedCapacityNumericNum - 1], elecBaseboard.ScaledHeatingCapacity)); ErrorsFound = true; @@ -324,14 +327,12 @@ namespace ElectricBaseboardRadiator { ShowContinueError(state, EnergyPlus::format("Input for {} = {}", heatingDesignCapacityMethodFieldName, heatingDesignCapacityMethod)); ShowContinueError( - state, - EnergyPlus::format("Blank field not allowed for {}", numericFieldNames[iHeatFracOfAutosizedCapacityNumericNum - 1])); + state, std::format("Blank field not allowed for {}", numericFieldNames[iHeatFracOfAutosizedCapacityNumericNum - 1])); ErrorsFound = true; } } else { ShowSevereError(state, cCurrentModuleObject + " = " + elecBaseboard.EquipName); - ShowContinueError(state, - EnergyPlus::format("Illegal {} = {}", heatingDesignCapacityMethodFieldName, heatingDesignCapacityMethod)); + ShowContinueError(state, std::format("Illegal {} = {}", heatingDesignCapacityMethodFieldName, heatingDesignCapacityMethod)); ErrorsFound = true; } @@ -386,7 +387,7 @@ namespace ElectricBaseboardRadiator { ShowSevereError(state, std::string{RoutineName} + cCurrentModuleObject + "=\"" + elecBaseboardName + "\", the number of surface/radiant fraction groups entered was less than the allowable minimum."); - ShowContinueError(state, EnergyPlus::format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); + ShowContinueError(state, std::format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); ErrorsFound = true; elecBaseboard.TotSurfToDistrib = 0; } @@ -620,7 +621,7 @@ namespace ElectricBaseboardRadiator { int SizingMethod = HVAC::HeatingCapacitySizing; // Integer representation of sizing method name (e.g., CoolingAirflowSizing) int FieldNum = 1; // IDD numeric field number where input field description is found std::string const SizingString = - EnergyPlus::format("{} [W]", state.dataElectBaseboardRad->ElecBaseboardNumericFields(BaseboardNum).FieldNames(FieldNum)); + std::format("{} [W]", state.dataElectBaseboardRad->ElecBaseboardNumericFields(BaseboardNum).FieldNames(FieldNum)); // capacity sizing methods (e.g., HeatingDesignCapacity, CapacityPerFloorArea, FractionOfAutosizedCoolingCapacity) int CapSizingMethod = elecBaseboard.HeatingCapMethod; zoneEqSizing.SizingMethod(SizingMethod) = CapSizingMethod; diff --git a/src/EnergyPlus/ElectricPowerServiceManager.cc b/src/EnergyPlus/ElectricPowerServiceManager.cc index ffe42af15e8..309ef73b966 100644 --- a/src/EnergyPlus/ElectricPowerServiceManager.cc +++ b/src/EnergyPlus/ElectricPowerServiceManager.cc @@ -46,6 +46,10 @@ // POSSIBILITY OF SUCH DAMAGE. // C++ Headers +#ifdef DEBUG_ARITHM_MSVC +# include +#endif +#include #include #include @@ -81,15 +85,10 @@ #include #include #include - #ifdef DEBUG_ARITHM_GCC_OR_CLANG # include #endif -#ifdef DEBUG_ARITHM_MSVC -# include -#endif - namespace EnergyPlus { void createFacilityElectricPowerServiceObject(const EnergyPlusData &state) @@ -2332,18 +2331,17 @@ void GeneratorController::simGeneratorGetPowerOutput(EnergyPlusData &state, if (electricPowerOutput < 0.0) { if (errCountNegElectProd_ == 0) { ShowWarningMessage(state, - EnergyPlus::format("{} named {} is producing negative electric power, check generator inputs.", - generatorTypeNames[(int)generatorType], - name)); + std::format("{} named {} is producing negative electric power, check generator inputs.", + generatorTypeNames[(int)generatorType], + name)); ShowContinueError(state, EnergyPlus::format("Electric power production rate ={:.4R}", electricPowerOutput)); ShowContinueError(state, "The power will be set to zero, and the simulation continues... "); } - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} named {} is producing negative electric power ", generatorTypeNames[(int)generatorType], name), - errCountNegElectProd_, - electricPowerOutput, - electricPowerOutput); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} named {} is producing negative electric power ", generatorTypeNames[(int)generatorType], name), + errCountNegElectProd_, + electricPowerOutput, + electricPowerOutput); electricPowerOutput = 0.0; } } @@ -2624,12 +2622,12 @@ DCtoACInverter::DCtoACInverter(EnergyPlusData &state, std::string const &objectN } // end switch modelType } } else { - ShowSevereError(state, EnergyPlus::format("{} did not find inverter name = {}", routineName, objectName)); + ShowSevereError(state, std::format("{} did not find inverter name = {}", routineName, objectName)); errorsFound = true; } if (errorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Preceding errors terminate program.", routineName)); + ShowFatalError(state, std::format("{}Preceding errors terminate program.", routineName)); } } @@ -3019,12 +3017,12 @@ ACtoDCConverter::ACtoDCConverter(EnergyPlusData &state, std::string const &objec state, zoneNum_, name_, DataHeatBalance::IntGainType::ElectricLoadCenterConverter, &qdotConvZone_, nullptr, &qdotRadZone_); } } else { - ShowSevereError(state, EnergyPlus::format("{} did not find power converter name = {}", routineName, objectName)); + ShowSevereError(state, std::format("{} did not find power converter name = {}", routineName, objectName)); errorsFound = true; } if (errorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Preceding errors terminate program.", routineName)); + ShowFatalError(state, std::format("{}Preceding errors terminate program.", routineName)); } } @@ -3311,13 +3309,13 @@ ElectricStorage::ElectricStorage( // main constructor if (liIon_Vfull_ < liIon_Vexp_ || liIon_Vexp_ < liIon_Vnom_) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", invalid entry.", routineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - EnergyPlus::format("{} must be greater than {},", - state.dataIPShortCut->cNumericFieldNames(10), - state.dataIPShortCut->cNumericFieldNames(11))); - ShowContinueError(state, EnergyPlus::format("which must be greater than {}.", state.dataIPShortCut->cNumericFieldNames(12))); + std::format("{} must be greater than {},", + state.dataIPShortCut->cNumericFieldNames(10), + state.dataIPShortCut->cNumericFieldNames(11))); + ShowContinueError(state, std::format("which must be greater than {}.", state.dataIPShortCut->cNumericFieldNames(12))); for (int i = 10; i <= 12; ++i) { ShowContinueError( state, EnergyPlus::format("{} = {:.3R}", state.dataIPShortCut->cNumericFieldNames(i), state.dataIPShortCut->rNumericArgs(i))); @@ -3333,12 +3331,12 @@ ElectricStorage::ElectricStorage( // main constructor if (liIon_Qexp_ >= liIon_Qnom_) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", invalid entry.", routineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - EnergyPlus::format("{} must be greater than {}.", - state.dataIPShortCut->cNumericFieldNames(16), - state.dataIPShortCut->cNumericFieldNames(15))); + std::format("{} must be greater than {}.", + state.dataIPShortCut->cNumericFieldNames(16), + state.dataIPShortCut->cNumericFieldNames(15))); for (int i = 15; i <= 16; ++i) { ShowContinueError( state, EnergyPlus::format("{} = {:.3R}", state.dataIPShortCut->cNumericFieldNames(i), state.dataIPShortCut->rNumericArgs(i))); @@ -3562,11 +3560,11 @@ ElectricStorage::ElectricStorage( // main constructor } // switch storage model type } } else { // storage not found - ShowSevereError(state, EnergyPlus::format("{} did not find storage name = {}", routineName, objectName)); + ShowSevereError(state, std::format("{} did not find storage name = {}", routineName, objectName)); errorsFound = true; } if (errorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Preceding errors terminate program.", routineName)); + ShowFatalError(state, std::format("{}Preceding errors terminate program.", routineName)); } } @@ -3579,8 +3577,7 @@ Real64 checkUserEfficiencyInput(EnergyPlusData &state, Real64 userInputValue, bo if (isCharging) { if (userInputValue < minChargeEfficiency) { ShowSevereError( - state, - EnergyPlus::format("ElectricStorage charge efficiency was too low. This occurred for electric storage unit named {}", deviceName)); + state, std::format("ElectricStorage charge efficiency was too low. This occurred for electric storage unit named {}", deviceName)); ShowContinueError(state, "Please check your input value for this electric storage unit and fix the charge efficiency."); errorsFound = true; return minChargeEfficiency; @@ -3590,8 +3587,7 @@ Real64 checkUserEfficiencyInput(EnergyPlusData &state, Real64 userInputValue, bo } // discharging if (userInputValue < minDischargeEfficiency) { ShowSevereError( - state, - EnergyPlus::format("ElectricStorage discharge efficiency was too low. This occurred for electric storage unit named {}", deviceName)); + state, std::format("ElectricStorage discharge efficiency was too low. This occurred for electric storage unit named {}", deviceName)); ShowContinueError(state, "Please check your input value for this electric storage unit and fix the discharge efficiency."); errorsFound = true; return minDischargeEfficiency; @@ -3620,7 +3616,7 @@ void checkChargeDischargeVoltageCurves( } } if (gotErrs) { - ShowWarningMessage(state, EnergyPlus::format("Kinetic Battery Model: {} has a charging/discharging voltage curve conflict.", nameBatt)); + ShowWarningMessage(state, std::format("Kinetic Battery Model: {} has a charging/discharging voltage curve conflict.", nameBatt)); ShowContinueError(state, "Discharging voltage is higher than charging voltage which may potentially lead to an imbalance in the stored energy."); ShowContinueError(state, "Check the charging and discharging curves to make sure that the charging voltage is greater than discharging."); @@ -4032,11 +4028,10 @@ void ElectricStorage::simulateKineticBatteryModel(EnergyPlusData &state, bool const ok = determineCurrentForBatteryDischarge(state, I0, T0, Volt, Pw, q0, dischargeCurve_, k, c, qmax, E0c, internalR_); if (!ok) { - ShowFatalError( - state, - EnergyPlus::format("ElectricLoadCenter:Storage:Battery named=\"{}\". Battery discharge current could not be estimated due to " - "iteration limit reached. ", - name_)); + ShowFatalError(state, + std::format("ElectricLoadCenter:Storage:Battery named=\"{}\". Battery discharge current could not be estimated due to " + "iteration limit reached. ", + name_)); // issue #5301, need more diagnostics for this. } @@ -4556,8 +4551,8 @@ ElectricTransformer::ElectricTransformer(EnergyPlusData &state, std::string cons if (ratedCapacity_ == 0) { if (performanceInputMode_ == TransformerPerformanceInput::LossesMethod) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\".", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Specified {} = {}", s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(6))); + ShowWarningError(state, std::format("{}{}=\"{}\".", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Specified {} = {}", s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(6))); ShowContinueError(state, EnergyPlus::format("Specified {} = {:.1R}", s_ipsc->cNumericFieldNames(2), ratedCapacity_)); ShowContinueError(state, "Transformer load and no load losses cannot be calculated with 0.0 rated capacity."); ShowContinueError(state, "Simulation continues but transformer losses will be set to zero."); @@ -4574,8 +4569,7 @@ ElectricTransformer::ElectricTransformer(EnergyPlusData &state, std::string cons if (s_ipsc->lNumericFieldBlanks(11)) { maxPUL_ = ratedPUL_; } else if (maxPUL_ <= 0 || maxPUL_ > 1) { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid entry.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid entry.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("Invalid {}=[{:.3R}].", s_ipsc->cNumericFieldNames(11), s_ipsc->rNumericArgs(11))); ShowContinueError(state, "Entered value must be > 0 and <= 1."); errorsFound = true; @@ -4597,7 +4591,7 @@ ElectricTransformer::ElectricTransformer(EnergyPlusData &state, std::string cons // Provide warning if no meter is wired to a transformer used to get power from the grid if (numWiredMeters <= 0) { - ShowWarningError(state, EnergyPlus::format("{}ElectricLoadCenter:Transformer=\"{}\":", routineName, name_)); + ShowWarningError(state, std::format("{}ElectricLoadCenter:Transformer=\"{}\":", routineName, name_)); ShowContinueError(state, "ISOLATED Transformer: No meter wired to a transformer used to input power from grid"); } @@ -4738,12 +4732,12 @@ ElectricTransformer::ElectricTransformer(EnergyPlusData &state, std::string cons } } else { - ShowSevereError(state, EnergyPlus::format("{} did not find transformer name = {}", routineName, objectName)); + ShowSevereError(state, std::format("{} did not find transformer name = {}", routineName, objectName)); errorsFound = true; } if (errorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Preceding errors terminate program.", routineName)); + ShowFatalError(state, std::format("{}Preceding errors terminate program.", routineName)); } } @@ -4850,7 +4844,7 @@ void ElectricTransformer::manageTransformers(EnergyPlusData &state, Real64 const if ((pastElecLoad / ratedCapacity_) > 1.0) { if (overloadErrorIndex_ == 0) { ShowSevereError(state, "Transformer Overloaded"); - ShowContinueError(state, EnergyPlus::format("Entered in ElectricLoadCenter:Transformer ={}", name_)); + ShowContinueError(state, std::format("Entered in ElectricLoadCenter:Transformer ={}", name_)); } ShowRecurringSevereErrorAtEnd(state, "Transformer Overloaded: Entered in ElectricLoadCenter:Transformer =" + name_, overloadErrorIndex_); } @@ -4959,7 +4953,7 @@ void ElectricTransformer::setupMeterIndices(EnergyPlusData &state) if (meter->resource != Constant::eResource::Electricity && meter->resource != Constant::eResource::ElectricityPurchased && meter->resource != Constant::eResource::ElectricitySurplusSold && meter->resource != Constant::eResource::ElectricityProduced && meter->resource != Constant::eResource::ElectricityNet) { - ShowFatalError(state, EnergyPlus::format("Non-electricity meter used for {}", name_)); + ShowFatalError(state, std::format("Non-electricity meter used for {}", name_)); } } } diff --git a/src/EnergyPlus/EnergyPlus.hh b/src/EnergyPlus/EnergyPlus.hh index 9107dc3d31b..4379c9612a6 100644 --- a/src/EnergyPlus/EnergyPlus.hh +++ b/src/EnergyPlus/EnergyPlus.hh @@ -137,7 +137,6 @@ using ObjexxFCL::Vector4; // ObjexxFCL Functions #include -// #include #include #include #include diff --git a/src/EnergyPlus/EnergyPlusLogger.cc b/src/EnergyPlus/EnergyPlusLogger.cc index f9bf0436120..920f740ca58 100644 --- a/src/EnergyPlus/EnergyPlusLogger.cc +++ b/src/EnergyPlus/EnergyPlusLogger.cc @@ -45,6 +45,10 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + +// EnergyPlus Headers #include #include @@ -59,7 +63,7 @@ void EnergyPlusLogger::error(const std::string_view message) if (Log_level::Error >= minimum_level) { const std::pair &contextPair = *(reinterpret_cast *>(message_context)); - std::string fullMessage = fmt::format("{}: {}", contextPair.second, message); + std::string fullMessage = EnergyPlus::format("{}: {}", contextPair.second, message); ShowSevereError(*contextPair.first, fullMessage); } } @@ -69,7 +73,7 @@ void EnergyPlusLogger::warning(const std::string_view message) if (Log_level::Warning >= minimum_level) { const std::pair &contextPair = *(reinterpret_cast *>(message_context)); - std::string fullMessage = fmt::format("{}: {}", contextPair.second, message); + std::string fullMessage = EnergyPlus::format("{}: {}", contextPair.second, message); ShowWarningError(*contextPair.first, fullMessage); } } @@ -79,7 +83,7 @@ void EnergyPlusLogger::info(const std::string_view message) if (Log_level::Info >= minimum_level) { const std::pair &contextPair = *(reinterpret_cast *>(message_context)); - std::string fullMessage = fmt::format("{}: {}", contextPair.second, message); + std::string fullMessage = EnergyPlus::format("{}: {}", contextPair.second, message); ShowMessage(*contextPair.first, fullMessage); } } diff --git a/src/EnergyPlus/EvaporativeCoolers.cc b/src/EnergyPlus/EvaporativeCoolers.cc index 95cac584bf0..5d27c3ef0bf 100644 --- a/src/EnergyPlus/EvaporativeCoolers.cc +++ b/src/EnergyPlus/EvaporativeCoolers.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -2524,14 +2525,12 @@ void CalcIndirectResearchSpecialEvapCoolerAdvanced(EnergyPlusData &state, if (SolFla == -1) { if (!state.dataGlobal->WarmupFlag) { if (thisEvapCond.IterationLimit == 0) { - ShowSevereError( - state, - EnergyPlus::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " - "Evaporative Cooler Research Special = {}", - thisEvapCond.Name)); + ShowSevereError(state, + std::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " + "Evaporative Cooler Research Special = {}", + thisEvapCond.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - EnergyPlus::format(" Iteration limit [{}] exceeded in calculating secondary air mass flow rate", MaxIte)); + ShowContinueError(state, std::format(" Iteration limit [{}] exceeded in calculating secondary air mass flow rate", MaxIte)); ShowContinueError(state, " Simulation continues"); } ShowRecurringWarningErrorAtEnd( @@ -2542,11 +2541,10 @@ void CalcIndirectResearchSpecialEvapCoolerAdvanced(EnergyPlusData &state, } else if (SolFla == -2) { if (!state.dataGlobal->WarmupFlag) { if (thisEvapCond.IterationFailed == 0) { - ShowSevereError( - state, - EnergyPlus::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " - "Evaporative Cooler Research Special = {}", - thisEvapCond.Name)); + ShowSevereError(state, + std::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " + "Evaporative Cooler Research Special = {}", + thisEvapCond.Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "...Bad secondary air mass flow rate limits"); ShowContinueError(state, EnergyPlus::format("...Given minimum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMin)); @@ -2585,14 +2583,12 @@ void CalcIndirectResearchSpecialEvapCoolerAdvanced(EnergyPlusData &state, if (SolFla == -1) { if (!state.dataGlobal->WarmupFlag) { if (thisEvapCond.IterationLimit == 0) { - ShowSevereError( - state, - EnergyPlus::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " - "Evaporative Cooler Research Special = {}", - thisEvapCond.Name)); + ShowSevereError(state, + std::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " + "Evaporative Cooler Research Special = {}", + thisEvapCond.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - EnergyPlus::format(" Iteration limit [{}] exceeded in calculating secondary air mass flow rate", MaxIte)); + ShowContinueError(state, std::format(" Iteration limit [{}] exceeded in calculating secondary air mass flow rate", MaxIte)); ShowContinueError(state, " Simulation continues"); } ShowRecurringWarningErrorAtEnd( @@ -2603,11 +2599,10 @@ void CalcIndirectResearchSpecialEvapCoolerAdvanced(EnergyPlusData &state, } else if (SolFla == -2) { if (!state.dataGlobal->WarmupFlag) { if (thisEvapCond.IterationFailed == 0) { - ShowSevereError( - state, - EnergyPlus::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " - "Evaporative Cooler Research Special = {}", - thisEvapCond.Name)); + ShowSevereError(state, + std::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " + "Evaporative Cooler Research Special = {}", + thisEvapCond.Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "...Bad secondary air mass flow rate limits"); ShowContinueError(state, EnergyPlus::format("...Given minimum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMin)); @@ -2665,14 +2660,12 @@ void CalcIndirectResearchSpecialEvapCoolerAdvanced(EnergyPlusData &state, if (SolFla == -1) { if (!state.dataGlobal->WarmupFlag) { if (thisEvapCond.IterationLimit == 0) { - ShowSevereError( - state, - EnergyPlus::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " - "Evaporative Cooler Research Special = {}", - thisEvapCond.Name)); + ShowSevereError(state, + std::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " + "Evaporative Cooler Research Special = {}", + thisEvapCond.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, - EnergyPlus::format(" Iteration limit [{}] exceeded in calculating secondary air mass flow rate", MaxIte)); + ShowContinueError(state, std::format(" Iteration limit [{}] exceeded in calculating secondary air mass flow rate", MaxIte)); ShowContinueError(state, " Simulation continues"); } ShowRecurringWarningErrorAtEnd( @@ -2683,11 +2676,10 @@ void CalcIndirectResearchSpecialEvapCoolerAdvanced(EnergyPlusData &state, } else if (SolFla == -2) { if (!state.dataGlobal->WarmupFlag) { if (thisEvapCond.IterationFailed == 0) { - ShowSevereError( - state, - EnergyPlus::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " - "Evaporative Cooler Research Special = {}", - thisEvapCond.Name)); + ShowSevereError(state, + std::format("CalcIndirectResearchSpecialEvapCooler: calculate secondary air mass flow failed for Indirect " + "Evaporative Cooler Research Special = {}", + thisEvapCond.Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "...Bad secondary air mass flow rate limits"); ShowContinueError(state, EnergyPlus::format("...Given minimum secondary air mass flow rate={:.3R} kg/s", MassFlowRateSecMin)); @@ -3361,21 +3353,20 @@ void SimZoneEvaporativeCoolerUnit(EnergyPlusData &state, } else { CompNum = CompIndex; if (CompNum < 1 || CompNum > state.dataEvapCoolers->NumZoneEvapUnits) { - ShowFatalError( - state, - EnergyPlus::format("SimZoneEvaporativeCoolerUnit: Invalid CompIndex passed={}, Number of units ={}, Entered Unit name = {}", - CompNum, - state.dataEvapCoolers->NumZoneEvapUnits, - CompName)); + ShowFatalError(state, + std::format("SimZoneEvaporativeCoolerUnit: Invalid CompIndex passed={}, Number of units ={}, Entered Unit name = {}", + CompNum, + state.dataEvapCoolers->NumZoneEvapUnits, + CompName)); } if (state.dataEvapCoolers->CheckZoneEvapUnitName(CompNum)) { if (CompName != ZoneEvapUnit(CompNum).Name) { ShowFatalError( state, - EnergyPlus::format("SimZoneEvaporativeCoolerUnit: Invalid CompIndex passed={}, Unit name={}, stored unit name for that index={}", - CompNum, - CompName, - ZoneEvapUnit(CompNum).Name)); + std::format("SimZoneEvaporativeCoolerUnit: Invalid CompIndex passed={}, Unit name={}, stored unit name for that index={}", + CompNum, + CompName, + ZoneEvapUnit(CompNum).Name)); } state.dataEvapCoolers->CheckZoneEvapUnitName(CompNum) = false; } @@ -3549,8 +3540,8 @@ void GetInputZoneEvaporativeCoolerUnit(EnergyPlusData &state) "ZONETEMPERATUREDEADBANDONOFFCYCLING", "ZONECOOLINGLOADONOFFCYCLING", "ZONECOOLINGLOADVARIABLESPEEDFAN"}; thisZoneEvapUnit.ControlSchemeType = static_cast(getEnumValue(controlTypeNamesUC, Alphas(10))); if (thisZoneEvapUnit.ControlSchemeType == ControlType::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); - ShowContinueError(state, EnergyPlus::format("invalid choice found {}=\"{}\".", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, std::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowContinueError(state, std::format("invalid choice found {}=\"{}\".", cAlphaFields(10), Alphas(10))); ErrorsFound = true; } @@ -3561,16 +3552,16 @@ void GetInputZoneEvaporativeCoolerUnit(EnergyPlusData &state) if (thisZoneEvapUnit.EvapCooler_1_Type_Num != EvapCoolerType::Invalid) { thisZoneEvapUnit.EvapCooler_1_ObjectClassName = evapCoolerTypeNames[static_cast(thisZoneEvapUnit.EvapCooler_1_Type_Num)]; } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); - ShowContinueError(state, EnergyPlus::format("invalid choice found {}=\"{}\".", cAlphaFields(11), Alphas(11))); + ShowSevereError(state, std::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowContinueError(state, std::format("invalid choice found {}=\"{}\".", cAlphaFields(11), Alphas(11))); ErrorsFound = true; } thisZoneEvapUnit.EvapCooler_1_Name = Alphas(12); thisZoneEvapUnit.EvapCooler_1_Index = Util::FindItemInList(Alphas(12), state.dataEvapCoolers->EvapCond, &EvapConditions::Name); if (thisZoneEvapUnit.EvapCooler_1_Index == 0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); - ShowContinueError(state, EnergyPlus::format("invalid, not found {}=\"{}\".", cAlphaFields(12), Alphas(12))); + ShowSevereError(state, std::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowContinueError(state, std::format("invalid, not found {}=\"{}\".", cAlphaFields(12), Alphas(12))); ErrorsFound = true; } @@ -3579,8 +3570,8 @@ void GetInputZoneEvaporativeCoolerUnit(EnergyPlusData &state) if (thisZoneEvapUnit.EvapCooler_2_Type_Num != EvapCoolerType::Invalid) { thisZoneEvapUnit.EvapCooler_2_ObjectClassName = evapCoolerTypeNames[static_cast(thisZoneEvapUnit.EvapCooler_2_Type_Num)]; } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); - ShowContinueError(state, EnergyPlus::format("invalid choice found {}=\"{}\".", cAlphaFields(13), Alphas(13))); + ShowSevereError(state, std::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowContinueError(state, std::format("invalid choice found {}=\"{}\".", cAlphaFields(13), Alphas(13))); ErrorsFound = true; } @@ -3588,13 +3579,13 @@ void GetInputZoneEvaporativeCoolerUnit(EnergyPlusData &state) thisZoneEvapUnit.EvapCooler_2_Name = Alphas(14); thisZoneEvapUnit.EvapCooler_2_Index = Util::FindItemInList(Alphas(14), state.dataEvapCoolers->EvapCond, &EvapConditions::Name); if (thisZoneEvapUnit.EvapCooler_2_Index == 0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); - ShowContinueError(state, EnergyPlus::format("invalid, not found {}=\"{}\".", cAlphaFields(14), Alphas(14))); + ShowSevereError(state, std::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowContinueError(state, std::format("invalid, not found {}=\"{}\".", cAlphaFields(14), Alphas(14))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); - ShowContinueError(state, EnergyPlus::format("missing input for {}", cAlphaFields(14))); + ShowSevereError(state, std::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowContinueError(state, std::format("missing input for {}", cAlphaFields(14))); ErrorsFound = true; } } @@ -3603,8 +3594,8 @@ void GetInputZoneEvaporativeCoolerUnit(EnergyPlusData &state) if (!lAlphaBlanks(15)) { thisZoneEvapUnit.HVACSizingIndex = Util::FindItemInList(Alphas(15), state.dataSize->ZoneHVACSizing); if (thisZoneEvapUnit.HVACSizingIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(15), Alphas(15))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowSevereError(state, std::format("{} = {} not found.", cAlphaFields(15), Alphas(15))); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisZoneEvapUnit.Name)); ErrorsFound = true; } } @@ -3646,12 +3637,12 @@ void GetInputZoneEvaporativeCoolerUnit(EnergyPlusData &state) // check that fan type is consistent with control method if (thisZoneEvapUnit.ControlSchemeType == ControlType::ZoneCoolingLoadVariableSpeedFan) { // must have a VS fan type if (thisZoneEvapUnit.fanType == HVAC::FanType::Constant) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowSevereError(state, std::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); ShowContinueError(state, "Fan:ConstantVolume is not consistent with control method ZoneCoolingLoadVariableSpeedFan."); ShowContinueError(state, "Change to a variable speed fan object type"); ErrorsFound = true; } else if (thisZoneEvapUnit.fanType == HVAC::FanType::OnOff) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); + ShowSevereError(state, std::format("{}=\"{}\" invalid data.", CurrentModuleObject, thisZoneEvapUnit.Name)); ShowContinueError(state, "Fan:OnOff is not consistent with control method ZoneCoolingLoadVariableSpeedFan."); ShowContinueError(state, "Change to a variable speed fan object type"); ErrorsFound = true; @@ -3671,7 +3662,7 @@ void GetInputZoneEvaporativeCoolerUnit(EnergyPlusData &state) lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in getting input.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in getting input.", RoutineName)); ShowContinueError(state, "... Preceding condition causes termination."); } @@ -3795,9 +3786,9 @@ void InitZoneEvaporativeCoolerUnit(EnergyPlusData &state, } else { ShowSevereError( state, - EnergyPlus::format("InitZoneEvaporativeCoolerUnit: ZoneHVAC:EvaporativeCoolerUnit = {}, is not on any ZoneHVAC:EquipmentList. " - "It will not be simulated.", - state.dataEvapCoolers->ZoneEvapUnit(Loop).Name)); + std::format("InitZoneEvaporativeCoolerUnit: ZoneHVAC:EvaporativeCoolerUnit = {}, is not on any ZoneHVAC:EquipmentList. " + "It will not be simulated.", + state.dataEvapCoolers->ZoneEvapUnit(Loop).Name)); } } } @@ -3811,11 +3802,11 @@ void InitZoneEvaporativeCoolerUnit(EnergyPlusData &state, if (zoneEvapUnit.ActualFanVolFlowRate != DataSizing::AutoSize) { if (zoneEvapUnit.ActualFanVolFlowRate < zoneEvapUnit.DesignAirVolumeFlowRate) { - ShowSevereError(state, EnergyPlus::format("InitZoneEvaporativeCoolerUnit: ZoneHVAC:EvaporativeCoolerUnit = {}", zoneEvapUnit.Name)); + ShowSevereError(state, std::format("InitZoneEvaporativeCoolerUnit: ZoneHVAC:EvaporativeCoolerUnit = {}", zoneEvapUnit.Name)); ShowContinueError(state, "...unit fan volumetric flow rate less than evaporative cooler unit design supply air flow rate."); - ShowContinueError(state, EnergyPlus::format("...fan volumetric flow rate = {:.5T} m3/s.", zoneEvapUnit.ActualFanVolFlowRate)); - ShowContinueError( - state, EnergyPlus::format("...evap cooler unit volumetric flow rate = {:.5T} m3/s.", zoneEvapUnit.DesignAirVolumeFlowRate)); + ShowContinueError(state, std::format("...fan volumetric flow rate = {:.5f} m3/s.", zoneEvapUnit.ActualFanVolFlowRate)); + ShowContinueError(state, + std::format("...evap cooler unit volumetric flow rate = {:.5f} m3/s.", zoneEvapUnit.DesignAirVolumeFlowRate)); zoneEvapUnit.DesignAirVolumeFlowRate = zoneEvapUnit.ActualFanVolFlowRate; ShowContinueError(state, "...evaporative cooler unit design supply air flow rate will match fan flow rate and simulation continues."); zoneEvapUnit.MyEnvrn = true; // re-initialize to set mass flow rate and max mass flow rate @@ -4257,15 +4248,15 @@ void ControlZoneEvapUnitOutput(EnergyPlusData &state, General::SolveRoot(state, Tol, MaxIte, SolFla, PartLoadRatio, f, 0.0, 1.0); if (SolFla == -1) { if (zoneEvapUnit.UnitLoadControlMaxIterErrorIndex == 0) { - ShowWarningError( - state, EnergyPlus::format("Iteration limit exceeded calculating evap unit part load ratio, for unit={}", zoneEvapUnit.Name)); + ShowWarningError(state, + std::format("Iteration limit exceeded calculating evap unit part load ratio, for unit={}", zoneEvapUnit.Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, EnergyPlus::format("Unit part load ratio returned={:.2R}", PartLoadRatio)); ShowContinueError(state, "Check input for Fan Placement."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "Zone Evaporative Cooler unit part load ratio control failed (iteration limit [{}]) for ZoneHVAC:EvaporativeCoolerUnit =\"{}", MaxIte, zoneEvapUnit.Name), @@ -4273,10 +4264,9 @@ void ControlZoneEvapUnitOutput(EnergyPlusData &state, } else if (SolFla == -2) { if (zoneEvapUnit.UnitLoadControlLimitsErrorIndex == 0) { - ShowWarningError( - state, - EnergyPlus::format("Zone Evaporative Cooler unit calculation failed: unit part load ratio limits exceeded, for unit = {}", - zoneEvapUnit.Name)); + ShowWarningError(state, + std::format("Zone Evaporative Cooler unit calculation failed: unit part load ratio limits exceeded, for unit = {}", + zoneEvapUnit.Name)); ShowContinueError(state, "Check input for Fan Placement."); ShowContinueErrorTimeStamp(state, ""); if (state.dataGlobal->WarmupFlag) { @@ -4387,26 +4377,26 @@ void ControlVSEvapUnitToMeetLoad(EnergyPlusData &state, General::SolveRoot(state, ErrorToler, MaxIte, SolFla, FanSpeedRatio, f, 0.0, 1.0); if (SolFla == -1) { if (zoneEvapUnit.UnitVSControlMaxIterErrorIndex == 0) { - ShowWarningError(state, - EnergyPlus::format("Iteration limit exceeded calculating variable speed evap unit fan speed ratio, for unit={}", - zoneEvapUnit.Name)); + ShowWarningError( + state, + std::format("Iteration limit exceeded calculating variable speed evap unit fan speed ratio, for unit={}", zoneEvapUnit.Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, EnergyPlus::format("Fan speed ratio returned={:.2R}", FanSpeedRatio)); ShowContinueError(state, "Check input for Fan Placement."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("Zone Evaporative Cooler unit control failed (iteration limit [{}]) for ZoneHVAC:EvaporativeCoolerUnit =\"{}", - MaxIte, - zoneEvapUnit.Name), + std::format("Zone Evaporative Cooler unit control failed (iteration limit [{}]) for ZoneHVAC:EvaporativeCoolerUnit =\"{}", + MaxIte, + zoneEvapUnit.Name), zoneEvapUnit.UnitVSControlMaxIterErrorIndex); } else if (SolFla == -2) { if (zoneEvapUnit.UnitVSControlLimitsErrorIndex == 0) { ShowWarningError( state, - EnergyPlus::format("Variable speed evaporative cooler unit calculation failed: fan speed ratio limits exceeded, for unit = {}", - zoneEvapUnit.Name)); + std::format("Variable speed evaporative cooler unit calculation failed: fan speed ratio limits exceeded, for unit = {}", + zoneEvapUnit.Name)); ShowContinueError(state, "Check input for Fan Placement."); ShowContinueErrorTimeStamp(state, ""); if (state.dataGlobal->WarmupFlag) { @@ -4476,7 +4466,7 @@ int GetInletNodeNum(EnergyPlusData &state, std::string const &EvapCondName, bool if (WhichEvapCond != 0) { return state.dataEvapCoolers->EvapCond(WhichEvapCond).InletNode; } - ShowSevereError(state, EnergyPlus::format("GetInletNodeNum: Could not find EvaporativeCooler = \"{}\"", EvapCondName)); + ShowSevereError(state, std::format("GetInletNodeNum: Could not find EvaporativeCooler = \"{}\"", EvapCondName)); ErrorsFound = true; return 0; } @@ -4500,7 +4490,7 @@ int GetOutletNodeNum(EnergyPlusData &state, std::string const &EvapCondName, boo if (WhichEvapCond != 0) { return state.dataEvapCoolers->EvapCond(WhichEvapCond).OutletNode; } - ShowSevereError(state, EnergyPlus::format("GetOutletNodeNum: Could not find EvaporativeCooler = \"{}\"", EvapCondName)); + ShowSevereError(state, std::format("GetOutletNodeNum: Could not find EvaporativeCooler = \"{}\"", EvapCondName)); ErrorsFound = true; return 0; } diff --git a/src/EnergyPlus/EvaporativeFluidCoolers.cc b/src/EnergyPlus/EvaporativeFluidCoolers.cc index 66b836eb9cf..65e3729b531 100644 --- a/src/EnergyPlus/EvaporativeFluidCoolers.cc +++ b/src/EnergyPlus/EvaporativeFluidCoolers.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -481,33 +482,32 @@ namespace EvaporativeFluidCoolers { if (thisEFC.DesignEnteringWaterTemp != DataSizing::AutoSize) { if (thisEFC.DesignEnteringWaterTemp <= thisEFC.DesignEnteringAirWetBulbTemp) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", {} must be greater than {}.", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(9), - state.dataIPShortCut->cNumericFieldNames(11))); + std::format("{} = \"{}\", {} must be greater than {}.", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(9), + state.dataIPShortCut->cNumericFieldNames(11))); ErrorsFound = true; } } if (thisEFC.DesignEnteringAirTemp <= thisEFC.DesignEnteringAirWetBulbTemp) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", {} must be greater than {}.", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(10), - state.dataIPShortCut->cNumericFieldNames(11))); + std::format("{} = \"{}\", {} must be greater than {}.", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(10), + state.dataIPShortCut->cNumericFieldNames(11))); ErrorsFound = true; } } else { // Evaporative fluid cooler performance input method is not specified as a valid "choice" ShowSevereError( state, - EnergyPlus::format("{} = \"{}\". Evaporative fluid cooler Performance Input Method must be " - "\"UFactorTimesAreaAndDesignWaterFlowRate\" or \"StandardDesignCapacity\" or \"UserSpecifiedDesignCapacity\".", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name)); - ShowContinueError(state, - EnergyPlus::format("Evaporative fluid cooler Performance Input Method currently specified as: {}", AlphArray(4))); + std::format("{} = \"{}\". Evaporative fluid cooler Performance Input Method must be " + "\"UFactorTimesAreaAndDesignWaterFlowRate\" or \"StandardDesignCapacity\" or \"UserSpecifiedDesignCapacity\".", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name)); + ShowContinueError(state, std::format("Evaporative fluid cooler Performance Input Method currently specified as: {}", AlphArray(4))); ErrorsFound = true; } @@ -610,10 +610,9 @@ namespace EvaporativeFluidCoolers { thisEFC.DesignEnteringAirWetBulbTemp = NumArray(21); if (state.dataIPShortCut->lAlphaFieldBlanks(4)) { - ShowSevereError(state, - EnergyPlus::format("{}, \"{}\" Performance input method is not specified. ", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name)); + ShowSevereError( + state, + std::format("{}, \"{}\" Performance input method is not specified. ", state.dataIPShortCut->cCurrentModuleObject, thisEFC.Name)); ErrorsFound = true; } else { thisEFC.PerformanceInputMethod = AlphArray(4); @@ -634,10 +633,10 @@ namespace EvaporativeFluidCoolers { Node::ObjectIsNotParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, thisEFC.OutdoorAirInletNodeNum)) { ShowSevereError(state, - EnergyPlus::format("{}, \"{}\" Outdoor Air Inlet Node::Node Name not valid Outdoor Air Node::Node= {}", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name, - AlphArray(5))); + std::format("{}, \"{}\" Outdoor Air Inlet Node::Node Name not valid Outdoor Air Node::Node= {}", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name, + AlphArray(5))); ShowContinueError(state, "...does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node::Node."); ErrorsFound = true; } @@ -653,8 +652,8 @@ namespace EvaporativeFluidCoolers { } else { thisEFC.EvapLossMode = static_cast(getEnumValue(evapLossNamesUC, Util::makeUPPER(AlphArray(6)))); if (thisEFC.EvapLossMode == EvapLoss::Invalid) { - ShowSevereError(state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(6), AlphArray(6))); - ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(6), AlphArray(6))); + ShowContinueError(state, std::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -687,8 +686,8 @@ namespace EvaporativeFluidCoolers { } else { thisEFC.BlowdownMode = static_cast(getEnumValue(blowDownNamesUC, Util::makeUPPER(AlphArray(7)))); if (thisEFC.BlowdownMode == Blowdown::Invalid) { - ShowSevereError(state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(7), AlphArray(7))); - ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(7), AlphArray(7))); + ShowContinueError(state, std::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -718,28 +717,28 @@ namespace EvaporativeFluidCoolers { if (thisEFC.DesignSprayWaterFlowRate <= 0.0) { ShowSevereError( state, - EnergyPlus::format("{} \"{}\". Evaporative fluid cooler input requires a design spray water flow rate greater than zero for all " - "performance input methods.", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name)); + std::format("{} \"{}\". Evaporative fluid cooler input requires a design spray water flow rate greater than zero for all " + "performance input methods.", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name)); ErrorsFound = true; } if (thisEFC.HighSpeedAirFlowRate <= 0.0 && thisEFC.HighSpeedAirFlowRate != DataSizing::AutoSize) { ShowSevereError( state, - EnergyPlus::format("{}= \"{}\". Evaporative fluid cooler input requires design air flow rate at high fan speed to be greater " - "than zero for all performance input methods.", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name)); + std::format("{}= \"{}\". Evaporative fluid cooler input requires design air flow rate at high fan speed to be greater " + "than zero for all performance input methods.", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name)); ErrorsFound = true; } if (thisEFC.LowSpeedAirFlowRate <= 0.0 && thisEFC.LowSpeedAirFlowRate != DataSizing::AutoSize) { ShowSevereError( state, - EnergyPlus::format("{}= \"{}\". Evaporative fluid cooler input requires design air flow rate at low fan speed to be greater than " - "zero for all performance input methods.", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name)); + std::format("{}= \"{}\". Evaporative fluid cooler input requires design air flow rate at low fan speed to be greater than " + "zero for all performance input methods.", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name)); ErrorsFound = true; } // High speed air flow rate must be greater than low speed air flow rate. @@ -747,7 +746,7 @@ namespace EvaporativeFluidCoolers { if (thisEFC.HighSpeedAirFlowRate <= thisEFC.LowSpeedAirFlowRate && thisEFC.HighSpeedAirFlowRate != DataSizing::AutoSize) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\". Evaporative fluid cooler air flow rate at low fan speed must be less than the air flow rate at high fan speed.", state.dataIPShortCut->cCurrentModuleObject, thisEFC.Name)); @@ -755,30 +754,29 @@ namespace EvaporativeFluidCoolers { } if (thisEFC.HighSpeedFanPower <= 0.0 && thisEFC.HighSpeedFanPower != DataSizing::AutoSize) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(2), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(2), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.LowSpeedFanPower <= 0.0 && thisEFC.LowSpeedFanPower != DataSizing::AutoSize) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(5), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(5), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.HighSpeedFanPower <= thisEFC.LowSpeedFanPower && thisEFC.HighSpeedFanPower != DataSizing::AutoSize) { - ShowSevereError( - state, - EnergyPlus::format("{} = \"{}\". Evaporative fluid cooler low speed fan power must be less than the high speed fan power .", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name)); + ShowSevereError(state, + std::format("{} = \"{}\". Evaporative fluid cooler low speed fan power must be less than the high speed fan power .", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name)); ErrorsFound = true; } @@ -786,94 +784,94 @@ namespace EvaporativeFluidCoolers { thisEFC.PerformanceInputMethod_Num = PIM::UFactor; if (thisEFC.HighSpeedEvapFluidCoolerUA <= 0.0 && thisEFC.HighSpeedEvapFluidCoolerUA != DataSizing::AutoSize) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(12), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(12), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.LowSpeedEvapFluidCoolerUA <= 0.0 && thisEFC.LowSpeedEvapFluidCoolerUA != DataSizing::AutoSize) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(13), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(13), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.HighSpeedEvapFluidCoolerUA <= thisEFC.LowSpeedEvapFluidCoolerUA && thisEFC.HighSpeedEvapFluidCoolerUA != DataSizing::AutoSize) { ShowSevereError( state, - EnergyPlus::format("{} = \"{}\". Evaporative fluid cooler U-factor Times Area Value at Low Fan Speed must be less than the " - "U-factor Times Area Value at High Fan Speed.", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name)); + std::format("{} = \"{}\". Evaporative fluid cooler U-factor Times Area Value at Low Fan Speed must be less than the " + "U-factor Times Area Value at High Fan Speed.", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name)); ErrorsFound = true; } if (thisEFC.DesignWaterFlowRate <= 0.0 && thisEFC.DesignWaterFlowRate != DataSizing::AutoSize) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(15), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(15), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } } else if (Util::SameString(AlphArray(4), "STANDARDDESIGNCAPACITY")) { thisEFC.PerformanceInputMethod_Num = PIM::StandardDesignCapacity; if (thisEFC.HighSpeedStandardDesignCapacity <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(9), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(9), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.LowSpeedStandardDesignCapacity <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(10), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(10), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.LowSpeedStandardDesignCapacity >= thisEFC.HighSpeedStandardDesignCapacity) { - ShowSevereError(state, - EnergyPlus::format( - "{} = \"{}\". Low-Speed Standard Design Capacity must be less than the High-Speed Standard Design Capacity.", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name)); + ShowSevereError( + state, + std::format("{} = \"{}\". Low-Speed Standard Design Capacity must be less than the High-Speed Standard Design Capacity.", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name)); ErrorsFound = true; } } else if (Util::SameString(AlphArray(4), "USERSPECIFIEDDESIGNCAPACITY")) { thisEFC.PerformanceInputMethod_Num = PIM::UserSpecifiedDesignCapacity; if (thisEFC.DesignWaterFlowRate <= 0.0 && thisEFC.DesignWaterFlowRate != DataSizing::AutoSize) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(15), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(15), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.HighSpeedUserSpecifiedDesignCapacity <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(16), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(16), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.LowSpeedUserSpecifiedDesignCapacity == Constant::AutoCalculate) { @@ -881,29 +879,29 @@ namespace EvaporativeFluidCoolers { } if (thisEFC.LowSpeedUserSpecifiedDesignCapacity <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(17), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(17), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.HighSpeedEvapFluidCoolerUA != 0.0) { if (thisEFC.HighSpeedEvapFluidCoolerUA > 0.0) { ShowSevereError( state, - EnergyPlus::format("{} = \"{}\". UserSpecifiedDesignCapacity performance input method and evaporative fluid cooler UA at " - "high fan speed have been specified.", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name)); + std::format("{} = \"{}\". UserSpecifiedDesignCapacity performance input method and evaporative fluid cooler UA at " + "high fan speed have been specified.", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name)); } else { ShowSevereError( state, - EnergyPlus::format("{} = \"{}\". UserSpecifiedDesignCapacity performance input method has been specified and evaporative " - "fluid cooler UA at high fan speed is being autosized.", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name)); + std::format("{} = \"{}\". UserSpecifiedDesignCapacity performance input method has been specified and evaporative " + "fluid cooler UA at high fan speed is being autosized.", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name)); } ShowContinueError(state, "Evaporative fluid cooler UA at high fan speed must be left blank when UserSpecifiedDesignCapacity performance " @@ -914,17 +912,17 @@ namespace EvaporativeFluidCoolers { if (thisEFC.LowSpeedEvapFluidCoolerUA > 0.0) { ShowSevereError( state, - EnergyPlus::format("{} = \"{}\". UserSpecifiedDesignCapacity performance input method and evaporative fluid cooler UA at " - "low fan speed have been specified.", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name)); + std::format("{} = \"{}\". UserSpecifiedDesignCapacity performance input method and evaporative fluid cooler UA at " + "low fan speed have been specified.", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name)); } else { ShowSevereError( state, - EnergyPlus::format("{} = \"{}\". UserSpecifiedDesignCapacity performance input method has been specified and evaporative " - "fluid cooler UA at low fan speed is being autosized.", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name)); + std::format("{} = \"{}\". UserSpecifiedDesignCapacity performance input method has been specified and evaporative " + "fluid cooler UA at low fan speed is being autosized.", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name)); } ShowContinueError(state, "Evaporative fluid cooler UA at low fan speed must be left blank when UserSpecifiedDesignCapacity performance " @@ -934,7 +932,7 @@ namespace EvaporativeFluidCoolers { if (thisEFC.LowSpeedUserSpecifiedDesignCapacity >= thisEFC.HighSpeedUserSpecifiedDesignCapacity) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\". Low-Speed User Specified Design Capacity must be less than the High-Speed User Specified Design Capacity.", state.dataIPShortCut->cCurrentModuleObject, thisEFC.Name)); @@ -943,55 +941,54 @@ namespace EvaporativeFluidCoolers { if (thisEFC.DesignEnteringAirTemp <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, buy must be >0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(20), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, buy must be >0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(20), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.DesignEnteringAirWetBulbTemp <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be >0 for {} = \"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(21), - state.dataIPShortCut->cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be >0 for {} = \"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(21), + state.dataIPShortCut->cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (thisEFC.DesignEnteringWaterTemp != DataSizing::AutoSize) { if (thisEFC.DesignEnteringWaterTemp <= thisEFC.DesignEnteringAirWetBulbTemp) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", {} must be greater than {}.", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(19), - state.dataIPShortCut->cNumericFieldNames(15))); + std::format("{} = \"{}\", {} must be greater than {}.", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(19), + state.dataIPShortCut->cNumericFieldNames(15))); ErrorsFound = true; } } if (thisEFC.DesignEnteringAirTemp <= thisEFC.DesignEnteringAirWetBulbTemp) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", {} must be greater than {}.", - state.dataIPShortCut->cCurrentModuleObject, - AlphArray(1), - state.dataIPShortCut->cNumericFieldNames(20), - state.dataIPShortCut->cNumericFieldNames(15))); + std::format("{} = \"{}\", {} must be greater than {}.", + state.dataIPShortCut->cCurrentModuleObject, + AlphArray(1), + state.dataIPShortCut->cNumericFieldNames(20), + state.dataIPShortCut->cNumericFieldNames(15))); ErrorsFound = true; } } else { // Evaporative fluid cooler performance input method is not specified as a valid "choice" ShowSevereError( state, - EnergyPlus::format("{} = \"{}\". Evaporative fluid cooler Performance Input Method must be " - "\"UFactorTimesAreaAndDesignWaterFlowRate\" or \"StandardDesignCapacity\" or \"UserSpecifiedDesignCapacity\".", - state.dataIPShortCut->cCurrentModuleObject, - thisEFC.Name)); - ShowContinueError(state, - EnergyPlus::format("Evaporative fluid cooler Performance Input Method currently specified as: {}", AlphArray(4))); + std::format("{} = \"{}\". Evaporative fluid cooler Performance Input Method must be " + "\"UFactorTimesAreaAndDesignWaterFlowRate\" or \"StandardDesignCapacity\" or \"UserSpecifiedDesignCapacity\".", + state.dataIPShortCut->cCurrentModuleObject, + thisEFC.Name)); + ShowContinueError(state, std::format("Evaporative fluid cooler Performance Input Method currently specified as: {}", AlphArray(4))); ErrorsFound = true; } @@ -1237,8 +1234,7 @@ namespace EvaporativeFluidCoolers { MaxLoad = this->HighSpeedStandardDesignCapacity * this->HeatRejectCapNomCapSizingRatio; OptLoad = this->HighSpeedStandardDesignCapacity; } else { - ShowFatalError(state, - EnergyPlus::format("SimEvapFluidCoolers: Invalid evaporative fluid cooler Type Requested = {}", EvapFluidCoolerType)); + ShowFatalError(state, std::format("SimEvapFluidCoolers: Invalid evaporative fluid cooler Type Requested = {}", EvapFluidCoolerType)); } } @@ -1271,8 +1267,7 @@ namespace EvaporativeFluidCoolers { } else if (this->Type == DataPlant::PlantEquipmentType::EvapFluidCooler_TwoSpd) { this->CalcTwoSpeedEvapFluidCooler(state); } else { - ShowFatalError(state, - EnergyPlus::format("SimEvapFluidCoolers: Invalid evaporative fluid cooler Type Requested = {}", EvapFluidCoolerType)); + ShowFatalError(state, std::format("SimEvapFluidCoolers: Invalid evaporative fluid cooler Type Requested = {}", EvapFluidCoolerType)); } this->CalculateWaterUsage(state); @@ -1391,8 +1386,7 @@ namespace EvaporativeFluidCoolers { if (this->DesignEnteringWaterTemp <= this->DesignEnteringAirWetBulbTemp) { ShowSevereError( state, - EnergyPlus::format("Error when autosizing the Design Entering Water Temperature for Evaporative Fluid Cooler = {}.", - this->Name)); + std::format("Error when autosizing the Design Entering Water Temperature for Evaporative Fluid Cooler = {}.", this->Name)); ShowContinueError( state, EnergyPlus::format( @@ -1411,7 +1405,7 @@ namespace EvaporativeFluidCoolers { state, this->EvapFluidCoolerType, this->Name, "Design Entering Water Temperature [C]", this->DesignEnteringWaterTemp); } } else if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, EnergyPlus::format("Autosizing error for evaporative fluid cooler object = {}", this->Name)); + ShowSevereError(state, std::format("Autosizing error for evaporative fluid cooler object = {}", this->Name)); ShowFatalError(state, "Autosizing of evaporative fluid cooler Design Entering Water Temperature requires a loop Sizing:Plant object."); } @@ -1429,7 +1423,7 @@ namespace EvaporativeFluidCoolers { DesignEnteringAirWetBulb = this->DesignEnteringAirWetBulbTemp; } if (this->DesignExitWaterTemp <= DesignEnteringAirWetBulb) { - ShowSevereError(state, EnergyPlus::format("Error when autosizing the UA value for Evaporative Fluid Cooler = {}.", this->Name)); + ShowSevereError(state, std::format("Error when autosizing the UA value for Evaporative Fluid Cooler = {}.", this->Name)); ShowContinueError( state, EnergyPlus::format("Design Loop Exit Temperature ({:.2R} C) must be greater than design entering air wet-bulb temperature " @@ -1471,7 +1465,7 @@ namespace EvaporativeFluidCoolers { } } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, EnergyPlus::format("Autosizing error for evaporative fluid cooler object = {}", this->Name)); + ShowSevereError(state, std::format("Autosizing error for evaporative fluid cooler object = {}", this->Name)); ShowFatalError(state, "Autosizing of evaporative fluid cooler condenser flow rate requires a loop Sizing:Plant object."); } } @@ -1568,7 +1562,7 @@ namespace EvaporativeFluidCoolers { } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of evaporative fluid cooler fan power requires a loop Sizing:Plant object."); - ShowFatalError(state, EnergyPlus::format(" Occurs in evaporative fluid cooler object= {}", this->Name)); + ShowFatalError(state, std::format(" Occurs in evaporative fluid cooler object= {}", this->Name)); } } } @@ -1637,16 +1631,15 @@ namespace EvaporativeFluidCoolers { // This conditional statement is to trap when the user specified Condenser/Evaporative Fluid Cooler water design setpoint // temperature is less than design inlet air wet bulb temperature of 25.6 C if (this->DesignExitWaterTemp <= 25.6) { - ShowSevereError(state, - EnergyPlus::format("Error when autosizing the UA value for Evaporative Fluid Cooler = {}.", this->Name)); + ShowSevereError(state, std::format("Error when autosizing the UA value for Evaporative Fluid Cooler = {}.", this->Name)); ShowContinueError( state, EnergyPlus::format("Design Loop Exit Temperature ({:.2R} C) must be greater than 25.6 C when autosizing the " "Evaporative Fluid Cooler UA.", this->DesignExitWaterTemp)); ShowContinueError(state, - EnergyPlus::format("The Design Loop Exit Temperature specified in Sizing:Plant object = {}", - state.dataSize->PlantSizData(PltSizCondNum).PlantLoopName)); + std::format("The Design Loop Exit Temperature specified in Sizing:Plant object = {}", + state.dataSize->PlantSizData(PltSizCondNum).PlantLoopName)); ShowContinueError(state, "It is recommended that the Design Loop Exit Temperature = 25.6 C plus the Evaporative Fluid Cooler design " "approach temperature (e.g., 4 C)."); @@ -1677,14 +1670,13 @@ namespace EvaporativeFluidCoolers { General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f, UA0, UA1); if (SolFla == -1) { ShowWarningError(state, "Iteration limit exceeded in calculating evaporative fluid cooler UA."); - ShowContinueError(state, - EnergyPlus::format("Autosizing of fluid cooler UA failed for evaporative fluid cooler = {}", this->Name)); + ShowContinueError(state, std::format("Autosizing of fluid cooler UA failed for evaporative fluid cooler = {}", this->Name)); ShowContinueError(state, EnergyPlus::format("The final UA value = {:.2R}W/C, and the simulation continues...", UA)); } else if (SolFla == -2) { this->SimSimpleEvapFluidCooler(state, par1, par2, UA0, OutWaterTempAtUA0); this->SimSimpleEvapFluidCooler(state, par1, par2, UA1, OutWaterTempAtUA1); - ShowSevereError( - state, EnergyPlus::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError(state, + std::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); ShowContinueError(state, "reasonable UA value. Review and revise design input values as appropriate. Specifying hard"); ShowContinueError(state, "sizes for some \"autosizable\" fields while autosizing other \"autosizable\" fields may be contributing " @@ -1731,9 +1723,8 @@ namespace EvaporativeFluidCoolers { EnergyPlus::format("Calculated water outlet temperature at high UA [C](UA = {:.2R} W/C) = {:.2R}", UA1, OutWaterTempAtUA1)); - ShowFatalError( - state, - EnergyPlus::format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); + ShowFatalError(state, + std::format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { this->HighSpeedEvapFluidCoolerUA = UA; @@ -1779,7 +1770,7 @@ namespace EvaporativeFluidCoolers { } } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, EnergyPlus::format("Autosizing error for evaporative fluid cooler object = {}", this->Name)); + ShowSevereError(state, std::format("Autosizing error for evaporative fluid cooler object = {}", this->Name)); ShowFatalError(state, "Autosizing of evaporative fluid cooler UA requires a loop Sizing:Plant object."); } } @@ -1812,15 +1803,13 @@ namespace EvaporativeFluidCoolers { General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f, UA0, UA1); if (SolFla == -1) { ShowWarningError(state, "Iteration limit exceeded in calculating evaporative fluid cooler UA."); - ShowContinueError(state, - EnergyPlus::format("Autosizing of fluid cooler UA failed for evaporative fluid cooler = {}", this->Name)); + ShowContinueError(state, std::format("Autosizing of fluid cooler UA failed for evaporative fluid cooler = {}", this->Name)); ShowContinueError(state, EnergyPlus::format("The final UA value = {:.2R}W/C, and the simulation continues...", UA)); } else if (SolFla == -2) { - ShowSevereError(state, - EnergyPlus::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError(state, std::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); ShowContinueError(state, "reasonable UA value. Review and revise design input values as appropriate. "); - ShowFatalError( - state, EnergyPlus::format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); + ShowFatalError(state, + std::format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); } this->HighSpeedEvapFluidCoolerUA = UA; } else { @@ -1885,14 +1874,12 @@ namespace EvaporativeFluidCoolers { General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f, UA0, UA1); if (SolFla == -1) { ShowWarningError(state, "Iteration limit exceeded in calculating evaporative fluid cooler UA."); - ShowContinueError(state, - EnergyPlus::format("Autosizing of fluid cooler UA failed for evaporative fluid cooler = {}", this->Name)); + ShowContinueError(state, std::format("Autosizing of fluid cooler UA failed for evaporative fluid cooler = {}", this->Name)); ShowContinueError(state, EnergyPlus::format("The final UA value = {:.2R}W/C, and the simulation continues...", UA)); } else if (SolFla == -2) { this->SimSimpleEvapFluidCooler(state, par1, par2, UA0, OutWaterTempAtUA0); this->SimSimpleEvapFluidCooler(state, par1, par2, UA1, OutWaterTempAtUA1); - ShowSevereError(state, - EnergyPlus::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError(state, std::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); ShowContinueError(state, "reasonable UA value. Review and revise design input values as appropriate. Specifying hard"); ShowContinueError( state, @@ -1938,8 +1925,8 @@ namespace EvaporativeFluidCoolers { ShowContinueError( state, EnergyPlus::format("Calculated water outlet temperature at high UA [C](UA = {:.2R} W/C) = {:.2R}", UA1, OutWaterTempAtUA1)); - ShowFatalError( - state, EnergyPlus::format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); + ShowFatalError(state, + std::format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); } this->HighSpeedEvapFluidCoolerUA = UA; } else { @@ -2046,15 +2033,13 @@ namespace EvaporativeFluidCoolers { General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f, UA0, UA1); if (SolFla == -1) { ShowWarningError(state, "Iteration limit exceeded in calculating evaporative fluid cooler UA."); - ShowContinueError(state, - EnergyPlus::format("Autosizing of fluid cooler UA failed for evaporative fluid cooler = {}", this->Name)); + ShowContinueError(state, std::format("Autosizing of fluid cooler UA failed for evaporative fluid cooler = {}", this->Name)); ShowContinueError(state, EnergyPlus::format("The final UA value = {:.2R}W/C, and the simulation continues...", UA)); } else if (SolFla == -2) { - ShowSevereError(state, - EnergyPlus::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError(state, std::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); ShowContinueError(state, "reasonable low-speed UA value. Review and revise design input values as appropriate. "); - ShowFatalError( - state, EnergyPlus::format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); + ShowFatalError(state, + std::format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); } this->LowSpeedEvapFluidCoolerUA = UA; } else { @@ -2102,13 +2087,11 @@ namespace EvaporativeFluidCoolers { General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f, UA0, UA1); if (SolFla == -1) { ShowSevereError(state, "Iteration limit exceeded in calculating EvaporativeFluidCooler UA"); - ShowFatalError(state, - EnergyPlus::format("Autosizing of EvaporativeFluidCooler UA failed for EvaporativeFluidCooler {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of EvaporativeFluidCooler UA failed for EvaporativeFluidCooler {}", this->Name)); } else if (SolFla == -2) { this->SimSimpleEvapFluidCooler(state, par1, par2, UA0, OutWaterTempAtUA0); this->SimSimpleEvapFluidCooler(state, par1, par2, UA1, OutWaterTempAtUA1); - ShowSevereError(state, - EnergyPlus::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError(state, std::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); ShowContinueError(state, "reasonable UA value. Review and revise design input values as appropriate. Specifying hard"); ShowContinueError( state, @@ -2135,8 +2118,8 @@ namespace EvaporativeFluidCoolers { EnergyPlus::format("Calculated water outlet temperature at low UA({:.2R}) = {:.2R}", UA0, OutWaterTempAtUA0)); ShowContinueError(state, EnergyPlus::format("Calculated water outlet temperature at high UA({:.2R}) = {:.2R}", UA1, OutWaterTempAtUA1)); - ShowFatalError( - state, EnergyPlus::format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); + ShowFatalError(state, + std::format("Autosizing of Evaporative Fluid Cooler UA failed for Evaporative Fluid Cooler = {}", this->Name)); } this->LowSpeedEvapFluidCoolerUA = UA; } else { @@ -2383,10 +2366,9 @@ namespace EvaporativeFluidCoolers { bypassFraction = BypassFraction2; } if (NumIteration > MaxIteration) { - ShowWarningError(state, - EnergyPlus::format("Evaporative fluid cooler fluid bypass iteration exceeds maximum limit of {} for {}", - MaxItChar, - this->Name)); + ShowWarningError( + state, + std::format("Evaporative fluid cooler fluid bypass iteration exceeds maximum limit of {} for {}", MaxItChar, this->Name)); } this->BypassFraction = BypassFraction2; // may not meet TempSetPoint due to limit of evaporative fluid cooler outlet temp to OWTLowerLimit @@ -2764,13 +2746,11 @@ namespace EvaporativeFluidCoolers { this->DesWaterMassFlowRate * this->EvapFluidCoolerMassFlowRateMultiplier) { ++this->HighMassFlowErrorCount; if (this->HighMassFlowErrorCount < 2) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", this->EvapFluidCoolerType, this->Name)); + ShowWarningError(state, std::format("{} \"{}\"", this->EvapFluidCoolerType, this->Name)); ShowContinueError(state, " Condenser Loop Mass Flow Rate is much greater than the evaporative fluid coolers design mass flow rate."); ShowContinueError( - state, - EnergyPlus::format(" Condenser Loop Mass Flow Rate = {:.6T}", state.dataLoopNodes->Node(this->WaterOutletNode).MassFlowRate)); - ShowContinueError(state, - EnergyPlus::format(" Evaporative Fluid Cooler Design Mass Flow Rate = {:.6T}", this->DesWaterMassFlowRate)); + state, std::format(" Condenser Loop Mass Flow Rate = {:.6f}", state.dataLoopNodes->Node(this->WaterOutletNode).MassFlowRate)); + ShowContinueError(state, std::format(" Evaporative Fluid Cooler Design Mass Flow Rate = {:.6f}", this->DesWaterMassFlowRate)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( @@ -2789,13 +2769,13 @@ namespace EvaporativeFluidCoolers { if (TempDifference > TempAllowance && this->WaterMassFlowRate > 0.0) { ++this->OutletWaterTempErrorCount; if (this->OutletWaterTempErrorCount < 2) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", this->EvapFluidCoolerType, this->Name)); + ShowWarningError(state, std::format("{} \"{}\"", this->EvapFluidCoolerType, this->Name)); ShowContinueError( state, - EnergyPlus::format("Evaporative fluid cooler water outlet temperature ({:6.2F} C) is below the specified minimum condenser " - "loop temp of {:6.2F} C", - this->OutletWaterTemp, - LoopMinTemp)); + std::format("Evaporative fluid cooler water outlet temperature ({:6.2F} C) is below the specified minimum condenser " + "loop temp of {:6.2F} C", + this->OutletWaterTemp, + LoopMinTemp)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( @@ -2812,10 +2792,10 @@ namespace EvaporativeFluidCoolers { if (this->WaterMassFlowRate > 0.0 && this->WaterMassFlowRate <= DataBranchAirLoopPlant::MassFlowTolerance) { ++this->SmallWaterMassFlowErrorCount; if (this->SmallWaterMassFlowErrorCount < 2) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", this->EvapFluidCoolerType, this->Name)); + ShowWarningError(state, std::format("{} \"{}\"", this->EvapFluidCoolerType, this->Name)); ShowContinueError(state, "Evaporative fluid cooler water mass flow rate near zero."); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, EnergyPlus::format("Actual Mass flow = {:.2T}", this->WaterMassFlowRate)); + ShowContinueError(state, std::format("Actual Mass flow = {:.2f}", this->WaterMassFlowRate)); } else { ShowRecurringWarningErrorAtEnd(state, this->EvapFluidCoolerType + " \"" + this->Name + @@ -2872,16 +2852,15 @@ namespace EvaporativeFluidCoolers { if (Util::SameString(this->PerformanceInputMethod, "STANDARDDESIGNCAPACITY")) { this->PerformanceInputMethod_Num = PIM::StandardDesignCapacity; if (FluidName != "WATER") { - ShowSevereError( - state, - EnergyPlus::format("{} = \"{}{}", - state.dataIPShortCut->cCurrentModuleObject, - this->Name, - R"(". StandardDesignCapacity performance input method is only valid for fluid type = "Water".)")); + ShowSevereError(state, + std::format("{} = \"{}{}", + state.dataIPShortCut->cCurrentModuleObject, + this->Name, + R"(". StandardDesignCapacity performance input method is only valid for fluid type = "Water".)")); ShowContinueError(state, - EnergyPlus::format("Currently, Fluid Type = {} in CondenserLoop = {}", - FluidName, - state.dataPlnt->PlantLoop(state.dataSize->CurLoopNum).Name)); + std::format("Currently, Fluid Type = {} in CondenserLoop = {}", + FluidName, + state.dataPlnt->PlantLoop(state.dataSize->CurLoopNum).Name)); ErrorsFound = true; } } @@ -2902,7 +2881,7 @@ namespace EvaporativeFluidCoolers { if (this->HighSpeedAirFlowRate <= this->LowSpeedAirFlowRate) { ShowSevereError( state, - EnergyPlus::format( + std::format( "EvaporativeFluidCooler:TwoSpeed \"{}\". Low speed air flow rate must be less than the high speed air flow rate.", this->Name)); ErrorsFound = true; @@ -2911,9 +2890,9 @@ namespace EvaporativeFluidCoolers { (this->HighSpeedEvapFluidCoolerUA <= this->LowSpeedEvapFluidCoolerUA)) { ShowSevereError( state, - EnergyPlus::format("EvaporativeFluidCooler:TwoSpeed \"{}\". Evaporative fluid cooler UA at low fan speed must be less " - "than the evaporative fluid cooler UA at high fan speed.", - this->Name)); + std::format("EvaporativeFluidCooler:TwoSpeed \"{}\". Evaporative fluid cooler UA at low fan speed must be less " + "than the evaporative fluid cooler UA at high fan speed.", + this->Name)); ErrorsFound = true; } } diff --git a/src/EnergyPlus/ExhaustAirSystemManager.cc b/src/EnergyPlus/ExhaustAirSystemManager.cc index d141a5d2bb0..db4417c1957 100644 --- a/src/EnergyPlus/ExhaustAirSystemManager.cc +++ b/src/EnergyPlus/ExhaustAirSystemManager.cc @@ -49,8 +49,10 @@ #include #include -// EnergyPlus Headers +// Local Headers #include + +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/ExtendedHeatIndex.cc b/src/EnergyPlus/ExtendedHeatIndex.cc index 79cfacf5e9d..a0610cb3ee5 100644 --- a/src/EnergyPlus/ExtendedHeatIndex.cc +++ b/src/EnergyPlus/ExtendedHeatIndex.cc @@ -59,8 +59,10 @@ // } // +// C++ Headers #include +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/ExternalInterface.cc b/src/EnergyPlus/ExternalInterface.cc index cc6dbf5cb59..52563e63ec8 100644 --- a/src/EnergyPlus/ExternalInterface.cc +++ b/src/EnergyPlus/ExternalInterface.cc @@ -45,14 +45,8 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -// FMI-Related Headers -extern "C" { -#include -#include -#include -} - // C++ Headers +#include #include #include @@ -60,6 +54,13 @@ extern "C" { #include #include +// Third Party Headers +extern "C" { +#include +#include +#include +} + // EnergyPlus Headers #include #include @@ -406,7 +407,8 @@ void InitExternalInterface(EnergyPlusData &state) state.dataExternalInterface->ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("ExternalInterface: Did not find file \"{}\".", state.dataExternalInterface->socCfgFilPath)); + ShowSevereError(state, + EnergyPlus::format("ExternalInterface: Did not find file \"{}\".", state.dataExternalInterface->socCfgFilPath.string())); ShowContinueError(state, "This file needs to be in same directory as in.idf."); ShowContinueError(state, "Check the documentation for the ExternalInterface."); state.dataExternalInterface->ErrorsFound = true; @@ -809,7 +811,7 @@ void InstantiateInitializeFMUImport(EnergyPlusData &state) // TODO: This is doing a null pointer check; OK? if (fmuInst.fmicomponent == nullptr) { ShowSevereError(state, "ExternalInterface/CalcExternalInterfaceFMUImport: Error when trying to instantiate"); - ShowContinueError(state, EnergyPlus::format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowContinueError(state, std::format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -826,7 +828,7 @@ void InstantiateInitializeFMUImport(EnergyPlusData &state) &fmuInst.fmicomponent, &state.dataExternalInterface->tStart, &localfmiTrue, &state.dataExternalInterface->tStop, &fmuInst.Index); if (fmuInst.fmistatus != fmiOK) { ShowSevereError(state, "ExternalInterface/CalcExternalInterfaceFMUImport: Error when trying to initialize"); - ShowContinueError(state, EnergyPlus::format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowContinueError(state, std::format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); ShowContinueError(state, EnergyPlus::format("Error Code = \"{}\"", fmuInst.fmistatus)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -856,7 +858,7 @@ void InitializeFMU(EnergyPlusData &state) &fmuInst.fmicomponent, &state.dataExternalInterface->tStart, &localfmiTrue, &state.dataExternalInterface->tStop, &fmuInst.Index); if (fmuInst.fmistatus != fmiOK) { ShowSevereError(state, "ExternalInterface/CalcExternalInterfaceFMUImport: Error when trying to initialize"); - ShowContinueError(state, EnergyPlus::format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowContinueError(state, std::format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); ShowContinueError(state, EnergyPlus::format("Error Code = \"{}\"", fmuInst.fmistatus)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -886,7 +888,7 @@ void TerminateResetFreeFMUImport(EnergyPlusData &state, int fmiEndSimulation) // check if fmiComponent has been freed if (fmuInst.fmicomponent == nullptr) { ShowSevereError(state, "ExternalInterface/TerminateResetFreeFMUImport: Error when trying to terminate"); - ShowContinueError(state, EnergyPlus::format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowContinueError(state, std::format("instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -995,10 +997,10 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) } ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport:"); ShowContinueError(state, "duplicate file names (but not same file) entered."); - ShowContinueError(state, EnergyPlus::format("...entered file name=\"{}\"", state.dataExternalInterface->FMU(j).Name)); - ShowContinueError(state, EnergyPlus::format("... full file name=\"{}\"", fullFileName(j))); - ShowContinueError(state, EnergyPlus::format("...entered file name=\"{}\"", state.dataExternalInterface->FMU(k).Name)); - ShowContinueError(state, EnergyPlus::format("... full file name=\"{}\"", fullFileName(k))); + ShowContinueError(state, std::format("...entered file name=\"{}\"", state.dataExternalInterface->FMU(j).Name)); + ShowContinueError(state, std::format("... full file name=\"{}\"", fullFileName(j))); + ShowContinueError(state, std::format("...entered file name=\"{}\"", state.dataExternalInterface->FMU(k).Name)); + ShowContinueError(state, std::format("... full file name=\"{}\"", fullFileName(k))); ShowContinueError(state, "...name collision but not same file name."); state.dataExternalInterface->ErrorsFound = true; } @@ -1058,14 +1060,14 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) for (int i = 1; i <= state.dataExternalInterface->NumFMUObjects; ++i) { auto &fmu = state.dataExternalInterface->FMU(i); if (fmu.NumInstances == 0) { - ShowSevereError(state, EnergyPlus::format("ExternalInterface/InitExternalInterfaceFMUImport: The FMU \"{}\" does", fmu.Name)); + ShowSevereError(state, std::format("ExternalInterface/InitExternalInterfaceFMUImport: The FMU \"{}\" does", fmu.Name)); ShowContinueError(state, "not have any instances or any input variable. An FMU should have at least one instance"); ShowContinueError(state, "or one input variable defined in input file. Check FMU object in the input file."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } if (NumFMUInputVariables > 0 && fmu.TotNumInputVariablesInIDF == 0) { - ShowWarningError(state, EnergyPlus::format("InitExternalInterfaceFMUImport: The FMU \"{}\"", fmu.Name)); + ShowWarningError(state, std::format("InitExternalInterfaceFMUImport: The FMU \"{}\"", fmu.Name)); ShowContinueError(state, "is defined but has no input variables."); ShowContinueError(state, "Check the input field of the corresponding object"); ShowContinueError(state, "ExternalInterface:FunctionalMockupUnitImport:From:Variable."); @@ -1101,7 +1103,7 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) if (retVal != 0) { ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to"); - ShowContinueError(state, EnergyPlus::format("unpack the FMU \"{}\".", fmu.Name)); + ShowContinueError(state, std::format("unpack the FMU \"{}\".", fmu.Name)); ShowContinueError(state, "Check if the FMU exists. Also check if the FMU folder is not write protected."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1123,7 +1125,7 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) if (fmuInst.Index < 0) { ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to"); ShowContinueError(state, "get the model ID and model GUID"); - ShowContinueError(state, EnergyPlus::format("of instance \"{}\" of FMU \"{}\".", fmuInst.Name, fmu.Name)); + ShowContinueError(state, std::format("of instance \"{}\" of FMU \"{}\".", fmuInst.Name, fmu.Name)); ShowContinueError(state, "Check if modelDescription.xml exists in the folder where the FMU has been unpacked."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1151,7 +1153,7 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) if (retValfmiPathLib != 0) { ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to"); ShowContinueError(state, "get the path to the binaries of instance"); - ShowContinueError(state, EnergyPlus::format("\"{}\" of FMU \"{}\".", fmuInst.Name, fmu.Name)); + ShowContinueError(state, std::format("\"{}\" of FMU \"{}\".", fmuInst.Name, fmu.Name)); ShowContinueError(state, "Check if binaries folder exists where the FMU has been unpacked."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1178,17 +1180,17 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) if (retValfmiVersion != 0) { ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to"); ShowContinueError(state, "load FMI functions library of instance"); - ShowContinueError(state, EnergyPlus::format("\"{}\" of FMU \"{}\".", fmuInst.Name, fmu.Name)); - ShowContinueError(state, EnergyPlus::format("\"{}\".", fmuInst.fmiVersionNumber)); + ShowContinueError(state, std::format("\"{}\" of FMU \"{}\".", fmuInst.Name, fmu.Name)); + ShowContinueError(state, std::format("\"{}\".", fmuInst.fmiVersionNumber)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } if (fmuInst.fmiVersionNumber.substr(0, 3) != "1.0") { ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when getting version"); - ShowContinueError(state, EnergyPlus::format("number of instance \"{}\"", fmuInst.Name)); - ShowContinueError(state, EnergyPlus::format("of FMU \"{}\".", fmu.Name)); - ShowContinueError(state, EnergyPlus::format("The version number found (\"{}\")", fmuInst.fmiVersionNumber.substr(0, 3))); + ShowContinueError(state, std::format("number of instance \"{}\"", fmuInst.Name)); + ShowContinueError(state, std::format("of FMU \"{}\".", fmu.Name)); + ShowContinueError(state, std::format("The version number found (\"{}\")", fmuInst.fmiVersionNumber.substr(0, 3))); ShowContinueError(state, "differs from version 1.0 which is currently supported."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1255,9 +1257,8 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) if (fmuInst.fmuInputVariable(k).ValueReference == -999) { ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to"); ShowContinueError(state, "get the value reference of FMU input variable"); - ShowContinueError(state, - EnergyPlus::format("\"{}\" of instance \"{}\" of FMU", fmuInst.fmuInputVariable(k).Name, fmuInst.Name)); - ShowContinueError(state, EnergyPlus::format("of FMU \"{}\". Please check the name of input variable", fmu.Name)); + ShowContinueError(state, std::format("\"{}\" of instance \"{}\" of FMU", fmuInst.fmuInputVariable(k).Name, fmuInst.Name)); + ShowContinueError(state, std::format("of FMU \"{}\". Please check the name of input variable", fmu.Name)); ShowContinueError(state, "in the input file and in the modelDescription file."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1266,9 +1267,8 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) if (fmuInst.fmuInputVariable(k).ValueReference == -1) { ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to"); ShowContinueError(state, "get the value reference of FMU input variable"); - ShowContinueError(state, - EnergyPlus::format("\"{}\" of instance \"{}\" of FMU", fmuInst.fmuInputVariable(k).Name, fmuInst.Name)); - ShowContinueError(state, EnergyPlus::format("\"{}\". This variable is not an FMU input variable.", fmu.Name)); + ShowContinueError(state, std::format("\"{}\" of instance \"{}\" of FMU", fmuInst.fmuInputVariable(k).Name, fmuInst.Name)); + ShowContinueError(state, std::format("\"{}\". This variable is not an FMU input variable.", fmu.Name)); ShowContinueError(state, "Please check the causality of the variable in the modelDescription file."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1294,8 +1294,7 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) } if (NumFMUInputVariables > 0 && fmuInst.NumInputVariablesInIDF == 0) { - ShowWarningError(state, - EnergyPlus::format("InitExternalInterfaceFMUImport: The instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowWarningError(state, std::format("InitExternalInterfaceFMUImport: The instance \"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); ShowContinueError(state, "is defined but has no input variables. Check the input field of the"); ShowContinueError(state, "corresponding object: ExternalInterface:FunctionalMockupUnitImport:From:Variable."); } @@ -1309,23 +1308,21 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) // check whether the number of input variables in fmu is bigger than in the idf if (fmuInst.NumInputVariablesInFMU > fmuInst.NumInputVariablesInIDF) { ShowWarningError(state, - EnergyPlus::format("InitExternalInterfaceFMUImport: The number of input variables defined in input file ({})", - fmuInst.NumInputVariablesInIDF)); + std::format("InitExternalInterfaceFMUImport: The number of input variables defined in input file ({})", + fmuInst.NumInputVariablesInIDF)); ShowContinueError( - state, - EnergyPlus::format("of instance \"{}\" of FMU \"{}\" is less than the number of input variables", fmuInst.Name, fmu.Name)); - ShowContinueError(state, EnergyPlus::format("in the modelDescription file ({}).", fmuInst.NumInputVariablesInFMU)); + state, std::format("of instance \"{}\" of FMU \"{}\" is less than the number of input variables", fmuInst.Name, fmu.Name)); + ShowContinueError(state, std::format("in the modelDescription file ({}).", fmuInst.NumInputVariablesInFMU)); ShowContinueError(state, "Check the input file and the modelDescription file again."); } // check whether the number of input variables in fmu is less than in the idf if (fmuInst.NumInputVariablesInFMU < fmuInst.NumInputVariablesInIDF) { ShowWarningError(state, - EnergyPlus::format("InitExternalInterfaceFMUImport: The number of input variables defined in input file ({})", - fmuInst.NumInputVariablesInIDF)); + std::format("InitExternalInterfaceFMUImport: The number of input variables defined in input file ({})", + fmuInst.NumInputVariablesInIDF)); ShowContinueError( - state, - EnergyPlus::format("of instance \"{}\" of FMU \"{}\" is bigger than the number of input variables", fmuInst.Name, fmu.Name)); - ShowContinueError(state, EnergyPlus::format("in the modelDescription file ({}).", fmuInst.NumInputVariablesInFMU)); + state, std::format("of instance \"{}\" of FMU \"{}\" is bigger than the number of input variables", fmuInst.Name, fmu.Name)); + ShowContinueError(state, std::format("in the modelDescription file ({}).", fmuInst.NumInputVariablesInFMU)); ShowContinueError(state, "Check the input file and the modelDescription file again."); } } @@ -1402,9 +1399,9 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to get the value reference of " "the FMU output variable"); - ShowContinueError( - state, EnergyPlus::format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableSchedule(k).Name, fmuInst.Name)); - ShowContinueError(state, EnergyPlus::format("of FMU \"{}\" that will be mapped to a schedule.", fmu.Name)); + ShowContinueError(state, + std::format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableSchedule(k).Name, fmuInst.Name)); + ShowContinueError(state, std::format("of FMU \"{}\" that will be mapped to a schedule.", fmu.Name)); ShowContinueError(state, "Please check the name of output variables in the input file and"); ShowContinueError(state, "in the modelDescription file."); state.dataExternalInterface->ErrorsFound = true; @@ -1415,9 +1412,9 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to get the value reference of " "the FMU output variable"); - ShowContinueError( - state, EnergyPlus::format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableSchedule(k).Name, fmuInst.Name)); - ShowContinueError(state, EnergyPlus::format("of FMU \"{}\" that will be mapped to a schedule.", fmu.Name)); + ShowContinueError(state, + std::format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableSchedule(k).Name, fmuInst.Name)); + ShowContinueError(state, std::format("of FMU \"{}\" that will be mapped to a schedule.", fmu.Name)); ShowContinueError(state, "This variable is not an FMU output variable."); ShowContinueError(state, "Please check the causality of the variable in the modelDescription file."); state.dataExternalInterface->ErrorsFound = true; @@ -1428,8 +1425,8 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) fmuInst.NumOutputVariablesSchedule = k; if (fmuInst.eplusInputVariableSchedule(k).VarIndex <= 0) { ShowSevereError(state, - EnergyPlus::format("ExternalInterface/InitExternalInterfaceFMUImport:declares variable \"{}\",", - fmuInst.eplusInputVariableSchedule(k).Name)); + std::format("ExternalInterface/InitExternalInterfaceFMUImport:declares variable \"{}\",", + fmuInst.eplusInputVariableSchedule(k).Name)); ShowContinueError(state, "but variable is not a schedule variable."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1505,9 +1502,9 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to get the value reference of " "the FMU output variable"); - ShowContinueError( - state, EnergyPlus::format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableVariable(k).Name, fmuInst.Name)); - ShowContinueError(state, EnergyPlus::format("of FMU \"{}\" that will be mapped to a variable.", fmu.Name)); + ShowContinueError(state, + std::format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableVariable(k).Name, fmuInst.Name)); + ShowContinueError(state, std::format("of FMU \"{}\" that will be mapped to a variable.", fmu.Name)); ShowContinueError(state, "Please check the name of output variables in the input file and in the modelDescription file."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1517,9 +1514,9 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to get the value reference of " "the FMU output variable"); - ShowContinueError( - state, EnergyPlus::format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableVariable(k).Name, fmuInst.Name)); - ShowContinueError(state, EnergyPlus::format("of FMU \"{}\" that will be mapped to a variable.", fmu.Name)); + ShowContinueError(state, + std::format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableVariable(k).Name, fmuInst.Name)); + ShowContinueError(state, std::format("of FMU \"{}\" that will be mapped to a variable.", fmu.Name)); ShowContinueError(state, "This variable is not an FMU output variable. Please check the causality of the variable in the " "modelDescription file."); @@ -1532,8 +1529,8 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) fmuInst.NumOutputVariablesVariable = k; if (fmuInst.eplusInputVariableVariable(k).VarIndex <= 0) { ShowSevereError(state, - EnergyPlus::format("ExternalInterface/InitExternalInterfaceFMUImport:declares variable \"{}\",", - fmuInst.eplusInputVariableVariable(k).Name)); + std::format("ExternalInterface/InitExternalInterfaceFMUImport:declares variable \"{}\",", + fmuInst.eplusInputVariableVariable(k).Name)); ShowContinueError(state, "but variable is not an EMS variable."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1612,9 +1609,9 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to get the value reference of " "the FMU output variable"); - ShowContinueError( - state, EnergyPlus::format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableActuator(k).Name, fmuInst.Name)); - ShowContinueError(state, EnergyPlus::format("of FMU \"{}\" that will be mapped to an actuator.", fmu.Name)); + ShowContinueError(state, + std::format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableActuator(k).Name, fmuInst.Name)); + ShowContinueError(state, std::format("of FMU \"{}\" that will be mapped to an actuator.", fmu.Name)); ShowContinueError(state, "Please check the name of output variables in the input file and in the modelDescription file."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1624,9 +1621,9 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) ShowSevereError(state, "ExternalInterface/InitExternalInterfaceFMUImport: Error when trying to get the value reference of " "the FMU output variable"); - ShowContinueError( - state, EnergyPlus::format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableActuator(k).Name, fmuInst.Name)); - ShowContinueError(state, EnergyPlus::format("of FMU \"{}\" that will be mapped to an actuator.", fmu.Name)); + ShowContinueError(state, + std::format("\"{}\" of instance \"{}\"", fmuInst.fmuOutputVariableActuator(k).Name, fmuInst.Name)); + ShowContinueError(state, std::format("of FMU \"{}\" that will be mapped to an actuator.", fmu.Name)); ShowContinueError(state, "This variable is not an FMU output variable. Please check the causality of the variable in the " "modelDescription file."); @@ -1639,8 +1636,8 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) fmuInst.NumOutputVariablesActuator = k; if (fmuInst.eplusInputVariableActuator(k).VarIndex <= 0) { ShowSevereError(state, - EnergyPlus::format("ExternalInterface/InitExternalInterfaceFMUImport:declares variable \"{}\",", - fmuInst.eplusInputVariableActuator(k).Name)); + std::format("ExternalInterface/InitExternalInterfaceFMUImport:declares variable \"{}\",", + fmuInst.eplusInputVariableActuator(k).Name)); ShowContinueError(state, "but variable is not an EMS variable."); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -1665,33 +1662,31 @@ void InitExternalInterfaceFMUImport(EnergyPlusData &state) // check whether the number of output variables in fmu is bigger than in the idf if (fmuInst.NumOutputVariablesInFMU > fmuInst.NumOutputVariablesInIDF) { ShowWarningError(state, - EnergyPlus::format("InitExternalInterfaceFMUImport: The number of output variables defined in input file ({})", - fmuInst.NumOutputVariablesInIDF)); + std::format("InitExternalInterfaceFMUImport: The number of output variables defined in input file ({})", + fmuInst.NumOutputVariablesInIDF)); ShowContinueError( - state, - EnergyPlus::format("of instance \"{}\" of FMU \"{}\" is less than the number of output variables", fmuInst.Name, fmu.Name)); - ShowContinueError(state, EnergyPlus::format("in the modelDescription file ({}).", fmuInst.NumOutputVariablesInFMU)); + state, std::format("of instance \"{}\" of FMU \"{}\" is less than the number of output variables", fmuInst.Name, fmu.Name)); + ShowContinueError(state, std::format("in the modelDescription file ({}).", fmuInst.NumOutputVariablesInFMU)); ShowContinueError(state, "Check the input file and the modelDescription file again."); } // check whether the number of output variables in fmu is less than in the idf if (fmuInst.NumOutputVariablesInFMU < fmuInst.NumOutputVariablesInIDF) { ShowWarningError(state, - EnergyPlus::format("InitExternalInterfaceFMUImport: The number of output variables defined in input file ({})", - fmuInst.NumOutputVariablesInIDF)); + std::format("InitExternalInterfaceFMUImport: The number of output variables defined in input file ({})", + fmuInst.NumOutputVariablesInIDF)); ShowContinueError( - state, - EnergyPlus::format("of instance \"{}\" of FMU \"{}\" is bigger than the number of output variables", fmuInst.Name, fmu.Name)); - ShowContinueError(state, EnergyPlus::format("in the modelDescription file ({}).", fmuInst.NumOutputVariablesInFMU)); + state, std::format("of instance \"{}\" of FMU \"{}\" is bigger than the number of output variables", fmuInst.Name, fmu.Name)); + ShowContinueError(state, std::format("in the modelDescription file ({}).", fmuInst.NumOutputVariablesInFMU)); ShowContinueError(state, "Check the input file and the modelDescription file again."); } DisplayString( state, - EnergyPlus::format( + std::format( "Number of inputs in instance \"{}\" of FMU \"{}\" = \"{}\".", fmuInst.Name, fmu.Name, fmuInst.NumInputVariablesInIDF)); DisplayString( state, - EnergyPlus::format( + std::format( "Number of outputs in instance \"{}\" of FMU \"{}\" = \"{}\".", fmuInst.Name, fmu.Name, fmuInst.NumOutputVariablesInIDF)); } } @@ -1948,7 +1943,7 @@ void CalcExternalInterfaceFMUImport(EnergyPlusData &state) if (fmuInst.fmistatus != fmiOK) { ShowSevereError( state, - EnergyPlus::format( + std::format( "ExternalInterface/CalcExternalInterfaceFMUImport: Error when trying to set an input value in instance \"{}\"", fmuInst.Name)); ShowContinueError(state, EnergyPlus::format("of FMU \"{}\"; Error Code = \"{}\"", fmu.Name, fmuInst.fmistatus)); @@ -2009,7 +2004,7 @@ void CalcExternalInterfaceFMUImport(EnergyPlusData &state) if (fmuInst.fmistatus != fmiOK) { ShowSevereError(state, "ExternalInterface/CalcExternalInterfaceFMUImport: "); ShowContinueError(state, "Error when trying to set inputs in instance"); - ShowContinueError(state, EnergyPlus::format("\"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); + ShowContinueError(state, std::format("\"{}\" of FMU \"{}\"", fmuInst.Name, fmu.Name)); ShowContinueError(state, EnergyPlus::format("Error Code = \"{}\"", fmuInst.fmistatus)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); @@ -2147,9 +2142,9 @@ void CalcExternalInterface(EnergyPlusData &state) // Socket asked to terminate simulation, but simulation continues if (state.dataExternalInterface->noMoreValues && state.dataExternalInterface->showContinuationWithoutUpdate) { if (state.dataExternalInterface->haveExternalInterfaceBCVTB) { - ShowWarningError(state, - EnergyPlus::format("ExternalInterface: Continue simulation without updated values from server at t ={:.2T} hours", - preSimTim / 3600.0)); + ShowWarningError( + state, + std::format("ExternalInterface: Continue simulation without updated values from server at t ={:.2f} hours", preSimTim / 3600.0)); } state.dataExternalInterface->showContinuationWithoutUpdate = false; } @@ -2208,10 +2203,10 @@ void CalcExternalInterface(EnergyPlusData &state) if (retVal != 0) { continueSimulation = false; ShowSevereError(state, - EnergyPlus::format("ExternalInterface: Socket communication received error value \"{:2}\" at time = {:.2T} hours.", - retVal, - preSimTim / 3600)); - ShowContinueError(state, EnergyPlus::format("ExternalInterface: Flag from server \"{:2}\".", flaRea)); + std::format("ExternalInterface: Socket communication received error value \"{:2}\" at time = {:.2f} hours.", + retVal, + preSimTim / 3600)); + ShowContinueError(state, std::format("ExternalInterface: Flag from server \"{:2}\".", flaRea)); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -2223,8 +2218,7 @@ void CalcExternalInterface(EnergyPlusData &state) // Added a check since the FMUExport is terminated with the flaRea set to 1. state.dataExternalInterface->noMoreValues = true; if (state.dataExternalInterface->haveExternalInterfaceBCVTB) { - ShowSevereError(state, - EnergyPlus::format("ExternalInterface: Received end of simulation flag at time = {:.2T} hours.", preSimTim / 3600)); + ShowSevereError(state, std::format("ExternalInterface: Received end of simulation flag at time = {:.2f} hours.", preSimTim / 3600)); StopExternalInterfaceIfError(state); } } @@ -2233,9 +2227,9 @@ void CalcExternalInterface(EnergyPlusData &state) if ((flaRea == 0) && (!state.dataExternalInterface->ErrorsFound) && continueSimulation && (nDblRea != isize(state.dataExternalInterface->varInd))) { ShowSevereError(state, - EnergyPlus::format("ExternalInterface: Received \"{}\" double values, expected \"{}\".", - nDblRea, - size(state.dataExternalInterface->varInd))); + std::format("ExternalInterface: Received \"{}\" double values, expected \"{}\".", + nDblRea, + size(state.dataExternalInterface->varInd))); state.dataExternalInterface->ErrorsFound = true; StopExternalInterfaceIfError(state); } @@ -2250,7 +2244,7 @@ void CalcExternalInterface(EnergyPlusData &state) RuntimeLanguageProcessor::ExternalInterfaceSetErlVariable(state, state.dataExternalInterface->varInd(i), dblValRea(i)); } else { ShowContinueError(state, "ExternalInterface: Error in finding the type of the input variable for EnergyPlus"); - ShowContinueError(state, EnergyPlus::format("variable index: {}. Variable will not be updated.", i)); + ShowContinueError(state, std::format("variable index: {}. Variable will not be updated.", i)); } } } @@ -2312,8 +2306,7 @@ void GetReportVariableKey( } if ((varType == OutputProcessor::VariableType::Invalid) || (iKey > numKeys)) { ShowSevereError( - state, - EnergyPlus::format("ExternalInterface: Simulation model has no variable \"{}\" with key \"{}\".", VarNames(Loop), varKeys(Loop))); + state, std::format("ExternalInterface: Simulation model has no variable \"{}\" with key \"{}\".", VarNames(Loop), varKeys(Loop))); state.dataExternalInterface->ErrorsFound = true; } } @@ -2331,7 +2324,7 @@ void WarnIfExternalInterfaceObjectsAreUsed(EnergyPlusData &state, std::string co int const NumObjects = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, ObjectWord); if (NumObjects > 0) { - ShowWarningError(state, EnergyPlus::format("IDF file contains object \"{}\",", ObjectWord)); + ShowWarningError(state, std::format("IDF file contains object \"{}\",", ObjectWord)); ShowContinueError(state, "but object \"ExternalInterface\" with appropriate key entry is not specified. Values will not be updated."); } } @@ -2369,10 +2362,10 @@ void VerifyExternalInterfaceObject(EnergyPlusData &state) (!Util::SameString(state.dataIPShortCut->cAlphaArgs(1), "FunctionalMockupUnitImport")) && (!Util::SameString(state.dataIPShortCut->cAlphaArgs(1), "FunctionalMockupUnitExport"))) { ShowSevereError(state, - EnergyPlus::format("VerifyExternalInterfaceObject: {}, invalid {}=\"{}\".", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + std::format("VerifyExternalInterfaceObject: {}, invalid {}=\"{}\".", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(1), + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "only \"PtolemyServer or FunctionalMockupUnitImport or FunctionalMockupUnitExport\" allowed."); state.dataExternalInterface->ErrorsFound = true; } diff --git a/src/EnergyPlus/FanCoilUnits.cc b/src/EnergyPlus/FanCoilUnits.cc index a651d1dff4e..0e60c5bda36 100644 --- a/src/EnergyPlus/FanCoilUnits.cc +++ b/src/EnergyPlus/FanCoilUnits.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -304,8 +305,8 @@ namespace FanCoilUnits { if (fanCoil.LowSpeedRatio > fanCoil.MedSpeedRatio) { ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); ShowContinueError(state, EnergyPlus::format("... {} is greater than the medium speed supply air flow ratio.", cNumericFields(2))); - ShowContinueError(state, EnergyPlus::format("... Fan Coil Unit low speed supply air flow ratio = {:.5T} ", fanCoil.LowSpeedRatio)); - ShowContinueError(state, EnergyPlus::format("... Fan Coit Unit medium speed supply air flow ratio = {:.5T} ", fanCoil.MedSpeedRatio)); + ShowContinueError(state, EnergyPlus::format("... Fan Coil Unit low speed supply air flow ratio = {:.5f} ", fanCoil.LowSpeedRatio)); + ShowContinueError(state, EnergyPlus::format("... Fan Coit Unit medium speed supply air flow ratio = {:.5f} ", fanCoil.MedSpeedRatio)); ShowContinueError(state, "... Fan Coil Unit low speed supply air flow ratio and medium speed supply air flow ratio set to default values"); fanCoil.LowSpeedRatio = 1.0 / 3.0; @@ -448,7 +449,7 @@ namespace FanCoilUnits { // mine the hot water node from the coil object int coilIndex = WaterCoils::GetWaterCoilIndex(state, fanCoil.HCoilType, fanCoil.HCoilName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, std::format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); ErrorsFound = true; } else { fanCoil.HeatCoilFluidInletNode = state.dataWaterCoils->WaterCoil(coilIndex).WaterInletNodeNum; @@ -461,13 +462,13 @@ namespace FanCoilUnits { IsNotOK = false; ValidateComponent(state, fanCoil.HCoilType, fanCoil.HCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, std::format("...specified in {}=\"{}\".", CurrentModuleObject, fanCoil.Name)); ErrorsFound = true; } else { int coilIndex; HeatingCoils::GetCoilIndex(state, fanCoil.HCoilName, coilIndex, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, fanCoil.Name)); ErrorsFound = true; } else { fanCoil.DesignHeatingCapacity = state.dataHeatingCoils->HeatingCoil(coilIndex).NominalCapacity; @@ -476,8 +477,8 @@ namespace FanCoilUnits { } } } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, EnergyPlus::format("illegal value: {}=\"{}\".", cAlphaFields(13), Alphas(13))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, std::format("illegal value: {}=\"{}\".", cAlphaFields(13), Alphas(13))); ErrorsFound = true; } @@ -491,8 +492,8 @@ namespace FanCoilUnits { if (!lAlphaBlanks(16)) { fanCoil.HVACSizingIndex = Util::FindItemInList(Alphas(16), state.dataSize->ZoneHVACSizing); if (fanCoil.HVACSizingIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(16), Alphas(16))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", state.dataFanCoilUnits->cMO_FanCoil, fanCoil.Name)); + ShowSevereError(state, std::format("{} = {} not found.", cAlphaFields(16), Alphas(16))); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataFanCoilUnits->cMO_FanCoil, fanCoil.Name)); ErrorsFound = true; } } @@ -515,10 +516,10 @@ namespace FanCoilUnits { if (fanCoil.fanType != fan->type) { ShowSevereCustom(state, eoh, - EnergyPlus::format("{} was specified as having type {}, but has type {}", - fanCoil.FanName, - HVAC::fanTypeNamesUC[(int)fanCoil.fanType], - HVAC::fanTypeNamesUC[(int)fan->type])); + std::format("{} was specified as having type {}, but has type {}", + fanCoil.FanName, + HVAC::fanTypeNamesUC[(int)fanCoil.fanType], + HVAC::fanTypeNamesUC[(int)fan->type])); ErrorsFound = true; } @@ -526,11 +527,11 @@ namespace FanCoilUnits { fanCoil.FanAirVolFlow = fan->maxAirFlowRate; if (fanCoil.MaxAirVolFlow > fanCoil.FanAirVolFlow && fanCoil.FanAirVolFlow != DataSizing::AutoSize) { - ShowWarningError(state, EnergyPlus::format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); - ShowContinueError(state, EnergyPlus::format("... {} is greater than the maximum fan flow rate.", cNumericFields(1))); - ShowContinueError(state, EnergyPlus::format("... Fan Coil Unit flow = {:.5T} m3/s.", fanCoil.MaxAirVolFlow)); - ShowContinueError(state, EnergyPlus::format("... Fan = {}: {}", HVAC::fanTypeNames[(int)fanCoil.fanType], fanCoil.FanName)); - ShowContinueError(state, EnergyPlus::format("... Fan flow = {:.5T} m3/s.", fanCoil.FanAirVolFlow)); + ShowWarningError(state, std::format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); + ShowContinueError(state, std::format("... {} is greater than the maximum fan flow rate.", cNumericFields(1))); + ShowContinueError(state, std::format("... Fan Coil Unit flow = {:.5f} m3/s.", fanCoil.MaxAirVolFlow)); + ShowContinueError(state, std::format("... Fan = {}: {}", HVAC::fanTypeNames[(int)fanCoil.fanType], fanCoil.FanName)); + ShowContinueError(state, std::format("... Fan flow = {:.5f} m3/s.", fanCoil.FanAirVolFlow)); ShowContinueError(state, "... Fan Coil Unit flow rate reduced to match the fan flow rate and the simulation continues."); fanCoil.MaxAirVolFlow = fanCoil.FanAirVolFlow; } @@ -544,13 +545,12 @@ namespace FanCoilUnits { (fanCoil.CapCtrlMeth_Num == CCM::CycFan && fanCoil.fanType != HVAC::FanType::OnOff) || (fanCoil.CapCtrlMeth_Num == CCM::VarFanVarFlow && fanCoil.fanType != HVAC::FanType::VAV) || (fanCoil.CapCtrlMeth_Num == CCM::VarFanConsFlow && fanCoil.fanType != HVAC::FanType::VAV)) { - ShowSevereError(state, EnergyPlus::format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); - ShowContinueError( - state, - EnergyPlus::format("...the fan type of the object : {} does not match with the capacity control method selected : " - "{} please see I/O reference", - fanCoil.FanName, - capCtrlMeth)); + ShowSevereError(state, std::format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); + ShowContinueError(state, + std::format("...the fan type of the object : {} does not match with the capacity control method selected : " + "{} please see I/O reference", + fanCoil.FanName, + capCtrlMeth)); ShowContinueError(state, "...for ConstantFanVariableFlow a Fan:OnOff or Fan:ConstantVolume is valid."); ShowContinueError(state, "...for CyclingFan a Fan:OnOff is valid."); ShowContinueError(state, "...for VariableFanVariableFlow or VariableFanConstantFlow a Fan:VariableVolume is valid."); @@ -561,13 +561,13 @@ namespace FanCoilUnits { if (fanCoil.CapCtrlMeth_Num == CCM::VarFanVarFlow || fanCoil.CapCtrlMeth_Num == CCM::VarFanConsFlow || fanCoil.CapCtrlMeth_Num == CCM::ASHRAE) { // then expect continuous speed control fan if (dynamic_cast(state.dataFans->fans(fanCoil.FanIndex))->speedControl != Fans::SpeedControl::Continuous) { - ShowSevereError(state, EnergyPlus::format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); + ShowSevereError(state, std::format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); ShowContinueError( state, - EnergyPlus::format("...the fan type of the object : {} does not match with the capacity control method selected : " - "{} please see I/O reference", - fanCoil.FanName, - capCtrlMeth)); + std::format("...the fan type of the object : {} does not match with the capacity control method selected : " + "{} please see I/O reference", + fanCoil.FanName, + capCtrlMeth)); ShowContinueError( state, "...for VariableFanVariableFlow or VariableFanConstantFlow a Fan:SystemModel should have Continuous speed control."); @@ -580,13 +580,12 @@ namespace FanCoilUnits { // check low speed fan ratio when using ASHRAE90.1 capacity control method if (fanCoil.CapCtrlMeth_Num == CCM::ASHRAE) { if (fanCoil.LowSpeedRatio > 0.5) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, EnergyPlus::format("... {} is greater than the 50% of the supply air flow ratio.", cNumericFields(2))); - ShowContinueError(state, - EnergyPlus::format("... Fan Coil Unit low speed supply air flow ratio = {:.5T} ", fanCoil.LowSpeedRatio)); + ShowWarningError(state, std::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, std::format("... {} is greater than the 50% of the supply air flow ratio.", cNumericFields(2))); + ShowContinueError(state, std::format("... Fan Coil Unit low speed supply air flow ratio = {:.5f} ", fanCoil.LowSpeedRatio)); } else if (fanCoil.LowSpeedRatio == 0.0) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, EnergyPlus::format("... {} is equal to 0.", cNumericFields(2))); + ShowWarningError(state, std::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, std::format("... {} is equal to 0.", cNumericFields(2))); ShowContinueError(state, "... Fan Coil Unit low speed supply air flow ratio should be greater than 0 to comply with ASHRAE90.1."); ShowContinueError(state, "... Fan Coil Unit low speed supply air flow ratio set to 0.5"); fanCoil.LowSpeedRatio = 0.5; @@ -628,20 +627,19 @@ namespace FanCoilUnits { // check that fan coil doesn' have local outside air if (!lAlphaBlanks(8)) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\". Fan coil unit has local as well as central outdoor air specified", - CurrentModuleObject, - fanCoil.Name)); + std::format("{} = \"{}\". Fan coil unit has local as well as central outdoor air specified", + CurrentModuleObject, + fanCoil.Name)); } // check that the air terminal mixer out node is the fan coil inlet node if (fanCoil.AirInNode != state.dataFanCoilUnits->ATMixerOutNode) { - ShowSevereError(state, - EnergyPlus::format( - "{} = \"{}\". Fan coil unit air inlet node name must be the same as an air terminal mixer outlet node name.", - CurrentModuleObject, - fanCoil.Name)); + ShowSevereError( + state, + std::format("{} = \"{}\". Fan coil unit air inlet node name must be the same as an air terminal mixer outlet node name.", + CurrentModuleObject, + fanCoil.Name)); ShowContinueError(state, "..Air terminal mixer outlet node name is specified in AirTerminal:SingleDuct:InletSideMixer object."); - ShowContinueError(state, - EnergyPlus::format("..Fan coil unit air inlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirInNode))); + ShowContinueError(state, std::format("..Fan coil unit air inlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirInNode))); ErrorsFound = true; } // check for supply side air terminal mixer @@ -657,22 +655,22 @@ namespace FanCoilUnits { // check that fan coil doesn' have local outside air if (!lAlphaBlanks(8)) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\". Fan coil unit has local as well as central outdoor air specified", - CurrentModuleObject, - fanCoil.Name)); + std::format("{} = \"{}\". Fan coil unit has local as well as central outdoor air specified", + CurrentModuleObject, + fanCoil.Name)); } // check that the air terminal mixer secondary air inlet node is the fan coil outlet node if (fanCoil.AirOutNode != state.dataFanCoilUnits->ATMixerSecNode) { ShowSevereError( state, - EnergyPlus::format("{} = \"{}\". Fan coil unit air outlet node name must be the same as the air terminal mixer secondary air " - "inlet node name.", - CurrentModuleObject, - fanCoil.Name)); + std::format("{} = \"{}\". Fan coil unit air outlet node name must be the same as the air terminal mixer secondary air " + "inlet node name.", + CurrentModuleObject, + fanCoil.Name)); ShowContinueError( state, "..Air terminal mixer secondary inlet node name is specified in AirTerminal:SingleDuct:SupplySideMixer object."); - ShowContinueError( - state, EnergyPlus::format("..Fan coil unit air outlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirOutNode))); + ShowContinueError(state, + std::format("..Fan coil unit air outlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirOutNode))); ErrorsFound = true; } bool ZoneNodeNotFound = true; @@ -691,14 +689,13 @@ namespace FanCoilUnits { state.dataZoneEquip->ZoneEquipConfig(fanCoil.ControlZoneNum).ReturnNode); } if (!InletNodeFound) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, fanCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, fanCoil.Name)); ShowContinueError(state, "..FanCoil inlet node name must be the same as either a zone exhaust node name or an induced " "air node in ZonePlenum."); ShowContinueError(state, "..Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object."); ShowContinueError(state, "..Induced Air Outlet Node name is specified in AirLoopHVAC:ReturnPlenum object."); - ShowContinueError(state, - EnergyPlus::format("..FanCoil inlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirInNode))); + ShowContinueError(state, std::format("..FanCoil inlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirInNode))); ErrorsFound = true; } } @@ -722,14 +719,14 @@ namespace FanCoilUnits { if (!InletNodeFound) { ShowSevereError( state, - EnergyPlus::format("{} = \"{}\". Fan coil unit air inlet node name must be the same either as a zone exhaust node name " - "or an induce air node in ZoePlenum.", - CurrentModuleObject, - fanCoil.Name)); + std::format("{} = \"{}\". Fan coil unit air inlet node name must be the same either as a zone exhaust node name " + "or an induce air node in ZoePlenum.", + CurrentModuleObject, + fanCoil.Name)); ShowContinueError(state, "..Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object."); ShowContinueError(state, "..Induced Air Outlet Node name is specified in AirLoopHVAC:ReturnPlenum object."); - ShowContinueError( - state, EnergyPlus::format("..Fan coil unit air inlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirInNode))); + ShowContinueError(state, + std::format("..Fan coil unit air inlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirInNode))); ErrorsFound = true; } } @@ -742,12 +739,12 @@ namespace FanCoilUnits { if (state.dataFanCoilUnits->ZoneInNodeNotFound) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\". Fan coil unit air outlet node name must be the same as a zone inlet node name.", - CurrentModuleObject, - fanCoil.Name)); + std::format("{} = \"{}\". Fan coil unit air outlet node name must be the same as a zone inlet node name.", + CurrentModuleObject, + fanCoil.Name)); ShowContinueError(state, "..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object."); - ShowContinueError( - state, EnergyPlus::format("..Fan coil unit air outlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirOutNode))); + ShowContinueError(state, + std::format("..Fan coil unit air outlet node name = {}", state.dataLoopNodes->NodeID(fanCoil.AirOutNode))); ErrorsFound = true; } @@ -756,9 +753,9 @@ namespace FanCoilUnits { if (!lAlphaBlanks(17)) { fanCoil.fanOpModeSched = Sched::GetSchedule(state, Alphas(17)); if (fanCoil.fanType != HVAC::FanType::OnOff && fanCoil.fanType != HVAC::FanType::SystemModel) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, EnergyPlus::format("For {} = {}", cAlphaFields(17), Alphas(17))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(9), Alphas(9))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, std::format("For {} = {}", cAlphaFields(17), Alphas(17))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(9), Alphas(9))); ShowContinueError(state, "...fan operating schedule is allowed for on off or system model fan type only )"); ErrorsFound = true; } else if (fanCoil.fanOpModeSched == nullptr) { @@ -773,8 +770,8 @@ namespace FanCoilUnits { if (!lNumericBlanks(11)) { fanCoil.DesignMinOutletTemp = Numbers(11); if (lNumericBlanks(12)) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, EnergyPlus::format("... {} and {} must be used in unison.", cNumericFields(11), cNumericFields(12))); + ShowWarningError(state, std::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, std::format("... {} and {} must be used in unison.", cNumericFields(11), cNumericFields(12))); ErrorsFound = true; } } @@ -783,16 +780,16 @@ namespace FanCoilUnits { fanCoil.DesignMaxOutletTemp = Numbers(12); if (fanCoil.DesignMinOutletTemp != DataSizing::AutoSize && fanCoil.DesignMaxOutletTemp != DataSizing::AutoSize) { if (fanCoil.DesignMaxOutletTemp < fanCoil.DesignMinOutletTemp) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, EnergyPlus::format("... {} is greater than {}.", cNumericFields(11), cNumericFields(12))); - ShowContinueError(state, EnergyPlus::format("... {} = {:.2T} [C].", cNumericFields(11), fanCoil.DesignMinOutletTemp)); - ShowContinueError(state, EnergyPlus::format("... {} = {:.2T} [C].", cNumericFields(12), fanCoil.DesignMaxOutletTemp)); + ShowWarningError(state, std::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, std::format("... {} is greater than {}.", cNumericFields(11), cNumericFields(12))); + ShowContinueError(state, std::format("... {} = {:.2f} [C].", cNumericFields(11), fanCoil.DesignMinOutletTemp)); + ShowContinueError(state, std::format("... {} = {:.2f} [C].", cNumericFields(12), fanCoil.DesignMaxOutletTemp)); ErrorsFound = true; } } if (lNumericBlanks(11)) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); - ShowContinueError(state, EnergyPlus::format("... {} and {} must be used in unison.", cNumericFields(11), cNumericFields(12))); + ShowWarningError(state, std::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, fanCoil.Name)); + ShowContinueError(state, std::format("... {} and {} must be used in unison.", cNumericFields(11), cNumericFields(12))); ErrorsFound = true; } } @@ -853,7 +850,7 @@ namespace FanCoilUnits { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } for (auto &fanCoil : state.dataFanCoilUnits->FanCoil) { @@ -1030,7 +1027,7 @@ namespace FanCoilUnits { state, fanCoil.HCoilName, fanCoil.HCoilPlantTypeOf, fanCoil.HeatCoilPlantLoc, errFlag, _, _, _, _, _); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Reference Unit=\"{}\", type={}", fanCoil.Name, fanCoil.UnitType)); + ShowContinueError(state, std::format("Reference Unit=\"{}\", type={}", fanCoil.Name, fanCoil.UnitType)); ShowFatalError(state, "InitFanCoilUnits: Program terminated for previous conditions."); } @@ -1039,8 +1036,7 @@ namespace FanCoilUnits { } else if (fanCoil.heatCoilType == HVAC::CoilType::HeatingElectric) { // do nothing, valid type } else { - ShowFatalError(state, - EnergyPlus::format("InitFanCoilUnits: FanCoil={}, invalid heating coil type. Program terminated.", fanCoil.Name)); + ShowFatalError(state, std::format("InitFanCoilUnits: FanCoil={}, invalid heating coil type. Program terminated.", fanCoil.Name)); } if ((fanCoil.CCoilPlantType == DataPlant::PlantEquipmentType::CoilWaterCooling) || @@ -1048,13 +1044,12 @@ namespace FanCoilUnits { PlantUtilities::ScanPlantLoopsForObject( state, fanCoil.CCoilPlantName, fanCoil.CCoilPlantType, fanCoil.CoolCoilPlantLoc, errFlag, _, _, _, _, _); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Reference Unit=\"{}\", type={}", fanCoil.Name, fanCoil.UnitType)); + ShowContinueError(state, std::format("Reference Unit=\"{}\", type={}", fanCoil.Name, fanCoil.UnitType)); ShowFatalError(state, "InitFanCoilUnits: Program terminated for previous conditions."); } fanCoil.CoolCoilFluidOutletNodeNum = DataPlant::CompData::getPlantComponent(state, fanCoil.CoolCoilPlantLoc).NodeNumOut; } else { - ShowFatalError(state, - EnergyPlus::format("InitFanCoilUnits: FanCoil={}, invalid cooling coil type. Program terminated.", fanCoil.Name)); + ShowFatalError(state, std::format("InitFanCoilUnits: FanCoil={}, invalid cooling coil type. Program terminated.", fanCoil.Name)); } state.dataFanCoilUnits->MyPlantScanFlag(FanCoilNum) = false; @@ -1067,11 +1062,10 @@ namespace FanCoilUnits { state, state.dataFanCoilUnits->FanCoil(Loop).UnitType, state.dataFanCoilUnits->FanCoil(Loop).Name)) { continue; } - ShowSevereError( - state, - EnergyPlus::format("InitFanCoil: FanCoil Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - state.dataFanCoilUnits->FanCoil(Loop).UnitType, - state.dataFanCoilUnits->FanCoil(Loop).Name)); + ShowSevereError(state, + std::format("InitFanCoil: FanCoil Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + state.dataFanCoilUnits->FanCoil(Loop).UnitType, + state.dataFanCoilUnits->FanCoil(Loop).Name)); } } @@ -1413,11 +1407,11 @@ namespace FanCoilUnits { } // Check that the fan volumetric flow rate is greater than or equal to the FCU volumetric flow rate if (MaxAirVolFlowDes > fanCoil.FanAirVolFlow) { - ShowWarningError(state, EnergyPlus::format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); + ShowWarningError(state, std::format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); ShowContinueError(state, "... Maximum supply air flow rate is greater than the maximum fan flow rate."); - ShowContinueError(state, EnergyPlus::format("... Fan Coil Unit flow = {:.5T} [m3/s].", MaxAirVolFlowDes)); - ShowContinueError(state, EnergyPlus::format("... Fan = {}: {}", HVAC::fanTypeNames[(int)fanCoil.fanType], fanCoil.FanName)); - ShowContinueError(state, EnergyPlus::format("... Fan flow = {:.5T} [m3/s].", fanCoil.FanAirVolFlow)); + ShowContinueError(state, std::format("... Fan Coil Unit flow = {:.5f} [m3/s].", MaxAirVolFlowDes)); + ShowContinueError(state, std::format("... Fan = {}: {}", HVAC::fanTypeNames[(int)fanCoil.fanType], fanCoil.FanName)); + ShowContinueError(state, std::format("... Fan flow = {:.5f} [m3/s].", fanCoil.FanAirVolFlow)); ShowContinueError(state, "... Fan Coil Unit flow rate reduced to match the fan flow rate and the simulation continues."); MaxAirVolFlowDes = fanCoil.FanAirVolFlow; } @@ -1429,9 +1423,9 @@ namespace FanCoilUnits { MaxAirVolFlowUser = fanCoil.MaxAirVolFlow; if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxAirVolFlowDes - MaxAirVolFlowUser) / MaxAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeFanCoilUnit: Potential issue with equipment sizing for {} {}", fanCoil.UnitType, fanCoil.Name)); + ShowMessage( + state, + std::format("SizeFanCoilUnit: Potential issue with equipment sizing for {} {}", fanCoil.UnitType, fanCoil.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Supply Air Maximum Flow Rate of {:.5R} [m3/s]", MaxAirVolFlowUser)); ShowContinueError( @@ -1450,11 +1444,11 @@ namespace FanCoilUnits { // Check that the fan volumetric flow rate is greater than or equal to the FCU volumetric flow rate if (fanCoil.MaxAirVolFlow > fanCoil.FanAirVolFlow) { - ShowWarningError(state, EnergyPlus::format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); + ShowWarningError(state, std::format("{}{}: {}", RoutineName, fanCoil.UnitType, fanCoil.Name)); ShowContinueError(state, "... Maximum supply air flow rate is greater than the maximum fan flow rate."); - ShowContinueError(state, EnergyPlus::format("... Fan Coil Unit flow = {:.5T} m3/s.", fanCoil.MaxAirVolFlow)); - ShowContinueError(state, EnergyPlus::format("... Fan = {}: {}", HVAC::fanTypeNames[(int)fanCoil.fanType], fanCoil.FanName)); - ShowContinueError(state, EnergyPlus::format("... Fan flow = {:.5T} m3/s.", fanCoil.FanAirVolFlow)); + ShowContinueError(state, std::format("... Fan Coil Unit flow = {:.5f} m3/s.", fanCoil.MaxAirVolFlow)); + ShowContinueError(state, std::format("... Fan = {}: {}", HVAC::fanTypeNames[(int)fanCoil.fanType], fanCoil.FanName)); + ShowContinueError(state, std::format("... Fan flow = {:.5f} m3/s.", fanCoil.FanAirVolFlow)); ShowContinueError(state, "... Fan Coil Unit flow rate reduced to match the fan flow rate and the simulation continues."); fanCoil.MaxAirVolFlow = fanCoil.FanAirVolFlow; } @@ -1493,9 +1487,9 @@ namespace FanCoilUnits { OutAirVolFlowUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(OutAirVolFlowDes - OutAirVolFlowUser) / OutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeFanCoilUnit: Potential issue with equipment sizing for {} {}", fanCoil.UnitType, fanCoil.Name)); + ShowMessage( + state, + std::format("SizeFanCoilUnit: Potential issue with equipment sizing for {} {}", fanCoil.UnitType, fanCoil.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowUser)); ShowContinueError( @@ -1553,7 +1547,7 @@ namespace FanCoilUnits { DoWaterCoilSizing = false; // If there is no heating Plant Sizing object and autosizing was requested, issue fatal error message ShowSevereError(state, "Autosizing of water coil requires a heating loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in {} Object={}", fanCoil.UnitType, fanCoil.Name)); + ShowContinueError(state, std::format("Occurs in {} Object={}", fanCoil.UnitType, fanCoil.Name)); ErrorsFound = true; } } @@ -1659,9 +1653,9 @@ namespace FanCoilUnits { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxHotWaterVolFlowDes - MaxHotWaterVolFlowUser) / MaxHotWaterVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeFanCoilUnit: Potential issue with equipment sizing for {} {}", fanCoil.UnitType, fanCoil.Name)); + ShowMessage( + state, + std::format("SizeFanCoilUnit: Potential issue with equipment sizing for {} {}", fanCoil.UnitType, fanCoil.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Hot Water Flow of {:.5R} [m3/s]", MaxHotWaterVolFlowUser)); ShowContinueError( @@ -1732,7 +1726,7 @@ namespace FanCoilUnits { DoWaterCoilSizing = false; // If there is no cooling Plant Sizing object and autosizing was requested, issue fatal error message ShowSevereError(state, "Autosizing of water coil requires a cooling loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in {} Object={}", fanCoil.UnitType, fanCoil.Name)); + ShowContinueError(state, std::format("Occurs in {} Object={}", fanCoil.UnitType, fanCoil.Name)); ErrorsFound = true; } } @@ -1833,9 +1827,9 @@ namespace FanCoilUnits { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxColdWaterVolFlowDes - MaxColdWaterVolFlowUser) / MaxColdWaterVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeFanCoilUnit: Potential issue with equipment sizing for {} {}", fanCoil.UnitType, fanCoil.Name)); + ShowMessage( + state, + std::format("SizeFanCoilUnit: Potential issue with equipment sizing for {} {}", fanCoil.UnitType, fanCoil.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Cold Water Flow of {:.5R}[m3/s]", MaxColdWaterVolFlowUser)); ShowContinueError( @@ -2122,17 +2116,17 @@ namespace FanCoilUnits { if (SolFlag == -1) { ++fanCoil.ConvgErrCountC; if (fanCoil.ConvgErrCountC < 2) { - ShowWarningError(state, EnergyPlus::format("Cold Water control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, std::format("Cold Water control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Iteration limit exceeded in calculating water flow rate "); state.dataLoopNodes->Node(fanCoil.CoolCoilFluidInletNode).MassFlowRate = CWFlow; Calc4PipeFanCoil(state, FanCoilNum, ControlledZoneNum, FirstHVACIteration, QUnitOut); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); + ShowContinueErrorTimeStamp(state, std::format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); ShowContinueErrorTimeStamp( state, - EnergyPlus::format("Min water flow used during iterations = {}, Max water flow used during iterations = {}", - MinWaterFlow, - MaxWaterFlow)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("Water flow rate on last iteration = {}", CWFlow)); + std::format("Min water flow used during iterations = {}, Max water flow used during iterations = {}", + MinWaterFlow, + MaxWaterFlow)); + ShowContinueErrorTimeStamp(state, std::format("Water flow rate on last iteration = {}", CWFlow)); ShowContinueErrorTimeStamp(state, "..Water flow rate set to last iteration value "); } else { ShowRecurringWarningErrorAtEnd( @@ -2141,7 +2135,7 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountC; if (fanCoil.LimitErrCountC < 2) { - ShowWarningError(state, EnergyPlus::format("Cold Water control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, std::format("Cold Water control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Bad cold water mass flow limits"); ShowContinueErrorTimeStamp(state, "..Water flow rate set to lower limit "); } else { @@ -2152,7 +2146,7 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountC; if (fanCoil.LimitErrCountC < 2) { - ShowWarningError(state, EnergyPlus::format("Cold Water control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, std::format("Cold Water control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Bad cold water mass flow limits"); ShowContinueErrorTimeStamp(state, "..Water flow rate set to lower limit "); } else { @@ -2268,17 +2262,17 @@ namespace FanCoilUnits { if (SolFlag == -1) { ++fanCoil.ConvgErrCountH; if (fanCoil.ConvgErrCountH < 2) { - ShowWarningError(state, EnergyPlus::format("Hot Water control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, std::format("Hot Water control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Iteration limit exceeded in calculating water flow rate "); state.dataLoopNodes->Node(fanCoil.HeatCoilFluidInletNode).MassFlowRate = HWFlow; Calc4PipeFanCoil(state, FanCoilNum, ControlledZoneNum, FirstHVACIteration, QUnitOut); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); + ShowContinueErrorTimeStamp(state, std::format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); ShowContinueErrorTimeStamp( state, - EnergyPlus::format("Min water flow used during iterations = {}, Max water flow used during iterations = {}", - MinWaterFlow, - MaxWaterFlow)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("Water flow rate on last iteration = {}", HWFlow)); + std::format("Min water flow used during iterations = {}, Max water flow used during iterations = {}", + MinWaterFlow, + MaxWaterFlow)); + ShowContinueErrorTimeStamp(state, std::format("Water flow rate on last iteration = {}", HWFlow)); ShowContinueErrorTimeStamp(state, "..Water flow rate set to last iteration value "); } else { ShowRecurringWarningErrorAtEnd( @@ -2287,7 +2281,7 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountH; if (fanCoil.LimitErrCountH < 2) { - ShowWarningError(state, EnergyPlus::format("Hot Water control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, std::format("Hot Water control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Bad hot water mass flow limits"); ShowContinueErrorTimeStamp(state, "..Water flow rate set to lower limit "); } else { @@ -2298,7 +2292,7 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountH; if (fanCoil.LimitErrCountH < 2) { - ShowWarningError(state, EnergyPlus::format("Hot Water control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, std::format("Hot Water control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Bad hot water mass flow limits"); ShowContinueErrorTimeStamp(state, "..Water flow rate set to lower limit "); } else { @@ -2487,17 +2481,16 @@ namespace FanCoilUnits { if (SolFlag == -1) { ++fanCoil.ConvgErrCountC; if (fanCoil.ConvgErrCountC < 2) { - ShowWarningError(state, - EnergyPlus::format("Part-load ratio cooling control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, std::format("Part-load ratio cooling control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Iteration limit exceeded in calculating FCU part-load ratio "); state.dataLoopNodes->Node(fanCoil.CoolCoilFluidInletNode).MassFlowRate = PLR * fanCoil.MaxCoolCoilFluidFlow; Calc4PipeFanCoil(state, FanCoilNum, ControlledZoneNum, FirstHVACIteration, QUnitOut, PLR); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); + ShowContinueErrorTimeStamp(state, std::format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); ShowContinueErrorTimeStamp( state, - EnergyPlus::format( + std::format( "Min part-load used during iterations = {}, Max part-load used during iterations = {}", PLRMin, PLRMax)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("Part-load ratio on last iteration = {}", PLR)); + ShowContinueErrorTimeStamp(state, std::format("Part-load ratio on last iteration = {}", PLR)); ShowContinueErrorTimeStamp(state, "..Part-load ratio set to last iteration value "); } else { ShowRecurringWarningErrorAtEnd(state, @@ -2507,10 +2500,9 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountC; if (fanCoil.LimitErrCountC < 2) { - ShowWarningError(state, - EnergyPlus::format("Part-load ratio cooling control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, std::format("Part-load ratio cooling control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Bad part-load ratio limits"); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("..Part-load ratio set to {}", PLRMin)); + ShowContinueErrorTimeStamp(state, std::format("..Part-load ratio set to {}", PLRMin)); } else { ShowRecurringWarningErrorAtEnd( state, "Part-load ratio cooling control failed in fan coil unit " + fanCoil.Name, fanCoil.BadMassFlowLimIndexC); @@ -2519,7 +2511,7 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountC; if (fanCoil.LimitErrCountC < 2) { - ShowWarningError(state, EnergyPlus::format("Part-load ratio control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, std::format("Part-load ratio control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Bad part-load ratio limits"); ShowContinueErrorTimeStamp(state, "..Part-load ratio set to 0"); } else { @@ -2588,19 +2580,17 @@ namespace FanCoilUnits { if (SolFlag == -1) { ++fanCoil.ConvgErrCountH; if (fanCoil.ConvgErrCountH < 2) { - ShowWarningError(state, - EnergyPlus::format("Part-load ratio heating control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, std::format("Part-load ratio heating control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Iteration limit exceeded in calculating FCU part-load ratio "); state.dataLoopNodes->Node(fanCoil.HeatCoilFluidInletNode).MassFlowRate = PLR * fanCoil.MaxHeatCoilFluidFlow; Calc4PipeFanCoil(state, FanCoilNum, ControlledZoneNum, FirstHVACIteration, QUnitOut, PLR); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); + ShowContinueErrorTimeStamp(state, std::format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); ShowContinueErrorTimeStamp( state, - EnergyPlus::format( - "Min part-load ratio used during iterations = {}, Max part-load used during iterations = {}", - PLRMin, - PLRMax)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("Part-load ratio on last iteration = {}", PLR)); + std::format("Min part-load ratio used during iterations = {}, Max part-load used during iterations = {}", + PLRMin, + PLRMax)); + ShowContinueErrorTimeStamp(state, std::format("Part-load ratio on last iteration = {}", PLR)); ShowContinueErrorTimeStamp(state, "..Part-load ratio set to last iteration value "); } else { ShowRecurringWarningErrorAtEnd(state, @@ -2611,10 +2601,9 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountH; if (fanCoil.LimitErrCountH < 2) { - ShowWarningError(state, - EnergyPlus::format("Part-load ratio heating control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, std::format("Part-load ratio heating control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Bad hot part-load ratio limits"); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("..Part-load ratio set to {}", PLRMin)); + ShowContinueErrorTimeStamp(state, std::format("..Part-load ratio set to {}", PLRMin)); } else { ShowRecurringWarningErrorAtEnd(state, "Part-load ratio heating control failed in fan coil unit " + fanCoil.Name, @@ -2624,8 +2613,7 @@ namespace FanCoilUnits { } else if (SolFlag == -2) { ++fanCoil.LimitErrCountH; if (fanCoil.LimitErrCountH < 2) { - ShowWarningError(state, - EnergyPlus::format("Part-load ratio heating control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, std::format("Part-load ratio heating control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Bad part-load ratio limits"); ShowContinueErrorTimeStamp(state, "..Part-load ratio set to 0"); } else { @@ -2893,10 +2881,10 @@ namespace FanCoilUnits { if (fanCoil.MaxIterIndexC == 0) { ShowWarningMessage( state, - EnergyPlus::format("ZoneHVAC:FourPipeFanCoil=\"{}\" -- Exceeded max iterations while adjusting cycling fan sensible " - "runtime to meet the zone load within the cooling convergence tolerance.", - fanCoil.Name)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("Iterations={}", MaxIterCycl)); + std::format("ZoneHVAC:FourPipeFanCoil=\"{}\" -- Exceeded max iterations while adjusting cycling fan sensible " + "runtime to meet the zone load within the cooling convergence tolerance.", + fanCoil.Name)); + ShowContinueErrorTimeStamp(state, std::format("Iterations={}", MaxIterCycl)); } ShowRecurringWarningErrorAtEnd(state, "ZoneHVAC:FourPipeFanCoil=\"" + fanCoil.Name + @@ -2950,12 +2938,12 @@ namespace FanCoilUnits { if (fanCoil.MaxIterIndexH == 0) { ShowWarningMessage( state, - EnergyPlus::format("ZoneHVAC:FourPipeFanCoil=\"{}\" -- Exceeded max iterations while adjusting cycling fan sensible " - "runtime to meet the zone load within the heating convergence tolerance.", - fanCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...Requested zone load = {:.3T} [W]", QZnReq)); - ShowContinueError(state, EnergyPlus::format("...Fan coil capacity = {:.3T} [W]", QUnitOut)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("Iterations={}", MaxIterCycl)); + std::format("ZoneHVAC:FourPipeFanCoil=\"{}\" -- Exceeded max iterations while adjusting cycling fan sensible " + "runtime to meet the zone load within the heating convergence tolerance.", + fanCoil.Name)); + ShowContinueError(state, std::format("...Requested zone load = {:.3f} [W]", QZnReq)); + ShowContinueError(state, std::format("...Fan coil capacity = {:.3f} [W]", QUnitOut)); + ShowContinueErrorTimeStamp(state, std::format("Iterations={}", MaxIterCycl)); } ShowRecurringWarningErrorAtEnd(state, "ZoneHVAC:FourPipeFanCoil=\"" + fanCoil.Name + @@ -3831,10 +3819,10 @@ namespace FanCoilUnits { if (fanCoil.MaxIterIndexC == 0) { ShowWarningMessage( state, - EnergyPlus::format("ZoneHVAC:FourPipeFanCoil=\"{}\" -- Exceeded max iterations while adjusting cycling fan sensible " - "runtime to meet the zone load within the cooling convergence tolerance.", - fanCoil.Name)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("Iterations={}", MaxIterCycl)); + std::format("ZoneHVAC:FourPipeFanCoil=\"{}\" -- Exceeded max iterations while adjusting cycling fan sensible " + "runtime to meet the zone load within the cooling convergence tolerance.", + fanCoil.Name)); + ShowContinueErrorTimeStamp(state, std::format("Iterations={}", MaxIterCycl)); } ShowRecurringWarningErrorAtEnd(state, "ZoneHVAC:FourPipeFanCoil=\"" + fanCoil.Name + @@ -3965,12 +3953,11 @@ namespace FanCoilUnits { // warning if not converged if (Iter > (MaxIterCycl - 1)) { if (fanCoil.MaxIterIndexH == 0) { - ShowWarningMessage( - state, - EnergyPlus::format("ZoneHVAC:FourPipeFanCoil=\"{}\" -- Exceeded max iterations while adjusting cycling fan " - "sensible runtime to meet the zone load within the heating convergence tolerance.", - fanCoil.Name)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("Iterations={}", MaxIterCycl)); + ShowWarningMessage(state, + std::format("ZoneHVAC:FourPipeFanCoil=\"{}\" -- Exceeded max iterations while adjusting cycling fan " + "sensible runtime to meet the zone load within the heating convergence tolerance.", + fanCoil.Name)); + ShowContinueErrorTimeStamp(state, std::format("Iterations={}", MaxIterCycl)); } ShowRecurringWarningErrorAtEnd(state, "ZoneHVAC:FourPipeFanCoil=\"" + fanCoil.Name + @@ -3998,13 +3985,12 @@ namespace FanCoilUnits { if (SolFlag == -1) { ++fanCoil.ConvgErrCountH; if (fanCoil.ConvgErrCountH < 2) { - ShowWarningError(state, EnergyPlus::format("Electric heating coil control failed in fan coil unit {}", fanCoil.Name)); + ShowWarningError(state, std::format("Electric heating coil control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Iteration limit exceeded in calculating electric heating coil capacity modulation "); Calc4PipeFanCoil(state, FanCoilNum, ZoneNum, FirstHVACIteration, QUnitOut, _, eHeatCoilPLR); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); + ShowContinueErrorTimeStamp(state, std::format("Load Request = {}, Final Capacity = {}", QZnReq, QUnitOut)); ShowContinueErrorTimeStamp( - state, - EnergyPlus::format("Electric heating coil part load ratio used during last iterations = {}", eHeatCoilPLR)); + state, std::format("Electric heating coil part load ratio used during last iterations = {}", eHeatCoilPLR)); } else { ShowRecurringWarningErrorAtEnd( state, "Electric heating coil Iteration limit exceeded in fan coil unit " + fanCoil.Name, fanCoil.MaxIterIndexH); @@ -4013,8 +3999,7 @@ namespace FanCoilUnits { ++fanCoil.LimitErrCountH; if (fanCoil.LimitErrCountH < 2) { ShowWarningError( - state, - EnergyPlus::format("Part load ratio electric heating coil control failed in fan coil unit {}", fanCoil.Name)); + state, std::format("Part load ratio electric heating coil control failed in fan coil unit {}", fanCoil.Name)); ShowContinueError(state, " Bad par load ratio limits"); ShowContinueErrorTimeStamp(state, "..Par load ratio set to 0"); } else { @@ -4450,8 +4435,8 @@ namespace FanCoilUnits { } else { // developer error ShowFatalError(state, - EnergyPlus::format("Developer Error - CalcFanCoilAirAndWaterFlowResidual: Water control node not found for {}", - state.dataFanCoilUnits->FanCoil(FanCoilNum).Name)); + std::format("Developer Error - CalcFanCoilAirAndWaterFlowResidual: Water control node not found for {}", + state.dataFanCoilUnits->FanCoil(FanCoilNum).Name)); } Real64 QUnitOut; // delivered capacity [W] Calc4PipeFanCoil(state, diff --git a/src/EnergyPlus/Fans.cc b/src/EnergyPlus/Fans.cc index aa3681b4572..783fc321c81 100644 --- a/src/EnergyPlus/Fans.cc +++ b/src/EnergyPlus/Fans.cc @@ -47,12 +47,15 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include -// EnergyPlus Headers +// Local Headers #include + +// EnergyPlus Headers #include #include #include @@ -1022,7 +1025,7 @@ void GetFanInput(EnergyPlusData &state) } if (foundMissingPowerFraction) { // field set input does not match number of speeds, throw warning - ShowSevereError(state, EnergyPlus::format("{}: {}=\"{}\", invalid entry.", routineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, std::format("{}: {}=\"{}\", invalid entry.", routineName, cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError( state, "Fan with Discrete speed control does not have input for power fraction at all speed levels and does not have a power curve."); @@ -1035,7 +1038,7 @@ void GetFanInput(EnergyPlusData &state) state, fan->zoneNum, fan->Name, DataHeatBalance::IntGainType::FanSystemModel, &fan->qdotConvZone, nullptr, &fan->qdotRadZone); } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}: Errors found in input for fan name = {}. Program terminates.", routineName, fan->Name)); + ShowFatalError(state, std::format("{}: Errors found in input for fan name = {}. Program terminates.", routineName, fan->Name)); } } // for (iFanSystemModel) @@ -1059,23 +1062,23 @@ void GetFanInput(EnergyPlusData &state) ErrorsFound = true; ShowSevereError(state, "GetFanInput, duplicate fan inlet node names, must be unique for fans."); ShowContinueError(state, - EnergyPlus::format("Fan={}:{} and Fan={}:{}.", - HVAC::fanTypeNames[(int)fan1->type], - fan1->Name, - HVAC::fanTypeNames[(int)fan2->type], - fan2->Name)); - ShowContinueError(state, EnergyPlus::format("Inlet Node Name=\"{}\".", state.dataLoopNodes->NodeID(fan1->inletNodeNum))); + std::format("Fan={}:{} and Fan={}:{}.", + HVAC::fanTypeNames[(int)fan1->type], + fan1->Name, + HVAC::fanTypeNames[(int)fan2->type], + fan2->Name)); + ShowContinueError(state, std::format("Inlet Node Name=\"{}\".", state.dataLoopNodes->NodeID(fan1->inletNodeNum))); } if (fan1->outletNodeNum == fan2->outletNodeNum) { ErrorsFound = true; ShowSevereError(state, "GetFanInput, duplicate fan outlet node names, must be unique for fans."); ShowContinueError(state, - EnergyPlus::format("Fan={}:{} and Fan={}:{}.", - HVAC::fanTypeNames[(int)fan1->type], - fan1->Name, - HVAC::fanTypeNames[(int)fan2->type], - fan2->Name)); - ShowContinueError(state, EnergyPlus::format("Outlet Node Name=\"{}\".", state.dataLoopNodes->NodeID(fan1->outletNodeNum))); + std::format("Fan={}:{} and Fan={}:{}.", + HVAC::fanTypeNames[(int)fan1->type], + fan1->Name, + HVAC::fanTypeNames[(int)fan2->type], + fan2->Name)); + ShowContinueError(state, std::format("Outlet Node Name=\"{}\".", state.dataLoopNodes->NodeID(fan1->outletNodeNum))); } } } @@ -1173,7 +1176,7 @@ void GetFanInput(EnergyPlusData &state) } else { for (int speedLoop = 0; speedLoop < fanSystem->numSpeeds; ++speedLoop) { SetupOutputVariable(state, - EnergyPlus::format("Fan Runtime Fraction Speed {}", speedLoop + 1), + std::format("Fan Runtime Fraction Speed {}", speedLoop + 1), Constant::Units::None, fanSystem->runtimeFracAtSpeed[speedLoop], OutputProcessor::TimeStepType::System, @@ -1233,9 +1236,9 @@ void FanComponent::init(EnergyPlusData &state) continue; } ShowSevereError(state, - EnergyPlus::format("InitFans: Fan=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - HVAC::fanTypeNames[(int)fan->type], - fan->Name)); + std::format("InitFans: Fan=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + HVAC::fanTypeNames[(int)fan->type], + fan->Name)); } } @@ -1430,9 +1433,9 @@ void FanComponent::set_size(EnergyPlusData &state) // Check for inconsistent drive ratio and motor speed, and report design fan speed with warning if (_motorSpeed > (motorMaxSpeed + 1.e-5)) { ShowWarningError(state, - EnergyPlus::format("Drive ratio for {}: {} is too low at design conditions -- check motor speed and drive ratio inputs", - HVAC::fanTypeNames[(int)type], - Name)); + std::format("Drive ratio for {}: {} is too low at design conditions -- check motor speed and drive ratio inputs", + HVAC::fanTypeNames[(int)type], + Name)); ShowContinueError(state, EnergyPlus::format("...Design fan speed [rev/min]: {:.2R}", fanSpeed)); } @@ -1448,8 +1451,7 @@ void FanComponent::set_size(EnergyPlusData &state) // Check for undersized belt and report design size with warning if (fanTorque > (beltMaxTorque + 1.e-5)) { ShowWarningError( - state, - EnergyPlus::format("Belt for {}: {} is undersized at design conditions -- check belt inputs", HVAC::fanTypeNames[(int)type], Name)); + state, std::format("Belt for {}: {} is undersized at design conditions -- check belt inputs", HVAC::fanTypeNames[(int)type], Name)); ShowContinueError(state, EnergyPlus::format("...Design belt output torque (without oversizing) [Nm]: {:.2R}", fanTorque)); } @@ -1484,8 +1486,7 @@ void FanComponent::set_size(EnergyPlusData &state) // Check for undersized motor and report design size with warning if (beltInputPower > (motorMaxOutPower + 1.e-5)) { ShowWarningError( - state, - EnergyPlus::format("Motor for {}: {} is undersized at design conditions -- check motor inputs", HVAC::fanTypeNames[(int)type], Name)); + state, std::format("Motor for {}: {} is undersized at design conditions -- check motor inputs", HVAC::fanTypeNames[(int)type], Name)); ShowContinueError(state, EnergyPlus::format("...Design motor output power (without oversizing) [W]: {:.2R}", beltInputPower)); } @@ -1518,8 +1519,7 @@ void FanComponent::set_size(EnergyPlusData &state) // Check for undersized VFD and report design size with warning if (motorInputPower > (vfdMaxOutPower + 1.e-5)) { ShowWarningError( - state, - EnergyPlus::format("VFD for {}: {} is undersized at design conditions -- check VFD inputs", HVAC::fanTypeNames[(int)type], Name)); + state, std::format("VFD for {}: {} is undersized at design conditions -- check VFD inputs", HVAC::fanTypeNames[(int)type], Name)); ShowContinueError(state, EnergyPlus::format("...Design VFD output power (without oversizing) [W]: {:.2R}", motorInputPower)); } @@ -1623,12 +1623,11 @@ void FanComponent::set_size(EnergyPlusData &state) // Check fault availability schedules if (!fault.CheckFaultyAirFilterFanCurve(state)) { - ShowSevereError(state, EnergyPlus::format("FaultModel:Fouling:AirFilter = \"{}\"", fault.Name)); + ShowSevereError(state, std::format("FaultModel:Fouling:AirFilter = \"{}\"", fault.Name)); ShowContinueError( - state, - EnergyPlus::format("Invalid Fan Curve Name = \"{}\" does not cover ", state.dataCurveManager->curves(fault.fanCurveNum)->Name)); - ShowContinueError(state, EnergyPlus::format("the operational point of Fan {}", Name)); - ShowFatalError(state, EnergyPlus::format("SizeFan: Invalid FaultModel:Fouling:AirFilter={}", fault.Name)); + state, std::format("Invalid Fan Curve Name = \"{}\" does not cover ", state.dataCurveManager->curves(fault.fanCurveNum)->Name)); + ShowContinueError(state, std::format("the operational point of Fan {}", Name)); + ShowFatalError(state, std::format("SizeFan: Invalid FaultModel:Fouling:AirFilter={}", fault.Name)); } } } // FanComponent::set_size() @@ -2009,10 +2008,9 @@ void FanComponent::simulateOnOff(EnergyPlusData &state, ObjexxFCL::OptionalWarmupFlag) { - ShowSevereError(state, EnergyPlus::format("{} = {}\"", HVAC::fanTypeNames[(int)type], Name)); + ShowSevereError(state, std::format("{} = {}\"", HVAC::fanTypeNames[(int)type], Name)); ShowContinueError(state, "Error in Fan Power Ratio curve. Curve output less than 0.0."); - ShowContinueError(state, - EnergyPlus::format("Curve output = {:.5T}, fan speed ratio = {:.5T}", _speedRaisedToPower, _speedRatio)); + ShowContinueError(state, std::format("Curve output = {:.5f}, fan speed ratio = {:.5f}", _speedRaisedToPower, _speedRatio())); ShowContinueError(state, "Check curve coefficients to ensure proper power ratio as a function of fan speed ratio."); ShowContinueError(state, "Resetting Fan Power Ratio curve output to 0.0 and the simulation continues."); ShowContinueErrorTimeStamp(state, "Occurrence info:"); @@ -2024,10 +2022,10 @@ void FanComponent::simulateOnOff(EnergyPlusData &state, ObjexxFCL::OptionalWarmupFlag) { - ShowSevereError(state, EnergyPlus::format("{} = {}\"", HVAC::fanTypeNames[(int)type], Name)); + ShowSevereError(state, std::format("{} = {}\"", HVAC::fanTypeNames[(int)type], Name)); ShowContinueError(state, "Error in Fan Efficiency Ratio curve. Curve output less than 0.01."); - ShowContinueError( - state, EnergyPlus::format("Curve output = {:.5T}, fan speed ratio = {:.5T}", _effRatioAtSpeedRatio, _speedRatio)); + ShowContinueError(state, + std::format("Curve output = {:.5f}, fan speed ratio = {:.5f}", _effRatioAtSpeedRatio, _speedRatio())); ShowContinueError(state, "Check curve coefficients to ensure proper efficiency ratio as a function of fan speed ratio."); ShowContinueError(state, "Resetting Fan Efficiency Ratio curve output to 0.01 and the simulation continues."); ShowContinueErrorTimeStamp(state, "Occurrence info:"); @@ -2466,7 +2464,7 @@ Real64 CalFaultyFanAirFlowReduction(EnergyPlusData &state, // Check whether the fan curve covers the design operational point of the fan Real64 FanCalDeltaPress = Curve::CurveValue(state, FanCurvePtr, FanDesignAirFlowRate); // [Pa] if ((FanCalDeltaPress < 0.9 * FanDesignDeltaPress) || (FanCalDeltaPress > 1.1 * FanDesignDeltaPress)) { - ShowWarningError(state, EnergyPlus::format("The design operational point of the fan {} does not fall ", FanName)); + ShowWarningError(state, std::format("The design operational point of the fan {} does not fall ", FanName)); ShowContinueError(state, "on the fan curve provided in the FaultModel:Fouling:AirFilter object. "); return 0.0; } @@ -2482,7 +2480,7 @@ Real64 CalFaultyFanAirFlowReduction(EnergyPlusData &state, if ((FanCalDeltaPresstemp <= FanCalDeltaPress) || (FanFaultyAirFlowRate <= state.dataCurveManager->curves(FanCurvePtr)->inputLimits[0].min)) { // The new operational point of the fan go beyond the fan selection range - ShowWarningError(state, EnergyPlus::format("The operational point of the fan {} may go beyond the fan selection ", FanName)); + ShowWarningError(state, std::format("The operational point of the fan {} may go beyond the fan selection ", FanName)); ShowContinueError(state, "range in the faulty fouling air filter cases"); break; } diff --git a/src/EnergyPlus/FaultsManager.cc b/src/EnergyPlus/FaultsManager.cc index a2c709be890..c3b869e5565 100644 --- a/src/EnergyPlus/FaultsManager.cc +++ b/src/EnergyPlus/FaultsManager.cc @@ -45,6 +45,9 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + // EnergyPlus Headers #include #include @@ -761,8 +764,7 @@ namespace FaultsManager { if (lAlphaFieldBlanks(5)) { ShowSevereError( state, - EnergyPlus::format( - "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + std::format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } @@ -779,7 +781,7 @@ namespace FaultsManager { if (boiler_it == state.dataBoilers->Boiler.end()) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -836,8 +838,7 @@ namespace FaultsManager { if (lAlphaFieldBlanks(4)) { ShowSevereError( state, - EnergyPlus::format( - "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); + std::format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); state.dataFaultsMgr->ErrorsFound = true; } @@ -846,8 +847,7 @@ namespace FaultsManager { if (lAlphaFieldBlanks(5)) { ShowSevereError( state, - EnergyPlus::format( - "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + std::format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } @@ -867,7 +867,7 @@ namespace FaultsManager { if (CoilNum <= 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -887,7 +887,7 @@ namespace FaultsManager { if (CoilNum <= 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -896,12 +896,12 @@ namespace FaultsManager { // The fault model is only applicable to the coils controlled on leaving air temperature ShowWarningError( state, - EnergyPlus::format("{} = \"{}\" invalid {} = \"{}\". The specified coil is not controlled on leaving air temperature. " - "The coil SAT sensor fault model will not be applied.", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(5), - cAlphaArgs(5))); + std::format("{} = \"{}\" invalid {} = \"{}\". The specified coil is not controlled on leaving air temperature. " + "The coil SAT sensor fault model will not be applied.", + cFaultCurrentObject, + cAlphaArgs(1), + cAlphaFieldNames(5), + cAlphaArgs(5))); } else { // Link the fault model with the coil that is controlled on leaving air temperature state.dataSteamCoils->SteamCoil(CoilNum).FaultyCoilSATFlag = true; @@ -922,7 +922,7 @@ namespace FaultsManager { if (CoilNum <= 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } @@ -932,7 +932,7 @@ namespace FaultsManager { if (lAlphaFieldBlanks(6)) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(6), cAlphaArgs(6))); state.dataFaultsMgr->ErrorsFound = true; } @@ -948,7 +948,7 @@ namespace FaultsManager { if (ControlNum <= 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(6), cAlphaArgs(6))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -960,13 +960,13 @@ namespace FaultsManager { if (state.dataHVACControllers->ControllerProps(ControlNum).SensedNode != state.dataWaterCoils->WaterCoil(CoilNum).AirOutletNodeNum) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\" invalid {} = \"{}\" does not match {} = \"{}", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(6), - cAlphaArgs(6), - cAlphaFieldNames(5), - cAlphaArgs(5))); + std::format("{} = \"{}\" invalid {} = \"{}\" does not match {} = \"{}", + cFaultCurrentObject, + cAlphaArgs(1), + cAlphaFieldNames(6), + cAlphaArgs(6), + cAlphaFieldNames(5), + cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } } @@ -1004,7 +1004,7 @@ namespace FaultsManager { if (CoilSysNum <= 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -1067,8 +1067,7 @@ namespace FaultsManager { if (lAlphaFieldBlanks(4)) { ShowSevereError( state, - EnergyPlus::format( - "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); + std::format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); state.dataFaultsMgr->ErrorsFound = true; } @@ -1077,8 +1076,7 @@ namespace FaultsManager { if (lAlphaFieldBlanks(5)) { ShowSevereError( state, - EnergyPlus::format( - "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + std::format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } @@ -1094,7 +1092,7 @@ namespace FaultsManager { if (TowerNum <= 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -1107,12 +1105,12 @@ namespace FaultsManager { faultsTowerFouling.TowerType)) { ShowWarningError( state, - EnergyPlus::format("{} = \"{}\" invalid {} = \"{}\" not match the type of {}. Tower type in the fault model is updated. ", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(4), - cAlphaArgs(4), - cAlphaFieldNames(5))); + std::format("{} = \"{}\" invalid {} = \"{}\" not match the type of {}. Tower type in the fault model is updated. ", + cFaultCurrentObject, + cAlphaArgs(1), + cAlphaFieldNames(4), + cAlphaArgs(4), + cAlphaFieldNames(5))); faultsTowerFouling.TowerType = DataPlant::PlantEquipTypeNames[static_cast(state.dataCondenserLoopTowers->towers(TowerNum).TowerType)]; } @@ -1122,7 +1120,7 @@ namespace FaultsManager { if (state.dataCondenserLoopTowers->towers(TowerNum).PerformanceInputMethod_Num != CondenserLoopTowers::PIM::UFactor) { ShowWarningError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}. Tower Performance Input Method is not UFactorTimesAreaAndDesignWaterFlowRate. The " "tower fouling fault model will not be applied to the tower. ", cFaultCurrentObject, @@ -1181,8 +1179,7 @@ namespace FaultsManager { if (lAlphaFieldBlanks(4)) { ShowSevereError( state, - EnergyPlus::format( - "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); + std::format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); state.dataFaultsMgr->ErrorsFound = true; } @@ -1191,8 +1188,7 @@ namespace FaultsManager { if (lAlphaFieldBlanks(5)) { ShowSevereError( state, - EnergyPlus::format( - "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + std::format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } @@ -1208,7 +1204,7 @@ namespace FaultsManager { if (TowerNum <= 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -1220,12 +1216,12 @@ namespace FaultsManager { if (!Util::SameString(DataPlant::PlantEquipTypeNames[static_cast(state.dataCondenserLoopTowers->towers(TowerNum).TowerType)], faultsCondSWTFouling.TowerType)) { ShowWarningError(state, - EnergyPlus::format("{} = \"{}\" invalid {} = \"{}\" not match the type of {}. Tower type is updated. ", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(4), - cAlphaArgs(4), - cAlphaFieldNames(5))); + std::format("{} = \"{}\" invalid {} = \"{}\" not match the type of {}. Tower type is updated. ", + cFaultCurrentObject, + cAlphaArgs(1), + cAlphaFieldNames(4), + cAlphaArgs(4), + cAlphaFieldNames(5))); faultsCondSWTFouling.TowerType = DataPlant::PlantEquipTypeNames[static_cast(state.dataCondenserLoopTowers->towers(TowerNum).TowerType)]; } @@ -1279,8 +1275,7 @@ namespace FaultsManager { if (lAlphaFieldBlanks(4)) { ShowSevereError( state, - EnergyPlus::format( - "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); + std::format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); state.dataFaultsMgr->ErrorsFound = true; } @@ -1289,8 +1284,7 @@ namespace FaultsManager { if (lAlphaFieldBlanks(5)) { ShowSevereError( state, - EnergyPlus::format( - "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); + std::format("{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } @@ -1311,7 +1305,7 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -1331,7 +1325,7 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -1351,7 +1345,7 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -1373,7 +1367,7 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -1394,7 +1388,7 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -1415,7 +1409,7 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -1435,7 +1429,7 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -1455,7 +1449,7 @@ namespace FaultsManager { if (ChillerNum <= 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" not found.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -1575,10 +1569,10 @@ namespace FaultsManager { // Related Thermostat Offset Fault Name is required for Humidistat Offset Type: ThermostatOffsetDependent if (lAlphaFieldBlanks(6)) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\": {} cannot be blank for Humidistat Offset Type = \"ThermostatOffsetDependent\".", - cFaultCurrentObject, - cAlphaArgs(1), - cAlphaFieldNames(6))); + std::format("{} = \"{}\": {} cannot be blank for Humidistat Offset Type = \"ThermostatOffsetDependent\".", + cFaultCurrentObject, + cAlphaArgs(1), + cAlphaFieldNames(6))); state.dataFaultsMgr->ErrorsFound = true; } else { faultsHStat.FaultyThermostatName = cAlphaArgs(6); @@ -1605,12 +1599,11 @@ namespace FaultsManager { // Reference offset value is required for Humidistat Offset Type: ThermostatOffsetIndependent if (lAlphaFieldBlanks(1)) { - ShowSevereError( - state, - EnergyPlus::format("{} = \"{}\": {} cannot be blank for Humidistat Offset Type = \"ThermostatOffsetIndependent\".", - cFaultCurrentObject, - cAlphaArgs(1), - cNumericFieldNames(1))); + ShowSevereError(state, + std::format("{} = \"{}\": {} cannot be blank for Humidistat Offset Type = \"ThermostatOffsetIndependent\".", + cFaultCurrentObject, + cAlphaArgs(1), + cNumericFieldNames(1))); state.dataFaultsMgr->ErrorsFound = true; } else { faultsHStat.Offset = rNumericArgs(1); @@ -1659,7 +1652,7 @@ namespace FaultsManager { // Reference offset value is required if (lAlphaFieldBlanks(1)) { - ShowSevereError(state, EnergyPlus::format("{} = \"{}\" cannot be blank.", cFaultCurrentObject, cNumericFieldNames(1))); + ShowSevereError(state, std::format("{} = \"{}\" cannot be blank.", cFaultCurrentObject, cNumericFieldNames(1))); state.dataFaultsMgr->ErrorsFound = true; } else { faultsTStat.Offset = rNumericArgs(1); @@ -1728,10 +1721,10 @@ namespace FaultsManager { int CoilNum = Util::FindItemInList(faultsFoulCoil.FouledCoilName, state.dataWaterCoils->WaterCoil); if (CoilNum <= 0) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\". Referenced Coil named \"{}\" was not found.", - cFaultCurrentObject, - cAlphaArgs(1), - faultsFoulCoil.FouledCoilName)); + std::format("{} = \"{}\". Referenced Coil named \"{}\" was not found.", + cFaultCurrentObject, + cAlphaArgs(1), + faultsFoulCoil.FouledCoilName)); state.dataFaultsMgr->ErrorsFound = true; } else { // Coil is found: check if the right type @@ -1815,8 +1808,7 @@ namespace FaultsManager { } else { ShowSevereError( state, - EnergyPlus::format( - "{} = \"{}\" invalid {} = \"{}\".", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(2), cAlphaArgs(2))); + std::format("{} = \"{}\" invalid {} = \"{}\".", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(2), cAlphaArgs(2))); ShowContinueError( state, R"(Coil was found but it is not one of the supported types ("Coil:Cooling:Water" or "Coil:Heating:Water").)"); state.dataFaultsMgr->ErrorsFound = true; @@ -1873,7 +1865,7 @@ namespace FaultsManager { if (lAlphaFieldBlanks(4)) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(4), cAlphaArgs(4))); state.dataFaultsMgr->ErrorsFound = true; } else { @@ -1891,7 +1883,7 @@ namespace FaultsManager { if (lAlphaFieldBlanks(5)) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {} = \"{}\" blank.", cFaultCurrentObject, cAlphaArgs(1), cAlphaFieldNames(5), cAlphaArgs(5))); state.dataFaultsMgr->ErrorsFound = true; } diff --git a/src/EnergyPlus/FileSystem.cc b/src/EnergyPlus/FileSystem.cc index 8b74c535a30..ac38440ed93 100644 --- a/src/EnergyPlus/FileSystem.cc +++ b/src/EnergyPlus/FileSystem.cc @@ -45,34 +45,34 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -// Standard C++ library -#include -#include -#include -#include -#include -#include -#include -#include - +// C++ Headers #ifdef _WIN32 # include # include #else # include #endif - +#include +#include +#include +#include +#include +#include #ifdef __APPLE__ # include #endif +#include +#include +#include + +// Third Party Headers +#include // EnergyPlus Headers #include #include #include -#include - namespace EnergyPlus { namespace FileSystem { @@ -348,7 +348,7 @@ namespace FileSystem { { // Shenanigans would not be needed with fmt 10+ (maybe earlier), because fmt has native fs::path support if (!fileExists(filePath)) { - throw FatalError(fmt::format("File does not exists: {}", filePath)); + throw FatalError(EnergyPlus::format("File does not exists: {}", filePath.string())); } // Can only be 'r', 'b' or 'rb' @@ -359,7 +359,7 @@ namespace FileSystem { const std::uintmax_t file_size = fs::file_size(filePath); std::ifstream file(filePath, mode); if (!file.is_open()) { - throw FatalError(fmt::format("Could not open file: {}", filePath)); + throw FatalError(EnergyPlus::format("Could not open file: {}", filePath.string())); } std::string result(file_size, '\0'); file.read(result.data(), file_size); @@ -371,7 +371,7 @@ namespace FileSystem { // Shenanigans would not be needed with fmt 10+ (maybe earlier), because fmt has native fs::path support if (!fileExists(filePath)) { - throw FatalError(fmt::format("File does not exists: {}", filePath)); + throw FatalError(EnergyPlus::format("File does not exists: {}", filePath.string())); } // Can only be 'r', 'b' or 'rb' @@ -381,7 +381,7 @@ namespace FileSystem { std::ifstream file(filePath, mode); if (!file.is_open()) { - throw FatalError(fmt::format("Could not open file: {}", filePath)); + throw FatalError(EnergyPlus::format("Could not open file: {}", filePath.string())); } FileTypes const ext = getFileType(filePath); diff --git a/src/EnergyPlus/FileSystem.hh b/src/EnergyPlus/FileSystem.hh index edd806a8897..3d1ebcdcf5b 100644 --- a/src/EnergyPlus/FileSystem.hh +++ b/src/EnergyPlus/FileSystem.hh @@ -48,13 +48,7 @@ #ifndef FileSystem_hh_INCLUDED #define FileSystem_hh_INCLUDED -#include -#include -#include -#include -#include -#include -#include +// C++ Headers #ifndef __cppcheck__ # if __has_include() # include @@ -67,19 +61,18 @@ namespace fs = std::experimental::filesystem; # error "no filesystem support" # endif #endif +#include +#include -#include - -// If we want to allow this kind of stuff -// fs::path p = "folder/eplus"; -// std::string suffixStr = "out.audit"; -// -// fs::path filePath = p + suffixStr; => folder/eplusout.audit (would throw) -// std::string message = "Cannot find " + p + "." => would throw now, need p.string() instead +// Third Party Headers +// #include +#include +#include +#include +#include -// inline fs::path operator+(fs::path const &left, fs::path const &right) { -// return fs::path(left)+=right; -// } +// EnergyPlus Headers +#include namespace EnergyPlus { namespace FileSystem { @@ -244,7 +237,7 @@ namespace FileSystem { auto close_file = [](FILE *f) { fclose(f); }; auto holder = std::unique_ptr(fopen(path, "wb"), close_file); if (!holder) { - throw FatalError(fmt::format("Could not open file: {}", path)); + throw FatalError(fmt::format("Could not open file: {}", static_cast(path))); } auto f = holder.get(); diff --git a/src/EnergyPlus/FluidCoolers.cc b/src/EnergyPlus/FluidCoolers.cc index 30ec1de1526..97c07836369 100644 --- a/src/EnergyPlus/FluidCoolers.cc +++ b/src/EnergyPlus/FluidCoolers.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -670,7 +671,7 @@ bool FluidCoolerspecs::validateTwoSpeedInputs(EnergyPlusData &state, if (this->DesignEnteringAirTemp <= this->DesignEnteringAirWetBulbTemp) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\", {} must be greater than {}.", cCurrentModuleObject, AlphArray(1), cNumericFieldNames(8), cNumericFieldNames(9))); ErrorsFound = true; } @@ -678,69 +679,67 @@ bool FluidCoolerspecs::validateTwoSpeedInputs(EnergyPlusData &state, // Check various inputs for both the performance input methods if (this->DesignWaterFlowRate <= 0.0 && !this->DesignWaterFlowRateWasAutoSized) { ShowSevereError(state, - EnergyPlus::format("{}= \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {}= \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(10), - cAlphaFieldNames(4), - AlphArray(4))); + std::format("{}= \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {}= \"{}\".", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(10), + cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (this->HighSpeedAirFlowRate <= 0.0 && !this->HighSpeedAirFlowRateWasAutoSized) { ShowSevereError(state, - EnergyPlus::format("{}= \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {}= \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(11), - cAlphaFieldNames(4), - AlphArray(4))); + std::format("{}= \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {}= \"{}\".", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(11), + cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (this->LowSpeedAirFlowRate <= 0.0 && !this->LowSpeedAirFlowRateWasAutoSized) { ShowSevereError(state, - EnergyPlus::format("{}= \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {}= \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(13), - cAlphaFieldNames(4), - AlphArray(4))); + std::format("{}= \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {}= \"{}\".", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(13), + cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } // High speed air flow rate must be greater than low speed air flow rate. // Can't tell yet if autosized, check later in InitFluidCooler. if (this->HighSpeedAirFlowRate <= this->LowSpeedAirFlowRate && !this->HighSpeedAirFlowRateWasAutoSized) { - ShowSevereError( - state, - EnergyPlus::format("{}= \"{}\". Fluid cooler air flow rate at low fan speed must be less than the air flow rate at high fan speed.", - cCurrentModuleObject, - this->Name)); + ShowSevereError(state, + std::format("{}= \"{}\". Fluid cooler air flow rate at low fan speed must be less than the air flow rate at high fan speed.", + cCurrentModuleObject, + this->Name)); ErrorsFound = true; } if (this->HighSpeedFanPower <= 0.0 && !this->HighSpeedFanPowerWasAutoSized) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(12), - cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(12), + cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (this->LowSpeedFanPower <= 0.0 && !this->LowSpeedFanPowerWasAutoSized) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(15), - cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(15), + cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (this->HighSpeedFanPower <= this->LowSpeedFanPower && !this->HighSpeedFanPowerWasAutoSized) { - ShowSevereError(state, - EnergyPlus::format("{}= \"{}\". Fluid cooler low speed fan power must be less than high speed fan power.", - cCurrentModuleObject, - this->Name)); + ShowSevereError( + state, + std::format("{}= \"{}\". Fluid cooler low speed fan power must be less than high speed fan power.", cCurrentModuleObject, this->Name)); ErrorsFound = true; } @@ -748,65 +747,63 @@ bool FluidCoolerspecs::validateTwoSpeedInputs(EnergyPlusData &state, this->PerformanceInputMethod_Num = PerfInputMethod::U_FACTOR; if (this->HighSpeedFluidCoolerUA <= 0.0 && !this->HighSpeedFluidCoolerUAWasAutoSized) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(1), - cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(1), + cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (this->LowSpeedFluidCoolerUA <= 0.0 && !this->LowSpeedFluidCoolerUAWasAutoSized) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(2), - cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {} = \"{}\".", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(2), + cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (this->HighSpeedFluidCoolerUA <= this->LowSpeedFluidCoolerUA && !this->HighSpeedFluidCoolerUAWasAutoSized) { - ShowSevereError( - state, - EnergyPlus::format("{}= \"{}\". Fluid cooler UA at low fan speed must be less than the fluid cooler UA at high fan speed.", - cCurrentModuleObject, - this->Name)); + ShowSevereError(state, + std::format("{}= \"{}\". Fluid cooler UA at low fan speed must be less than the fluid cooler UA at high fan speed.", + cCurrentModuleObject, + this->Name)); ErrorsFound = true; } } else if (Util::SameString(AlphArray(4), "NominalCapacity")) { this->PerformanceInputMethod_Num = PerfInputMethod::NOMINAL_CAPACITY; if (this->FluidCoolerNominalCapacity <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {}= \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(4), - cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {}= \"{}\".", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(4), + cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (this->FluidCoolerLowSpeedNomCap <= 0.0 && !this->FluidCoolerLowSpeedNomCapWasAutoSized) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {}= \"{}\".", - cCurrentModuleObject, - AlphArray(1), - cNumericFieldNames(5), - cAlphaFieldNames(4), - AlphArray(4))); + std::format("{} = \"{}\", invalid data for \"{}\", entered value <= 0.0, but must be > 0 for {}= \"{}\".", + cCurrentModuleObject, + AlphArray(1), + cNumericFieldNames(5), + cAlphaFieldNames(4), + AlphArray(4))); ErrorsFound = true; } if (this->HighSpeedFluidCoolerUA != 0.0) { if (this->HighSpeedFluidCoolerUA > 0.0) { - ShowSevereError( - state, - EnergyPlus::format("{}= \"{}\". Nominal capacity input method and fluid cooler UA at high fan speed have been specified.", - cCurrentModuleObject, - this->Name)); + ShowSevereError(state, + std::format("{}= \"{}\". Nominal capacity input method and fluid cooler UA at high fan speed have been specified.", + cCurrentModuleObject, + this->Name)); } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}= \"{}\". Nominal capacity input method has been specified and fluid cooler UA at high fan speed is being autosized.", cCurrentModuleObject, this->Name)); @@ -817,15 +814,14 @@ bool FluidCoolerspecs::validateTwoSpeedInputs(EnergyPlusData &state, } if (this->LowSpeedFluidCoolerUA != 0.0) { if (this->LowSpeedFluidCoolerUA > 0.0) { - ShowSevereError( - state, - EnergyPlus::format("{}= \"{}\". Nominal capacity input method and fluid cooler UA at low fan speed have been specified.", - cCurrentModuleObject, - this->Name)); + ShowSevereError(state, + std::format("{}= \"{}\". Nominal capacity input method and fluid cooler UA at low fan speed have been specified.", + cCurrentModuleObject, + this->Name)); } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}= \"{}\". Nominal capacity input method has been specified and fluid cooler UA at low fan speed is being autosized.", cCurrentModuleObject, this->Name)); @@ -836,14 +832,13 @@ bool FluidCoolerspecs::validateTwoSpeedInputs(EnergyPlusData &state, } if (this->FluidCoolerLowSpeedNomCap >= this->FluidCoolerNominalCapacity) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\". Low-speed nominal capacity must be less than the high-speed nominal capacity.", - cCurrentModuleObject, - this->Name)); + std::format("{} = \"{}\". Low-speed nominal capacity must be less than the high-speed nominal capacity.", + cCurrentModuleObject, + this->Name)); ErrorsFound = true; } } else { // Fluid cooler performance input method is not specified as a valid "choice" - ShowSevereError(state, - EnergyPlus::format("{}= \"{}\", invalid {}= \"{}\".", cCurrentModuleObject, AlphArray(1), cAlphaFieldNames(4), AlphArray(4))); + ShowSevereError(state, std::format("{}= \"{}\", invalid {}= \"{}\".", cCurrentModuleObject, AlphArray(1), cAlphaFieldNames(4), AlphArray(4))); ShowContinueError(state, R"(... must be "UFactorTimesAreaAndDesignWaterFlowRate" or "NominalCapacity".)"); ErrorsFound = true; } @@ -968,7 +963,7 @@ void FluidCoolerspecs::size(EnergyPlusData &state) // temperature auto ensureSizingPlantExitTempIsNotLessThanDesignEnteringAirTemp = [this, &state, PltSizCondNum]() { if (state.dataSize->PlantSizData(PltSizCondNum).ExitTemp <= this->DesignEnteringAirTemp && state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, EnergyPlus::format("Error when autosizing the UA value for fluid cooler = {}.", this->Name)); + ShowSevereError(state, std::format("Error when autosizing the UA value for fluid cooler = {}.", this->Name)); ShowContinueError( state, EnergyPlus::format("Design Loop Exit Temperature ({:.2R} C) must be greater than design entering air dry-bulb temperature " @@ -1020,7 +1015,7 @@ void FluidCoolerspecs::size(EnergyPlusData &state) this->DesignLeavingWaterTemp = state.dataSize->PlantSizData(PltSizCondNum).ExitTemp; } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, EnergyPlus::format("Autosizing error for fluid cooler object = {}", this->Name)); + ShowSevereError(state, std::format("Autosizing error for fluid cooler object = {}", this->Name)); ShowFatalError(state, "Autosizing of fluid cooler condenser flow rate requires a loop Sizing:Plant object."); } } @@ -1078,7 +1073,7 @@ void FluidCoolerspecs::size(EnergyPlusData &state) } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of fluid cooler fan power requires a loop Sizing:Plant object."); - ShowFatalError(state, EnergyPlus::format(" Occurs in fluid cooler object = {}", this->Name)); + ShowFatalError(state, std::format(" Occurs in fluid cooler object = {}", this->Name)); } } } @@ -1153,7 +1148,7 @@ void FluidCoolerspecs::size(EnergyPlusData &state) } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of fluid cooler air flow rate requires a loop Sizing:Plant object"); - ShowFatalError(state, EnergyPlus::format(" Occurs in fluid cooler object = {}", this->Name)); + ShowFatalError(state, std::format(" Occurs in fluid cooler object = {}", this->Name)); } } } @@ -1221,13 +1216,12 @@ void FluidCoolerspecs::size(EnergyPlusData &state) General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f, UA0, UA1); if (SolFla == -1) { ShowWarningError(state, "Iteration limit exceeded in calculating fluid cooler UA."); - ShowContinueError(state, EnergyPlus::format("Autosizing of fluid cooler UA failed for fluid cooler = {}", this->Name)); + ShowContinueError(state, std::format("Autosizing of fluid cooler UA failed for fluid cooler = {}", this->Name)); ShowContinueError(state, EnergyPlus::format("The final UA value ={:.2R} W/K, and the simulation continues...", UA)); } else if (SolFla == -2) { CalcFluidCoolerOutlet(state, this->indexInArray, rho * tmpDesignWaterFlowRate, tmpHighSpeedAirFlowRate, UA0, OutWaterTempAtUA0); CalcFluidCoolerOutlet(state, this->indexInArray, rho * tmpDesignWaterFlowRate, tmpHighSpeedAirFlowRate, UA1, OutWaterTempAtUA1); - ShowSevereError(state, - EnergyPlus::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError(state, std::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); ShowContinueError(state, "reasonable UA value. Review and revise design input values as appropriate. Specifying hard"); ShowContinueError(state, R"(sizes for some "autosizable" fields while autosizing other "autosizable" fields may be )"); ShowContinueError(state, "contributing to this problem."); @@ -1258,7 +1252,7 @@ void FluidCoolerspecs::size(EnergyPlusData &state) state, EnergyPlus::format("Calculated water outlet temp at low UA [C] (UA = {:.2R} W/K) = {:.2R}", UA0, OutWaterTempAtUA0)); ShowContinueError( state, EnergyPlus::format("Calculated water outlet temp at high UA [C](UA = {:.2R} W/K) = {:.2R}", UA1, OutWaterTempAtUA1)); - ShowFatalError(state, EnergyPlus::format("Autosizing of Fluid Cooler UA failed for fluid cooler = {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of Fluid Cooler UA failed for fluid cooler = {}", this->Name)); } tmpHighSpeedEvapFluidCoolerUA = UA; if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { @@ -1308,7 +1302,7 @@ void FluidCoolerspecs::size(EnergyPlusData &state) } } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { - ShowSevereError(state, EnergyPlus::format("Autosizing error for fluid cooler object = {}", this->Name)); + ShowSevereError(state, std::format("Autosizing error for fluid cooler object = {}", this->Name)); ShowFatalError(state, "Autosizing of fluid cooler UA requires a loop Sizing:Plant object."); } } @@ -1337,14 +1331,13 @@ void FluidCoolerspecs::size(EnergyPlusData &state) if (SolFla == -1) { ShowWarningError(state, "Iteration limit exceeded in calculating fluid cooler UA."); if (PltSizCondNum > 0) { - ShowContinueError(state, EnergyPlus::format("Autosizing of fluid cooler UA failed for fluid cooler = {}", this->Name)); + ShowContinueError(state, std::format("Autosizing of fluid cooler UA failed for fluid cooler = {}", this->Name)); } ShowContinueError(state, EnergyPlus::format("The final UA value ={:.2R} W/K, and the simulation continues...", UA)); } else if (SolFla == -2) { CalcFluidCoolerOutlet(state, this->indexInArray, rho * tmpDesignWaterFlowRate, tmpHighSpeedAirFlowRate, UA0, OutWaterTempAtUA0); CalcFluidCoolerOutlet(state, this->indexInArray, rho * tmpDesignWaterFlowRate, tmpHighSpeedAirFlowRate, UA1, OutWaterTempAtUA1); - ShowSevereError(state, - EnergyPlus::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError(state, std::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); ShowContinueError(state, "reasonable UA value. Review and revise design input values as appropriate. Specifying hard"); ShowContinueError(state, R"(sizes for some "autosizable" fields while autosizing other "autosizable" fields may be )"); ShowContinueError(state, "contributing to this problem."); @@ -1377,7 +1370,7 @@ void FluidCoolerspecs::size(EnergyPlusData &state) ShowContinueError( state, EnergyPlus::format("Calculated water outlet temp at high UA [C] (UA = {:.2R} W/K) = {:.2R}", UA1, OutWaterTempAtUA1)); if (PltSizCondNum > 0) { - ShowFatalError(state, EnergyPlus::format("Autosizing of Fluid Cooler UA failed for fluid cooler = {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of Fluid Cooler UA failed for fluid cooler = {}", this->Name)); } } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { @@ -1520,13 +1513,12 @@ void FluidCoolerspecs::size(EnergyPlusData &state) General::SolveRoot(state, Acc, MaxIte, SolFla, UA, f, UA0, UA1); if (SolFla == -1) { ShowWarningError(state, "Iteration limit exceeded in calculating fluid cooler UA."); - ShowContinueError(state, EnergyPlus::format("Autosizing of fluid cooler UA failed for fluid cooler = {}", this->Name)); + ShowContinueError(state, std::format("Autosizing of fluid cooler UA failed for fluid cooler = {}", this->Name)); ShowContinueError(state, EnergyPlus::format("The final UA value at low fan speed ={:.2R} W/C, and the simulation continues...", UA)); } else if (SolFla == -2) { CalcFluidCoolerOutlet(state, this->indexInArray, rho * tmpDesignWaterFlowRate, this->LowSpeedAirFlowRate, UA0, OutWaterTempAtUA0); CalcFluidCoolerOutlet(state, this->indexInArray, rho * tmpDesignWaterFlowRate, this->LowSpeedAirFlowRate, UA1, OutWaterTempAtUA1); - ShowSevereError(state, - EnergyPlus::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); + ShowSevereError(state, std::format("{}: The combination of design input values did not allow the calculation of a ", CalledFrom)); ShowContinueError(state, "reasonable low-speed UA value. Review and revise design input values as appropriate. "); ShowContinueError(state, R"(Specifying hard sizes for some "autosizable" fields while autosizing other "autosizable" )"); ShowContinueError(state, "fields may be contributing to this problem."); @@ -1557,7 +1549,7 @@ void FluidCoolerspecs::size(EnergyPlusData &state) EnergyPlus::format("Calculated water outlet temp at low UA [C](UA = {:.2R} W/C) = {:.2R}", UA0, OutWaterTempAtUA0)); ShowContinueError( state, EnergyPlus::format("Calculated water outlet temp at high UA [C](UA = {:.2R} W/C) = {:.2R}", UA1, OutWaterTempAtUA1)); - ShowFatalError(state, EnergyPlus::format("Autosizing of Fluid Cooler UA failed for fluid cooler = {}", this->Name)); + ShowFatalError(state, std::format("Autosizing of Fluid Cooler UA failed for fluid cooler = {}", this->Name)); } if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { this->LowSpeedFluidCoolerUA = UA; @@ -1636,15 +1628,15 @@ void FluidCoolerspecs::size(EnergyPlusData &state) if (this->FluidCoolerType == DataPlant::PlantEquipmentType::FluidCooler_TwoSpd && state.dataPlnt->PlantFirstSizesOkayToFinalize) { if (this->DesignWaterFlowRate > 0.0) { if (this->HighSpeedAirFlowRate <= this->LowSpeedAirFlowRate) { - ShowSevereError(state, - EnergyPlus::format( - "FluidCooler:TwoSpeed \"{}\". Low speed air flow rate must be less than high speed air flow rate.", this->Name)); + ShowSevereError( + state, + std::format("FluidCooler:TwoSpeed \"{}\". Low speed air flow rate must be less than high speed air flow rate.", this->Name)); ErrorsFound = true; } if (this->HighSpeedFluidCoolerUA <= this->LowSpeedFluidCoolerUA) { ShowSevereError( state, - EnergyPlus::format( + std::format( "FluidCooler:TwoSpeed \"{}\". Fluid cooler UA at low fan speed must be less than the fluid cooler UA at high fan speed.", this->Name)); ErrorsFound = true; @@ -1960,17 +1952,15 @@ void FluidCoolerspecs::update(EnergyPlusData &state) if (state.dataLoopNodes->Node(waterOutletNode).MassFlowRate > this->DesWaterMassFlowRate * this->FluidCoolerMassFlowRateMultiplier) { ++this->HighMassFlowErrorCount; if (this->HighMassFlowErrorCount < 2) { - ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], this->Name)); + ShowWarningError(state, std::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], this->Name)); ShowContinueError(state, " Condenser Loop Mass Flow Rate is much greater than the fluid coolers design mass flow rate."); - ShowContinueError(state, - EnergyPlus::format(" Condenser Loop Mass Flow Rate = {:.6T}", state.dataLoopNodes->Node(waterOutletNode).MassFlowRate)); - ShowContinueError(state, EnergyPlus::format(" Fluid Cooler Design Mass Flow Rate = {:.6T}", this->DesWaterMassFlowRate)); + ShowContinueError(state, std::format(" Condenser Loop Mass Flow Rate = {:.6f}", state.dataLoopNodes->Node(waterOutletNode).MassFlowRate)); + ShowContinueError(state, std::format(" Fluid Cooler Design Mass Flow Rate = {:.6f}", this->DesWaterMassFlowRate)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\" Condenser Loop Mass Flow Rate is much greater than the fluid coolers design mass flow rate. Error continues...", DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], this->Name), @@ -1986,21 +1976,19 @@ void FluidCoolerspecs::update(EnergyPlusData &state) ++this->OutletWaterTempErrorCount; if (this->OutletWaterTempErrorCount < 2) { - ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], this->Name)); + ShowWarningError(state, std::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], this->Name)); ShowContinueError( state, - EnergyPlus::format(" Fluid cooler water outlet temperature ({:.2F} C) is below the specified minimum condenser loop temp of {:.2F} C", - this->OutletWaterTemp, - LoopMinTemp)); + std::format(" Fluid cooler water outlet temperature ({:.2F} C) is below the specified minimum condenser loop temp of {:.2F} C", + this->OutletWaterTemp, + LoopMinTemp)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{} \"{}\" Fluid cooler water outlet temperature is below the specified minimum condenser loop temp. Error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], - this->Name), + std::format("{} \"{}\" Fluid cooler water outlet temperature is below the specified minimum condenser loop temp. Error continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], + this->Name), this->OutletWaterTempErrorIndex, this->OutletWaterTemp, this->OutletWaterTemp); @@ -2011,16 +1999,15 @@ void FluidCoolerspecs::update(EnergyPlusData &state) if (this->WaterMassFlowRate > 0.0 && this->WaterMassFlowRate <= DataBranchAirLoopPlant::MassFlowTolerance) { ++this->SmallWaterMassFlowErrorCount; if (this->SmallWaterMassFlowErrorCount < 2) { - ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], this->Name)); + ShowWarningError(state, std::format("{} \"{}\"", DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], this->Name)); ShowContinueError(state, " Fluid cooler water mass flow rate near zero."); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, EnergyPlus::format("Actual Mass flow = {:.2T}", this->WaterMassFlowRate)); + ShowContinueError(state, std::format("Actual Mass flow = {:.2f}", this->WaterMassFlowRate)); } else { ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{} \"{}\" Fluid cooler water mass flow rate is near zero. Error continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], - this->Name), + std::format("{} \"{}\" Fluid cooler water mass flow rate is near zero. Error continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->FluidCoolerType)], + this->Name), this->SmallWaterMassFlowErrorIndex, this->WaterMassFlowRate, this->WaterMassFlowRate); diff --git a/src/EnergyPlus/FluidProperties.cc b/src/EnergyPlus/FluidProperties.cc index df56beea167..827d6019b38 100644 --- a/src/EnergyPlus/FluidProperties.cc +++ b/src/EnergyPlus/FluidProperties.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include #include #include @@ -60,7 +61,7 @@ #include #include #include -#include +#include namespace EnergyPlus { @@ -1035,19 +1036,18 @@ namespace Fluid { if (refrig->HfgValues.empty()) { ShowSevereCustom(state, eoh, - EnergyPlus::format(R"(No Saturated Gas/Fluid Enthalpy found. Need properties with {}="Enthalpy" and {}="FluidGas".)", - cAlphaFields(2), - cAlphaFields(3))); + std::format(R"(No Saturated Gas/Fluid Enthalpy found. Need properties with {}="Enthalpy" and {}="FluidGas".)", + cAlphaFields(2), + cAlphaFields(3))); ErrorsFound = true; } if (refrig->CpfValues.empty()) { - ShowSevereCustom( - state, - eoh, - EnergyPlus::format(R"(No Saturated Fluid Specific Heat found. Need properties with {}="SpecificHeat" and {}="Fluid".)", - cAlphaFields(2), - cAlphaFields(3))); + ShowSevereCustom(state, + eoh, + std::format(R"(No Saturated Fluid Specific Heat found. Need properties with {}="SpecificHeat" and {}="Fluid".)", + cAlphaFields(2), + cAlphaFields(3))); ErrorsFound = true; } @@ -1055,27 +1055,27 @@ namespace Fluid { ShowSevereCustom( state, eoh, - EnergyPlus::format(R"(No Saturated Gas/Fluid Specific Heat found. Need properties with {}="SpecificHeat" and {}="FluidGas".)", - cAlphaFields(2), - cAlphaFields(3))); + std::format(R"(No Saturated Gas/Fluid Specific Heat found. Need properties with {}="SpecificHeat" and {}="FluidGas".)", + cAlphaFields(2), + cAlphaFields(3))); ErrorsFound = true; } if (refrig->RhofValues.empty()) { ShowSevereCustom(state, eoh, - EnergyPlus::format(R"(No Saturated Fluid Density found. Need properties with {}="Density" and {}="Fluid".)", - cAlphaFields(2), - cAlphaFields(3))); + std::format(R"(No Saturated Fluid Density found. Need properties with {}="Density" and {}="Fluid".)", + cAlphaFields(2), + cAlphaFields(3))); ErrorsFound = true; } if (refrig->RhofgValues.empty()) { ShowSevereCustom(state, eoh, - EnergyPlus::format(R"(No Saturated Gas/Fluid Density found. Need properties with {}="Density" and {}="FluidGas".)", - cAlphaFields(2), - cAlphaFields(3))); + std::format(R"(No Saturated Gas/Fluid Density found. Need properties with {}="Density" and {}="FluidGas".)", + cAlphaFields(2), + cAlphaFields(3))); ErrorsFound = true; } } // for (refrigNum) @@ -1158,7 +1158,7 @@ namespace Fluid { refrig->SupTemps = supTempArray.Temps; if (Numbers(1) <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{}: {} Name={}", routineName, CurrentModuleObject, refrig->Name)); + ShowSevereError(state, std::format("{}: {} Name={}", routineName, CurrentModuleObject, refrig->Name)); ShowContinueError(state, EnergyPlus::format("Negative pressures not allowed in fluid property input data, Value =[{:.3R}].", Numbers(1))); ErrorsFound = true; @@ -1211,10 +1211,10 @@ namespace Fluid { if ((NumNumbers - 1) != refrig->NumSupTempPoints) { ShowSevereCustom(state, eoh, - EnergyPlus::format("Number of superheated {} points ({}) not equal to number of temperature points ({})", - Alphas(2), - NumNumbers - 1, - refrig->NumSupTempPoints)); + std::format("Number of superheated {} points ({}) not equal to number of temperature points ({})", + Alphas(2), + NumNumbers - 1, + refrig->NumSupTempPoints)); ErrorsFound = true; continue; } @@ -1443,10 +1443,10 @@ namespace Fluid { if (!glycolRaw->CpTempArrayName.empty() && glycolRaw->CpTempArrayName != Alphas(3)) { ShowSevereCustom(state, eoh, - EnergyPlus::format("All specific heat data for the same glycol must use the same temperature list" - "Expected name={}, Entered name={}", - glycolRaw->CpTempArrayName, - Alphas(3))); + std::format("All specific heat data for the same glycol must use the same temperature list" + "Expected name={}, Entered name={}", + glycolRaw->CpTempArrayName, + Alphas(3))); ErrorsFound = true; continue; } @@ -1462,10 +1462,10 @@ namespace Fluid { if (!glycolRaw->RhoTempArrayName.empty() && glycolRaw->RhoTempArrayName != Alphas(3)) { ShowSevereCustom(state, eoh, - EnergyPlus::format("All density data for the same glycol must use the same temperature list" - "Expected name={}, Entered name={}", - glycolRaw->RhoTempArrayName, - Alphas(3))); + std::format("All density data for the same glycol must use the same temperature list" + "Expected name={}, Entered name={}", + glycolRaw->RhoTempArrayName, + Alphas(3))); ErrorsFound = true; continue; } @@ -1481,10 +1481,10 @@ namespace Fluid { if (!glycolRaw->CondTempArrayName.empty() && glycolRaw->CondTempArrayName != Alphas(3)) { ShowSevereCustom(state, eoh, - EnergyPlus::format("All conductivity data for the same glycol must use the same temperature list" - "Expected name={}, Entered name={}", - glycolRaw->CondTempArrayName, - Alphas(3))); + std::format("All conductivity data for the same glycol must use the same temperature list" + "Expected name={}, Entered name={}", + glycolRaw->CondTempArrayName, + Alphas(3))); ErrorsFound = true; continue; } @@ -1500,10 +1500,10 @@ namespace Fluid { if (!glycolRaw->ViscTempArrayName.empty() && glycolRaw->ViscTempArrayName != Alphas(3)) { ShowSevereCustom(state, eoh, - EnergyPlus::format("All conductivity data for the same glycol must use the same temperature list" - "Expected name={}, Entered name={}", - glycolRaw->ViscTempArrayName, - Alphas(3))); + std::format("All conductivity data for the same glycol must use the same temperature list" + "Expected name={}, Entered name={}", + glycolRaw->ViscTempArrayName, + Alphas(3))); ErrorsFound = true; continue; } @@ -1598,9 +1598,9 @@ namespace Fluid { if ((NumNumbers - 1) != glycolRaw->NumCpTempPoints) { ShowSevereCustom(state, eoh, - EnergyPlus::format("Number of specific heat points ({}) not equal to number of temperature points ({})", - NumNumbers - 1, - glycolRaw->NumCpTempPoints)); + std::format("Number of specific heat points ({}) not equal to number of temperature points ({})", + NumNumbers - 1, + glycolRaw->NumCpTempPoints)); ErrorsFound = true; continue; } @@ -1613,9 +1613,9 @@ namespace Fluid { if ((NumNumbers - 1) != glycolRaw->NumRhoTempPoints) { ShowSevereCustom(state, eoh, - EnergyPlus::format("Number of density points ({}) not equal to number of temperature points ({})", - NumNumbers - 1, - glycolRaw->NumRhoTempPoints)); + std::format("Number of density points ({}) not equal to number of temperature points ({})", + NumNumbers - 1, + glycolRaw->NumRhoTempPoints)); ErrorsFound = true; continue; } @@ -1628,9 +1628,9 @@ namespace Fluid { if ((NumNumbers - 1) != glycolRaw->NumCondTempPoints) { ShowSevereCustom(state, eoh, - EnergyPlus::format("Number of conductivity points ({}) not equal to number of temperature points ({})", - NumNumbers - 1, - glycolRaw->NumCondTempPoints)); + std::format("Number of conductivity points ({}) not equal to number of temperature points ({})", + NumNumbers - 1, + glycolRaw->NumCondTempPoints)); ErrorsFound = true; continue; } @@ -1643,9 +1643,9 @@ namespace Fluid { if ((NumNumbers - 1) != glycolRaw->NumViscTempPoints) { ShowSevereCustom(state, eoh, - EnergyPlus::format("Number of viscosity points ({}) not equal to number of temperature points ({})", - NumNumbers - 1, - glycolRaw->NumViscTempPoints)); + std::format("Number of viscosity points ({}) not equal to number of temperature points ({})", + NumNumbers - 1, + glycolRaw->NumViscTempPoints)); ErrorsFound = true; continue; } @@ -1736,10 +1736,10 @@ namespace Fluid { glycol->CpDataPresent = glycolRaw->CpDataPresent; if (!glycol->CpDataPresent) { - ShowSevereError(state, EnergyPlus::format("{}: Specific heat data not entered for a {}", routineName, CurrentModuleObject)); + ShowSevereError(state, std::format("{}: Specific heat data not entered for a {}", routineName, CurrentModuleObject)); ShowContinueError(state, "ALL data must be entered for user-defined glycols"); - ShowContinueError(state, EnergyPlus::format("Glycol mixture name = {}", glycol->Name)); - ShowContinueError(state, EnergyPlus::format("Glycol fluid name = {}", glycol->GlycolName)); + ShowContinueError(state, std::format("Glycol mixture name = {}", glycol->Name)); + ShowContinueError(state, std::format("Glycol fluid name = {}", glycol->GlycolName)); ErrorsFound = true; continue; } @@ -1758,10 +1758,10 @@ namespace Fluid { glycol->RhoDataPresent = glycolRaw->RhoDataPresent; if (!glycol->RhoDataPresent) { - ShowSevereError(state, EnergyPlus::format("{}: density data not entered for a {}", routineName, CurrentModuleObject)); + ShowSevereError(state, std::format("{}: density data not entered for a {}", routineName, CurrentModuleObject)); ShowContinueError(state, "ALL data must be entered for user-defined glycols"); - ShowContinueError(state, EnergyPlus::format("Glycol mixture name = {}", glycol->Name)); - ShowContinueError(state, EnergyPlus::format("Glycol fluid name = {}", glycol->GlycolName)); + ShowContinueError(state, std::format("Glycol mixture name = {}", glycol->Name)); + ShowContinueError(state, std::format("Glycol fluid name = {}", glycol->GlycolName)); ErrorsFound = true; continue; } @@ -1780,10 +1780,10 @@ namespace Fluid { glycol->CondDataPresent = glycolRaw->CondDataPresent; if (!glycol->CondDataPresent) { - ShowSevereError(state, EnergyPlus::format("{}: conductivity data not entered for a {}", routineName, CurrentModuleObject)); + ShowSevereError(state, std::format("{}: conductivity data not entered for a {}", routineName, CurrentModuleObject)); ShowContinueError(state, "ALL data must be entered for user-defined glycols"); - ShowContinueError(state, EnergyPlus::format("Glycol mixture name = {}", glycol->Name)); - ShowContinueError(state, EnergyPlus::format("Glycol fluid name = {}", glycol->GlycolName)); + ShowContinueError(state, std::format("Glycol mixture name = {}", glycol->Name)); + ShowContinueError(state, std::format("Glycol fluid name = {}", glycol->GlycolName)); ErrorsFound = true; continue; } @@ -1802,10 +1802,10 @@ namespace Fluid { glycol->ViscDataPresent = glycolRaw->ViscDataPresent; if (!glycol->ViscDataPresent) { - ShowSevereError(state, EnergyPlus::format("{}: viscosity data not entered for a {}", routineName, CurrentModuleObject)); + ShowSevereError(state, std::format("{}: viscosity data not entered for a {}", routineName, CurrentModuleObject)); ShowContinueError(state, "ALL data must be entered for user-defined glycols"); - ShowContinueError(state, EnergyPlus::format("Glycol mixture name = {}", glycol->Name)); - ShowContinueError(state, EnergyPlus::format("Glycol fluid name = {}", glycol->GlycolName)); + ShowContinueError(state, std::format("Glycol mixture name = {}", glycol->Name)); + ShowContinueError(state, std::format("Glycol fluid name = {}", glycol->GlycolName)); ErrorsFound = true; continue; } @@ -1854,7 +1854,7 @@ namespace Fluid { lNumericFieldBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}: Previous errors in input cause program termination.", routineName)); + ShowFatalError(state, std::format("{}: Previous errors in input cause program termination.", routineName)); } if (state.dataInputProcessing->inputProcessor->getNumSectionsFound("REPORTGLYCOLS") > 0) { @@ -1967,9 +1967,8 @@ namespace Fluid { } } } else { // user has input data for concentrations that are too close or repeated, this must be fixed - ShowFatalError( - state, - EnergyPlus::format("{}: concentration values too close or data repeated, check your fluid property input data", routineName)); + ShowFatalError(state, + std::format("{}: concentration values too close or data repeated, check your fluid property input data", routineName)); } } } @@ -2086,8 +2085,7 @@ namespace Fluid { Failure = this->ViscLowTempIndex == 0 || this->ViscHighTempIndex == 0; } if (Failure) { - ShowSevereError(state, - EnergyPlus::format("setTempLimits: Required values for Glycol={} are all zeroes for some data types.", this->Name)); + ShowSevereError(state, std::format("setTempLimits: Required values for Glycol={} are all zeroes for some data types.", this->Name)); ErrorsFound = true; } } @@ -2239,8 +2237,7 @@ namespace Fluid { } if (Failure) { ShowSevereError( - state, - EnergyPlus::format("RefrigProps::setTempimits: Required values for Refrigerant={} are all zeroes for some data types.", this->Name)); + state, std::format("RefrigProps::setTempimits: Required values for Refrigerant={} are all zeroes for some data types.", this->Name)); ErrorsFound = true; } } @@ -2869,8 +2866,7 @@ namespace Fluid { // send warning if (this->errors[(int)RefrigError::SatTemp].count <= df->RefrigErrorLimitTest) { ShowSevereMessage( - state, - EnergyPlus::format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name)); + state, std::format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name)); ShowContinueError(state, EnergyPlus::format("...Called From:{}, supplied data range=[{:.2R},{:.2R}]", CalledFrom, @@ -2884,7 +2880,7 @@ namespace Fluid { } ShowRecurringSevereErrorAtEnd( state, - EnergyPlus::format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name), + std::format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name), this->errors[(int)RefrigError::SatTemp].index, Temperature, "{C}"); @@ -2905,7 +2901,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, std::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -2968,8 +2964,7 @@ namespace Fluid { // send warning if (this->errors[(int)RefrigError::SatPress].count <= df->RefrigErrorLimitTest) { ShowSevereMessage( - state, - EnergyPlus::format("{}: Saturation pressure is out of range for refrigerant [{}] supplied data: **", routineName, this->Name)); + state, std::format("{}: Saturation pressure is out of range for refrigerant [{}] supplied data: **", routineName, this->Name)); ShowContinueError(state, EnergyPlus::format("...Called From:{}, supplied data range=[{:.0R},{:.0R}]", CalledFrom, @@ -2982,7 +2977,7 @@ namespace Fluid { } ShowRecurringSevereErrorAtEnd( state, - EnergyPlus::format("{}: Saturation pressure is out of range for refrigerant [{}] supplied data: **", routineName, this->Name), + std::format("{}: Saturation pressure is out of range for refrigerant [{}] supplied data: **", routineName, this->Name), this->errors[(int)RefrigError::SatPress].index, Pressure, "{Pa}"); @@ -3002,7 +2997,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, std::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -3054,7 +3049,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, std::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -3093,7 +3088,7 @@ namespace Fluid { static constexpr std::string_view routineName = "RefrigProps::getSatDensity"; if ((Quality < 0.0) || (Quality > 1.0)) { - ShowSevereError(state, fmt::format("{}Refrigerant \"{}\", invalid quality, called from {}", routineName, this->Name, CalledFrom)); + ShowSevereError(state, std::format("{}Refrigerant \"{}\", invalid quality, called from {}", routineName, this->Name, CalledFrom)); ShowContinueError(state, EnergyPlus::format("Saturated density quality must be between 0 and 1, entered value=[{:.4R}].", Quality)); ShowFatalError(state, "Program terminates due to preceding condition."); } @@ -3145,8 +3140,7 @@ namespace Fluid { // send warning if (this->errors[(int)RefrigError::SatTempDensity].count <= df->RefrigErrorLimitTest) { ShowSevereMessage( - state, - EnergyPlus::format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name)); + state, std::format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name)); ShowContinueError(state, EnergyPlus::format("...Called From:{}, supplied data range=[{:.2R},{:.2R}]", CalledFrom, @@ -3160,7 +3154,7 @@ namespace Fluid { } ShowRecurringSevereErrorAtEnd( state, - EnergyPlus::format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name), + std::format("{}: Saturation temperature is out of range for refrigerant [{}] supplied data: **", routineName, this->Name), this->errors[(int)RefrigError::SatTempDensity].index, Temperature, "{C}"); @@ -3181,7 +3175,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, std::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -3217,7 +3211,7 @@ namespace Fluid { static constexpr std::string_view routineName = "RefrigProps::getSatSpecificHeat"; if ((Quality < 0.0) || (Quality > 1.0)) { - ShowSevereError(state, fmt::format("{}: Refrigerant \"{}\", invalid quality, called from {}", routineName, this->Name, CalledFrom)); + ShowSevereError(state, std::format("{}: Refrigerant \"{}\", invalid quality, called from {}", routineName, this->Name, CalledFrom)); ShowContinueError(state, EnergyPlus::format("Saturated density quality must be between 0 and 1, entered value=[{:.4R}].", Quality)); ShowFatalError(state, "Program terminates due to preceding condition."); } @@ -3241,7 +3235,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, std::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -3376,7 +3370,7 @@ namespace Fluid { (this->HshValues(LoPressIndex, HiTempIndex) <= 0.0) && (this->HshValues(HiPressIndex, HiTempIndex) <= 0.0)) { ++df->SatErrCountGetSupHeatEnthalpyRefrig; // set return value - ReturnValue = this->getSatEnthalpy(state, Temperature, 1.0, fmt::format("{}:{}", routineName, CalledFrom)); + ReturnValue = this->getSatEnthalpy(state, Temperature, 1.0, std::format("{}:{}", routineName, CalledFrom)); // send warning if (!state.dataGlobal->WarmupFlag) { this->errors[(int)RefrigError::SatSupEnthalpy].count++; @@ -3384,22 +3378,20 @@ namespace Fluid { if (this->errors[(int)RefrigError::SatTempDensity].count <= df->RefrigErrorLimitTest) { ShowWarningMessage( state, - EnergyPlus::format( - "{}: Refrigerant [{}] is saturated at the given conditions, saturated enthalpy at given temperature returned. **", - routineName, - this->Name)); - ShowContinueError(state, fmt::format("...Called From:{}", CalledFrom)); + std::format("{}: Refrigerant [{}] is saturated at the given conditions, saturated enthalpy at given temperature returned. **", + routineName, + this->Name)); + ShowContinueError(state, std::format("...Called From:{}", CalledFrom)); ShowContinueError(state, EnergyPlus::format("Refrigerant temperature = {:.2R}", Temperature)); ShowContinueError(state, EnergyPlus::format("Refrigerant pressure = {:.0R}", Pressure)); ShowContinueError(state, EnergyPlus::format("Returned Enthalpy value = {:.3R}", ReturnValue)); ShowContinueErrorTimeStamp(state, ""); } - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{}: Refrigerant [{}] saturated at the given conditions **", routineName, this->Name), - this->errors[(int)RefrigError::SatSupEnthalpy].index, - Temperature, - "{C}"); + ShowRecurringWarningErrorAtEnd(state, + std::format("{}: Refrigerant [{}] saturated at the given conditions **", routineName, this->Name), + this->errors[(int)RefrigError::SatSupEnthalpy].index, + Temperature, + "{C}"); } return ReturnValue; } @@ -3409,16 +3401,16 @@ namespace Fluid { this->errors[(int)RefrigError::SatSupEnthalpy].count += CurTempRangeErrCount; if (CurTempRangeErrCount > 0) { if (this->errors[(int)RefrigError::SatSupEnthalpyTemp].count <= df->RefrigErrorLimitTest) { - ShowWarningMessage( - state, - EnergyPlus::format( - "{}: Refrigerant [{}] Temperature is out of range for superheated enthalpy: values capped **", routineName, this->Name)); - ShowContinueError(state, fmt::format(" Called From:{}", CalledFrom)); + ShowWarningMessage(state, + std::format("{}: Refrigerant [{}] Temperature is out of range for superheated enthalpy: values capped **", + routineName, + this->Name)); + ShowContinueError(state, std::format(" Called From:{}", CalledFrom)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{}: Refrigerant [{}] Temperature is out of range for superheated enthalpy: values capped **", routineName, this->Name), this->errors[(int)RefrigError::SatSupEnthalpyTemp].index, Temperature, @@ -3430,16 +3422,15 @@ namespace Fluid { if (CurPresRangeErrCount > 0) { if (this->errors[(int)RefrigError::SatSupEnthalpyPress].count <= df->RefrigErrorLimitTest) { ShowWarningMessage(state, - EnergyPlus::format("{}: Refrigerant [{}] Pressure is out of range for superheated enthalpy: values capped **", - routineName, - this->Name)); - ShowContinueError(state, fmt::format(" Called From:{}", CalledFrom)); + std::format("{}: Refrigerant [{}] Pressure is out of range for superheated enthalpy: values capped **", + routineName, + this->Name)); + ShowContinueError(state, std::format(" Called From:{}", CalledFrom)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{}: Refrigerant [{}] Pressure is out of range for superheated enthalpy: values capped **", routineName, this->Name), + std::format("{}: Refrigerant [{}] Pressure is out of range for superheated enthalpy: values capped **", routineName, this->Name), this->errors[(int)RefrigError::SatSupEnthalpyPress].index, Pressure, "{Pa}"); @@ -3462,7 +3453,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, std::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -3593,7 +3584,7 @@ namespace Fluid { EnthalpyMax = max(this->HshValues(TempStart, LoTempIndex), this->HshValues(TempStart, HiTempIndex)); EnthalpyMin = min(this->HshValues(TempFinish, LoTempIndex), this->HshValues(TempFinish, HiTempIndex)); // get saturated enthalpy for checking - SatEnthalpy = this->getSatEnthalpy(state, Temperature, 1.0, fmt::format("{}:{}", routineName, CalledFrom)); + SatEnthalpy = this->getSatEnthalpy(state, Temperature, 1.0, std::format("{}:{}", routineName, CalledFrom)); // make some checks on the data before interpolating if (Enthalpy < SatEnthalpy) { @@ -3601,7 +3592,7 @@ namespace Fluid { ++CurSatErrCount; ++ErrCount; // return sat pressure at this temperature - ReturnValue = this->getSatPressure(state, Temperature, fmt::format("{}:{}", routineName, CalledFrom)); + ReturnValue = this->getSatPressure(state, Temperature, std::format("{}:{}", routineName, CalledFrom)); } else if (EnthalpyMax < Enthalpy || EnthalpyMin > Enthalpy) { // out of range error @@ -3654,11 +3645,11 @@ namespace Fluid { if (this->errors[(int)RefrigError::SatSupPress].count <= df->RefrigErrorLimitTest) { ShowSevereMessage( state, - EnergyPlus::format("{}: Refrigerant [{}] is saturated at the given enthalpy and temperature, saturated enthalpy at given " - "temperature returned. **", - routineName, - this->Name)); - ShowContinueError(state, fmt::format("...Called From:{}", CalledFrom)); + std::format("{}: Refrigerant [{}] is saturated at the given enthalpy and temperature, saturated enthalpy at given " + "temperature returned. **", + routineName, + this->Name)); + ShowContinueError(state, std::format("...Called From:{}", CalledFrom)); ShowContinueError(state, EnergyPlus::format("Refrigerant temperature = {:.2R}", Temperature)); ShowContinueError(state, EnergyPlus::format("Refrigerant Enthalpy = {:.3R}", Enthalpy)); ShowContinueError(state, EnergyPlus::format("Returned Pressure value = {:.0R}", ReturnValue)); @@ -3666,7 +3657,7 @@ namespace Fluid { } ShowRecurringSevereErrorAtEnd( state, - EnergyPlus::format("{}: Refrigerant [{}] saturated at the given enthalpy and temperature **", routineName, this->Name), + std::format("{}: Refrigerant [{}] saturated at the given enthalpy and temperature **", routineName, this->Name), this->errors[(int)RefrigError::SatSupPress].index, ReturnValue, "{Pa}"); @@ -3676,16 +3667,16 @@ namespace Fluid { this->errors[(int)RefrigError::SatSupPressTemp].count += CurTempRangeErrCount; if (CurTempRangeErrCount > 0) { if (this->errors[(int)RefrigError::SatSupPressTemp].count <= df->RefrigErrorLimitTest) { - ShowWarningMessage( - state, - EnergyPlus::format( - "{}: Refrigerant [{}] Temperature is out of range for superheated pressure: values capped **", routineName, this->Name)); - ShowContinueError(state, fmt::format(" Called From:{}", CalledFrom)); + ShowWarningMessage(state, + std::format("{}: Refrigerant [{}] Temperature is out of range for superheated pressure: values capped **", + routineName, + this->Name)); + ShowContinueError(state, std::format(" Called From:{}", CalledFrom)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{}: Refrigerant [{}] Temperature is out of range for superheated pressure: values capped **", routineName, this->Name), this->errors[(int)RefrigError::SatSupPressTemp].index, Temperature, @@ -3697,16 +3688,15 @@ namespace Fluid { if (CurEnthalpyRangeErrCount > 0) { if (this->errors[(int)RefrigError::SatSupPressEnthalpy].count <= df->RefrigErrorLimitTest) { ShowWarningMessage(state, - EnergyPlus::format("{}: Refrigerant [{}] Pressure is out of range for superheated enthalpy: values capped **", - routineName, - this->Name)); - ShowContinueError(state, fmt::format(" Called From:{}", CalledFrom)); + std::format("{}: Refrigerant [{}] Pressure is out of range for superheated enthalpy: values capped **", + routineName, + this->Name)); + ShowContinueError(state, std::format(" Called From:{}", CalledFrom)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{}: Refrigerant [{}] Pressure is out of range for superheated pressure: values capped **", routineName, this->Name), + std::format("{}: Refrigerant [{}] Pressure is out of range for superheated pressure: values capped **", routineName, this->Name), this->errors[(int)RefrigError::SatSupPressEnthalpy].index, Enthalpy, "{J}"); @@ -3729,7 +3719,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, std::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -3775,43 +3765,42 @@ namespace Fluid { // check temperature data range and attempt to cap if necessary RefTHigh = this->PsHighTempValue; - RefTSat = this->getSatTemperature(state, Pressure, fmt::format("{}:{}", routineName, CalledFrom)); + RefTSat = this->getSatTemperature(state, Pressure, std::format("{}:{}", routineName, CalledFrom)); if (TempLow < RefTSat) { ShowWarningMessage( state, - EnergyPlus::format("{}: Refrigerant [{}] temperature lower bound is out of range for superheated refrigerant: values capped **", - routineName, - this->Name)); - ShowContinueError(state, fmt::format(" Called From:{}", CalledFrom)); + std::format("{}: Refrigerant [{}] temperature lower bound is out of range for superheated refrigerant: values capped **", + routineName, + this->Name)); + ShowContinueError(state, std::format(" Called From:{}", CalledFrom)); ShowContinueErrorTimeStamp(state, ""); TempLow = RefTSat; } if (TempUp > RefTHigh) { ShowWarningMessage( state, - EnergyPlus::format("{}: Refrigerant [{}] temperature lower bound is out of range for superheated refrigerant: values capped **", - routineName, - this->Name)); - ShowContinueError(state, fmt::format(" Called From:{}", CalledFrom)); + std::format("{}: Refrigerant [{}] temperature lower bound is out of range for superheated refrigerant: values capped **", + routineName, + this->Name)); + ShowContinueError(state, std::format(" Called From:{}", CalledFrom)); ShowContinueErrorTimeStamp(state, ""); TempUp = RefTHigh; } if (TempLow >= TempUp) { - ShowWarningMessage( - state, - EnergyPlus::format("{}Refrigerant [{}] temperature lower bound is out of range for superheated refrigerant: values capped **", - routineName, - this->Name)); - ShowContinueError(state, fmt::format(" Called From:{}", CalledFrom)); + ShowWarningMessage(state, + std::format("{}Refrigerant [{}] temperature lower bound is out of range for superheated refrigerant: values capped **", + routineName, + this->Name)); + ShowContinueError(state, std::format(" Called From:{}", CalledFrom)); ShowContinueErrorTimeStamp(state, ""); TempLow = RefTSat; TempUp = RefTHigh; } // check enthalpy data range and attempt to cap if necessary - EnthalpyLow = this->getSupHeatEnthalpy(state, TempLow, Pressure, fmt::format("{}:{}", routineName, CalledFrom)); - EnthalpyHigh = this->getSupHeatEnthalpy(state, TempUp, Pressure, fmt::format("{}:{}", routineName, CalledFrom)); + EnthalpyLow = this->getSupHeatEnthalpy(state, TempLow, Pressure, std::format("{}:{}", routineName, CalledFrom)); + EnthalpyHigh = this->getSupHeatEnthalpy(state, TempUp, Pressure, std::format("{}:{}", routineName, CalledFrom)); if (Enthalpy <= EnthalpyLow) { ReturnValue = TempLow; return ReturnValue; @@ -3859,7 +3848,7 @@ namespace Fluid { if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, std::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -4005,23 +3994,21 @@ namespace Fluid { if (this->errors[(int)RefrigError::SatSupDensity].count <= df->RefrigErrorLimitTest) { ShowWarningMessage( state, - EnergyPlus::format( - "{}: Refrigerant [{}] is saturated at the given conditions, saturated density at given temperature returned. **", - routineName, - this->Name)); - ShowContinueError(state, fmt::format("...Called From:{}", CalledFrom)); + std::format("{}: Refrigerant [{}] is saturated at the given conditions, saturated density at given temperature returned. **", + routineName, + this->Name)); + ShowContinueError(state, std::format("...Called From:{}", CalledFrom)); ShowContinueError(state, EnergyPlus::format("Refrigerant temperature = {:.2R}", Temperature)); ShowContinueError(state, EnergyPlus::format("Refrigerant pressure = {:.0R}", Pressure)); ShowContinueError(state, EnergyPlus::format("Returned Density value = {:.3R}", saturated_density)); ShowContinueErrorTimeStamp(state, ""); } if (df->SatErrCountGetSupHeatDensityRefrig > 0) { - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{}: Refrigerant [{}] saturated at the given conditions **", routineName, this->Name), - this->errors[(int)RefrigError::SatSupEnthalpy].index, - Temperature, - "{C}"); + ShowRecurringWarningErrorAtEnd(state, + std::format("{}: Refrigerant [{}] saturated at the given conditions **", routineName, this->Name), + this->errors[(int)RefrigError::SatSupEnthalpy].index, + Temperature, + "{C}"); } return saturated_density; } @@ -4031,16 +4018,16 @@ namespace Fluid { this->errors[(int)RefrigError::SatSupDensityTemp].count += CurTempRangeErrCount; if (CurTempRangeErrCount > 0) { if (this->errors[(int)RefrigError::SatSupDensityTemp].count <= df->RefrigErrorLimitTest) { - ShowWarningMessage( - state, - EnergyPlus::format( - "{}: Refrigerant [{}] Temperature is out of range for superheated density: values capped **", routineName, this->Name)); - ShowContinueError(state, fmt::format(" Called From:{}", CalledFrom)); + ShowWarningMessage(state, + std::format("{}: Refrigerant [{}] Temperature is out of range for superheated density: values capped **", + routineName, + this->Name)); + ShowContinueError(state, std::format(" Called From:{}", CalledFrom)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{}: Refrigerant [{}] Temperature is out of range for superheated density: values capped **", routineName, this->Name), this->errors[(int)RefrigError::SatSupDensityTemp].index, Temperature, @@ -4052,16 +4039,15 @@ namespace Fluid { if (CurPresRangeErrCount > 0) { if (this->errors[(int)RefrigError::SatSupDensityPress].count <= df->RefrigErrorLimitTest) { ShowWarningMessage(state, - EnergyPlus::format("{}: Refrigerant [{}] Pressure is out of range for superheated density: values capped **", - routineName, - this->Name)); - ShowContinueError(state, fmt::format(" Called From:{}", CalledFrom)); + std::format("{}: Refrigerant [{}] Pressure is out of range for superheated density: values capped **", + routineName, + this->Name)); + ShowContinueError(state, std::format(" Called From:{}", CalledFrom)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{}: Refrigerant [{}] Pressure is out of range for superheated density: values capped **", routineName, this->Name), + std::format("{}: Refrigerant [{}] Pressure is out of range for superheated density: values capped **", routineName, this->Name), this->errors[(int)RefrigError::SatSupDensityPress].index, Pressure, "{Pa}"); @@ -4083,7 +4069,7 @@ namespace Fluid { auto &df = state.dataFluid; if (RefrigIndex == 0) { if ((RefrigIndex = GetRefrigNum(state, refrigName)) == 0) { - ShowSevereError(state, EnergyPlus::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); + ShowSevereError(state, std::format("Refrigerant \"{}\" not found, called from: {}", refrigName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -4169,9 +4155,9 @@ namespace Fluid { df->glycolErrorLimits[(int)GlycolError::SpecHeatLow] = ++this->errors[(int)GlycolError::SpecHeatLow].count; if (df->glycolErrorLimits[(int)GlycolError::SpecHeatLow] <= df->GlycolErrorLimitTest) { ShowWarningMessage(state, - EnergyPlus::format("{}: Temperature is out of range (too low) for fluid [{}] specific heat supplied values **", - routineName, - this->Name)); + std::format("{}: Temperature is out of range (too low) for fluid [{}] specific heat supplied values **", + routineName, + this->Name)); ShowContinueError(state, EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", CalledFrom, @@ -4182,7 +4168,7 @@ namespace Fluid { } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{}: Temperature out of range (too low) for fluid [{}] specific heat **", routineName, this->Name), + std::format("{}: Temperature out of range (too low) for fluid [{}] specific heat **", routineName, this->Name), this->errors[(int)GlycolError::SpecHeatLow].index, Temp, "{C}"); @@ -4194,8 +4180,7 @@ namespace Fluid { df->glycolErrorLimits[(int)GlycolError::SpecHeatHigh] = ++this->errors[(int)GlycolError::SpecHeatHigh].count; if (df->glycolErrorLimits[(int)GlycolError::SpecHeatHigh] <= df->GlycolErrorLimitTest) { ShowWarningMessage( - state, - EnergyPlus::format("{}: Temperature is out of range (too high) for fluid [{}] specific heat **", routineName, this->Name)); + state, std::format("{}: Temperature is out of range (too high) for fluid [{}] specific heat **", routineName, this->Name)); ShowContinueError(state, EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", CalledFrom, @@ -4206,7 +4191,7 @@ namespace Fluid { } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{}: Temperature out of range (too high) for fluid [{}] specific heat **", routineName, this->Name), + std::format("{}: Temperature out of range (too high) for fluid [{}] specific heat **", routineName, this->Name), this->errors[(int)GlycolError::SpecHeatHigh].index, Temp, "{C}"); @@ -4243,7 +4228,7 @@ namespace Fluid { if (GlycolIndex == 0) { if ((GlycolIndex = GetGlycolNum(state, glycolName)) == 0) { - ShowSevereError(state, EnergyPlus::format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); + ShowSevereError(state, std::format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -4320,8 +4305,8 @@ namespace Fluid { if (error == GlycolError::DensityLow) { if (df->glycolErrorLimits[(int)error] <= df->GlycolErrorLimitTest) { - ShowWarningMessage( - state, EnergyPlus::format("{}: Temperature is out of range (too low) for fluid [{}] density **", routineName, this->Name)); + ShowWarningMessage(state, + std::format("{}: Temperature is out of range (too low) for fluid [{}] density **", routineName, this->Name)); ShowContinueError(state, EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", CalledFrom, @@ -4333,15 +4318,15 @@ namespace Fluid { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{}: Temperature out of range (too low) for fluid [{}] density **", routineName, this->Name), + std::format("{}: Temperature out of range (too low) for fluid [{}] density **", routineName, this->Name), this->errors[(int)GlycolError::DensityLow].index, Temp, "{C}"); } else { // error == GlycolError::DensityHigh if (df->glycolErrorLimits[(int)error] <= df->GlycolErrorLimitTest) { - ShowWarningMessage( - state, EnergyPlus::format("{}: Temperature is out of range (too high) for fluid [{}] density **", routineName, this->Name)); + ShowWarningMessage(state, + std::format("{}: Temperature is out of range (too high) for fluid [{}] density **", routineName, this->Name)); ShowContinueError(state, EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", CalledFrom, @@ -4352,7 +4337,7 @@ namespace Fluid { } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{}: Temperature out of range (too high) for fluid [{}] density **", routineName, this->Name), + std::format("{}: Temperature out of range (too high) for fluid [{}] density **", routineName, this->Name), this->errors[(int)GlycolError::DensityHigh].index, Temp, "{C}"); @@ -4375,7 +4360,7 @@ namespace Fluid { if (GlycolIndex == 0) { if ((GlycolIndex = GetGlycolNum(state, glycolName)) == 0) { - ShowSevereError(state, EnergyPlus::format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); + ShowSevereError(state, std::format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -4423,8 +4408,8 @@ namespace Fluid { // If user didn't input data (shouldn't get this far, but just in case...), we can't find a value if (!this->CondDataPresent) { - ShowSevereError( - state, EnergyPlus::format("{}: conductivity data not found for glycol \"{}\", called from {}", routineName, this->Name, CalledFrom)); + ShowSevereError(state, + std::format("{}: conductivity data not found for glycol \"{}\", called from {}", routineName, this->Name, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -4457,8 +4442,7 @@ namespace Fluid { if (error == GlycolError::ConductivityLow) { if (df->glycolErrorLimits[(int)error] <= df->GlycolErrorLimitTest) { ShowWarningMessage( - state, - EnergyPlus::format("{}: Temperature is out of range (too low) for fluid [{}] conductivity **", routineName, this->Name)); + state, std::format("{}: Temperature is out of range (too low) for fluid [{}] conductivity **", routineName, this->Name)); ShowContinueError(state, EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", CalledFrom, @@ -4470,7 +4454,7 @@ namespace Fluid { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{}: Temperature out of range (too low) for fluid [{}] conductivity **", routineName, this->Name), + std::format("{}: Temperature out of range (too low) for fluid [{}] conductivity **", routineName, this->Name), this->errors[(int)error].index, Temp, "{C}"); @@ -4479,8 +4463,7 @@ namespace Fluid { else if (error == GlycolError::ConductivityHigh) { if (df->glycolErrorLimits[(int)error] <= df->GlycolErrorLimitTest) { ShowWarningMessage( - state, - EnergyPlus::format("{}: Temperature is out of range (too high) for fluid [{}] conductivity **", routineName, this->Name)); + state, std::format("{}: Temperature is out of range (too high) for fluid [{}] conductivity **", routineName, this->Name)); ShowContinueError(state, EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", CalledFrom, @@ -4492,7 +4475,7 @@ namespace Fluid { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{}: Temperature out of range (too high) for fluid [{}] conductivity **", routineName, this->Name), + std::format("{}: Temperature out of range (too high) for fluid [{}] conductivity **", routineName, this->Name), this->errors[(int)error].index, Temp, "{C}"); @@ -4514,7 +4497,7 @@ namespace Fluid { if (GlycolIndex == 0) { if ((GlycolIndex = GetGlycolNum(state, glycolName)) == 0) { - ShowSevereError(state, EnergyPlus::format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); + ShowSevereError(state, std::format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -4563,8 +4546,8 @@ namespace Fluid { // If user didn't input data (shouldn't get this far, but just in case...), we can't find a value if (!this->ViscDataPresent) { - ShowSevereError( - state, EnergyPlus::format("{}: viscosity data not found for glycol \"{}\", called from {}", routineName, this->Name, CalledFrom)); + ShowSevereError(state, + std::format("{}: viscosity data not found for glycol \"{}\", called from {}", routineName, this->Name, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -4596,8 +4579,8 @@ namespace Fluid { if (error == GlycolError::ViscosityLow) { if (df->glycolErrorLimits[(int)error] <= df->GlycolErrorLimitTest) { - ShowWarningMessage( - state, EnergyPlus::format("{}: Temperature is out of range (too low) for fluid [{}] viscosity **", routineName, this->Name)); + ShowWarningMessage(state, + std::format("{}: Temperature is out of range (too low) for fluid [{}] viscosity **", routineName, this->Name)); ShowContinueError(state, EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", CalledFrom, @@ -4609,7 +4592,7 @@ namespace Fluid { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{}: Temperature out of range (too low) for fluid [{}] viscosity **", routineName, this->Name), + std::format("{}: Temperature out of range (too low) for fluid [{}] viscosity **", routineName, this->Name), this->errors[(int)GlycolError::ViscosityLow].index, Temp, "{C}"); @@ -4618,7 +4601,7 @@ namespace Fluid { else if (error == GlycolError::ViscosityHigh) { if (df->glycolErrorLimits[(int)error] <= df->GlycolErrorLimitTest) { ShowWarningMessage( - state, EnergyPlus::format("{}: Temperature is out of range (too high) for fluid [{}] viscosity **", routineName, this->Name)); + state, std::format("{}: Temperature is out of range (too high) for fluid [{}] viscosity **", routineName, this->Name)); ShowContinueError(state, EnergyPlus::format("..Called From:{},Temperature=[{:.2R}], supplied data range=[{:.2R},{:.2R}]", CalledFrom, @@ -4630,7 +4613,7 @@ namespace Fluid { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{}: Temperature out of range (too high) for fluid [{}] viscosity **", routineName, this->Name), + std::format("{}: Temperature out of range (too high) for fluid [{}] viscosity **", routineName, this->Name), this->errors[(int)GlycolError::ViscosityHigh].index, Temp, "{C}"); @@ -4652,7 +4635,7 @@ namespace Fluid { if (GlycolIndex == 0) { if ((GlycolIndex = GetGlycolNum(state, glycolName)) == 0) { - ShowSevereError(state, EnergyPlus::format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); + ShowSevereError(state, std::format("Glycol \"{}\" not found, called from: {}", glycolName, CalledFrom)); ShowFatalError(state, "Program terminates due to preceding condition."); return 0.0; } @@ -4961,7 +4944,7 @@ namespace Fluid { // send warning if (df->TempRangeErrCountGetInterpolatedSatProp <= df->RefrigErrorLimitTest) { ShowWarningError(state, "GetInterpolatedSatProp: Saturation temperature for interpolation is out of range of data supplied: **"); - ShowContinueErrorTimeStamp(state, fmt::format(" Called from:{}", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Called from:{}", CalledFrom)); ShowContinueError(state, EnergyPlus::format("Refrigerant temperature = {:.2R}", Temperature)); ShowContinueError(state, EnergyPlus::format("Returned saturated property value = {:.3R}", ReturnValue)); } else { @@ -5007,7 +4990,7 @@ namespace Fluid { NeedOrphanMessage = false; } if (state.dataGlobal->DisplayUnusedObjects) { - ShowMessage(state, EnergyPlus::format("Refrigerant={}", refrig->Name)); + ShowMessage(state, std::format("Refrigerant={}", refrig->Name)); } else { ++NumUnusedRefrig; } @@ -5034,7 +5017,7 @@ namespace Fluid { NeedOrphanMessage = false; } if (state.dataGlobal->DisplayUnusedObjects) { - ShowMessage(state, EnergyPlus::format("Glycol={}", glycol->Name)); + ShowMessage(state, std::format("Glycol={}", glycol->Name)); } else { ++NumUnusedGlycol; } @@ -5042,10 +5025,10 @@ namespace Fluid { if (NumUnusedRefrig > 0 || NumUnusedGlycol > 0) { if (NumUnusedRefrig > 0) { - ShowMessage(state, EnergyPlus::format("There are {} unused refrigerants in input.", NumUnusedRefrig)); + ShowMessage(state, std::format("There are {} unused refrigerants in input.", NumUnusedRefrig)); } if (NumUnusedGlycol > 0) { - ShowMessage(state, EnergyPlus::format("There are {} unused glycols in input.", NumUnusedGlycol)); + ShowMessage(state, std::format("There are {} unused glycols in input.", NumUnusedGlycol)); } ShowMessage(state, "Use Output:Diagnostics,DisplayUnusedObjects; to see them."); } diff --git a/src/EnergyPlus/FluidProperties.hh b/src/EnergyPlus/FluidProperties.hh index 6697319e7a0..cfac528ab7e 100644 --- a/src/EnergyPlus/FluidProperties.hh +++ b/src/EnergyPlus/FluidProperties.hh @@ -54,13 +54,12 @@ // ObjexxFCL Headers #include #include -#include // EnergyPlus Headers #include #include #include -#include +#include namespace EnergyPlus { diff --git a/src/EnergyPlus/FuelCellElectricGenerator.cc b/src/EnergyPlus/FuelCellElectricGenerator.cc index bf293f6c5aa..2fb034fb167 100644 --- a/src/EnergyPlus/FuelCellElectricGenerator.cc +++ b/src/EnergyPlus/FuelCellElectricGenerator.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -711,7 +712,7 @@ namespace FuelCellElectricGenerator { int NumFuelCellAuxilHeaters = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (NumFuelCellAuxilHeaters <= 0) { - ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -770,8 +771,8 @@ namespace FuelCellElectricGenerator { } } } else { - ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, std::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -780,8 +781,8 @@ namespace FuelCellElectricGenerator { s_ipsc->cCurrentModuleObject = "Generator:FuelCell:ExhaustGasToWaterHeatExchanger"; int NumFCExhaustGasHXs = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (NumFCExhaustGasHXs <= 0) { - ShowWarningError(state, EnergyPlus::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("Fuel Cell model requires an {} object", s_ipsc->cCurrentModuleObject)); + ShowWarningError(state, std::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowContinueError(state, std::format("Fuel Cell model requires an {} object", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -871,8 +872,8 @@ namespace FuelCellElectricGenerator { // store cooling water volume flow rate for autosizing system PlantUtilities::RegisterPlantCompDesignFlow(state, fuelCell.ExhaustHX.WaterInNode, fuelCell.ExhaustHX.WaterVolumeFlowMax); } else { - ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, std::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -881,8 +882,8 @@ namespace FuelCellElectricGenerator { int NumFCElecStorageUnits = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (NumFCElecStorageUnits <= 0) { - ShowWarningError(state, EnergyPlus::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("Fuel Cell model requires an {} object", s_ipsc->cCurrentModuleObject)); + ShowWarningError(state, std::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowContinueError(state, std::format("Fuel Cell model requires an {} object", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -909,8 +910,8 @@ namespace FuelCellElectricGenerator { if (Util::SameString(AlphArray(2), "SimpleEfficiencyWithConstraints")) { fuelCell.ElecStorage.StorageModelMode = DataGenerators::ElectricalStorage::SimpleEffConstraints; } else { - ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(2), AlphArray(2))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, std::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(2), AlphArray(2))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } @@ -928,8 +929,8 @@ namespace FuelCellElectricGenerator { } } } else { - ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, std::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -938,8 +939,8 @@ namespace FuelCellElectricGenerator { int NumFCPowerCondUnits = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, s_ipsc->cCurrentModuleObject); if (NumFCPowerCondUnits <= 0) { - ShowWarningError(state, EnergyPlus::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("Fuel Cell model requires a {} object", s_ipsc->cCurrentModuleObject)); + ShowWarningError(state, std::format("No {} equipment specified in input file", s_ipsc->cCurrentModuleObject)); + ShowContinueError(state, std::format("Fuel Cell model requires a {} object", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -994,8 +995,8 @@ namespace FuelCellElectricGenerator { } } } else { - ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, std::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -1070,8 +1071,8 @@ namespace FuelCellElectricGenerator { fuelCell.StackCooler.StackCoolerPresent = true; } else { - ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, std::format("Invalid, {} = {}", s_ipsc->cAlphaFieldNames(1), AlphArray(1))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -1928,7 +1929,7 @@ namespace FuelCellElectricGenerator { if (NdotExcessAir < 0) { // can't meet stoichiometric fuel reaction ShowWarningError(state, "Air flow rate into fuel cell is too low for stoichiometric fuel reaction"); - ShowContinueError(state, EnergyPlus::format("Increase air flow in GENERATOR:FC:AIR SUPPLY object:{}", this->AirSup.Name)); + ShowContinueError(state, std::format("Increase air flow in GENERATOR:FC:AIR SUPPLY object:{}", this->AirSup.Name)); } // figure CO2 and Water rate from products (coefs setup during one-time processing in gas phase library ) diff --git a/src/EnergyPlus/Furnaces.cc b/src/EnergyPlus/Furnaces.cc index c7f30ba1c50..ecc3ab595bc 100644 --- a/src/EnergyPlus/Furnaces.cc +++ b/src/EnergyPlus/Furnaces.cc @@ -48,12 +48,15 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include -// EnergyPlus Headers +// Local Headers #include + +// EnergyPlus Headers #include #include #include @@ -1047,7 +1050,7 @@ namespace Furnaces { } else if (lAlphaBlanks(5) && thisFurnace.fanType != HVAC::FanType::OnOff) { ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisFurnace.Name)); ShowContinueError(state, EnergyPlus::format("{} = {}", cAlphaFields(7), Alphas(7))); - ShowContinueError(state, EnergyPlus::format("Fan type must be Fan:OnOff when {} = Blank.", cAlphaFields(5))); + ShowContinueError(state, std::format("Fan type must be Fan:OnOff when {} = Blank.", cAlphaFields(5))); ErrorsFound = true; } } @@ -1062,12 +1065,12 @@ namespace Furnaces { errFlag = false; thisFurnace.heatCoilType = HeatingCoils::GetHeatingCoilTypeNum(state, Alphas(10), HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { ValidateComponent(state, Alphas(10), HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -1076,7 +1079,7 @@ namespace Furnaces { errFlag = false; HeatingCoils::GetCoilIndex(state, HeatingCoilName, thisFurnace.HeatingCoilIndex, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1085,7 +1088,7 @@ namespace Furnaces { thisFurnace.DesignHeatingCapacity = HeatingCoils::GetCoilCapacity(state, HVAC::coilTypeNames[(int)thisFurnace.heatCoilType], HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1095,7 +1098,7 @@ namespace Furnaces { HeatingCoils::GetCoilInletNode(state, HVAC::coilTypeNames[(int)thisFurnace.heatCoilType], HeatingCoilName, errFlag); thisFurnace.HWCoilAirInletNode = HeatingCoilInletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1104,7 +1107,7 @@ namespace Furnaces { HeatingCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, HVAC::coilTypeNames[(int)thisFurnace.heatCoilType], HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1115,7 +1118,7 @@ namespace Furnaces { thisFurnace.heatCoilType = HVAC::CoilType::HeatingWater; ValidateComponent(state, HVAC::coilTypeNames[(int)thisFurnace.heatCoilType], HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -1124,7 +1127,7 @@ namespace Furnaces { thisFurnace.CoilControlNode = WaterCoils::GetCoilWaterInletNode(state, HVAC::coilTypeNames[(int)thisFurnace.heatCoilType], HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1133,7 +1136,7 @@ namespace Furnaces { thisFurnace.MaxHeatCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, HVAC::coilTypeNames[(int)thisFurnace.heatCoilType], HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1143,7 +1146,7 @@ namespace Furnaces { WaterCoils::GetCoilInletNode(state, HVAC::coilTypeNames[(int)thisFurnace.heatCoilType], HeatingCoilName, errFlag); thisFurnace.HWCoilAirInletNode = HeatingCoilInletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1153,7 +1156,7 @@ namespace Furnaces { WaterCoils::GetCoilOutletNode(state, HVAC::coilTypeNames[(int)thisFurnace.heatCoilType], HeatingCoilName, errFlag); thisFurnace.HWCoilAirOutletNode = HeatingCoilOutletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1161,9 +1164,8 @@ namespace Furnaces { errFlag = false; HVACControllers::CheckCoilWaterInletNode(state, thisFurnace.CoilControlNode, errFlag); if (!errFlag) { // then did find a controller so that is bad - ShowSevereError( - state, - EnergyPlus::format("{} = {} has a conflicting Controller:WaterCoil object", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError(state, + std::format("{} = {} has a conflicting Controller:WaterCoil object", CurrentModuleObject, thisFurnace.Name)); ShowContinueError(state, "Hot water coils are controlled directly by unitary and furnace systems."); ShowContinueError(state, "No water coil controller should be input for the coil."); ErrorsFound = true; @@ -1174,15 +1176,15 @@ namespace Furnaces { thisFurnace.heatCoilType = HVAC::CoilType::HeatingSteam; ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object errFlag = false; thisFurnace.HeatingCoilIndex = SteamCoils::GetSteamCoilIndex(state, "COIL:HEATING:STEAM", HeatingCoilName, errFlag); if (thisFurnace.HeatingCoilIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(11), HeatingCoilName)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError(state, std::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(11), HeatingCoilName)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1190,7 +1192,7 @@ namespace Furnaces { errFlag = false; thisFurnace.CoilControlNode = SteamCoils::GetCoilSteamInletNode(state, "COIL:HEATING:STEAM", HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1206,7 +1208,7 @@ namespace Furnaces { HeatingCoilInletNode = SteamCoils::GetCoilAirInletNode(state, thisFurnace.HeatingCoilIndex, HeatingCoilName, errFlag); thisFurnace.HWCoilAirInletNode = HeatingCoilInletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1215,14 +1217,14 @@ namespace Furnaces { HeatingCoilOutletNode = SteamCoils::GetCoilAirOutletNode(state, thisFurnace.HeatingCoilIndex, HeatingCoilName, errFlag); thisFurnace.HWCoilAirOutletNode = HeatingCoilOutletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(11), Alphas(11))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(11), Alphas(11))); ErrorsFound = true; } // IF (Furnace(FurnaceNum)%heatCoilType == Coil_HeatingGasOrOtherFuel .OR. &, etc. @@ -1234,58 +1236,55 @@ namespace Furnaces { CompSetHeatOutlet = Alphas(4); // Fan inlet node name must not be the same as the furnace inlet node name if (FanInletNode != thisFurnace.FurnaceInletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); if (thisFurnace.type == HVAC::UnitarySysType::Furnace_HeatOnly) { ShowContinueError( state, "When a blow through fan is specified, the fan inlet node name must be the same as the furnace inlet node name."); - ShowContinueError(state, EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError(state, std::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); ShowContinueError( - state, - EnergyPlus::format("...Furnace inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + state, std::format("...Furnace inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); } else { ShowContinueError( state, "When a blow through fan is specified, the fan inlet node name must be the same as the unitary system inlet node name."); - ShowContinueError(state, - EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); - ShowContinueError(state, - EnergyPlus::format("...Unitary System inlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + ShowContinueError(state, std::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError( + state, + std::format("...Unitary System inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); } ErrorsFound = true; } // Fan outlet node name must be the same as the heating coil inlet node name if (FanOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError( state, "When a blow through fan is specified, the fan outlet node name must be the same as the heating coil inlet node name."); - ShowContinueError(state, EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, - EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + ShowContinueError(state, std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); + ShowContinueError(state, std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ErrorsFound = true; } // Heating coil outlet node name must be the same as the furnace outlet node name if (HeatingCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); if (thisFurnace.type == HVAC::UnitarySysType::Furnace_HeatOnly) { ShowContinueError(state, "When a blow through fan is specified, the heating coil outlet node name must be the same as the furnace " "outlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Furnace outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError( + state, + std::format("...Furnace outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } else { ShowContinueError(state, "When a blow through fan is specified, the heating coil outlet node name must be the same as the unitary " "system outlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...UnitarySystem outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError( + state, + std::format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } ErrorsFound = true; } @@ -1296,59 +1295,56 @@ namespace Furnaces { CompSetFanOutlet = Alphas(4); // Heating coil inlet node name must not be the same as the furnace inlet node name if (HeatingCoilInletNode != thisFurnace.FurnaceInletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); if (thisFurnace.type == HVAC::UnitarySysType::Furnace_HeatOnly) { ShowContinueError(state, "When a draw through fan is specified, the heating coil inlet node name must be the same as the furnace " "inlet node name."); + ShowContinueError(state, + std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ShowContinueError( - state, EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); - ShowContinueError( - state, - EnergyPlus::format("...Furnace inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + state, std::format("...Furnace inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); } else { ShowContinueError(state, "When a draw through fan is specified, the heating coil inlet node name must be the same as the unitary " "system inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ShowContinueError(state, - EnergyPlus::format("...UnitarySystem inlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + ShowContinueError( + state, + std::format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); } ErrorsFound = true; } // Heating coil outlet node name must be the same as the fan inlet node name if (HeatingCoilOutletNode != FanInletNode) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError( state, "When a draw through fan is specified, the heating coil outlet node name must be the same as the fan inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError(state, + std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, std::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); ErrorsFound = true; } // Fan coil outlet node name must be the same as the furnace outlet node name if (FanOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); if (thisFurnace.type == HVAC::UnitarySysType::Furnace_HeatOnly) { ShowContinueError( state, "When a draw through fan is specified, the fan outlet node name must be the same as the furnace outlet node name."); - ShowContinueError(state, EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); + ShowContinueError(state, std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); ShowContinueError( - state, - EnergyPlus::format("...Furnace outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + state, std::format("...Furnace outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } else { ShowContinueError(state, "When a draw through fan is specified, the fan outlet node name must be the same as the unitary system " "outlet node name."); - ShowContinueError(state, - EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, - EnergyPlus::format("...UnitarySystem outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + ShowContinueError(state, std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); + ShowContinueError( + state, + std::format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } ErrorsFound = true; } @@ -1368,10 +1364,10 @@ namespace Furnaces { // Compare the flow rates. if (thisFurnace.ActualFanVolFlowRate != DataSizing::AutoSize && thisFurnace.DesignFanVolFlowRate != DataSizing::AutoSize) { if (thisFurnace.DesignFanVolFlowRate > thisFurnace.ActualFanVolFlowRate) { - ShowWarningError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, - EnergyPlus::format("... The {} > Max Volume Flow Rate defined in the associated fan object, should be <=.", - cNumericFields(2))); + ShowWarningError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError( + state, + std::format("... The {} > Max Volume Flow Rate defined in the associated fan object, should be <=.", cNumericFields(2))); ShowContinueError(state, EnergyPlus::format("... Entered value = {:.4R}... Fan [{} = {}] Max Value = {:.4R}", thisFurnace.DesignFanVolFlowRate, @@ -1384,8 +1380,8 @@ namespace Furnaces { } if (thisFurnace.DesignFanVolFlowRate != DataSizing::AutoSize) { if (thisFurnace.DesignFanVolFlowRate <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("... The {} <= 0.0, it must be > 0.0.", cNumericFields(2))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("... The {} <= 0.0, it must be > 0.0.", cNumericFields(2))); ShowContinueError(state, EnergyPlus::format("... Entered value = {:.2R}", thisFurnace.DesignFanVolFlowRate)); ErrorsFound = true; } @@ -1498,8 +1494,8 @@ namespace Furnaces { // Get the Controlling Zone or Location of the Furnace Thermostat thisFurnace.ControlZoneNum = Util::FindItemInList(Alphas(6), state.dataHeatBal->Zone); if (thisFurnace.ControlZoneNum == 0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(6), Alphas(6))); ErrorsFound = true; } @@ -1552,17 +1548,17 @@ namespace Furnaces { } } if (!AirNodeFound) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find air node (zone with thermostat)."); - ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(6), Alphas(6))); + ShowContinueError(state, std::format("Specified {} = {}", cAlphaFields(6), Alphas(6))); ShowContinueError( state, "Both a ZoneHVAC:EquipmentConnections object and a ZoneControl:Thermostat object must be specified for this zone."); ErrorsFound = true; } if (!AirLoopFound) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find correct AirLoopHVAC."); - ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(6), Alphas(6))); + ShowContinueError(state, std::format("Specified {} = {}", cAlphaFields(6), Alphas(6))); ErrorsFound = true; } } @@ -1573,8 +1569,8 @@ namespace Furnaces { thisFurnace.fanType = static_cast(getEnumValue(HVAC::fanTypeNamesUC, Alphas(7))); if (thisFurnace.fanType != HVAC::FanType::OnOff && thisFurnace.fanType != HVAC::FanType::Constant) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(7), Alphas(7))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(7), Alphas(7))); ErrorsFound = true; } else if ((thisFurnace.FanIndex = Fans::GetFanIndex(state, FanName)) == 0) { @@ -1591,23 +1587,22 @@ namespace Furnaces { // Check fan's schedule for cycling fan operation if constant volume fan is used if (thisFurnace.fanOpModeSched != nullptr && thisFurnace.fanType == HVAC::FanType::Constant) { if (!thisFurnace.fanOpModeSched->checkMinMaxVals(state, Clusive::Ex, 0.0, Clusive::In, 1.0)) { - Sched::ShowSevereBadMinMax(state, - eoh, - cAlphaFields(5), - Alphas(5), - Clusive::In, - 0.0, - Clusive::In, - 1.0, - EnergyPlus::format("For {} = {}, fan operating mode must be continuous (schedule values > 0)", - cAlphaFields(7), - Alphas(7))); + Sched::ShowSevereBadMinMax( + state, + eoh, + cAlphaFields(5), + Alphas(5), + Clusive::In, + 0.0, + Clusive::In, + 1.0, + std::format("For {} = {}, fan operating mode must be continuous (schedule values > 0)", cAlphaFields(7), Alphas(7))); ErrorsFound = true; } } else if (lAlphaBlanks(5) && thisFurnace.fanType != HVAC::FanType::OnOff) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisFurnace.Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", cAlphaFields(7), Alphas(7))); - ShowContinueError(state, EnergyPlus::format("Fan type must be Fan:OnOff when {} = Blank.", cAlphaFields(5))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("{} = {}", cAlphaFields(7), Alphas(7))); + ShowContinueError(state, std::format("Fan type must be Fan:OnOff when {} = Blank.", cAlphaFields(5))); ErrorsFound = true; } } @@ -1624,13 +1619,13 @@ namespace Furnaces { errFlag = false; thisFurnace.heatCoilType = HeatingCoils::GetHeatingCoilTypeNum(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil @@ -1639,7 +1634,7 @@ namespace Furnaces { errFlag = false; HeatingCoils::GetCoilIndex(state, HeatingCoilName, thisFurnace.HeatingCoilIndex, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1647,7 +1642,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignHeatingCapacity = HeatingCoils::GetCoilCapacity(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1655,7 +1650,7 @@ namespace Furnaces { errFlag = false; HeatingCoilInletNode = HeatingCoils::GetCoilInletNode(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1663,7 +1658,7 @@ namespace Furnaces { errFlag = false; HeatingCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1671,7 +1666,7 @@ namespace Furnaces { errFlag = false; HeatingCoilPLFCurveIndex = HeatingCoils::GetHeatingCoilPLFCurveIndex(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1682,7 +1677,7 @@ namespace Furnaces { thisFurnace.heatCoilType = HVAC::CoilType::HeatingWater; ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -1690,7 +1685,7 @@ namespace Furnaces { errFlag = false; thisFurnace.CoilControlNode = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1698,7 +1693,7 @@ namespace Furnaces { errFlag = false; thisFurnace.MaxHeatCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1707,7 +1702,7 @@ namespace Furnaces { HeatingCoilInletNode = WaterCoils::GetCoilInletNode(state, "Coil:Heating:Water", HeatingCoilName, errFlag); thisFurnace.HWCoilAirInletNode = HeatingCoilInletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1716,7 +1711,7 @@ namespace Furnaces { HeatingCoilOutletNode = WaterCoils::GetCoilOutletNode(state, "Coil:Heating:Water", HeatingCoilName, errFlag); thisFurnace.HWCoilAirOutletNode = HeatingCoilOutletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1724,9 +1719,8 @@ namespace Furnaces { errFlag = false; HVACControllers::CheckCoilWaterInletNode(state, thisFurnace.CoilControlNode, errFlag); if (!errFlag) { // then did find a controller so that is bad - ShowSevereError( - state, - EnergyPlus::format("{} = {} has a conflicting Controller:WaterCoil object", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError(state, + std::format("{} = {} has a conflicting Controller:WaterCoil object", CurrentModuleObject, thisFurnace.Name)); ShowContinueError(state, "Hot water coils are controlled directly by unitary and furnace systems."); ShowContinueError(state, "No water coil controller should be input for the coil."); ErrorsFound = true; @@ -1737,15 +1731,15 @@ namespace Furnaces { thisFurnace.heatCoilType = HVAC::CoilType::HeatingSteam; ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object errFlag = false; thisFurnace.HeatingCoilIndex = SteamCoils::GetSteamCoilIndex(state, "COIL:HEATING:STEAM", HeatingCoilName, errFlag); if (thisFurnace.HeatingCoilIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(11), HeatingCoilName)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError(state, std::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(11), HeatingCoilName)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1753,7 +1747,7 @@ namespace Furnaces { errFlag = false; thisFurnace.CoilControlNode = SteamCoils::GetCoilSteamInletNode(state, "Coil:Heating:Steam", HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1770,7 +1764,7 @@ namespace Furnaces { HeatingCoilInletNode = SteamCoils::GetCoilAirInletNode(state, thisFurnace.HeatingCoilIndex, HeatingCoilName, errFlag); thisFurnace.HWCoilAirInletNode = HeatingCoilInletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -1779,14 +1773,14 @@ namespace Furnaces { HeatingCoilOutletNode = SteamCoils::GetCoilAirOutletNode(state, thisFurnace.HeatingCoilIndex, HeatingCoilName, errFlag); thisFurnace.HWCoilAirOutletNode = HeatingCoilOutletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(11), Alphas(11))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(11), Alphas(11))); ErrorsFound = true; } // IF (Furnace(FurnaceNum)%heatCoilType == Coil_HeatingGasOrOtherFuel .OR. &, etc. @@ -1816,7 +1810,7 @@ namespace Furnaces { if (thisFurnace.coolCoilType == HVAC::CoilType::CoolingDXSingleSpeed) { ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from DX cooling coil @@ -1824,7 +1818,7 @@ namespace Furnaces { // Get DX cooling coil index DXCoils::GetDXCoilIndex(state, CoolingCoilName, thisFurnace.CoolingCoilIndex, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1832,7 +1826,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignCoolingCapacity = DXCoils::GetCoilCapacity(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1841,7 +1835,7 @@ namespace Furnaces { CoolingCoilInletNode = DXCoils::GetCoilInletNode(state, CoolingCoilType, CoolingCoilName, errFlag); CoolingCoilOutletNode = DXCoils::GetCoilOutletNode(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1859,7 +1853,7 @@ namespace Furnaces { thisFurnace.CondenserNodeNum = DXCoils::GetCoilCondenserInletNode(state, CoolingCoilType, CoolingCoilName, errFlag); } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1873,7 +1867,7 @@ namespace Furnaces { } else if (thisFurnace.coolCoilType == HVAC::CoilType::CoolingDXHXAssisted) { ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heat exchanger assisted cooling coil @@ -1881,7 +1875,7 @@ namespace Furnaces { // Get DX heat exchanger assisted cooling coil index HVACHXAssistedCoolingCoil::GetHXDXCoilIndex(state, CoolingCoilName, thisFurnace.CoolingCoilIndex, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1889,7 +1883,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignCoolingCapacity = HVACHXAssistedCoolingCoil::GetCoilCapacity(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1898,7 +1892,7 @@ namespace Furnaces { CoolingCoilInletNode = HVACHXAssistedCoolingCoil::GetCoilInletNode(state, CoolingCoilType, CoolingCoilName, errFlag); CoolingCoilOutletNode = HVACHXAssistedCoolingCoil::GetCoilOutletNode(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1907,7 +1901,7 @@ namespace Furnaces { std::string ChildCoolingCoilName = HVACHXAssistedCoolingCoil::GetHXDXCoilName(state, CoolingCoilType, CoolingCoilName, IsNotOK); std::string ChildCoolingCoilType = HVACHXAssistedCoolingCoil::GetHXDXCoilType(state, CoolingCoilType, CoolingCoilName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1916,7 +1910,7 @@ namespace Furnaces { int childCCIndex = CoilCoolingDX::factory(state, ChildCoolingCoilName); if (childCCIndex < 0) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, Alphas(1))); errFlag = true; ErrorsFound = true; } @@ -1943,7 +1937,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1971,7 +1965,7 @@ namespace Furnaces { ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { errFlag = false; @@ -1985,7 +1979,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2002,13 +1996,13 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(12), Alphas(12))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(12), Alphas(12))); ErrorsFound = true; } @@ -2018,8 +2012,8 @@ namespace Furnaces { thisFurnace.DehumidControlType_Num = DehumidificationControlMode::Multimode; thisFurnace.Humidistat = true; if (thisFurnace.coolCoilType != HVAC::CoilType::CoolingDXHXAssisted) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(14), Alphas(14))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(14), Alphas(14))); ShowContinueError(state, "Multimode control must be used with a Heat Exchanger Assisted Cooling Coil."); if (lAlphaBlanks(15)) { ShowContinueError(state, @@ -2037,7 +2031,7 @@ namespace Furnaces { thisFurnace.DehumidControlType_Num = DehumidificationControlMode::CoolReheat; thisFurnace.Humidistat = true; if (lAlphaBlanks(15)) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Dehumidification control type is assumed to be None since a reheat coil has not been specified and the " "simulation continues."); @@ -2057,15 +2051,15 @@ namespace Furnaces { AirNodeFound = true; } if (!AirNodeFound) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find Air Node (Zone with Humidistat)."); - ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(6), Alphas(6))); + ShowContinueError(state, std::format("Specified {} = {}", cAlphaFields(6), Alphas(6))); ErrorsFound = true; } } } else { // invalid input - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(14), Alphas(14))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(14), Alphas(14))); thisFurnace.Humidistat = false; ErrorsFound = true; } @@ -2093,13 +2087,13 @@ namespace Furnaces { thisFurnace.suppHeatCoilType = HeatingCoils::GetHeatingCoilTypeNum(state, ReheatingCoilType, ReheatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { ValidateComponent(state, ReheatingCoilType, ReheatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("In {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("In {} \"{}\"", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from reheat coil @@ -2107,7 +2101,7 @@ namespace Furnaces { // Get the heating coil index HeatingCoils::GetCoilIndex(state, ReheatingCoilName, thisFurnace.SuppHeatCoilIndex, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2116,7 +2110,7 @@ namespace Furnaces { thisFurnace.DesignSuppHeatingCapacity = HeatingCoils::GetCoilCapacity(state, ReheatingCoilType, ReheatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2124,7 +2118,7 @@ namespace Furnaces { errFlag = false; ReheatCoilInletNode = HeatingCoils::GetCoilInletNode(state, ReheatingCoilType, ReheatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2132,7 +2126,7 @@ namespace Furnaces { errFlag = false; ReheatCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, ReheatingCoilType, ReheatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2143,7 +2137,7 @@ namespace Furnaces { thisFurnace.suppHeatCoilType = HVAC::CoilType::HeatingWater; ValidateComponent(state, ReheatingCoilType, ReheatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -2151,7 +2145,7 @@ namespace Furnaces { errFlag = false; thisFurnace.SuppCoilControlNode = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", ReheatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -2160,7 +2154,7 @@ namespace Furnaces { thisFurnace.MaxSuppCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", ReheatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -2169,7 +2163,7 @@ namespace Furnaces { ReheatCoilInletNode = WaterCoils::GetCoilInletNode(state, "Coil:Heating:Water", ReheatingCoilName, errFlag); thisFurnace.SuppCoilAirInletNode = ReheatCoilInletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -2178,7 +2172,7 @@ namespace Furnaces { ReheatCoilOutletNode = WaterCoils::GetCoilOutletNode(state, "Coil:Heating:Water", ReheatingCoilName, errFlag); thisFurnace.SuppCoilAirOutletNode = ReheatCoilOutletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -2187,8 +2181,7 @@ namespace Furnaces { HVACControllers::CheckCoilWaterInletNode(state, thisFurnace.CoilControlNode, errFlag); if (!errFlag) { // then did find a controller so that is bad ShowSevereError( - state, - EnergyPlus::format("{} = {} has a conflicting Controller:WaterCoil object", CurrentModuleObject, thisFurnace.Name)); + state, std::format("{} = {} has a conflicting Controller:WaterCoil object", CurrentModuleObject, thisFurnace.Name)); ShowContinueError(state, "Hot water coils are controlled directly by unitary and furnace systems."); ShowContinueError(state, "No water coil controller should be input for the coil."); ErrorsFound = true; @@ -2199,16 +2192,15 @@ namespace Furnaces { thisFurnace.suppHeatCoilType = HVAC::CoilType::HeatingSteam; ValidateComponent(state, ReheatingCoilType, ReheatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object errFlag = false; thisFurnace.SuppHeatCoilIndex = SteamCoils::GetSteamCoilIndex(state, "COIL:HEATING:STEAM", ReheatingCoilName, errFlag); if (thisFurnace.SuppHeatCoilIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(11), ReheatingCoilName)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError(state, std::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(11), ReheatingCoilName)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -2216,7 +2208,7 @@ namespace Furnaces { errFlag = false; thisFurnace.SuppCoilControlNode = SteamCoils::GetCoilSteamInletNode(state, "Coil:Heating:Steam", ReheatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -2234,7 +2226,7 @@ namespace Furnaces { ReheatCoilInletNode = SteamCoils::GetCoilAirInletNode(state, thisFurnace.SuppHeatCoilIndex, ReheatingCoilName, errFlag); thisFurnace.SuppCoilAirInletNode = ReheatCoilInletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -2243,14 +2235,14 @@ namespace Furnaces { ReheatCoilOutletNode = SteamCoils::GetCoilAirOutletNode(state, thisFurnace.SuppHeatCoilIndex, ReheatingCoilName, errFlag); thisFurnace.SuppCoilAirOutletNode = ReheatCoilOutletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } } } else { // Illegal heating coil - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(15), Alphas(15))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(15), Alphas(15))); ErrorsFound = true; } // IF (Furnace(FurnaceNum)%SuppHeatCoilType_Num == Coil_HeatingGasOrOtherFuel .OR. &, etc. @@ -2259,153 +2251,142 @@ namespace Furnaces { if (thisFurnace.fanPlace == HVAC::FanPlace::BlowThru) { if (FanInletNode != thisFurnace.FurnaceInletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); if (thisFurnace.type == HVAC::UnitarySysType::Furnace_HeatCool) { ShowContinueError( state, "When a blow through fan is specified, the fan inlet node name must be the same as the furnace inlet node name."); - ShowContinueError(state, EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError(state, std::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); ShowContinueError( - state, - EnergyPlus::format("...Furnace inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + state, std::format("...Furnace inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); } else { ShowContinueError( state, "When a blow through fan is specified, the fan inlet node name must be the same as the unitary system inlet node name."); - ShowContinueError(state, - EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); - ShowContinueError(state, - EnergyPlus::format("...UnitarySystem inlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + ShowContinueError(state, std::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError( + state, + std::format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); } ErrorsFound = true; } if (thisFurnace.CoolingCoilUpstream) { if (FanOutletNode != CoolingCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError( state, "When a blow through fan is specified, the fan outlet node name must be the same as the cooling coil inlet node name."); + ShowContinueError(state, std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + std::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The cooling coil outlet node name must be the same as the heating coil inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + ShowContinueError(state, + std::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, + std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ErrorsFound = true; } if ((thisFurnace.Humidistat && thisFurnace.DehumidControlType_Num == DehumidificationControlMode::CoolReheat) || ReheatCoilInletNode > 0) { if (HeatingCoilOutletNode != ReheatCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "When a blow through fan is specified, the heating coil outlet node name must be the same as the " "reheat coil inlet node name."); ShowContinueError( - state, - EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...Reheat coil inlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilInletNode))); + state, std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, + std::format("...Reheat coil inlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilInletNode))); ErrorsFound = true; } if (ReheatCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); if (thisFurnace.type == HVAC::UnitarySysType::Furnace_HeatCool) { ShowContinueError(state, "The reheat coil outlet node name must be the same as the furnace outlet node name."); ShowContinueError( - state, - EnergyPlus::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); + state, std::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Furnace outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("...Furnace outlet node name = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } else { ShowContinueError(state, "The reheat coil outlet node name must be the same as the unitary system outlet node name."); ShowContinueError( - state, - EnergyPlus::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); + state, std::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...UnitarySystem outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("...UnitarySystem outlet node name = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } ErrorsFound = true; } } else { // IF((Furnace(FurnaceNum)%Humidistat ... // Heating coil outlet node name must be the same as the furnace outlet node name if (HeatingCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); if (thisFurnace.type == HVAC::UnitarySysType::Furnace_HeatOnly) { ShowContinueError(state, "When a blow through fan is specified, the heating coil outlet node name must be the same as the " "furnace outlet node name."); ShowContinueError( - state, - EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + state, std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Furnace outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("...Furnace outlet node name = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } else { ShowContinueError(state, "When a blow through fan is specified, the heating coil outlet node name must be the same as the " "unitary system outlet node name."); ShowContinueError( - state, - EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + state, std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...UnitarySystem outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("...UnitarySystem outlet node name = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } ErrorsFound = true; } } } else { // IF(Furnace(FurnaceNum)%CoolingCoilUpstream)THEN if (FanOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError( state, "When a blow through fan is specified, the fan outlet node name must be the same as the heating coil inlet node name."); + ShowContinueError(state, std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ErrorsFound = true; } if (HeatingCoilOutletNode != CoolingCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The heating coil outlet node name must be the same as the cooling coil inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + ShowContinueError(state, + std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, + std::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); ErrorsFound = true; } if (CoolingCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); if (thisFurnace.type == HVAC::UnitarySysType::Furnace_HeatCool) { ShowContinueError(state, "When a blow through fan is specified, the cooling coil outlet node name must be the same as the " "furnace outlet node name."); + ShowContinueError( + state, std::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); ShowContinueError( state, - EnergyPlus::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, - EnergyPlus::format("...Furnace outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("...Furnace outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } else { ShowContinueError(state, "When a blow through fan is specified, the cooling coil outlet node name must be the same as the " "unitary system outlet node name."); ShowContinueError( - state, - EnergyPlus::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + state, std::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...UnitarySystem outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("...UnitarySystem outlet node name = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } ErrorsFound = true; } @@ -2415,162 +2396,153 @@ namespace Furnaces { if (thisFurnace.CoolingCoilUpstream) { if (CoolingCoilInletNode != thisFurnace.FurnaceInletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); if (thisFurnace.type == HVAC::UnitarySysType::Furnace_HeatCool) { ShowContinueError(state, "When a draw through fan is specified, the cooling coil inlet node name must be the same as the " "furnace inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); ShowContinueError(state, - EnergyPlus::format("...Furnace inlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + std::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + ShowContinueError( + state, + std::format("...Furnace inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); } else { ShowContinueError(state, "When a draw through fan is specified, the cooling coil inlet node name must be the same as the " "unitary system inlet node name."); + ShowContinueError( + state, std::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); ShowContinueError( state, - EnergyPlus::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); - ShowContinueError(state, - EnergyPlus::format("...UnitarySystem inlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + std::format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); } ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The cooling coil outlet node name must be the same as the heating coil inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + ShowContinueError(state, + std::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, + std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ErrorsFound = true; } if (HeatingCoilOutletNode != FanInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError( state, "When a draw through fan is specified, the heating coil outlet node name must be the same as the fan inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, std::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); ErrorsFound = true; } if ((thisFurnace.Humidistat && thisFurnace.DehumidControlType_Num == DehumidificationControlMode::CoolReheat) || ReheatCoilInletNode > 0) { if (FanOutletNode != ReheatCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "When a draw through fan is specified, the fan outlet node name must be the same as the reheat coil " "inlet node name."); + ShowContinueError(state, std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...Reheat coil inlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilInletNode))); + std::format("...Reheat coil inlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilInletNode))); ErrorsFound = true; } if (ReheatCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); if (thisFurnace.type == HVAC::UnitarySysType::Furnace_HeatCool) { ShowContinueError(state, "The reheat coil outlet node name must be the same as the furnace outlet node name."); ShowContinueError( - state, - EnergyPlus::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); + state, std::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Furnace outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("...Furnace outlet node name = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } else { ShowContinueError(state, "The reheat coil outlet node name must be the same as the unitary system outlet node name."); ShowContinueError( - state, - EnergyPlus::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); + state, std::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(ReheatCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...UnitarySystem outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("...UnitarySystem outlet node name = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } ErrorsFound = true; } } else { if (FanOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "When a draw through fan is specified, the fan outlet node name must be the same as the unitary system " "outlet node name."); + ShowContinueError(state, std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, - EnergyPlus::format("...Unitary system outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("...Unitary system outlet node name = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); ErrorsFound = true; } } } else { // IF(Furnace(FurnaceNum)%CoolingCoilUpstream)THEN if (HeatingCoilInletNode != thisFurnace.FurnaceInletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); if (thisFurnace.type == HVAC::UnitarySysType::Furnace_HeatCool) { ShowContinueError(state, "When a draw through fan is specified, the heating coil inlet node name must be the same as the " "furnace inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ShowContinueError(state, - EnergyPlus::format("...Furnace inlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + ShowContinueError( + state, + std::format("...Furnace inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); } else { ShowContinueError(state, "When a draw through fan is specified, the heating coil inlet node name must be the same as the " "unitary system inlet node name."); + ShowContinueError( + state, std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ShowContinueError( state, - EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); - ShowContinueError(state, - EnergyPlus::format("...UnitarySystem inlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + std::format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); } ErrorsFound = true; } if (HeatingCoilOutletNode != CoolingCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The heating coil outlet node name must be the same as the cooling coil inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + ShowContinueError(state, + std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, + std::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); ErrorsFound = true; } if (CoolingCoilOutletNode != FanInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError( state, "When a draw through fan is specified, the cooling coil outlet node name must be the same as the fan inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + std::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, std::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); ErrorsFound = true; } if (FanOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); if (thisFurnace.type == HVAC::UnitarySysType::Furnace_HeatCool) { ShowContinueError( state, "When a draw through fan is specified, the fan outlet node name must be the same as the furnace outlet node name."); - ShowContinueError(state, - EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, - EnergyPlus::format("...Furnace outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + ShowContinueError(state, std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); + ShowContinueError( + state, + std::format("...Furnace outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } else { ShowContinueError(state, "When a draw through fan is specified, the fan outlet node name must be the same as the unitary system " "outlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); ShowContinueError(state, - EnergyPlus::format("...UnitarySystem outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); + ShowContinueError( + state, + std::format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); } ErrorsFound = true; } @@ -2641,22 +2613,22 @@ namespace Furnaces { thisFurnace.MaxCoolAirVolFlow = Numbers(2); if (thisFurnace.MaxCoolAirVolFlow <= 0 && thisFurnace.MaxCoolAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(2), Numbers(2))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {:.7f}", cNumericFields(2), Numbers(2))); ErrorsFound = true; } thisFurnace.MaxHeatAirVolFlow = Numbers(3); if (thisFurnace.MaxHeatAirVolFlow <= 0 && thisFurnace.MaxHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(3), Numbers(3))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {:.7f}", cNumericFields(3), Numbers(3))); ErrorsFound = true; } thisFurnace.MaxNoCoolHeatAirVolFlow = Numbers(4); if (thisFurnace.MaxNoCoolHeatAirVolFlow < 0 && thisFurnace.MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(4), Numbers(4))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {:.7f}", cNumericFields(4), Numbers(4))); ErrorsFound = true; } @@ -2679,7 +2651,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2693,28 +2665,24 @@ namespace Furnaces { if (thisFurnace.ActualFanVolFlowRate != DataSizing::AutoSize) { if (thisFurnace.ActualFanVolFlowRate < thisFurnace.MaxCoolAirVolFlow && thisFurnace.MaxCoolAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError( state, - EnergyPlus::format( - "... air flow rate = {:.7T} in fan object {} is less than the maximum HVAC system air flow rate in cooling mode.", - thisFurnace.ActualFanVolFlowRate, - FanName)); - ShowContinueError(state, - EnergyPlus::format(" The {} is reset to the fan flow rate and the simulation continues.", cNumericFields(2))); + std::format("... air flow rate = {:.7f} in fan object {} is less than the maximum HVAC system air flow rate in cooling mode.", + thisFurnace.ActualFanVolFlowRate, + FanName)); + ShowContinueError(state, std::format(" The {} is reset to the fan flow rate and the simulation continues.", cNumericFields(2))); thisFurnace.MaxCoolAirVolFlow = thisFurnace.ActualFanVolFlowRate; thisFurnace.DesignFanVolFlowRate = thisFurnace.ActualFanVolFlowRate; } if (thisFurnace.ActualFanVolFlowRate < thisFurnace.MaxHeatAirVolFlow && thisFurnace.MaxHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError( state, - EnergyPlus::format( - "... air flow rate = {:.7T} in fan object {} is less than the maximum HVAC system air flow rate in heating mode.", - thisFurnace.ActualFanVolFlowRate, - FanName)); - ShowContinueError(state, - EnergyPlus::format(" The {} is reset to the fan flow rate and the simulation continues.", cNumericFields(3))); + std::format("... air flow rate = {:.7f} in fan object {} is less than the maximum HVAC system air flow rate in heating mode.", + thisFurnace.ActualFanVolFlowRate, + FanName)); + ShowContinueError(state, std::format(" The {} is reset to the fan flow rate and the simulation continues.", cNumericFields(3))); thisFurnace.MaxHeatAirVolFlow = thisFurnace.ActualFanVolFlowRate; thisFurnace.DesignFanVolFlowRate = thisFurnace.ActualFanVolFlowRate; } @@ -2748,7 +2716,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } @@ -2838,8 +2806,8 @@ namespace Furnaces { // Get the Controlling Zone or Location of the Furnace Thermostat thisFurnace.ControlZoneNum = Util::FindItemInList(Alphas(5), state.dataHeatBal->Zone); if (thisFurnace.ControlZoneNum == 0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } @@ -2892,17 +2860,17 @@ namespace Furnaces { } } if (!AirNodeFound) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find air node (zone with thermostat)."); - ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); + ShowContinueError(state, std::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); ShowContinueError( state, "Both a ZoneHVAC:EquipmentConnections object and a ZoneControl:Thermostat object must be specified for this zone."); ErrorsFound = true; } if (!AirLoopFound) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find correct AirLoopHVAC."); - ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); + ShowContinueError(state, std::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } } @@ -2943,21 +2911,21 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } if (thisFurnace.heatCoilType == HVAC::CoilType::HeatingDXSingleSpeed) { ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from DX heating coil DXCoils::GetDXCoilIndex(state, HeatingCoilName, thisFurnace.HeatingCoilIndex, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2966,7 +2934,7 @@ namespace Furnaces { HeatingCoilInletNode = DXCoils::GetCoilInletNode(state, HeatingCoilType, HeatingCoilName, errFlag); HeatingCoilOutletNode = DXCoils::GetCoilOutletNode(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2974,7 +2942,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignHeatingCapacity = DXCoils::GetCoilCapacity(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} ={}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -2982,7 +2950,7 @@ namespace Furnaces { } else if (thisFurnace.heatCoilType == HVAC::CoilType::HeatingDXVariableSpeed) { ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { if (thisFurnace.bIsIHP) { @@ -3001,8 +2969,8 @@ namespace Furnaces { } } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(8), Alphas(8))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(8), Alphas(8))); ErrorsFound = true; } @@ -3021,7 +2989,7 @@ namespace Furnaces { ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from DX cooling coil @@ -3049,7 +3017,7 @@ namespace Furnaces { CoolingCoilInletNode = DXCoils::GetCoilInletNode(state, CoolingCoilType, CoolingCoilName, errFlag); CoolingCoilOutletNode = DXCoils::GetCoilOutletNode(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3057,7 +3025,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignCoolingCapacity = DXCoils::GetCoilCapacity(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3069,7 +3037,7 @@ namespace Furnaces { CoolingCoilInletNode = HVACHXAssistedCoolingCoil::GetCoilInletNode(state, CoolingCoilType, CoolingCoilName, errFlag); CoolingCoilOutletNode = HVACHXAssistedCoolingCoil::GetCoilOutletNode(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3077,7 +3045,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignCoolingCapacity = HVACHXAssistedCoolingCoil::GetCoilCapacity(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3091,7 +3059,7 @@ namespace Furnaces { // Furnace(FurnaceNum)%DXCoolCoilName = CoolingCoilName ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { errFlag = false; @@ -3105,7 +3073,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...specified in {}=\"{}\".", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3124,13 +3092,13 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); ErrorsFound = true; } } @@ -3159,20 +3127,20 @@ namespace Furnaces { thisFurnace.suppHeatCoilType = HeatingCoils::GetHeatingCoilTypeNum(state, SuppHeatCoilType, SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { IsNotOK = false; ValidateComponent(state, SuppHeatCoilType, SuppHeatCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("In {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("In {} \"{}\"", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from the supplemental heating coil HeatingCoils::GetCoilIndex(state, SuppHeatCoilName, thisFurnace.SuppHeatCoilIndex, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3180,7 +3148,7 @@ namespace Furnaces { errFlag = false; SupHeatCoilInletNode = HeatingCoils::GetCoilInletNode(state, SuppHeatCoilType, SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3189,7 +3157,7 @@ namespace Furnaces { SupHeatCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, SuppHeatCoilType, SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3197,7 +3165,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignSuppHeatingCapacity = HeatingCoils::GetCoilCapacity(state, SuppHeatCoilType, SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3207,7 +3175,7 @@ namespace Furnaces { thisFurnace.suppHeatCoilType = HVAC::CoilType::HeatingWater; ValidateComponent(state, SuppHeatCoilType, SuppHeatCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -3215,7 +3183,7 @@ namespace Furnaces { errFlag = false; thisFurnace.SuppCoilControlNode = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -3223,7 +3191,7 @@ namespace Furnaces { errFlag = false; thisFurnace.MaxSuppCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -3232,7 +3200,7 @@ namespace Furnaces { SupHeatCoilInletNode = WaterCoils::GetCoilInletNode(state, "Coil:Heating:Water", SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirInletNode = SupHeatCoilInletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -3241,15 +3209,14 @@ namespace Furnaces { SupHeatCoilOutletNode = WaterCoils::GetCoilOutletNode(state, "Coil:Heating:Water", SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirOutletNode = SupHeatCoilOutletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } errFlag = false; HVACControllers::CheckCoilWaterInletNode(state, thisFurnace.CoilControlNode, errFlag); if (!errFlag) { // then did find a controller so that is bad - ShowSevereError( - state, - EnergyPlus::format("{} = {} has a conflicting Controller:WaterCoil object", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError(state, + std::format("{} = {} has a conflicting Controller:WaterCoil object", CurrentModuleObject, thisFurnace.Name)); ShowContinueError(state, "Hot water coils are controlled directly by unitary and furnace systems."); ShowContinueError(state, "No water coil controller should be input for the coil."); ErrorsFound = true; @@ -3260,15 +3227,15 @@ namespace Furnaces { thisFurnace.suppHeatCoilType = HVAC::CoilType::HeatingSteam; ValidateComponent(state, SuppHeatCoilType, SuppHeatCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object errFlag = false; thisFurnace.SuppHeatCoilIndex = SteamCoils::GetSteamCoilIndex(state, "COIL:HEATING:STEAM", SuppHeatCoilName, errFlag); if (thisFurnace.SuppHeatCoilIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(12), SuppHeatCoilName)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError(state, std::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(12), SuppHeatCoilName)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -3276,7 +3243,7 @@ namespace Furnaces { errFlag = false; thisFurnace.SuppCoilControlNode = SteamCoils::GetCoilSteamInletNode(state, "Coil:Heating:Steam", SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -3294,7 +3261,7 @@ namespace Furnaces { SupHeatCoilInletNode = SteamCoils::GetCoilAirInletNode(state, thisFurnace.SuppHeatCoilIndex, SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirInletNode = SupHeatCoilInletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -3303,14 +3270,14 @@ namespace Furnaces { SupHeatCoilOutletNode = SteamCoils::GetCoilAirOutletNode(state, thisFurnace.SuppHeatCoilIndex, SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirOutletNode = SupHeatCoilOutletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(12), Alphas(12))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(12), Alphas(12))); ErrorsFound = true; } // IF (Furnace(FurnaceNum)%heatCoilType == Coil_HeatingGasOrOtherFuel .OR. &, etc. @@ -3320,9 +3287,9 @@ namespace Furnaces { if (lAlphaBlanks(15)) { thisFurnace.fanOp = HVAC::FanOp::Cycling; if (thisFurnace.fanType != HVAC::FanType::OnOff) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisFurnace.Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", cAlphaFields(6), Alphas(6))); - ShowContinueError(state, EnergyPlus::format("Fan type must be Fan:OnOff when {} = Blank.", cAlphaFields(15))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("{} = {}", cAlphaFields(6), Alphas(6))); + ShowContinueError(state, std::format("Fan type must be Fan:OnOff when {} = Blank.", cAlphaFields(15))); ErrorsFound = true; } } else if ((thisFurnace.fanOpModeSched = Sched::GetSchedule(state, Alphas(15))) == nullptr) { @@ -3341,7 +3308,7 @@ namespace Furnaces { 0.0, Clusive::In, 1.0, - EnergyPlus::format("For {} = {}, fan operating mode must be continuous (schedule values > 0)", cAlphaFields(7), Alphas(7))); + std::format("For {} = {}, fan operating mode must be continuous (schedule values > 0)", cAlphaFields(7), Alphas(7))); ErrorsFound = true; } @@ -3352,8 +3319,8 @@ namespace Furnaces { thisFurnace.DehumidControlType_Num = DehumidificationControlMode::Multimode; thisFurnace.Humidistat = true; if (thisFurnace.coolCoilType != HVAC::CoilType::CoolingDXHXAssisted) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(16), Alphas(16))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(16), Alphas(16))); ShowContinueError(state, "Multimode control must be used with a Heat Exchanger Assisted Cooling Coil."); ErrorsFound = true; } @@ -3374,16 +3341,16 @@ namespace Furnaces { AirNodeFound = true; } if (!AirNodeFound) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find Air Node (Zone with Humidistat)."); - ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); + ShowContinueError(state, std::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } } } else { // invalid input or blank if (!lAlphaBlanks(16)) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(16), Alphas(16))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(16), Alphas(16))); ErrorsFound = true; } else { thisFurnace.Humidistat = false; @@ -3394,114 +3361,104 @@ namespace Furnaces { // Check node names for child components if (thisFurnace.fanPlace == HVAC::FanPlace::BlowThru) { if (FanInletNode != thisFurnace.FurnaceInletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError( state, "When a blow through fan is specified, the fan inlet node name must be the same as the unitary system inlet node name."); - ShowContinueError(state, EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError(state, std::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); ShowContinueError( - state, - EnergyPlus::format("...Unitary system inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + state, std::format("...Unitary system inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); ErrorsFound = true; } if (FanOutletNode != CoolingCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError( state, "When a blow through fan is specified, the fan outlet node name must be the same as the cooling coil inlet node name."); - ShowContinueError(state, EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, - EnergyPlus::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + ShowContinueError(state, std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); + ShowContinueError(state, std::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The cooling coil outlet node name must be the same as the heating coil inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + std::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ErrorsFound = true; } if (HeatingCoilOutletNode != SupHeatCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "When a blow through fan is specified, the heating coil outlet node name must be the same as the supplemental " "heating coil inlet node name."); ShowContinueError( - state, - EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + state, std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); ShowContinueError( - state, - EnergyPlus::format("...Supplemental heating coil inlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); + state, std::format("...Supplemental heating coil inlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); ErrorsFound = true; } if (SupHeatCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The supplemental heating coil outlet node name must be the same as the unitary system outlet node name."); ShowContinueError( - state, - EnergyPlus::format("...Supplemental heating coil outlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); + state, std::format("...Supplemental heating coil outlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Unitary system outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("...Unitary system outlet node name = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); ErrorsFound = true; } } else { if (CoolingCoilInletNode != thisFurnace.FurnaceInletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "When a draw through fan is specified, the cooling coil inlet node name must be the same as the unitary system " "inlet node name."); + ShowContinueError(state, + std::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); ShowContinueError( - state, EnergyPlus::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); - ShowContinueError( - state, - EnergyPlus::format("...Unitary system inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + state, std::format("...Unitary system inlet node name = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The cooling coil outlet node name must be the same as the heating coil inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + std::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ErrorsFound = true; } if (HeatingCoilOutletNode != FanInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError( state, "When a draw through fan is specified, the heating coil outlet node name must be the same as the fan inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError(state, + std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, std::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); ErrorsFound = true; } if (FanOutletNode != SupHeatCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "When a draw through fan is specified, the fan outlet node name must be the same as the supplemental heating " "coil inlet node name."); + ShowContinueError(state, + std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); ShowContinueError( - state, EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError( - state, - EnergyPlus::format("...Supplemental heating coil inlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); + state, std::format("...Supplemental heating coil inlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); ErrorsFound = true; } if (SupHeatCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("For {} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "The supplemental heating coil outlet node name must be the same as the unitary system outlet node name."); ShowContinueError( - state, - EnergyPlus::format("...Supplemental heating coil outlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); + state, std::format("...Supplemental heating coil outlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Unitary system outlet node name = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("...Unitary system outlet node name = {}", + state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); ErrorsFound = true; } } @@ -3534,22 +3491,22 @@ namespace Furnaces { thisFurnace.MaxCoolAirVolFlow = Numbers(1); if (thisFurnace.MaxCoolAirVolFlow <= 0 && thisFurnace.MaxCoolAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(1), Numbers(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {:.7f}", cNumericFields(1), Numbers(1))); ErrorsFound = true; } thisFurnace.MaxHeatAirVolFlow = Numbers(2); if (thisFurnace.MaxHeatAirVolFlow <= 0 && thisFurnace.MaxHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(2), Numbers(2))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {:.7f}", cNumericFields(2), Numbers(2))); ErrorsFound = true; } thisFurnace.MaxNoCoolHeatAirVolFlow = Numbers(3); if (thisFurnace.MaxNoCoolHeatAirVolFlow < 0 && thisFurnace.MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(3), Numbers(3))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {:.7f}", cNumericFields(3), Numbers(3))); ErrorsFound = true; } @@ -3591,7 +3548,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3605,28 +3562,24 @@ namespace Furnaces { if (thisFurnace.ActualFanVolFlowRate != DataSizing::AutoSize) { if (thisFurnace.ActualFanVolFlowRate < thisFurnace.MaxCoolAirVolFlow && thisFurnace.MaxCoolAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError( state, - EnergyPlus::format( - "... air flow rate = {:.7T} in fan object {} is less than the maximum HVAC system air flow rate in cooling mode.", - thisFurnace.ActualFanVolFlowRate, - FanName)); - ShowContinueError(state, - EnergyPlus::format(" The {} is reset to the fan flow rate and the simulation continues.", cNumericFields(1))); + std::format("... air flow rate = {:.7f} in fan object {} is less than the maximum HVAC system air flow rate in cooling mode.", + thisFurnace.ActualFanVolFlowRate, + FanName)); + ShowContinueError(state, std::format(" The {} is reset to the fan flow rate and the simulation continues.", cNumericFields(1))); thisFurnace.MaxCoolAirVolFlow = thisFurnace.ActualFanVolFlowRate; thisFurnace.DesignFanVolFlowRate = thisFurnace.ActualFanVolFlowRate; } if (thisFurnace.ActualFanVolFlowRate < thisFurnace.MaxHeatAirVolFlow && thisFurnace.MaxHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError( state, - EnergyPlus::format( - "... air flow rate = {:.7T} in fan object {} is less than the maximum HVAC system air flow rate in heating mode.", - thisFurnace.ActualFanVolFlowRate, - FanName)); - ShowContinueError(state, - EnergyPlus::format(" The {} is reset to the fan flow rate and the simulation continues.", cNumericFields(2))); + std::format("... air flow rate = {:.7f} in fan object {} is less than the maximum HVAC system air flow rate in heating mode.", + thisFurnace.ActualFanVolFlowRate, + FanName)); + ShowContinueError(state, std::format(" The {} is reset to the fan flow rate and the simulation continues.", cNumericFields(2))); thisFurnace.MaxHeatAirVolFlow = thisFurnace.ActualFanVolFlowRate; thisFurnace.DesignFanVolFlowRate = thisFurnace.ActualFanVolFlowRate; } @@ -3654,7 +3607,7 @@ namespace Furnaces { errFlag); } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -3670,7 +3623,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } @@ -3687,7 +3640,7 @@ namespace Furnaces { } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } @@ -3785,8 +3738,8 @@ namespace Furnaces { // Get the Controlling Zone or Location of the Furnace Thermostat thisFurnace.ControlZoneNum = Util::FindItemInList(Alphas(5), state.dataHeatBal->Zone); if (thisFurnace.ControlZoneNum == 0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } @@ -3839,17 +3792,17 @@ namespace Furnaces { } } if (!AirNodeFound) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find air node (zone with thermostat)."); - ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); + ShowContinueError(state, std::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); ShowContinueError( state, "Both a ZoneHVAC:EquipmentConnections object and a ZoneControl:Thermostat object must be specified for this zone."); ErrorsFound = true; } if (!AirLoopFound) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find correct AirLoopHVAC."); - ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); + ShowContinueError(state, std::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } } @@ -3860,8 +3813,8 @@ namespace Furnaces { thisFurnace.fanType = static_cast(getEnumValue(HVAC::fanTypeNamesUC, Alphas(6))); if (thisFurnace.fanType != HVAC::FanType::OnOff) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(6), Alphas(6))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(6), Alphas(6))); ErrorsFound = true; } else if ((thisFurnace.FanIndex = Fans::GetFanIndex(state, FanName)) == 0) { @@ -3882,7 +3835,7 @@ namespace Furnaces { HeatingCoilName = Alphas(9); ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { thisFurnace.HeatingCoilIndex = WaterToAirHeatPump::GetCoilIndex(state, HeatingCoilType, HeatingCoilName, errFlag); @@ -3895,7 +3848,7 @@ namespace Furnaces { HeatingCoilName = Alphas(9); ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { thisFurnace.HeatingCoilIndex = WaterToAirHeatPumpSimple::GetCoilIndex(state, HeatingCoilType, HeatingCoilName, errFlag); @@ -3908,7 +3861,7 @@ namespace Furnaces { HeatingCoilName = Alphas(9); ValidateComponent(state, HeatingCoilType, HeatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { thisFurnace.HeatingCoilIndex = VariableSpeedCoils::GetCoilIndexVariableSpeed(state, HeatingCoilType, HeatingCoilName, errFlag); @@ -3916,8 +3869,8 @@ namespace Furnaces { HeatingCoilOutletNode = VariableSpeedCoils::GetCoilOutletNodeVariableSpeed(state, HeatingCoilType, HeatingCoilName, errFlag); } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(8), Alphas(8))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(8), Alphas(8))); ErrorsFound = true; } @@ -3928,7 +3881,7 @@ namespace Furnaces { CoolingCoilName = Alphas(11); ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { thisFurnace.CoolingCoilIndex = WaterToAirHeatPump::GetCoilIndex(state, CoolingCoilType, CoolingCoilName, errFlag); @@ -3941,7 +3894,7 @@ namespace Furnaces { CoolingCoilName = Alphas(11); ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { thisFurnace.CoolingCoilIndex = WaterToAirHeatPumpSimple::GetCoilIndex(state, CoolingCoilType, CoolingCoilName, errFlag); @@ -3954,7 +3907,7 @@ namespace Furnaces { CoolingCoilName = Alphas(11); ValidateComponent(state, CoolingCoilType, CoolingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { thisFurnace.CoolingCoilIndex = VariableSpeedCoils::GetCoilIndexVariableSpeed(state, CoolingCoilType, CoolingCoilName, errFlag); @@ -3962,8 +3915,8 @@ namespace Furnaces { CoolingCoilOutletNode = VariableSpeedCoils::GetCoilOutletNodeVariableSpeed(state, CoolingCoilType, CoolingCoilName, errFlag); } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(10), Alphas(10))); ErrorsFound = true; } @@ -3984,7 +3937,7 @@ namespace Furnaces { thisFurnace.WatertoAirHPType = WAHPCoilType::VarSpeedEquationFit; VariableSpeedCoils::SetVarSpeedCoilData(state, thisFurnace.CoolingCoilIndex, ErrorsFound, _, thisFurnace.HeatingCoilIndex); } else { - ShowContinueError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Cooling coil and heating coil should be of same general type"); ErrorsFound = true; } @@ -3998,20 +3951,20 @@ namespace Furnaces { thisFurnace.suppHeatCoilType = HeatingCoils::GetHeatingCoilTypeNum(state, Alphas(12), SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { IsNotOK = false; ValidateComponent(state, Alphas(12), SuppHeatCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("In {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("In {} \"{}\"", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from the supplemental heating coil HeatingCoils::GetCoilIndex(state, SuppHeatCoilName, thisFurnace.SuppHeatCoilIndex, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -4019,7 +3972,7 @@ namespace Furnaces { errFlag = false; SupHeatCoilInletNode = HeatingCoils::GetCoilInletNode(state, Alphas(12), SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -4027,7 +3980,7 @@ namespace Furnaces { errFlag = false; SupHeatCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, Alphas(12), SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -4035,7 +3988,7 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignSuppHeatingCapacity = HeatingCoils::GetCoilCapacity(state, Alphas(12), SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -4045,7 +3998,7 @@ namespace Furnaces { thisFurnace.suppHeatCoilType = HVAC::CoilType::HeatingWater; ValidateComponent(state, Alphas(12), SuppHeatCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -4053,7 +4006,7 @@ namespace Furnaces { errFlag = false; thisFurnace.SuppCoilControlNode = WaterCoils::GetCoilWaterInletNode(state, Alphas(12), SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -4061,7 +4014,7 @@ namespace Furnaces { errFlag = false; thisFurnace.MaxSuppCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, Alphas(12), SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -4070,7 +4023,7 @@ namespace Furnaces { SupHeatCoilInletNode = WaterCoils::GetCoilInletNode(state, Alphas(12), SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirInletNode = SupHeatCoilInletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -4079,16 +4032,15 @@ namespace Furnaces { SupHeatCoilOutletNode = WaterCoils::GetCoilOutletNode(state, Alphas(12), SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirOutletNode = SupHeatCoilOutletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } errFlag = false; HVACControllers::CheckCoilWaterInletNode(state, thisFurnace.CoilControlNode, errFlag); if (!errFlag) { // then did find a controller so that is bad - ShowSevereError( - state, - EnergyPlus::format("{} = {} has a conflicting Controller:WaterCoil object", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError(state, + std::format("{} = {} has a conflicting Controller:WaterCoil object", CurrentModuleObject, thisFurnace.Name)); ShowContinueError(state, "Hot water coils are controlled directly by unitary and furnace systems."); ShowContinueError(state, "No water coil controller should be input for the coil."); ErrorsFound = true; @@ -4099,15 +4051,15 @@ namespace Furnaces { thisFurnace.suppHeatCoilType = HVAC::CoilType::HeatingSteam; ValidateComponent(state, SuppHeatCoilType, SuppHeatCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object errFlag = false; thisFurnace.SuppHeatCoilIndex = SteamCoils::GetSteamCoilIndex(state, SuppHeatCoilType, SuppHeatCoilName, errFlag); if (thisFurnace.SuppHeatCoilIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(12), SuppHeatCoilName)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowSevereError(state, std::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(12), SuppHeatCoilName)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -4115,7 +4067,7 @@ namespace Furnaces { errFlag = false; thisFurnace.SuppCoilControlNode = SteamCoils::GetCoilSteamInletNode(state, "Coil:Heating:Steam", SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -4133,7 +4085,7 @@ namespace Furnaces { SupHeatCoilInletNode = SteamCoils::GetCoilAirInletNode(state, thisFurnace.SuppHeatCoilIndex, SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirInletNode = SupHeatCoilInletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -4142,14 +4094,14 @@ namespace Furnaces { SupHeatCoilOutletNode = SteamCoils::GetCoilAirOutletNode(state, thisFurnace.SuppHeatCoilIndex, SuppHeatCoilName, errFlag); thisFurnace.SuppCoilAirOutletNode = SupHeatCoilOutletNode; if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(12), Alphas(12))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(12), Alphas(12))); ErrorsFound = true; } // IF (Furnace(FurnaceNum)%heatCoilType == Coil_HeatingGasOrOtherFuel .OR. &, etc. @@ -4167,9 +4119,9 @@ namespace Furnaces { Node::ObjectIsNotParent); // need better verification. if (!OutAirNodeManager::CheckOutAirNodeNumber(state, thisFurnace.CondenserNodeNum)) { - ShowSevereError(state, EnergyPlus::format("For {} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError( - state, EnergyPlus::format(" Node name of outdoor dry-bulb temperature sensor not valid outdoor air node= {}", Alphas(14))); + ShowSevereError(state, std::format("For {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, + std::format(" Node name of outdoor dry-bulb temperature sensor not valid outdoor air node= {}", Alphas(14))); ShowContinueError(state, "...does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); ErrorsFound = true; } @@ -4181,9 +4133,9 @@ namespace Furnaces { if (lAlphaBlanks(16)) { thisFurnace.fanOp = HVAC::FanOp::Cycling; if (thisFurnace.fanType != HVAC::FanType::OnOff) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisFurnace.Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", cAlphaFields(6), Alphas(6))); - ShowContinueError(state, EnergyPlus::format("Fan type must be Fan:OnOff when {} = Blank.", cAlphaFields(16))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("{} = {}", cAlphaFields(6), Alphas(6))); + ShowContinueError(state, std::format("Fan type must be Fan:OnOff when {} = Blank.", cAlphaFields(16))); ErrorsFound = true; } } else if ((thisFurnace.fanOpModeSched = Sched::GetSchedule(state, Alphas(16))) == nullptr) { @@ -4198,7 +4150,7 @@ namespace Furnaces { thisFurnace.DehumidControlType_Num = DehumidificationControlMode::CoolReheat; thisFurnace.Humidistat = true; if (lAlphaBlanks(17)) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Dehumidification control type is assumed to be None since a supplemental reheat coil has not been " "specified and the simulation continues."); @@ -4218,16 +4170,16 @@ namespace Furnaces { AirNodeFound = true; } if (!AirNodeFound) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "Did not find Air Node (Zone with Humidistat)."); - ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); + ShowContinueError(state, std::format("Specified {} = {}", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } } } else { // invalid input or blank if (!lAlphaBlanks(17)) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(17), Alphas(17))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(17), Alphas(17))); ErrorsFound = true; } else { thisFurnace.Humidistat = false; @@ -4241,66 +4193,58 @@ namespace Furnaces { CompSetFanInlet = Alphas(3); CompSetCoolInlet = "UNDEFINED"; if (FanInletNode != thisFurnace.FurnaceInletNodeNum) { - ShowSevereError(state, - EnergyPlus::format("For {} = {}, Mismatch between unitary system inlet node and fan inlet node.", - CurrentModuleObject, - Alphas(1))); + ShowSevereError( + state, + std::format("For {} = {}, Mismatch between unitary system inlet node and fan inlet node.", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "..For \"BlowThrough\" fan, the inlet node name for the HeatPump should match the fan inlet node name."); - ShowContinueError(state, - EnergyPlus::format("..HeatPump Inlet Node = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); - ShowContinueError(state, EnergyPlus::format("..Fan Inlet Node = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError(state, std::format("..HeatPump Inlet Node = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + ShowContinueError(state, std::format("..Fan Inlet Node = {}", state.dataLoopNodes->NodeID(FanInletNode))); ErrorsFound = true; } if (FanOutletNode != CoolingCoilInletNode) { - ShowSevereError(state, - EnergyPlus::format("For {} = {}, Mismatch between fan outlet node and cooling coil inlet node.", - CurrentModuleObject, - Alphas(1))); + ShowSevereError( + state, + std::format("For {} = {}, Mismatch between fan outlet node and cooling coil inlet node.", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "..For \"BlowThrough\" fan, the fan outlet node name must match the cooling coil inlet node name."); - ShowContinueError(state, EnergyPlus::format("..Fan outlet node = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, EnergyPlus::format("..Cooling coil inlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + ShowContinueError(state, std::format("..Fan outlet node = {}", state.dataLoopNodes->NodeID(FanOutletNode))); + ShowContinueError(state, std::format("..Cooling coil inlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { ShowSevereError(state, - EnergyPlus::format("For {} = {}, Mismatch between cooling coil outlet node and heating coil inlet node.", - CurrentModuleObject, - Alphas(1))); + std::format("For {} = {}, Mismatch between cooling coil outlet node and heating coil inlet node.", + CurrentModuleObject, + Alphas(1))); ShowContinueError(state, "..The cooling coil outlet node name must match the heating coil inlet node name."); - ShowContinueError(state, - EnergyPlus::format("..Cooling coil outlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, - EnergyPlus::format("..Heating coil inlet node = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + ShowContinueError(state, std::format("..Cooling coil outlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, std::format("..Heating coil inlet node = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ErrorsFound = true; } if (HeatingCoilOutletNode != SupHeatCoilInletNode) { - ShowSevereError( - state, - EnergyPlus::format("For {} = {}, Mismatch between heating coil outlet node and supplemental heating coil inlet node.", - CurrentModuleObject, - Alphas(1))); + ShowSevereError(state, + std::format("For {} = {}, Mismatch between heating coil outlet node and supplemental heating coil inlet node.", + CurrentModuleObject, + Alphas(1))); ShowContinueError( state, "..For \"BlowThrough\" fan, the heating coil outlet node name must match the supplemental heating coil inlet node name."); - ShowContinueError( - state, EnergyPlus::format("..Heating coil outlet node = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError( - state, EnergyPlus::format("..Supplemental heating coil inlet node = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); + ShowContinueError(state, + std::format("..Heating coil outlet node = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, + std::format("..Supplemental heating coil inlet node = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); ErrorsFound = true; } if (SupHeatCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError( - state, - EnergyPlus::format("For {} = {}, Mismatch between supplemental heating coil outlet node and HeatPump outlet node.", - CurrentModuleObject, - Alphas(1))); + ShowSevereError(state, + std::format("For {} = {}, Mismatch between supplemental heating coil outlet node and HeatPump outlet node.", + CurrentModuleObject, + Alphas(1))); ShowContinueError(state, "..The supplemental heating coil outlet node name must match the HeatPump outlet node name."); + ShowContinueError( + state, std::format("..Supplemental heating coil outlet node = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); ShowContinueError( state, - EnergyPlus::format("..Supplemental heating coil outlet node = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); - ShowContinueError(state, - EnergyPlus::format("..HeatPump outlet node = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("..HeatPump outlet node = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); ErrorsFound = true; } } else { @@ -4308,67 +4252,60 @@ namespace Furnaces { CompSetCoolInlet = Alphas(3); if (CoolingCoilInletNode != thisFurnace.FurnaceInletNodeNum) { ShowSevereError(state, - EnergyPlus::format("For {} = {}, Mismatch between unitary system inlet node and cooling coil inlet node.", - CurrentModuleObject, - Alphas(1))); + std::format("For {} = {}, Mismatch between unitary system inlet node and cooling coil inlet node.", + CurrentModuleObject, + Alphas(1))); ShowContinueError( state, "..For \"DrawThrough\" fan, the inlet node name for the HeatPump should match the cooling coil inlet node name."); - ShowContinueError( - state, EnergyPlus::format("..HeatPump inlet node = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); - ShowContinueError(state, EnergyPlus::format("..Cooling coil inlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + ShowContinueError(state, + std::format("..HeatPump inlet node = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceInletNodeNum))); + ShowContinueError(state, std::format("..Cooling coil inlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { ShowSevereError(state, - EnergyPlus::format("For {} = {}, Mismatch between cooling coil outlet node and heating coil inlet node.", - CurrentModuleObject, - Alphas(1))); + std::format("For {} = {}, Mismatch between cooling coil outlet node and heating coil inlet node.", + CurrentModuleObject, + Alphas(1))); ShowContinueError(state, "..The outlet node name for the cooling coil should match the heating coil inlet node name."); - ShowContinueError(state, - EnergyPlus::format("..Cooling coil outlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, - EnergyPlus::format("..Heating coil inlet node = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + ShowContinueError(state, std::format("..Cooling coil outlet node = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, std::format("..Heating coil inlet node = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ErrorsFound = true; } if (HeatingCoilOutletNode != FanInletNode) { - ShowSevereError(state, - EnergyPlus::format("For {} = {}, Mismatch between heating coil outlet node and fan inlet node.", - CurrentModuleObject, - Alphas(1))); + ShowSevereError( + state, + std::format("For {} = {}, Mismatch between heating coil outlet node and fan inlet node.", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "..For \"DrawThrough\" fan, the outlet node name for the heating coil should match the fan inlet node name."); - ShowContinueError(state, - EnergyPlus::format("..Heating coil outlet node = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, EnergyPlus::format("..Fan inlet node = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError(state, std::format("..Heating coil outlet node = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, std::format("..Fan inlet node = {}", state.dataLoopNodes->NodeID(FanInletNode))); ErrorsFound = true; } if (FanOutletNode != SupHeatCoilInletNode) { ShowSevereError(state, - EnergyPlus::format("For {} = {}, Mismatch between fan outlet node and supplemental heating coil inlet node.", - CurrentModuleObject, - Alphas(1))); + std::format("For {} = {}, Mismatch between fan outlet node and supplemental heating coil inlet node.", + CurrentModuleObject, + Alphas(1))); ShowContinueError( state, "..For \"DrawThrough\" fan, the outlet node name for the fan should match the supplemental heating coil inlet node name."); + ShowContinueError(state, std::format("..Fan outlet node = {}", state.dataLoopNodes->NodeID(FanOutletNode))); ShowContinueError(state, - EnergyPlus::format("..Fan outlet node = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError( - state, EnergyPlus::format("..Supplemental heating coil inlet node = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); + std::format("..Supplemental heating coil inlet node = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); ErrorsFound = true; } if (SupHeatCoilOutletNode != thisFurnace.FurnaceOutletNodeNum) { - ShowSevereError( - state, - EnergyPlus::format("For {} = {}, Mismatch between supplemental heating coil outlet node and HeatPump outlet node.", - CurrentModuleObject, - Alphas(1))); + ShowSevereError(state, + std::format("For {} = {}, Mismatch between supplemental heating coil outlet node and HeatPump outlet node.", + CurrentModuleObject, + Alphas(1))); ShowContinueError(state, "..The supplemental heating coil outlet node name must match the HeatPump outlet node name."); + ShowContinueError( + state, std::format("..Supplemental heating coil outlet node = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); ShowContinueError( state, - EnergyPlus::format("..Supplemental heating coil outlet node = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); - ShowContinueError(state, - EnergyPlus::format("..HeatPump outlet node = {}", - state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); + std::format("..HeatPump outlet node = {}", state.dataLoopNodes->NodeID(thisFurnace.FurnaceOutletNodeNum))); ErrorsFound = true; } } @@ -4403,7 +4340,7 @@ namespace Furnaces { thisFurnace.MaxHeatAirVolFlow = WaterToAirHeatPumpSimple::GetCoilAirFlowRate(state, HeatingCoilType, HeatingCoilName, errFlag); thisFurnace.MaxCoolAirVolFlow = WaterToAirHeatPumpSimple::GetCoilAirFlowRate(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } else if (thisFurnace.heatCoilType == HVAC::CoilType::HeatingWAHPVariableSpeedEquationFit) { @@ -4411,7 +4348,7 @@ namespace Furnaces { thisFurnace.MaxHeatAirVolFlow = VariableSpeedCoils::GetCoilAirFlowRateVariableSpeed(state, HeatingCoilType, HeatingCoilName, errFlag); thisFurnace.MaxCoolAirVolFlow = VariableSpeedCoils::GetCoilAirFlowRateVariableSpeed(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } @@ -4427,7 +4364,7 @@ namespace Furnaces { if (thisFurnace.ActualFanVolFlowRate != DataSizing::AutoSize && thisFurnace.DesignFanVolFlowRate != DataSizing::AutoSize) { if (thisFurnace.DesignFanVolFlowRate > thisFurnace.ActualFanVolFlowRate) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "... has a Cooling or Heating Air Flow Rate > Max Fan Volume Flow Rate, should be <=."); ShowContinueError(state, EnergyPlus::format("... Entered value={:.2R}... Fan [{}:{}] Max Value={:.2R}", @@ -4439,7 +4376,7 @@ namespace Furnaces { } if (thisFurnace.ActualFanVolFlowRate != DataSizing::AutoSize && thisFurnace.DesignFanVolFlowRate != DataSizing::AutoSize) { if (thisFurnace.DesignFanVolFlowRate <= 0.0) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "... has a Design Fan Flow Rate <= 0.0, it must be >0.0"); ShowContinueError(state, EnergyPlus::format("... Entered value={:.2R}", thisFurnace.DesignFanVolFlowRate)); ErrorsFound = true; @@ -4452,14 +4389,14 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignHeatingCapacity = WaterToAirHeatPump::GetCoilCapacity(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } else if (thisFurnace.heatCoilType == HVAC::CoilType::HeatingWAHPSimple) { errFlag = false; thisFurnace.DesignHeatingCapacity = WaterToAirHeatPumpSimple::GetCoilCapacity(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } else if (thisFurnace.heatCoilType == HVAC::CoilType::HeatingWAHPVariableSpeedEquationFit) { @@ -4467,7 +4404,7 @@ namespace Furnaces { thisFurnace.DesignHeatingCapacity = VariableSpeedCoils::GetCoilCapacityVariableSpeed(state, HeatingCoilType, HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } @@ -4479,14 +4416,14 @@ namespace Furnaces { errFlag = false; thisFurnace.DesignCoolingCapacity = WaterToAirHeatPump::GetCoilCapacity(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } else if (thisFurnace.coolCoilType == HVAC::CoilType::CoolingWAHPSimple) { errFlag = false; thisFurnace.DesignCoolingCapacity = WaterToAirHeatPumpSimple::GetCoilCapacity(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } else if (thisFurnace.coolCoilType == HVAC::CoilType::CoolingWAHPVariableSpeedEquationFit) { @@ -4494,7 +4431,7 @@ namespace Furnaces { thisFurnace.DesignCoolingCapacity = VariableSpeedCoils::GetCoilCapacityVariableSpeed(state, CoolingCoilType, CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } @@ -4921,9 +4858,9 @@ namespace Furnaces { if (thisFurnace.type == HVAC::UnitarySysType::Unitary_HeatPump_AirToAir) { if (std::abs(thisFurnace.DesignCoolingCapacity - thisFurnace.DesignHeatingCapacity) / thisFurnace.DesignCoolingCapacity > 0.2) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\" heating capacity is disproportionate (> 20% different) to total cooling capacity", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("{} \"{}\" heating capacity is disproportionate (> 20% different) to total cooling capacity", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); } } } @@ -4934,9 +4871,9 @@ namespace Furnaces { if (thisFurnace.ActualFanVolFlowRate != DataSizing::AutoSize) { if (thisFurnace.DesignFanVolFlowRate > thisFurnace.ActualFanVolFlowRate) { ShowWarningError(state, - EnergyPlus::format("{}={} has a Design Fan Volume Flow Rate > Max Fan Volume Flow Rate, should be <=", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("{}={} has a Design Fan Volume Flow Rate > Max Fan Volume Flow Rate, should be <=", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError(state, EnergyPlus::format("... Entered value={:.2R}... Fan [{}] Max Value={:.2R}", thisFurnace.DesignFanVolFlowRate, @@ -4945,9 +4882,9 @@ namespace Furnaces { } if (thisFurnace.DesignFanVolFlowRate <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{}={} has a Design Fan Volume Flow Rate <= 0.0, it must be >0.0", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("{}={} has a Design Fan Volume Flow Rate <= 0.0, it must be >0.0", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError(state, EnergyPlus::format("... Entered value={:.2R}", thisFurnace.DesignFanVolFlowRate)); } @@ -5169,9 +5106,9 @@ namespace Furnaces { thisFurnace.ActualFanVolFlowRate == thisFurnace.MaxCoolAirVolFlow && thisFurnace.ActualFanVolFlowRate == thisFurnace.MaxNoCoolHeatAirVolFlow) { std::string FanName = state.dataFans->fans(thisFurnace.FanIndex)->Name; - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name)); - ShowContinueError( - state, EnergyPlus::format("...For fan type and name = {} \"{}\"", HVAC::fanTypeNames[(int)thisFurnace.fanType], FanName)); + ShowWarningError(state, std::format("{} \"{}\"", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name)); + ShowContinueError(state, + std::format("...For fan type and name = {} \"{}\"", HVAC::fanTypeNames[(int)thisFurnace.fanType], FanName)); ShowContinueError(state, "...Fan power ratio function of speed ratio curve has no impact if fan volumetric flow rate is the same as " "the unitary system volumetric flow rate."); @@ -5203,15 +5140,14 @@ namespace Furnaces { if (thisFurnace.ZoneSequenceCoolingNum == 0 || thisFurnace.ZoneSequenceHeatingNum == 0) { ShowSevereError( state, - EnergyPlus::format("{} \"{}\": Airloop air terminal in the zone equipment list for zone = {} not found or is not allowed Zone " - "Equipment Cooling or Heating Sequence = 0.", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name, - state.dataHeatBal->Zone(thisFurnace.ControlZoneNum).Name)); - ShowFatalError( - state, - EnergyPlus::format("Subroutine InitFurnace: Errors found in getting {} input. Preceding condition(s) causes termination.", - HVAC::unitarySysTypeNames[(int)thisFurnace.type])); + std::format("{} \"{}\": Airloop air terminal in the zone equipment list for zone = {} not found or is not allowed Zone " + "Equipment Cooling or Heating Sequence = 0.", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name, + state.dataHeatBal->Zone(thisFurnace.ControlZoneNum).Name)); + ShowFatalError(state, + std::format("Subroutine InitFurnace: Errors found in getting {} input. Preceding condition(s) causes termination.", + HVAC::unitarySysTypeNames[(int)thisFurnace.type])); } } @@ -5252,7 +5188,7 @@ namespace Furnaces { if (CntrlZoneTerminalUnitMassFlowRateMax >= HVAC::SmallAirVolFlow) { thisFurnace.ControlZoneMassFlowFrac = CntrlZoneTerminalUnitMassFlowRateMax / SumOfMassFlowRateMax; } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name)); + ShowSevereError(state, std::format("{} = {}", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name)); ShowContinueError(state, " The Fraction of Supply Air Flow That Goes Through the Controlling Zone is set to 1."); } BaseSizer::reportSizerOutput(state, @@ -5456,14 +5392,14 @@ namespace Furnaces { if (thisFurnace.FanVolFlow + 1e-10 < thisFurnace.CoolVolumeFlowRate(NumOfSpeedCooling)) { ShowWarningError( state, - EnergyPlus::format("{} - air flow rate = {:.7T} in fan object is less than the MSHP system air flow rate when cooling " - "is required ({:.7T}).", - state.dataFurnaces->CurrentModuleObject, - thisFurnace.FanVolFlow, - thisFurnace.CoolVolumeFlowRate(NumOfSpeedCooling))); + std::format("{} - air flow rate = {:.7f} in fan object is less than the MSHP system air flow rate when cooling " + "is required ({:.7f}).", + state.dataFurnaces->CurrentModuleObject, + thisFurnace.FanVolFlow, + thisFurnace.CoolVolumeFlowRate(NumOfSpeedCooling))); ShowContinueError( state, " The MSHP system flow rate when cooling is required is reset to the fan flow rate and the simulation continues."); - ShowContinueError(state, EnergyPlus::format(" Occurs in {} = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format(" Occurs in {} = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); thisFurnace.CoolVolumeFlowRate(NumOfSpeedCooling) = thisFurnace.FanVolFlow; if (thisFurnace.bIsIHP) // set max fan flow rate to the IHP collection @@ -5478,29 +5414,27 @@ namespace Furnaces { if (thisFurnace.CoolVolumeFlowRate(i) > thisFurnace.CoolVolumeFlowRate(i + 1)) { ShowContinueError( state, - EnergyPlus::format(" The MSHP system flow rate when cooling is required is reset to the flow rate at higher " - "speed and the simulation continues at Speed{}.", - i)); - ShowContinueError( - state, EnergyPlus::format(" Occurs in {} = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); + std::format(" The MSHP system flow rate when cooling is required is reset to the flow rate at higher " + "speed and the simulation continues at Speed{}.", + i)); + ShowContinueError(state, + std::format(" Occurs in {} = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); thisFurnace.CoolVolumeFlowRate(i) = thisFurnace.CoolVolumeFlowRate(i + 1); } } } if (NumOfSpeedHeating > 0) { if (thisFurnace.FanVolFlow + 1e-10 < thisFurnace.HeatVolumeFlowRate(NumOfSpeedHeating)) { - ShowWarningError( - state, - EnergyPlus::format("{} - air flow rate = {:.7T} in fan object is less than the MSHP system air flow rate when " - "heating is required ({:.7T}).", - state.dataFurnaces->CurrentModuleObject, - thisFurnace.FanVolFlow, - thisFurnace.HeatVolumeFlowRate(NumOfSpeedHeating))); + ShowWarningError(state, + std::format("{} - air flow rate = {:.7f} in fan object is less than the MSHP system air flow rate when " + "heating is required ({:.7f}).", + state.dataFurnaces->CurrentModuleObject, + thisFurnace.FanVolFlow, + thisFurnace.HeatVolumeFlowRate(NumOfSpeedHeating))); ShowContinueError( state, " The MSHP system flow rate when heating is required is reset to the fan flow rate and the simulation continues."); - ShowContinueError(state, - EnergyPlus::format(" Occurs in {} = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format(" Occurs in {} = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); thisFurnace.HeatVolumeFlowRate(NumOfSpeedHeating) = thisFurnace.FanVolFlow; if (thisFurnace.bIsIHP) // set max fan flow rate to the IHP collection @@ -5512,31 +5446,28 @@ namespace Furnaces { for (int i = NumOfSpeedHeating - 1; i >= 1; --i) { if (thisFurnace.HeatVolumeFlowRate(i) > thisFurnace.HeatVolumeFlowRate(i + 1)) { + ShowContinueError(state, + std::format(" The MSHP system flow rate when heating is required is reset to the flow rate at " + "higher speed and the simulation continues at Speed{}.", + i)); ShowContinueError( - state, - EnergyPlus::format(" The MSHP system flow rate when heating is required is reset to the flow rate at " - "higher speed and the simulation continues at Speed{}.", - i)); - ShowContinueError( - state, - EnergyPlus::format(" Occurs in {} system = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); + state, std::format(" Occurs in {} system = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); thisFurnace.HeatVolumeFlowRate(i) = thisFurnace.HeatVolumeFlowRate(i + 1); } } } } if (thisFurnace.FanVolFlow < thisFurnace.IdleVolumeAirRate && thisFurnace.IdleVolumeAirRate != 0.0) { - ShowWarningError( - state, - EnergyPlus::format("{} - air flow rate = {:.7T} in fan object is less than the MSHP system air flow rate when no " - "heating or cooling is needed ({:.7T}).", - state.dataFurnaces->CurrentModuleObject, - thisFurnace.FanVolFlow, - thisFurnace.IdleVolumeAirRate)); + ShowWarningError(state, + std::format("{} - air flow rate = {:.7f} in fan object is less than the MSHP system air flow rate when no " + "heating or cooling is needed ({:.7f}).", + state.dataFurnaces->CurrentModuleObject, + thisFurnace.FanVolFlow, + thisFurnace.IdleVolumeAirRate)); ShowContinueError(state, " The MSHP system flow rate when no heating or cooling is needed is reset to the fan flow rate and the " "simulation continues."); - ShowContinueError(state, EnergyPlus::format(" Occurs in {} = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format(" Occurs in {} = {}", state.dataFurnaces->CurrentModuleObject, thisFurnace.Name)); thisFurnace.IdleVolumeAirRate = thisFurnace.FanVolFlow; } RhoAir = state.dataEnvrn->StdRhoAir; @@ -6745,18 +6676,17 @@ namespace Furnaces { if (state.dataFurnaces->Iter > MaxIter) { if (thisFurnace.HeatingMaxIterIndex2 == 0) { - ShowWarningMessage( - state, - EnergyPlus::format("{} \"{}\" -- Exceeded max heating iterations ({}) while adjusting furnace runtime.", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name, - MaxIter)); + ShowWarningMessage(state, + std::format("{} \"{}\" -- Exceeded max heating iterations ({}) while adjusting furnace runtime.", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name, + MaxIter)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{} \"{}\" -- Exceeded max heating iterations error continues...", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + std::format("{} \"{}\" -- Exceeded max heating iterations error continues...", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), thisFurnace.HeatingMaxIterIndex2); } @@ -7114,26 +7044,25 @@ namespace Furnaces { if (std::abs(SystemSensibleLoad - TempHeatOutput) > HVAC::SmallLoad) { if (thisFurnace.DXHeatingMaxIterIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("Heating coil control failed to converge for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("Heating coil control failed to converge for {}:{}", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError(state, " Iteration limit exceeded in calculating DX heating coil sensible part-load ratio."); ShowContinueErrorTimeStamp( state, - EnergyPlus::format( - "Sensible load to be met by DX heating coil = {:.2T} (watts), sensible output of DX heating " - "coil = {:.2T} (watts), and the simulation continues.", - SystemSensibleLoad, - TempHeatOutput)); + std::format("Sensible load to be met by DX heating coil = {:.2f} (watts), sensible output of DX heating " + "coil = {:.2f} (watts), and the simulation continues.", + SystemSensibleLoad, + TempHeatOutput)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Iteration limit exceeded in calculating DX sensible heating " - "part-load ratio error continues. " - "Sensible load statistics:", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + std::format("{} \"{}\" - Iteration limit exceeded in calculating DX sensible heating " + "part-load ratio error continues. " + "Sensible load statistics:", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), thisFurnace.DXHeatingMaxIterIndex, SystemSensibleLoad, SystemSensibleLoad); @@ -7141,19 +7070,18 @@ namespace Furnaces { } else if (SolFlag == -2) { if (thisFurnace.DXHeatingRegulaFalsiFailedIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("Heating coil control failed for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("Heating coil control failed for {}:{}", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError(state, " DX sensible heating part-load ratio determined to be outside the range of 0-1."); ShowContinueErrorTimeStamp( state, - EnergyPlus::format( - "Sensible load to be met by DX heating coil = {:.2T} (watts), and the simulation continues.", - SystemSensibleLoad)); + std::format("Sensible load to be met by DX heating coil = {:.2f} (watts), and the simulation continues.", + SystemSensibleLoad)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\" - DX sensible heating part-load ratio out of range error continues. Sensible load statistics:", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name), @@ -7414,23 +7342,23 @@ namespace Furnaces { if (SolFlag == -1 && std::abs(SystemSensibleLoad - TempHeatOutput) > HVAC::SmallLoad) { if (thisFurnace.HeatingMaxIterIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("Heating coil control failed to converge for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("Heating coil control failed to converge for {}:{}", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError(state, " Iteration limit exceeded in calculating heating coil sensible part-load ratio."); ShowContinueErrorTimeStamp( state, - EnergyPlus::format("Sensible load to be met by heating coil = {:.2T} (watts), sensible output " - "of heating coil = {:.2T} (watts), and the simulation continues.", - SystemSensibleLoad, - TempHeatOutput)); + std::format("Sensible load to be met by heating coil = {:.2f} (watts), sensible output " + "of heating coil = {:.2f} (watts), and the simulation continues.", + SystemSensibleLoad, + TempHeatOutput)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Iteration limit exceeded in calculating sensible heating part-load " - "ratio error continues. Sensible load statistics:", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + std::format("{} \"{}\" - Iteration limit exceeded in calculating sensible heating part-load " + "ratio error continues. Sensible load statistics:", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), thisFurnace.HeatingMaxIterIndex, SystemSensibleLoad, SystemSensibleLoad); @@ -7438,18 +7366,18 @@ namespace Furnaces { } else if (SolFlag == -2) { if (thisFurnace.HeatingRegulaFalsiFailedIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("Heating coil control failed for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("Heating coil control failed for {}:{}", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError(state, " Sensible heating part-load ratio determined to be outside the range of 0-1."); ShowContinueErrorTimeStamp( state, - EnergyPlus::format("Sensible load to be met by heating coil = {:.2T} (watts), and the simulation continues.", - SystemSensibleLoad)); + std::format("Sensible load to be met by heating coil = {:.2f} (watts), and the simulation continues.", + SystemSensibleLoad)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\" - Sensible heating part-load ratio out of range error continues. Sensible load statistics:", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name), @@ -7642,24 +7570,24 @@ namespace Furnaces { if (std::abs(CoolCoilLoad - TempCoolOutput) > HVAC::SmallLoad) { if (thisFurnace.SensibleMaxIterIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("Cooling coil control failed to converge for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("Cooling coil control failed to converge for {}:{}", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError( state, " Iteration limit exceeded in calculating DX cooling coil sensible part-load ratio."); ShowContinueErrorTimeStamp( state, - EnergyPlus::format("Sensible load to be met by DX coil = {:.2T} (watts), sensible " - "output of DX coil = {:.2T} (watts), and the simulation continues.", - CoolCoilLoad, - TempCoolOutput)); + std::format("Sensible load to be met by DX coil = {:.2f} (watts), sensible " + "output of DX coil = {:.2f} (watts), and the simulation continues.", + CoolCoilLoad, + TempCoolOutput)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Iteration limit exceeded in calculating sensible cooling " - "part-load ratio error continues. Sensible load statistics:", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + std::format("{} \"{}\" - Iteration limit exceeded in calculating sensible cooling " + "part-load ratio error continues. Sensible load statistics:", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), thisFurnace.SensibleMaxIterIndex, CoolCoilLoad, CoolCoilLoad); @@ -7669,15 +7597,15 @@ namespace Furnaces { if (!state.dataGlobal->WarmupFlag) { if (thisFurnace.SensibleRegulaFalsiFailedIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("Cooling coil control failed for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("Cooling coil control failed for {}:{}", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError(state, " Cooling sensible part-load ratio determined to be outside the range of 0-1."); - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Cooling sensible load = {:.2T}", CoolCoilLoad)); + ShowContinueErrorTimeStamp(state, std::format(" Cooling sensible load = {:.2f}", CoolCoilLoad)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\" - Cooling sensible part-load ratio out of range error continues. Sensible cooling load " "statistics:", HVAC::unitarySysTypeNames[(int)thisFurnace.type], @@ -7961,25 +7889,25 @@ namespace Furnaces { if (!state.dataGlobal->WarmupFlag) { if (thisFurnace.LatentMaxIterIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("Cooling coil control failed to converge for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("Cooling coil control failed to converge for {}:{}", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError(state, " Iteration limit exceeded in calculating cooling coil latent part-load ratio."); - ShowContinueError(state, - EnergyPlus::format(" Latent load convergence error (percent) = {:.2T}", - 100.0 * std::abs((SystemMoistureLoad - TempLatentOutput) / - SystemMoistureLoad))); + ShowContinueError( + state, + std::format(" Latent load convergence error (percent) = {:.2f}", + 100.0 * std::abs((SystemMoistureLoad - TempLatentOutput) / SystemMoistureLoad))); ShowContinueErrorTimeStamp( state, - EnergyPlus::format("Moisture load to be met by DX coil = {:.2T} (watts), Latent " - "output of DX coil = {:.2T} (watts), and the simulation continues.", - SystemMoistureLoad, - TempLatentOutput)); + std::format("Moisture load to be met by DX coil = {:.2f} (watts), Latent " + "output of DX coil = {:.2f} (watts), and the simulation continues.", + SystemMoistureLoad, + TempLatentOutput)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\" - Iteration limit exceeded in calculating latent part-load ratio error continues. " "Latent " "load convergence error (percent) statistics follow.", @@ -7993,40 +7921,39 @@ namespace Furnaces { } else if (SolFlag == -2) { if (thisFurnace.LatentRegulaFalsiFailedIndex2 == 0) { ShowWarningMessage(state, - EnergyPlus::format("Cooling coil control failed for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("Cooling coil control failed for {}:{}", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError( state, - EnergyPlus::format(" Latent part-load ratio determined to be outside the range of {:.3T} to {:.3T}.", - TempMinPLR, - TempMaxPLR)); + std::format(" Latent part-load ratio determined to be outside the range of {:.3f} to {:.3f}.", + TempMinPLR, + TempMaxPLR)); ShowContinueErrorTimeStamp( - state, EnergyPlus::format("A PLR of {:.3T} will be used and the simulation continues.", TempMinPLR)); + state, std::format("A PLR of {:.3f} will be used and the simulation continues.", TempMinPLR)); } - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} \"{}\" - Cooling sensible part-load ratio out of range error " - "continues. System moisture load statistics:", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), - thisFurnace.LatentRegulaFalsiFailedIndex2, - SystemMoistureLoad, - SystemMoistureLoad); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} \"{}\" - Cooling sensible part-load ratio out of range error " + "continues. System moisture load statistics:", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), + thisFurnace.LatentRegulaFalsiFailedIndex2, + SystemMoistureLoad, + SystemMoistureLoad); LatentPartLoadRatio = TempMinPLR; } } else if (SolFlag == -2) { if (thisFurnace.LatentRegulaFalsiFailedIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("Cooling coil control failed for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("Cooling coil control failed for {}:{}", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError(state, " Latent part-load ratio determined to be outside the range of 0-1."); ShowContinueErrorTimeStamp(state, "A PLR of 0 will be used and the simulation continues."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\" - Latent part-load ratio out of range or 0-1 error continues. System moisture load statistics:", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name), @@ -8428,23 +8355,23 @@ namespace Furnaces { if (std::abs(ZoneSensLoadMet - TotalZoneSensLoad) / TotalZoneSensLoad > CoolErrorToler) { if (thisFurnace.SensibleMaxIterIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("Cooling coil control failed to converge for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("Cooling coil control failed to converge for {}:{}", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError(state, " Iteration limit exceeded in calculating DX cooling coil sensible part-load ratio."); ShowContinueErrorTimeStamp( state, - EnergyPlus::format("Sensible load to be met by DX coil = {:.2T} (watts), sensible output of DX coil = " - "{:.2T} (watts), and the simulation continues.", - TotalZoneSensLoad, - ZoneSensLoadMet)); + std::format("Sensible load to be met by DX coil = {:.2f} (watts), sensible output of DX coil = " + "{:.2f} (watts), and the simulation continues.", + TotalZoneSensLoad, + ZoneSensLoadMet)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Iteration limit exceeded in calculating sensible cooling part-load ratio error " - "continues. Sensible load statistics:", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + std::format("{} \"{}\" - Iteration limit exceeded in calculating sensible cooling part-load ratio error " + "continues. Sensible load statistics:", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), thisFurnace.SensibleMaxIterIndex, TotalZoneSensLoad, TotalZoneSensLoad); @@ -8468,21 +8395,20 @@ namespace Furnaces { if ((ZoneSensLoadMet - TotalZoneSensLoad) / TotalZoneSensLoad > CoolErrorToler) { if (thisFurnace.SensibleRegulaFalsiFailedIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("Cooling coil control failed for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("Cooling coil control failed for {}:{}", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError(state, " Cooling sensible part-load ratio determined to be outside the range of 0-1."); - ShowContinueError(state, - EnergyPlus::format(" An estimated part-load ratio = {:.2T} will be used and the simulation continues.", - CoolPartLoadRatio)); ShowContinueError( state, - EnergyPlus::format(" The estimated part-load ratio provides a cooling sensible capacity = {:.2T}", ZoneSensLoadMet)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Cooling sensible load required = {:.2T}", TotalZoneSensLoad)); + std::format(" An estimated part-load ratio = {:.2f} will be used and the simulation continues.", CoolPartLoadRatio)); + ShowContinueError( + state, std::format(" The estimated part-load ratio provides a cooling sensible capacity = {:.2f}", ZoneSensLoadMet)); + ShowContinueErrorTimeStamp(state, std::format(" Cooling sensible load required = {:.2f}", TotalZoneSensLoad)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\" - Cooling sensible part-load ratio out of range error continues. Sensible cooling load statistics:", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name), @@ -8635,23 +8561,22 @@ namespace Furnaces { if (std::abs(ZoneSensLoadMet - TotalZoneSensLoad) / TotalZoneSensLoad > HeatErrorToler) { if (thisFurnace.WSHPHeatMaxIterIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("Heating coil control failed to converge for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("Heating coil control failed to converge for {}:{}", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError(state, " Iteration limit exceeded in calculating DX heating coil sensible part-load ratio."); ShowContinueErrorTimeStamp( state, - EnergyPlus::format("Sensible load to be met by DX coil = {:.2T} (watts), sensible output of DX coil = " - "{:.2T} (watts), and the simulation continues.", - TotalZoneSensLoad, - ZoneSensLoadMet)); + std::format("Sensible load to be met by DX coil = {:.2f} (watts), sensible output of DX coil = " + "{:.2f} (watts), and the simulation continues.", + TotalZoneSensLoad, + ZoneSensLoadMet)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{} \"{}\" - Iteration limit exceeded in calculating sensible heating part-load ratio error continues.", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + std::format("{} \"{}\" - Iteration limit exceeded in calculating sensible heating part-load ratio error continues.", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), thisFurnace.WSHPHeatMaxIterIndex, TotalZoneSensLoad, TotalZoneSensLoad); @@ -8674,26 +8599,24 @@ namespace Furnaces { if ((ZoneSensLoadMet - TotalZoneSensLoad) / TotalZoneSensLoad > HeatErrorToler) { if (thisFurnace.WSHPHeatRegulaFalsiFailedIndex == 0) { ShowWarningError(state, - EnergyPlus::format("Heating coil control failed for {}:{}", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("Heating coil control failed for {}:{}", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueError(state, " Heating sensible part-load ratio determined to be outside the range of 0-1."); - ShowContinueError(state, - EnergyPlus::format(" An estimated part-load ratio = {:.2T} will be used and the simulation continues.", - HeatPartLoadRatio)); ShowContinueError( state, - EnergyPlus::format(" The estimated part-load ratio provides a heating sensible capacity = {:.2T}", ZoneSensLoadMet)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Heating sensible load required = {:.2T}", TotalZoneSensLoad)); + std::format(" An estimated part-load ratio = {:.2f} will be used and the simulation continues.", HeatPartLoadRatio)); + ShowContinueError( + state, std::format(" The estimated part-load ratio provides a heating sensible capacity = {:.2f}", ZoneSensLoadMet)); + ShowContinueErrorTimeStamp(state, std::format(" Heating sensible load required = {:.2f}", TotalZoneSensLoad)); } - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} \"{}\" - Heating sensible part-load ratio out of range error continues.", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), - thisFurnace.WSHPHeatRegulaFalsiFailedIndex, - TotalZoneSensLoad, - TotalZoneSensLoad); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} \"{}\" - Heating sensible part-load ratio out of range error continues.", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), + thisFurnace.WSHPHeatRegulaFalsiFailedIndex, + TotalZoneSensLoad, + TotalZoneSensLoad); } } } @@ -9628,43 +9551,41 @@ namespace Furnaces { if (SolFlag == -1) { if (thisFurnace.HotWaterCoilMaxIterIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + std::format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError( - state, EnergyPlus::format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); + ShowContinueError(state, + std::format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed (iteration limit [{}]) for {}=\"{}", - SolveMaxIter, - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), + std::format("CalcNonDXHeatingCoils: Hot water coil control failed (iteration limit [{}]) for {}=\"{}", + SolveMaxIter, + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), thisFurnace.HotWaterCoilMaxIterIndex); } else if (SolFlag == -2) { if (thisFurnace.HotWaterCoilMaxIterIndex2 == 0) { - ShowWarningMessage( - state, - EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name)); + ShowWarningMessage(state, + std::format("CalcNonDXHeatingCoils: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "...Bad hot water maximum flow rate limits"); ShowContinueError(state, EnergyPlus::format("...Given minimum water flow rate={:.3R} kg/s", MinWaterFlow)); ShowContinueError(state, EnergyPlus::format("...Given maximum water flow rate={:.3R} kg/s", MaxHotWaterFlow)); } - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed (flow limits) for {}=\"{}\"", - HVAC::unitarySysTypeNames[(int)thisFurnace.type], - thisFurnace.Name), - thisFurnace.HotWaterCoilMaxIterIndex2, - MaxHotWaterFlow, - MinWaterFlow, - _, - "[kg/s]", - "[kg/s]"); + ShowRecurringWarningErrorAtEnd(state, + std::format("CalcNonDXHeatingCoils: Hot water coil control failed (flow limits) for {}=\"{}\"", + HVAC::unitarySysTypeNames[(int)thisFurnace.type], + thisFurnace.Name), + thisFurnace.HotWaterCoilMaxIterIndex2, + MaxHotWaterFlow, + MinWaterFlow, + _, + "[kg/s]", + "[kg/s]"); } } } else { @@ -10199,9 +10120,9 @@ namespace Furnaces { if (!state.dataGlobal->WarmupFlag) { if (thisFurnace.ErrCountCyc == 0) { ++thisFurnace.ErrCountCyc; - ShowWarningError(state, - EnergyPlus::format("Iteration limit exceeded calculating VS WSHP unit cycling ratio, for unit={}", - thisFurnace.Name)); + ShowWarningError( + state, + std::format("Iteration limit exceeded calculating VS WSHP unit cycling ratio, for unit={}", thisFurnace.Name)); ShowContinueErrorTimeStamp(state, EnergyPlus::format("Cycling ratio returned={:.2R}", PartLoadFrac)); } else { ShowRecurringWarningErrorAtEnd( @@ -10213,9 +10134,9 @@ namespace Furnaces { } } } else if (SolFla == -2) { - ShowFatalError(state, - EnergyPlus::format("VS WSHP unit cycling ratio calculation failed: cycling limits exceeded, for unit={}", - thisFurnace.Name)); + ShowFatalError( + state, + std::format("VS WSHP unit cycling ratio calculation failed: cycling limits exceeded, for unit={}", thisFurnace.Name)); } } else { // Check to see which speed to meet the load @@ -10273,9 +10194,9 @@ namespace Furnaces { if (!state.dataGlobal->WarmupFlag) { if (thisFurnace.ErrCountVar == 0) { ++thisFurnace.ErrCountVar; - ShowWarningError(state, - EnergyPlus::format("Iteration limit exceeded calculating VS WSHP unit speed ratio, for unit={}", - thisFurnace.Name)); + ShowWarningError( + state, + std::format("Iteration limit exceeded calculating VS WSHP unit speed ratio, for unit={}", thisFurnace.Name)); ShowContinueErrorTimeStamp( state, EnergyPlus::format("Speed ratio returned=[{:.2R}], Speed number ={}", SpeedRatio, SpeedNum)); } else { @@ -10288,9 +10209,9 @@ namespace Furnaces { } } } else if (SolFla == -2) { - ShowFatalError(state, - EnergyPlus::format("VS WSHP unit compressor speed calculation failed: speed limits exceeded, for unit={}", - thisFurnace.Name)); + ShowFatalError( + state, + std::format("VS WSHP unit compressor speed calculation failed: speed limits exceeded, for unit={}", thisFurnace.Name)); } } } else { @@ -10354,8 +10275,7 @@ namespace Furnaces { if (thisFurnace.ErrCountVar2 == 0) { ++thisFurnace.ErrCountVar2; ShowWarningError( - state, - EnergyPlus::format("Iteration limit exceeded calculating VS WSHP unit speed ratio, for unit={}", thisFurnace.Name)); + state, std::format("Iteration limit exceeded calculating VS WSHP unit speed ratio, for unit={}", thisFurnace.Name)); ShowContinueErrorTimeStamp(state, EnergyPlus::format("Speed ratio returned=[{:.2R}], Speed number ={}", SpeedRatio, SpeedNum)); } else { @@ -10369,8 +10289,7 @@ namespace Furnaces { } } else if (SolFla == -2) { ShowFatalError( - state, - EnergyPlus::format("VS WSHP unit compressor speed calculation failed: speed limits exceeded, for unit={}", thisFurnace.Name)); + state, std::format("VS WSHP unit compressor speed calculation failed: speed limits exceeded, for unit={}", thisFurnace.Name)); } } } @@ -11303,7 +11222,7 @@ namespace Furnaces { if (Util::SameString(ChildCoolingCoilType, "COIL:COOLING:DX")) { int childCCIndex_DX = CoilCoolingDX::factory(state, ChildCoolingCoilName); if (childCCIndex_DX < 0) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisFurnace.Name)); errFlag = true; ErrorsFound = true; } @@ -11322,7 +11241,7 @@ namespace Furnaces { thisFurnace.MinOATCompressorCooling = -1000.0; } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", cCurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("...occurs in {} = {}", cCurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } @@ -11336,7 +11255,7 @@ namespace Furnaces { thisFurnace.MinOATCompressorHeating = -1000.0; } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", cCurrentModuleObject, thisFurnace.Name)); + ShowContinueError(state, std::format("...occurs in {} = {}", cCurrentModuleObject, thisFurnace.Name)); ErrorsFound = true; } } diff --git a/src/EnergyPlus/General.cc b/src/EnergyPlus/General.cc index 4e19513291c..47724582648 100644 --- a/src/EnergyPlus/General.cc +++ b/src/EnergyPlus/General.cc @@ -49,6 +49,7 @@ #include #include #include +#include // ObjexxFCL Headers #include @@ -1002,10 +1003,10 @@ int FindNumberInList(int const WhichNumber, Array1A_int const ListOfItems, int c } void DecodeMonDayHrMin(int const Item, // word containing encoded month, day, hour, minute - int &Month, // month in integer format (1-12) - int &Day, // day in integer format (1-31) - int &Hour, // hour in integer format (1-24) - int &Minute // minute in integer format (0:59) + int &Month, // month in integer EnergyPlus::format(1-12) + int &Day, // day in integer EnergyPlus::format(1-31) + int &Hour, // hour in integer EnergyPlus::format(1-24) + int &Minute // minute in integer EnergyPlus::format(0:59) ) { @@ -1039,10 +1040,10 @@ void DecodeMonDayHrMin(int const Item, // word containing encoded month, day, ho } void EncodeMonDayHrMin(int &Item, // word containing encoded month, day, hour, minute - int const Month, // month in integer format (1:12) - int const Day, // day in integer format (1:31) - int const Hour, // hour in integer format (1:24) - int const Minute // minute in integer format (0:59) + int const Month, // month in integer EnergyPlus::format(1:12) + int const Day, // day in integer EnergyPlus::format(1:31) + int const Hour, // hour in integer EnergyPlus::format(1:24) + int const Minute // minute in integer EnergyPlus::format(0:59) ) { @@ -1087,7 +1088,7 @@ std::string CreateTimeString(Real64 const Time) // Time in seconds // TimeStamp written with formatting // "hh:mm:ss.s" - return fmt::format("{:02d}:{:02d}:{:04.1f}", Hours, Minutes, Seconds); + return EnergyPlus::format("{:02d}:{:02d}:{:04.1f}", Hours, Minutes, Seconds); } void ParseTime(Real64 const Time, // Time value in seconds @@ -1496,7 +1497,8 @@ void CheckCreatedZoneItemName(EnergyPlusData &state, ResultName = ZoneName + ' ' + ItemName; bool TooLong = false; if (ItemLength > Constant::MaxNameLength) { - ShowWarningError(state, fmt::format("{}{} Combination of ZoneList and Object Name generate a name too long.", calledFrom, CurrentObject)); + ShowWarningError(state, + EnergyPlus::format("{}{} Combination of ZoneList and Object Name generate a name too long.", calledFrom, CurrentObject)); ShowContinueError(state, EnergyPlus::format("Object Name=\"{}\".", ItemName)); ShowContinueError(state, EnergyPlus::format("ZoneList/Zone Name=\"{}\".", ZoneName)); ShowContinueError( @@ -1512,9 +1514,9 @@ void CheckCreatedZoneItemName(EnergyPlusData &state, int FoundItem = Util::FindItemInList(ResultName, ItemNames, NumItems); if (FoundItem != 0) { - ShowSevereError(state, fmt::format("{}{}=\"{}\", Duplicate Generated name encountered.", calledFrom, CurrentObject, ItemName)); - ShowContinueError( - state, EnergyPlus::format("name=\"{}\" has already been generated or entered as {} item=[{}].", ResultName, CurrentObject, FoundItem)); + ShowSevereError(state, std::format("{}{}=\"{}\", Duplicate Generated name encountered.", calledFrom, CurrentObject, ItemName)); + ShowContinueError(state, + std::format("name=\"{}\" has already been generated or entered as {} item=[{}].", ResultName, CurrentObject, FoundItem)); if (TooLong) { ShowContinueError(state, "Duplicate name likely caused by the previous \"too long\" warning."); } diff --git a/src/EnergyPlus/GeneralRoutines.cc b/src/EnergyPlus/GeneralRoutines.cc index 1e65abbd1cd..e6a2fe69d5c 100644 --- a/src/EnergyPlus/GeneralRoutines.cc +++ b/src/EnergyPlus/GeneralRoutines.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include #include // ObjexxFCL Headers @@ -65,11 +66,8 @@ #include #include #include -#include -#include #include #include -#include #include #include #include @@ -77,7 +75,6 @@ #include #include #include -#include #include #include #include @@ -85,7 +82,6 @@ #include #include #include -#include #include #include #include @@ -230,7 +226,7 @@ void ControlCompOutput(EnergyPlusData &state, ShowContinueError( state, EnergyPlus::format( - "Acuated Node={} MinFlow=[{:.3T}], Max Flow={:.3T}", state.dataLoopNodes->NodeID(ActuatedNode), MinFlow, MaxFlow)); + "Acuated Node={} MinFlow=[{:.3f}], Max Flow={:.3f}", state.dataLoopNodes->NodeID(ActuatedNode), MinFlow, MaxFlow)); ShowContinueErrorTimeStamp(state, ""); ShowFatalError(state, "Program terminates due to preceding condition."); } @@ -549,10 +545,10 @@ void ControlCompOutput(EnergyPlusData &state, if ((Iter > MaxIter) && (!state.dataGlobal->WarmupFlag)) { // if ( CompErrIndex == 0 ) { ShowWarningMessage(state, EnergyPlus::format("ControlCompOutput: Maximum iterations exceeded for {} = {}", CompType, CompName)); - ShowContinueError(state, EnergyPlus::format("... Load met = {:.5T} W.", LoadMet)); - ShowContinueError(state, EnergyPlus::format("... Load requested = {:.5T} W.", QZnReq)); - ShowContinueError(state, EnergyPlus::format("... Error = {:.8T} %.", std::abs((LoadMet - QZnReq) * 100.0 / Denom))); - ShowContinueError(state, EnergyPlus::format("... Tolerance = {:.8T} %.", ControlOffset * 100.0)); + ShowContinueError(state, EnergyPlus::format("... Load met = {:.5f} W.", LoadMet)); + ShowContinueError(state, EnergyPlus::format("... Load requested = {:.5f} W.", QZnReq)); + ShowContinueError(state, EnergyPlus::format("... Error = {:.8f} %.", std::abs((LoadMet - QZnReq) * 100.0 / Denom))); + ShowContinueError(state, EnergyPlus::format("... Tolerance = {:.8f} %.", ControlOffset * 100.0)); ShowContinueError(state, "... Error = (Load met - Load requested) / MAXIMUM(Load requested, 100)"); ShowContinueError( state, EnergyPlus::format("... Actuated Node Mass Flow Rate ={:.9R} kg/s", state.dataLoopNodes->Node(ActuatedNode).MassFlowRate)); @@ -905,8 +901,8 @@ void TestAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) } if (Count > 0) { ShowSevereError(state, "Duplicate Node detected in Return Air Paths"); - ShowContinueError(state, EnergyPlus::format("Test Node={}", state.dataLoopNodes->NodeID(TestNode))); - ShowContinueError(state, EnergyPlus::format("In Air Path={}", state.dataAirLoop->AirToZoneNodeInfo(Loop).AirLoopName)); + ShowContinueError(state, std::format("Test Node={}", state.dataLoopNodes->NodeID(TestNode))); + ShowContinueError(state, std::format("In Air Path={}", state.dataAirLoop->AirToZoneNodeInfo(Loop).AirLoopName)); ErrFound = true; } } @@ -1004,16 +1000,13 @@ void TestSupplyAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) continue; } if (Count == 1 && AirPathNodeName != state.dataLoopNodes->NodeID(state.dataZonePlenum->ZoneSupPlenCond(Count2).InletNode)) { - ShowSevereError(state, - EnergyPlus::format("Error in AirLoopHVAC:SupplyPath={}", state.dataZoneEquip->SupplyAirPath(BCount).Name)); + ShowSevereError(state, std::format("Error in AirLoopHVAC:SupplyPath={}", state.dataZoneEquip->SupplyAirPath(BCount).Name)); ShowContinueError( - state, - EnergyPlus::format("For AirLoopHVAC:SupplyPlenum={}", state.dataZonePlenum->ZoneSupPlenCond(Count2).ZonePlenumName)); - ShowContinueError(state, EnergyPlus::format("Expected inlet node (supply air path)={}", AirPathNodeName)); - ShowContinueError( - state, - EnergyPlus::format("Encountered node name (supply plenum)={}", - state.dataLoopNodes->NodeID(state.dataZonePlenum->ZoneSupPlenCond(Count2).OutletNode(1)))); + state, std::format("For AirLoopHVAC:SupplyPlenum={}", state.dataZonePlenum->ZoneSupPlenCond(Count2).ZonePlenumName)); + ShowContinueError(state, std::format("Expected inlet node (supply air path)={}", AirPathNodeName)); + ShowContinueError(state, + std::format("Encountered node name (supply plenum)={}", + state.dataLoopNodes->NodeID(state.dataZonePlenum->ZoneSupPlenCond(Count2).OutletNode(1)))); ErrFound = true; ++NumErr; } @@ -1039,16 +1032,13 @@ void TestSupplyAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) continue; } if (Count == 1 && AirPathNodeName != state.dataLoopNodes->NodeID(state.dataSplitterComponent->SplitterCond(Count2).InletNode)) { - ShowSevereError(state, - EnergyPlus::format("Error in AirLoopHVAC:SupplyPath={}", state.dataZoneEquip->SupplyAirPath(BCount).Name)); + ShowSevereError(state, std::format("Error in AirLoopHVAC:SupplyPath={}", state.dataZoneEquip->SupplyAirPath(BCount).Name)); ShowContinueError( - state, - EnergyPlus::format("For AirLoopHVAC:ZoneSplitter={}", state.dataSplitterComponent->SplitterCond(Count2).SplitterName)); - ShowContinueError(state, EnergyPlus::format("Expected inlet node (supply air path)={}", AirPathNodeName)); - ShowContinueError( - state, - EnergyPlus::format("Encountered node name (zone splitter)={}", - state.dataLoopNodes->NodeID(state.dataSplitterComponent->SplitterCond(Count2).InletNode))); + state, std::format("For AirLoopHVAC:ZoneSplitter={}", state.dataSplitterComponent->SplitterCond(Count2).SplitterName)); + ShowContinueError(state, std::format("Expected inlet node (supply air path)={}", AirPathNodeName)); + ShowContinueError(state, + std::format("Encountered node name (zone splitter)={}", + state.dataLoopNodes->NodeID(state.dataSplitterComponent->SplitterCond(Count2).InletNode))); ErrFound = true; ++NumErr; } @@ -1068,9 +1058,9 @@ void TestSupplyAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) } } break; default: { - ShowSevereError(state, - EnergyPlus::format("Invalid Component Type in Supply Air Path={}", - state.dataZoneEquip->SupplyAirPath(BCount).ComponentType(Count))); + ShowSevereError( + state, + std::format("Invalid Component Type in Supply Air Path={}", state.dataZoneEquip->SupplyAirPath(BCount).ComponentType(Count))); ErrFound = true; ++NumErr; } break; @@ -1131,9 +1121,9 @@ void TestSupplyAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) } if (FoundSupplyPlenum(Count1)) { ShowSevereError(state, - EnergyPlus::format("AirLoopHVAC:SupplyPlenum=\"{}\", duplicate entry.", - state.dataZonePlenum->ZoneSupPlenCond(Count1).ZonePlenumName)); - ShowContinueError(state, EnergyPlus::format("already exists on AirLoopHVAC:SupplyPath=\"{}\".", FoundNames(Count1))); + std::format("AirLoopHVAC:SupplyPlenum=\"{}\", duplicate entry.", + state.dataZonePlenum->ZoneSupPlenCond(Count1).ZonePlenumName)); + ShowContinueError(state, std::format("already exists on AirLoopHVAC:SupplyPath=\"{}\".", FoundNames(Count1))); ErrFound = true; } else { // record use @@ -1155,9 +1145,9 @@ void TestSupplyAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) } if (FoundZoneSplitter(Count1)) { ShowSevereError(state, - EnergyPlus::format("AirLoopHVAC:ZoneSplitter=\"{}\", duplicate entry.", - state.dataSplitterComponent->SplitterCond(Count1).SplitterName)); - ShowContinueError(state, EnergyPlus::format("already exists on AirLoopHVAC:SupplyPath=\"{}\".", FoundNames(Count1))); + std::format("AirLoopHVAC:ZoneSplitter=\"{}\", duplicate entry.", + state.dataSplitterComponent->SplitterCond(Count1).SplitterName)); + ShowContinueError(state, std::format("already exists on AirLoopHVAC:SupplyPath=\"{}\".", FoundNames(Count1))); ErrFound = true; } else { // record use @@ -1175,8 +1165,8 @@ void TestSupplyAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) continue; } ShowSevereError(state, - EnergyPlus::format("AirLoopHVAC:SupplyPlenum=\"{}\", not found on any AirLoopHVAC:SupplyPath.", - state.dataZonePlenum->ZoneSupPlenCond(Count1).ZonePlenumName)); + std::format("AirLoopHVAC:SupplyPlenum=\"{}\", not found on any AirLoopHVAC:SupplyPath.", + state.dataZonePlenum->ZoneSupPlenCond(Count1).ZonePlenumName)); } } @@ -1186,8 +1176,8 @@ void TestSupplyAirPathIntegrity(EnergyPlusData &state, bool &ErrFound) continue; } ShowSevereError(state, - EnergyPlus::format("AirLoopHVAC:ZoneSplitter=\"{}\", not found on any AirLoopHVAC:SupplyPath.", - state.dataSplitterComponent->SplitterCond(Count1).SplitterName)); + std::format("AirLoopHVAC:ZoneSplitter=\"{}\", not found on any AirLoopHVAC:SupplyPath.", + state.dataSplitterComponent->SplitterCond(Count1).SplitterName)); } } @@ -1311,7 +1301,7 @@ void TestReturnAirPathIntegrity(EnergyPlusData &state, bool &ErrFound, Array2S_i } if (MixerCount > 1) { - ShowSevereError(state, EnergyPlus::format("Too many zone mixers in Return Air Path={}", state.dataZoneEquip->ReturnAirPath(BCount).Name)); + ShowSevereError(state, std::format("Too many zone mixers in Return Air Path={}", state.dataZoneEquip->ReturnAirPath(BCount).Name)); ErrFound = true; ++NumErr; continue; @@ -1333,13 +1323,13 @@ void TestReturnAirPathIntegrity(EnergyPlusData &state, bool &ErrFound, Array2S_i } // Found correct Mixer (by name), check outlet node vs. return air path outlet node if (AirPathNodeName != state.dataLoopNodes->NodeID(state.dataMixerComponent->MixerCond(Count2).OutletNode)) { - ShowSevereError(state, EnergyPlus::format("Error in Return Air Path={}", state.dataZoneEquip->ReturnAirPath(BCount).Name)); - ShowContinueError( - state, EnergyPlus::format("For Connector:Mixer={}", state.dataZoneEquip->ReturnAirPath(BCount).ComponentName(NumComp))); - ShowContinueError(state, EnergyPlus::format("Expected outlet node (return air path)={}", AirPathNodeName)); + ShowSevereError(state, std::format("Error in Return Air Path={}", state.dataZoneEquip->ReturnAirPath(BCount).Name)); + ShowContinueError(state, + std::format("For Connector:Mixer={}", state.dataZoneEquip->ReturnAirPath(BCount).ComponentName(NumComp))); + ShowContinueError(state, std::format("Expected outlet node (return air path)={}", AirPathNodeName)); ShowContinueError(state, - EnergyPlus::format("Encountered node name (mixer)={}", - state.dataLoopNodes->NodeID(state.dataMixerComponent->MixerCond(Count2).OutletNode))); + std::format("Encountered node name (mixer)={}", + state.dataLoopNodes->NodeID(state.dataMixerComponent->MixerCond(Count2).OutletNode))); ErrFound = true; ++NumErr; } else { @@ -1375,14 +1365,13 @@ void TestReturnAirPathIntegrity(EnergyPlusData &state, bool &ErrFound, Array2S_i continue; } if (AirPathNodeName != state.dataLoopNodes->NodeID(state.dataZonePlenum->ZoneRetPlenCond(Count2).OutletNode)) { - ShowSevereError(state, EnergyPlus::format("Error in Return Air Path={}", state.dataZoneEquip->ReturnAirPath(BCount).Name)); + ShowSevereError(state, std::format("Error in Return Air Path={}", state.dataZoneEquip->ReturnAirPath(BCount).Name)); ShowContinueError( - state, - EnergyPlus::format("For AirLoopHVAC:ReturnPlenum={}", state.dataZoneEquip->ReturnAirPath(BCount).ComponentName(NumComp))); - ShowContinueError(state, EnergyPlus::format("Expected outlet node (return air path)={}", AirPathNodeName)); + state, std::format("For AirLoopHVAC:ReturnPlenum={}", state.dataZoneEquip->ReturnAirPath(BCount).ComponentName(NumComp))); + ShowContinueError(state, std::format("Expected outlet node (return air path)={}", AirPathNodeName)); ShowContinueError(state, - EnergyPlus::format("Encountered node name (zone return plenum)={}", - state.dataLoopNodes->NodeID(state.dataZonePlenum->ZoneRetPlenCond(Count2).OutletNode))); + std::format("Encountered node name (zone return plenum)={}", + state.dataLoopNodes->NodeID(state.dataZonePlenum->ZoneRetPlenCond(Count2).OutletNode))); ErrFound = true; ++NumErr; } else { @@ -1485,8 +1474,8 @@ void TestReturnAirPathIntegrity(EnergyPlusData &state, bool &ErrFound, Array2S_i } } else { ShowWarningError(state, - EnergyPlus::format("TestReturnAirPathIntegrity: Air Loop has no Zone Equipment Return Node={}", - state.dataAirLoop->AirToZoneNodeInfo(Count2).AirLoopName)); + std::format("TestReturnAirPathIntegrity: Air Loop has no Zone Equipment Return Node={}", + state.dataAirLoop->AirToZoneNodeInfo(Count2).AirLoopName)); } } } @@ -1517,9 +1506,9 @@ void TestReturnAirPathIntegrity(EnergyPlusData &state, bool &ErrFound, Array2S_i } if (FoundReturnPlenum(Count1)) { ShowSevereError(state, - EnergyPlus::format("AirLoopHVAC:ReturnPlenum=\"{}\", duplicate entry.", - state.dataZonePlenum->ZoneRetPlenCond(Count1).ZonePlenumName)); - ShowContinueError(state, EnergyPlus::format("already exists on AirLoopHVAC:ReturnPath=\"{}\".", FoundNames(Count1))); + std::format("AirLoopHVAC:ReturnPlenum=\"{}\", duplicate entry.", + state.dataZonePlenum->ZoneRetPlenCond(Count1).ZonePlenumName)); + ShowContinueError(state, std::format("already exists on AirLoopHVAC:ReturnPath=\"{}\".", FoundNames(Count1))); ErrFound = true; } else { // record use @@ -1543,9 +1532,8 @@ void TestReturnAirPathIntegrity(EnergyPlusData &state, bool &ErrFound, Array2S_i } if (FoundZoneMixer(Count1)) { ShowSevereError( - state, - EnergyPlus::format("AirLoopHVAC:ZoneMixer=\"{}\", duplicate entry.", state.dataMixerComponent->MixerCond(Count1).MixerName)); - ShowContinueError(state, EnergyPlus::format("already exists on AirLoopHVAC:ReturnPath=\"{}\".", FoundNames(Count1))); + state, std::format("AirLoopHVAC:ZoneMixer=\"{}\", duplicate entry.", state.dataMixerComponent->MixerCond(Count1).MixerName)); + ShowContinueError(state, std::format("already exists on AirLoopHVAC:ReturnPath=\"{}\".", FoundNames(Count1))); ErrFound = true; } else { // record use @@ -1581,8 +1569,8 @@ void TestReturnAirPathIntegrity(EnergyPlusData &state, bool &ErrFound, Array2S_i continue; } ShowSevereError(state, - EnergyPlus::format("AirLoopHVAC:ReturnPlenum=\"{}\", not found on any AirLoopHVAC:ReturnPath.", - state.dataZonePlenum->ZoneRetPlenCond(Count1).ZonePlenumName)); + std::format("AirLoopHVAC:ReturnPlenum=\"{}\", not found on any AirLoopHVAC:ReturnPath.", + state.dataZonePlenum->ZoneRetPlenCond(Count1).ZonePlenumName)); } } @@ -1592,9 +1580,9 @@ void TestReturnAirPathIntegrity(EnergyPlusData &state, bool &ErrFound, Array2S_i continue; } ShowSevereError(state, - EnergyPlus::format("AirLoopHVAC:ZoneMixer=\"{}\", not found on any AirLoopHVAC:ReturnPath, AirLoopHVAC:ExhaustSystem, " - "AirTerminal:SingleDuct:SeriesPIU:Reheat,", - state.dataMixerComponent->MixerCond(Count1).MixerName)); + std::format("AirLoopHVAC:ZoneMixer=\"{}\", not found on any AirLoopHVAC:ReturnPath, AirLoopHVAC:ExhaustSystem, " + "AirTerminal:SingleDuct:SeriesPIU:Reheat,", + state.dataMixerComponent->MixerCond(Count1).MixerName)); ShowContinueError(state, "AirTerminal:SingleDuct:ParallelPIU:Reheat or AirTerminal:SingleDuct:ConstantVolume:FourPipeInduction."); } } diff --git a/src/EnergyPlus/GroundHeatExchangers/Base.cc b/src/EnergyPlus/GroundHeatExchangers/Base.cc index a94b96fb975..8f43a9e0e29 100644 --- a/src/EnergyPlus/GroundHeatExchangers/Base.cc +++ b/src/EnergyPlus/GroundHeatExchangers/Base.cc @@ -45,6 +45,10 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + +// EnergyPlus Headers #include #include #include @@ -367,7 +371,7 @@ void GLHEBase::updateGHX(EnergyPlusData &state) ShowContinueError(state, "This can be encountered in cases where the GLHE mass flow rate is either significantly"); ShowContinueError(state, " lower than the design value, or cases where the mass flow rate rapidly changes."); ShowContinueError( - state, EnergyPlus::format("GLHE Current Flow Rate={:.3T}; GLHE Design Flow Rate={:.3T}", this->massFlowRate, this->designMassFlow)); + state, EnergyPlus::format("GLHE Current Flow Rate={:.3f}; GLHE Design Flow Rate={:.3f}", this->massFlowRate, this->designMassFlow)); ++this->numErrorCalls; } } diff --git a/src/EnergyPlus/GroundHeatExchangers/BoreholeArray.cc b/src/EnergyPlus/GroundHeatExchangers/BoreholeArray.cc index 07e00e96c6e..e53927d164e 100644 --- a/src/EnergyPlus/GroundHeatExchangers/BoreholeArray.cc +++ b/src/EnergyPlus/GroundHeatExchangers/BoreholeArray.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include @@ -78,7 +79,7 @@ std::shared_ptr GLHEVertArray::GetVertArray(EnergyPlusData &state return *thisObj; } - ShowSevereError(state, fmt::format("Object=GroundHeatExchanger:Vertical:Array, Name={} - not found.", objectName)); + ShowSevereError(state, EnergyPlus::format("Object=GroundHeatExchanger:Vertical:Array, Name={} - not found.", objectName)); ShowFatalError(state, "Preceding errors cause program termination"); } diff --git a/src/EnergyPlus/GroundHeatExchangers/BoreholeSingle.cc b/src/EnergyPlus/GroundHeatExchangers/BoreholeSingle.cc index fb637402195..ac3c20d10a2 100644 --- a/src/EnergyPlus/GroundHeatExchangers/BoreholeSingle.cc +++ b/src/EnergyPlus/GroundHeatExchangers/BoreholeSingle.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include @@ -80,7 +81,7 @@ std::shared_ptr GLHEVertSingle::GetSingleBH(EnergyPlusData &stat return *thisObj; } - ShowSevereError(state, fmt::format("Object=GroundHeatExchanger:Vertical:Single, Name={} - not found.", objectName)); + ShowSevereError(state, EnergyPlus::format("Object=GroundHeatExchanger:Vertical:Single, Name={} - not found.", objectName)); ShowFatalError(state, "Preceding errors cause program termination"); } diff --git a/src/EnergyPlus/GroundHeatExchangers/Properties.cc b/src/EnergyPlus/GroundHeatExchangers/Properties.cc index 8cd5a4e0050..07efac92d8d 100644 --- a/src/EnergyPlus/GroundHeatExchangers/Properties.cc +++ b/src/EnergyPlus/GroundHeatExchangers/Properties.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include @@ -97,7 +98,7 @@ std::shared_ptr GLHEVertProps::GetVertProps(EnergyPlusData &state if (thisObj != state.dataGroundHeatExchanger->vertPropsVector.end()) { return *thisObj; } - ShowSevereError(state, fmt::format("Object=GroundHeatExchanger:Vertical:Properties, Name={} - not found.", objectName)); + ShowSevereError(state, EnergyPlus::format("Object=GroundHeatExchanger:Vertical:Properties, Name={} - not found.", objectName)); ShowFatalError(state, "Preceding errors cause program termination"); } diff --git a/src/EnergyPlus/GroundHeatExchangers/ResponseFactors.cc b/src/EnergyPlus/GroundHeatExchangers/ResponseFactors.cc index 9347f1739be..6f983880396 100644 --- a/src/EnergyPlus/GroundHeatExchangers/ResponseFactors.cc +++ b/src/EnergyPlus/GroundHeatExchangers/ResponseFactors.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include @@ -89,7 +90,7 @@ std::shared_ptr GetResponseFactor(EnergyPlusData &state, st if (thisObj != state.dataGroundHeatExchanger->responseFactorsVector.end()) { return *thisObj; } - ShowSevereError(state, fmt::format("Object=GroundHeatExchanger:ResponseFactors, Name={} - not found.", objectName)); + ShowSevereError(state, EnergyPlus::format("Object=GroundHeatExchanger:ResponseFactors, Name={} - not found.", objectName)); ShowFatalError(state, "Preceding errors cause program termination"); } diff --git a/src/EnergyPlus/GroundHeatExchangers/Slinky.cc b/src/EnergyPlus/GroundHeatExchangers/Slinky.cc index f5039dbacb1..87e5750e63a 100644 --- a/src/EnergyPlus/GroundHeatExchangers/Slinky.cc +++ b/src/EnergyPlus/GroundHeatExchangers/Slinky.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/GroundHeatExchangers/Vertical.cc b/src/EnergyPlus/GroundHeatExchangers/Vertical.cc index 60a315b0849..0db4fe6c11f 100644 --- a/src/EnergyPlus/GroundHeatExchangers/Vertical.cc +++ b/src/EnergyPlus/GroundHeatExchangers/Vertical.cc @@ -45,6 +45,10 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + +// EnergyPlus Headers #include #include #include @@ -58,7 +62,6 @@ #include #include #include -#include #include namespace EnergyPlus::GroundHeatExchangers { @@ -131,7 +134,7 @@ GLHEVert::GLHEVert(EnergyPlusData &state, std::string const &objName, nlohmann:: this->gFuncCalcMethod = GFuncCalcMethod::FullDesign; } else { errorsFound = true; - ShowSevereError(state, fmt::format("g-Function Calculation Method: \"{}\" is invalid", gFunctionMethodStr)); + ShowSevereError(state, EnergyPlus::format("g-Function Calculation Method: \"{}\" is invalid", gFunctionMethodStr)); } } @@ -653,7 +656,7 @@ nlohmann::json GLHEVert::getCommonGHEDesignerInputs(EnergyPlusData &state) const gheDesignerInputs["version"] = 2; // If you update GHEDesigner, you may need to use a new input version here gheDesignerInputs["topology"] = {{{"type", "ground_heat_exchanger"}, {"name", "ghe1"}}}; - std::string const p = fmt::format("[G-Function Calculation for GHE Named: {}] ", this->name); + std::string const p = EnergyPlus::format("[G-Function Calculation for GHE Named: {}] ", this->name); // set up the fluid to use in GHEDesigner, note that the concentration is more restrictive than in EnergyPlus nlohmann::json fluidObject; @@ -720,10 +723,10 @@ fs::path GLHEVert::runGHEDesigner(EnergyPlusData &state, nlohmann::json const &i exePath = FileSystem::getAbsolutePath(FileSystem::getProgramPath()); // could be /path/to/energyplus(.exe) or /path/to/energyplus_tests(.exe) exePath = exePath.parent_path() / ("energyplus" + FileSystem::exeExtension); } - std::string const cmd = fmt::format(R"("{}" auxiliary ghedesigner "{}" "{}")", - FileSystem::toString(exePath), - FileSystem::toGenericString(ghe_designer_input_file_path), - FileSystem::toGenericString(ghe_designer_output_directory)); + std::string const cmd = EnergyPlus::format(R"("{}" auxiliary ghedesigner "{}" "{}")", + FileSystem::toString(exePath), + FileSystem::toGenericString(ghe_designer_input_file_path), + FileSystem::toGenericString(ghe_designer_output_directory)); int const status = FileSystem::systemCall(cmd); if (status != 0) { ShowFatalError(state, "GHEDesigner failed to calculate G-functions."); @@ -888,7 +891,7 @@ void GLHEVert::calcUniformBHWallTempGFunctionsWithGHEDesigner(EnergyPlusData &st { nlohmann::json gheDesignerInputs = this->getCommonGHEDesignerInputs(state); - std::string const p = fmt::format("[GHEDesigner Calculation for GHE Named: {}] ", this->name); + std::string const p = EnergyPlus::format("[GHEDesigner Calculation for GHE Named: {}] ", this->name); // check the heights of the EnergyPlus boreholes to make sure they don't vary auto const &bhs = this->myRespFactors->myBorholes; diff --git a/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.cc b/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.cc index dde40f1024b..701f29500b7 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.cc @@ -91,7 +91,8 @@ namespace GroundTemp { auto *inputProcessor = state.dataInputProcessing->inputProcessor.get(); auto const modelInstances = inputProcessor->epJSON.find(currentModuleObject); if (modelInstances == inputProcessor->epJSON.end()) { - ShowFatalError(state, fmt::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); + ShowFatalError(state, + EnergyPlus::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); } auto const &modelSchemaProps = inputProcessor->getObjectSchemaProps(state, currentModuleObject); @@ -130,7 +131,8 @@ namespace GroundTemp { return thisModel; } - ShowFatalError(state, fmt::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); + ShowFatalError(state, + EnergyPlus::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); return nullptr; } diff --git a/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.cc b/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.cc index 3a3b8d4f954..0d12648b0d7 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.cc @@ -88,7 +88,8 @@ namespace GroundTemp { auto *inputProcessor = state.dataInputProcessing->inputProcessor.get(); auto const modelInstances = inputProcessor->epJSON.find(currentModuleObject); if (modelInstances == inputProcessor->epJSON.end()) { - ShowFatalError(state, fmt::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); + ShowFatalError(state, + EnergyPlus::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); } auto const &modelSchemaProps = inputProcessor->getObjectSchemaProps(state, currentModuleObject); @@ -175,7 +176,8 @@ namespace GroundTemp { return thisModel; } - ShowFatalError(state, fmt::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); + ShowFatalError(state, + EnergyPlus::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); return nullptr; } diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.cc b/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.cc index f9f15278ccb..75e093eae1d 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.cc @@ -119,12 +119,13 @@ namespace GroundTemp { state.dataEnvrn->GroundTempInputs[static_cast(DataEnvironment::GroundTempType::BuildingSurface)] = true; if (genErrorMessage) { - ShowWarningError(state, fmt::format("{}: Some values fall outside the range of 15-25C.", GroundTemp::modelTypeNames[(int)modelType])); + ShowWarningError(state, + EnergyPlus::format("{}: Some values fall outside the range of 15-25C.", GroundTemp::modelTypeNames[(int)modelType])); ShowContinueError(state, "These values may be inappropriate. Please consult the Input Output Reference for more details."); } } else if (numCurrObjects > 1) { - ShowSevereError(state, fmt::format("{}: Too many objects entered. Only one allowed.", GroundTemp::modelTypeNames[(int)modelType])); + ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", GroundTemp::modelTypeNames[(int)modelType])); errorsFound = true; } else { std::fill(thisModel->buildingSurfaceGroundTemps.begin(), thisModel->buildingSurfaceGroundTemps.end(), 18.0); @@ -138,7 +139,8 @@ namespace GroundTemp { return thisModel; } - ShowFatalError(state, fmt::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); + ShowFatalError(state, + EnergyPlus::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); return nullptr; } diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.cc b/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.cc index 7b3e382305f..74e027fea6d 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.cc @@ -117,7 +117,7 @@ namespace GroundTemp { state.dataEnvrn->GroundTempInputs[static_cast(DataEnvironment::GroundTempType::Deep)] = true; } else if (numCurrObjects > 1) { - ShowSevereError(state, fmt::format("{}: Too many objects entered. Only one allowed.", GroundTemp::modelTypeNames[(int)modelType])); + ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", GroundTemp::modelTypeNames[(int)modelType])); errorsFound = true; } else { @@ -132,7 +132,8 @@ namespace GroundTemp { return thisModel; } - ShowFatalError(state, fmt::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); + ShowFatalError(state, + EnergyPlus::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); return nullptr; } diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.cc b/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.cc index c9143d48439..77b0061db6b 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.cc @@ -117,7 +117,7 @@ namespace GroundTemp { found = true; } else if (numCurrObjects > 1) { - ShowSevereError(state, fmt::format("{}: Too many objects entered. Only one allowed.", GroundTemp::modelTypeNames[(int)modelType])); + ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", GroundTemp::modelTypeNames[(int)modelType])); // found stays false } else if (state.dataWeather->wthFCGroundTemps) { @@ -143,7 +143,8 @@ namespace GroundTemp { state.dataGrndTempModelMgr->groundTempModels.push_back(thisModel); return thisModel; } - ShowFatalError(state, fmt::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); + ShowFatalError(state, + EnergyPlus::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); return nullptr; } diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.cc b/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.cc index 43deb4b9315..c9b62b86293 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.cc @@ -116,7 +116,7 @@ namespace GroundTemp { state.dataEnvrn->GroundTempInputs[static_cast(DataEnvironment::GroundTempType::Shallow)] = true; } else if (numCurrObjects > 1) { - ShowSevereError(state, fmt::format("{}: Too many objects entered. Only one allowed.", GroundTemp::modelTypeNames[(int)modelType])); + ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", GroundTemp::modelTypeNames[(int)modelType])); errorsFound = true; } else { std::fill(thisModel->surfaceGroundTemps.begin(), thisModel->surfaceGroundTemps.end(), 13.0); @@ -130,7 +130,8 @@ namespace GroundTemp { return thisModel; } - ShowFatalError(state, fmt::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); + ShowFatalError(state, + EnergyPlus::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); return nullptr; } diff --git a/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.cc b/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.cc index cd0c613ebb6..50d25128ca8 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.cc @@ -48,7 +48,7 @@ // C++ Headers #include -// EnergyPlus headers +// EnergyPlus Headers #include #include #include @@ -82,7 +82,8 @@ namespace GroundTemp { auto *inputProcessor = state.dataInputProcessing->inputProcessor.get(); auto const modelInstances = inputProcessor->epJSON.find(currentModuleObject); if (modelInstances == inputProcessor->epJSON.end()) { - ShowFatalError(state, fmt::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); + ShowFatalError(state, + EnergyPlus::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); } auto const &modelSchemaProps = inputProcessor->getObjectSchemaProps(state, currentModuleObject); @@ -119,7 +120,8 @@ namespace GroundTemp { return thisModel; } - ShowFatalError(state, fmt::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); + ShowFatalError(state, + EnergyPlus::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType])); return nullptr; } diff --git a/src/EnergyPlus/HVACControllers.cc b/src/EnergyPlus/HVACControllers.cc index 165b6be3f32..b6fab3dc3ab 100644 --- a/src/EnergyPlus/HVACControllers.cc +++ b/src/EnergyPlus/HVACControllers.cc @@ -45,6 +45,9 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + // ObjexxFCL Headers #include #include @@ -73,6 +76,7 @@ #include #include #include +#include #include #include #include @@ -789,7 +793,7 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg EnergyPlus::format("HVACControllers: Missing temperature setpoint for controller type={} Name=\"{}\"", controllerProps.ControllerType, controllerProps.ControllerName)); - ShowContinueError(state, EnergyPlus::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + ShowContinueError(state, std::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); ShowContinueError(state, " use a Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at the " "controller sensed node."); @@ -800,11 +804,10 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg state, SensedNode, HVAC::CtrlVarType::Temp, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, - EnergyPlus::format("HVACControllers: Missing temperature setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, - EnergyPlus::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + std::format("HVACControllers: Missing temperature setpoint for controller type={} Name=\"{}\"", + controllerProps.ControllerType, + controllerProps.ControllerName)); + ShowContinueError(state, std::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); ShowContinueError(state, " use a Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at " "the controller sensed node."); @@ -817,11 +820,11 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg controllerProps.Action == ControllerAction::Reverse) { ShowWarningError( state, - EnergyPlus::format( + std::format( "HVACControllers: controller type={} Name=\"{}\" has detected a maximum humidity ratio setpoint at the control node.", controllerProps.ControllerType, controllerProps.ControllerName)); - ShowContinueError(state, EnergyPlus::format("Node referenced (by controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + ShowContinueError(state, std::format("Node referenced (by controller)={}", state.dataLoopNodes->NodeID(SensedNode))); ShowContinueError(state, " set the controller control variable to TemperatureAndHumidityRatio if humidity control is desired."); // SetPointErrorFlag = .TRUE. @@ -836,10 +839,10 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg state.dataLoopNodes->Node(SensedNode).HumRatMax == Node::SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - EnergyPlus::format("HVACControllers: Missing humidity ratio setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, EnergyPlus::format("Node referenced (by controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + std::format("HVACControllers: Missing humidity ratio setpoint for controller type={} Name=\"{}\"", + controllerProps.ControllerType, + controllerProps.ControllerName)); + ShowContinueError(state, std::format("Node referenced (by controller)={}", state.dataLoopNodes->NodeID(SensedNode))); ShowContinueError(state, " use a SetpointManager with the field Control Variable = \"MaximumHumidityRatio\" to establish a " "setpoint at the controller sensed node."); @@ -849,11 +852,10 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg state, SensedNode, HVAC::CtrlVarType::HumRat, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, - EnergyPlus::format("HVACControllers: Missing humidity ratio setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, - EnergyPlus::format("Node referenced (by controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + std::format("HVACControllers: Missing humidity ratio setpoint for controller type={} Name=\"{}\"", + controllerProps.ControllerType, + controllerProps.ControllerName)); + ShowContinueError(state, std::format("Node referenced (by controller)={}", state.dataLoopNodes->NodeID(SensedNode))); ShowContinueError(state, " use a SetpointManager with the field Control Variable = \"MaximumHumidityRatio\" to " "establish a setpoint at the controller sensed node."); @@ -863,10 +865,10 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg } else if (thisController.HumRatCntrlType == HVAC::CtrlVarType::MinHumRat) { ShowSevereError(state, - EnergyPlus::format("HVACControllers: incorrect humidity ratio setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, EnergyPlus::format("Node referenced (by controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + std::format("HVACControllers: incorrect humidity ratio setpoint for controller type={} Name=\"{}\"", + controllerProps.ControllerType, + controllerProps.ControllerName)); + ShowContinueError(state, std::format("Node referenced (by controller)={}", state.dataLoopNodes->NodeID(SensedNode))); ShowContinueError(state, " use a SetpointManager with the field Control Variable = \"MaximumHumidityRatio\" to establish a " "setpoint at the controller sensed node."); @@ -877,10 +879,10 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg if (state.dataLoopNodes->Node(SensedNode).TempSetPoint == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - EnergyPlus::format("HVACControllers: Missing temperature setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, EnergyPlus::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + std::format("HVACControllers: Missing temperature setpoint for controller type={} Name=\"{}\"", + controllerProps.ControllerType, + controllerProps.ControllerName)); + ShowContinueError(state, std::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); ShowContinueError(state, " use a Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at the " "controller sensed node."); @@ -891,11 +893,10 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg state, SensedNode, HVAC::CtrlVarType::Temp, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, - EnergyPlus::format("HVACControllers: Missing temperature setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, - EnergyPlus::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + std::format("HVACControllers: Missing temperature setpoint for controller type={} Name=\"{}\"", + controllerProps.ControllerType, + controllerProps.ControllerName)); + ShowContinueError(state, std::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); ShowContinueError(state, " use a Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at " "the controller sensed node."); @@ -905,12 +906,11 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg } if (state.dataLoopNodes->Node(SensedNode).HumRatMax == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError( - state, - EnergyPlus::format("HVACControllers: Missing maximum humidity ratio setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, EnergyPlus::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + ShowSevereError(state, + std::format("HVACControllers: Missing maximum humidity ratio setpoint for controller type={} Name=\"{}\"", + controllerProps.ControllerType, + controllerProps.ControllerName)); + ShowContinueError(state, std::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); ShowContinueError(state, " use a SetpointManager with the field Control Variable = \"MaximumHumidityRatio\" to establish a " "setpoint at the controller sensed node."); @@ -920,13 +920,11 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg EMSManager::CheckIfNodeSetPointManagedByEMS( state, SensedNode, HVAC::CtrlVarType::MaxHumRat, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { - ShowSevereError( - state, - EnergyPlus::format("HVACControllers: Missing maximum humidity ratio setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, - EnergyPlus::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + ShowSevereError(state, + std::format("HVACControllers: Missing maximum humidity ratio setpoint for controller type={} Name=\"{}\"", + controllerProps.ControllerType, + controllerProps.ControllerName)); + ShowContinueError(state, std::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); ShowContinueError(state, " use a SetpointManager with the field Control Variable = \"MaximumHumidityRatio\" to " "establish a setpoint at the controller sensed node."); @@ -939,10 +937,10 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg if (state.dataLoopNodes->Node(SensedNode).MassFlowRateSetPoint == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - EnergyPlus::format("HVACControllers: Missing mass flow rate setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, EnergyPlus::format("Node Referenced (in Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + std::format("HVACControllers: Missing mass flow rate setpoint for controller type={} Name=\"{}\"", + controllerProps.ControllerType, + controllerProps.ControllerName)); + ShowContinueError(state, std::format("Node Referenced (in Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); ShowContinueError(state, " use a SetpointManager with the field Control Variable = \"MassFlowRate\" to establish a " "setpoint at the controller sensed node."); @@ -953,11 +951,10 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg state, SensedNode, HVAC::CtrlVarType::MassFlowRate, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, - EnergyPlus::format("HVACControllers: Missing mass flow rate setpoint for controller type={} Name=\"{}\"", - controllerProps.ControllerType, - controllerProps.ControllerName)); - ShowContinueError(state, - EnergyPlus::format("Node Referenced (in Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); + std::format("HVACControllers: Missing mass flow rate setpoint for controller type={} Name=\"{}\"", + controllerProps.ControllerType, + controllerProps.ControllerName)); + ShowContinueError(state, std::format("Node Referenced (in Controller)={}", state.dataLoopNodes->NodeID(SensedNode))); ShowContinueError(state, " use a SetpointManager with the field Control Variable = \"MassFlowRate\" to establish a " "setpoint at the controller sensed node."); @@ -987,14 +984,13 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg // Check to make sure that the Minimum Flow rate is less than the max. if (thisController.MaxVolFlowActuated == 0.0) { ShowWarningError( - state, - EnergyPlus::format("{}: Controller:WaterCoil=\"{}\", Maximum Actuated Flow is zero.", RoutineName, thisController.ControllerName)); + state, std::format("{}: Controller:WaterCoil=\"{}\", Maximum Actuated Flow is zero.", RoutineName, thisController.ControllerName)); thisController.MinVolFlowActuated = 0.0; } else if (thisController.MinVolFlowActuated >= thisController.MaxVolFlowActuated) { ShowFatalError(state, - EnergyPlus::format("{}: Controller:WaterCoil=\"{}\", Minimum control flow is > or = Maximum control flow.", - RoutineName, - thisController.ControllerName)); + std::format("{}: Controller:WaterCoil=\"{}\", Minimum control flow is > or = Maximum control flow.", + RoutineName, + thisController.ControllerName)); } // Setup root finder after sizing calculation @@ -1128,7 +1124,7 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg } } break; default: { - ShowFatalError(state, EnergyPlus::format("Invalid Controller Variable Type={}", ControlVariableTypes(thisController.ControlVar))); + ShowFatalError(state, std::format("Invalid Controller Variable Type={}", ControlVariableTypes(thisController.ControlVar))); } break; } @@ -1150,7 +1146,7 @@ void InitController(EnergyPlusData &state, int const ControlNum, bool &IsConverg } } break; default: { - ShowFatalError(state, EnergyPlus::format("Invalid Actuator Variable Type={}", ControlVariableTypes(thisController.ActuatorVar))); + ShowFatalError(state, std::format("Invalid Actuator Variable Type={}", ControlVariableTypes(thisController.ActuatorVar))); } break; } @@ -1305,8 +1301,8 @@ void CalcSimpleController(EnergyPlusData &state, } else { // Check that the setpoint is defined if (!controllerProps.IsSetPointDefinedFlag) { - ShowSevereError(state, EnergyPlus::format("CalcSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); - ShowContinueError(state, EnergyPlus::format(" Controller name=\"{}\"", ControllerName)); + ShowSevereError(state, std::format("CalcSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); + ShowContinueError(state, std::format(" Controller name=\"{}\"", ControllerName)); ShowContinueError(state, " Setpoint is not available/defined."); ShowFatalError(state, "Preceding error causes program termination."); } @@ -1314,16 +1310,16 @@ void CalcSimpleController(EnergyPlusData &state, // - min bound // - max bound if (rootFinders.MinPoint.X != controllerProps.MinAvailActuated) { - ShowSevereError(state, EnergyPlus::format("CalcSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); - ShowContinueError(state, EnergyPlus::format(" Controller name=\"{}\"", ControllerName)); + ShowSevereError(state, std::format("CalcSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); + ShowContinueError(state, std::format(" Controller name=\"{}\"", ControllerName)); ShowContinueError(state, " Minimum bound must remain invariant during successive iterations."); ShowContinueError(state, EnergyPlus::format(" Minimum root finder point={:.{}T}", rootFinders.MinPoint.X, NumSigDigits)); ShowContinueError(state, EnergyPlus::format(" Minimum avail actuated={:.{}T}", controllerProps.MinAvailActuated, NumSigDigits)); ShowFatalError(state, "Preceding error causes program termination."); } if (rootFinders.MaxPoint.X != controllerProps.MaxAvailActuated) { - ShowSevereError(state, EnergyPlus::format("CalcSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); - ShowContinueError(state, EnergyPlus::format(" Controller name=\"{}\"", ControllerName)); + ShowSevereError(state, std::format("CalcSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); + ShowContinueError(state, std::format(" Controller name=\"{}\"", ControllerName)); ShowContinueError(state, " Maximum bound must remain invariant during successive iterations."); ShowContinueError(state, EnergyPlus::format(" Maximum root finder point={:.{}T}", rootFinders.MaxPoint.X, NumSigDigits)); ShowContinueError(state, EnergyPlus::format(" Maximum avail actuated={:.{}T}", controllerProps.MaxAvailActuated, NumSigDigits)); @@ -1444,8 +1440,8 @@ void FindRootSimpleController(EnergyPlusData &state, // Abnormal case: should never happen } break; case DataRootFinder::RootFinderStatus::ErrorRange: { - ShowSevereError(state, EnergyPlus::format("FindRootSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); - ShowContinueError(state, EnergyPlus::format(" Controller name=\"{}\"", ControllerName)); + ShowSevereError(state, std::format("FindRootSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); + ShowContinueError(state, std::format(" Controller name=\"{}\"", ControllerName)); ShowContinueError( state, EnergyPlus::format(" Root candidate x={:.{}T} does not lie within the min/max bounds.", controllerProps.ActuatedValue, NumSigDigits)); @@ -1456,9 +1452,9 @@ void FindRootSimpleController(EnergyPlusData &state, // Abnormal case: should never happen } break; case DataRootFinder::RootFinderStatus::ErrorBracket: { - ShowSevereError(state, EnergyPlus::format("FindRootSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); - ShowContinueError(state, EnergyPlus::format(" Controller name={}", controllerProps.ControllerName)); - ShowContinueError(state, fmt::format(" Controller action={}", state.dataHVACCtrl->ActionTypes[static_cast(controllerProps.Action)])); + ShowSevereError(state, std::format("FindRootSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); + ShowContinueError(state, std::format(" Controller name={}", controllerProps.ControllerName)); + ShowContinueError(state, std::format(" Controller action={}", state.dataHVACCtrl->ActionTypes[static_cast(controllerProps.Action)])); ShowContinueError(state, EnergyPlus::format(" Root candidate x={:.{}T} does not lie within the lower/upper brackets.", controllerProps.ActuatedValue, @@ -1486,56 +1482,52 @@ void FindRootSimpleController(EnergyPlusData &state, case DataRootFinder::RootFinderStatus::ErrorSlope: { if (!state.dataGlobal->WarmupFlag && controllerProps.BadActionErrCount == 0) { ++controllerProps.BadActionErrCount; - ShowSevereError(state, EnergyPlus::format("FindRootSimpleController: Controller error for controller = \"{}\"", ControllerName)); + ShowSevereError(state, std::format("FindRootSimpleController: Controller error for controller = \"{}\"", ControllerName)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, - fmt::format(" Controller function is inconsistent with user specified controller action = {}", + std::format(" Controller function is inconsistent with user specified controller action = {}", state.dataHVACCtrl->ActionTypes[static_cast(controllerProps.Action)])); ShowContinueError(state, " Actuator will be set to maximum action"); - ShowContinueError(state, EnergyPlus::format("Controller control type={}", ControlVariableTypes(controllerProps.ControlVar))); + ShowContinueError(state, std::format("Controller control type={}", ControlVariableTypes(controllerProps.ControlVar))); if (controllerProps.ControlVar == CtrlVarType::Temperature) { - ShowContinueError(state, EnergyPlus::format("Controller temperature setpoint = {:.2T} [C]", controllerProps.SetPointValue)); - ShowContinueError(state, EnergyPlus::format("Controller sensed temperature = {:.2T} [C]", controllerProps.SensedValue)); + ShowContinueError(state, std::format("Controller temperature setpoint = {:.2f} [C]", controllerProps.SetPointValue)); + ShowContinueError(state, std::format("Controller sensed temperature = {:.2f} [C]", controllerProps.SensedValue)); } else if (controllerProps.ControlVar == CtrlVarType::HumidityRatio) { - ShowContinueError( - state, EnergyPlus::format("Controller humidity ratio setpoint = {:.2T} [kgWater/kgDryAir]", controllerProps.SetPointValue)); ShowContinueError(state, - EnergyPlus::format("Controller sensed humidity ratio = {:.2T} [kgWater/kgDryAir]", controllerProps.SensedValue)); + std::format("Controller humidity ratio setpoint = {:.2f} [kgWater/kgDryAir]", controllerProps.SetPointValue)); + ShowContinueError(state, std::format("Controller sensed humidity ratio = {:.2f} [kgWater/kgDryAir]", controllerProps.SensedValue)); } else if (controllerProps.ControlVar == CtrlVarType::TemperatureAndHumidityRatio) { if (controllerProps.HumRatCtrlOverride) { ShowContinueError(state, "Humidity control is active."); - ShowContinueError( - state, EnergyPlus::format("Controller humidity ratio setpoint = {:.2T} [kgWater/kgDryAir]", controllerProps.SetPointValue)); - ShowContinueError( - state, EnergyPlus::format("Controller sensed humidity ratio = {:.2T} [kgWater/kgDryAir]", controllerProps.SensedValue)); - ShowContinueError( - state, - EnergyPlus::format("Controller humidity ratio setpoint dew-point temperature = {:.2T} [C]", - Psychrometrics::PsyTdpFnWPb(state, controllerProps.SetPointValue, state.dataEnvrn->OutBaroPress))); ShowContinueError(state, - EnergyPlus::format("Controller temperature setpoint = {:.2T} [C]", - state.dataLoopNodes->Node(controllerProps.SensedNode).TempSetPoint)); + std::format("Controller humidity ratio setpoint = {:.2f} [kgWater/kgDryAir]", controllerProps.SetPointValue)); + ShowContinueError(state, + std::format("Controller sensed humidity ratio = {:.2f} [kgWater/kgDryAir]", controllerProps.SensedValue)); + ShowContinueError(state, + std::format("Controller humidity ratio setpoint dew-point temperature = {:.2f} [C]", + Psychrometrics::PsyTdpFnWPb(state, controllerProps.SetPointValue, state.dataEnvrn->OutBaroPress))); + ShowContinueError(state, + std::format("Controller temperature setpoint = {:.2f} [C]", + state.dataLoopNodes->Node(controllerProps.SensedNode).TempSetPoint)); ShowContinueError( - state, - EnergyPlus::format("Controller sensed temperature = {:.2T} [C]", state.dataLoopNodes->Node(controllerProps.SensedNode).Temp)); + state, std::format("Controller sensed temperature = {:.2f} [C]", state.dataLoopNodes->Node(controllerProps.SensedNode).Temp)); } else { - ShowContinueError(state, EnergyPlus::format("Controller temperature setpoint = {:.2T} [C]", controllerProps.SetPointValue)); - ShowContinueError(state, EnergyPlus::format("Controller sensed temperature = {:.2T} [C]", controllerProps.SensedValue)); + ShowContinueError(state, std::format("Controller temperature setpoint = {:.2f} [C]", controllerProps.SetPointValue)); + ShowContinueError(state, std::format("Controller sensed temperature = {:.2f} [C]", controllerProps.SensedValue)); } } else if (controllerProps.ControlVar == CtrlVarType::Flow) { - ShowContinueError(state, EnergyPlus::format("Controller mass flow rate setpoint = {:.2T} [kg/s]", controllerProps.SetPointValue)); - ShowContinueError(state, EnergyPlus::format("Controller sensed mass flow rate = {:.2T} [kg/s]", controllerProps.SensedValue)); + ShowContinueError(state, std::format("Controller mass flow rate setpoint = {:.2f} [kg/s]", controllerProps.SetPointValue)); + ShowContinueError(state, std::format("Controller sensed mass flow rate = {:.2f} [kg/s]", controllerProps.SensedValue)); } else { // bad control variable input checked in input routine } if (controllerProps.ActuatorVar == CtrlVarType::Flow) { - ShowContinueError(state, - EnergyPlus::format("Controller actuator mass flow rate set to {:.2T} [kg/s]", controllerProps.MaxAvailActuated)); + ShowContinueError(state, std::format("Controller actuator mass flow rate set to {:.2f} [kg/s]", controllerProps.MaxAvailActuated)); if (controllerProps.ControlVar == CtrlVarType::Temperature || controllerProps.ControlVar == CtrlVarType::TemperatureAndHumidityRatio) { - ShowContinueError(state, - EnergyPlus::format("Controller actuator temperature = {:.2T} [C]", - state.dataLoopNodes->Node(controllerProps.ActuatedNode).Temp)); + ShowContinueError( + state, + std::format("Controller actuator temperature = {:.2f} [C]", state.dataLoopNodes->Node(controllerProps.ActuatedNode).Temp)); if (controllerProps.WaterCoilType == DataPlant::PlantEquipmentType::CoilWaterCooling || controllerProps.WaterCoilType == DataPlant::PlantEquipmentType::CoilWaterDetailedFlatCooling) { if (controllerProps.HumRatCtrlOverride) { @@ -1569,8 +1561,8 @@ void FindRootSimpleController(EnergyPlusData &state, } break; default: { // Should never happen - ShowSevereError(state, EnergyPlus::format("FindRootSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); - ShowContinueError(state, EnergyPlus::format(" Controller name={}", ControllerName)); + ShowSevereError(state, std::format("FindRootSimpleController: Root finder failed at {}", CreateHVACStepFullString(state))); + ShowContinueError(state, std::format(" Controller name={}", ControllerName)); ShowContinueError(state, EnergyPlus::format(" Unrecognized root finder status flag={}", rootFinders.StatusFlag)); ShowFatalError(state, "Preceding error causes program termination."); } break; @@ -1721,8 +1713,8 @@ bool CheckMinActiveController(EnergyPlusData &state, int const ControlNum) } break; default: { // Should never happen - ShowSevereError(state, EnergyPlus::format("CheckMinActiveController: Invalid controller action during {}.", CreateHVACStepFullString(state))); - ShowContinueError(state, EnergyPlus::format("CheckMinActiveController: Controller name={}", controllerProps.ControllerName)); + ShowSevereError(state, std::format("CheckMinActiveController: Invalid controller action during {}.", CreateHVACStepFullString(state))); + ShowContinueError(state, std::format("CheckMinActiveController: Controller name={}", controllerProps.ControllerName)); ShowContinueError(state, R"(CheckMinActiveController: Valid choices are "NORMAL" or "REVERSE")"); ShowFatalError(state, "CheckMinActiveController: Preceding error causes program termination."); } break; @@ -1762,8 +1754,8 @@ bool CheckMaxActiveController(EnergyPlusData &state, int const ControlNum) } break; default: { // Should never happen - ShowSevereError(state, EnergyPlus::format("CheckMaxActiveController: Invalid controller action during {}.", CreateHVACStepFullString(state))); - ShowContinueError(state, EnergyPlus::format("CheckMaxActiveController: Controller name={}", ControllerProps.ControllerName)); + ShowSevereError(state, std::format("CheckMaxActiveController: Invalid controller action during {}.", CreateHVACStepFullString(state))); + ShowContinueError(state, std::format("CheckMaxActiveController: Controller name={}", ControllerProps.ControllerName)); ShowContinueError(state, R"(CheckMaxActiveController: Valid choices are "NORMAL" or "REVERSE")"); ShowFatalError(state, "CheckMaxActiveController: Preceding error causes program termination."); } break; @@ -1815,8 +1807,7 @@ void UpdateController(EnergyPlusData &state, int const ControlNum) // Node(ActuatedNode)%MassFlowRate = ControllerProps(ControlNum)%NextActuatedValue } break; default: { - ShowFatalError(state, - EnergyPlus::format("UpdateController: Invalid Actuator Variable Type={}", ControlVariableTypes(ControllerProps.ActuatorVar))); + ShowFatalError(state, std::format("UpdateController: Invalid Actuator Variable Type={}", ControlVariableTypes(ControllerProps.ActuatorVar))); } break; } } @@ -2057,7 +2048,7 @@ void WriteAirLoopStatistics(EnergyPlusData &state, print(statisticsFile, "NumWarmRestarts,{}\n", NumWarmRestarts); print(statisticsFile, "NumSuccessfulWarmRestarts,{}\n", ThisAirLoopStats.NumSuccessfulWarmRestarts); print(statisticsFile, "NumFailedWarmRestarts,{}\n", ThisAirLoopStats.NumFailedWarmRestarts); - print(statisticsFile, "WarmRestartSuccessRatio,{:.10T}\n", WarmRestartSuccessRatio); + print(statisticsFile, "WarmRestartSuccessRatio,{:.10f}\n", WarmRestartSuccessRatio); // Total number of times SimAirLoopComponents() has been invoked over the course of the simulation // to simulate the specified air loop @@ -2078,7 +2069,7 @@ void WriteAirLoopStatistics(EnergyPlusData &state, AvgIterations = double(ThisAirLoopStats.TotIterations) / double(ThisAirLoopStats.NumCalls); } - print(statisticsFile, "AvgIterations,{:.10T}\n", AvgIterations); + print(statisticsFile, "AvgIterations,{:.10f}\n", AvgIterations); // Dump statistics for each controller on this air loop for (int AirLoopControlNum = 1; AirLoopControlNum <= ThisPrimaryAirSystem.NumControllers; ++AirLoopControlNum) { @@ -2111,7 +2102,7 @@ void WriteAirLoopStatistics(EnergyPlusData &state, } else { AvgIterations = double(TotIterations) / double(NumCalls); } - print(statisticsFile, "AvgIterations,{:.10T}\n", AvgIterations); + print(statisticsFile, "AvgIterations,{:.10f}\n", AvgIterations); // Dump iteration trackers for each operating mode for (int iModeNum = iFirstMode; iModeNum <= iLastMode; ++iModeNum) { @@ -2133,7 +2124,7 @@ void WriteAirLoopStatistics(EnergyPlusData &state, AvgIterations = double(ThisAirLoopStats.ControllerStats(AirLoopControlNum).TotIterations(iModeNum)) / double(ThisAirLoopStats.ControllerStats(AirLoopControlNum).NumCalls(iModeNum)); } - print(statisticsFile, "AvgIterations,{:.10T}\n", AvgIterations); + print(statisticsFile, "AvgIterations,{:.10f}\n", AvgIterations); } } } @@ -2150,7 +2141,7 @@ void SetupAirLoopControllersTracer(EnergyPlusData &state, int const AirLoopNum) // and writes header row with titles. // Open main controller trace file for each air loop - const std::string TraceFilePath = fmt::format("controller.{}.csv", state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).Name); + const std::string TraceFilePath = std::format("controller.{}.csv", state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).Name); auto &airLoopStats = state.dataHVACControllers->AirLoopStats(AirLoopNum); @@ -2159,8 +2150,8 @@ void SetupAirLoopControllersTracer(EnergyPlusData &state, int const AirLoopNum) airLoopStats.TraceFile->open(); if (!airLoopStats.TraceFile->good()) { - ShowFatalError( - state, EnergyPlus::format("SetupAirLoopControllersTracer: Failed to open air loop trace file \"{}\" for output (write).", TraceFilePath)); + ShowFatalError(state, + std::format("SetupAirLoopControllersTracer: Failed to open air loop trace file \"{}\" for output (write).", TraceFilePath)); return; } @@ -2297,7 +2288,7 @@ void TraceAirLoopController(EnergyPlusData &state, InputOutputFile &TraceFile, i auto &controllerProps = state.dataHVACControllers->ControllerProps(ControlNum); print(TraceFile, - "{},{},{:.10T},{:.10T},{:.10T},", + "{},{},{:.10f},{:.10f},{:.10f},", controllerProps.Mode, controllerProps.NumCalcCalls, state.dataLoopNodes->Node(controllerProps.ActuatedNode).MassFlowRate, @@ -2318,15 +2309,14 @@ void SetupIndividualControllerTracer(EnergyPlusData &state, int const ControlNum auto &controllerProps = state.dataHVACControllers->ControllerProps(ControlNum); - const std::string TraceFilePath = fmt::format("controller.{}.csv", controllerProps.ControllerName); + const std::string TraceFilePath = std::format("controller.{}.csv", controllerProps.ControllerName); auto &TraceFile = *controllerProps.TraceFile; TraceFile.filePath = TraceFilePath; TraceFile.open(); if (!TraceFile.good()) { ShowFatalError( - state, - EnergyPlus::format("SetupIndividualControllerTracer: Failed to open controller trace file \"{}\" for output (write).", TraceFilePath)); + state, std::format("SetupIndividualControllerTracer: Failed to open controller trace file \"{}\" for output (write).", TraceFilePath)); return; } @@ -2407,7 +2397,7 @@ void TraceIndividualController(EnergyPlusData &state, case DataHVACControllers::ControllerOperation::ColdStart: case DataHVACControllers::ControllerOperation::WarmRestart: { print(TraceFile, - "{:.10T},{:.10T},{:.10T},{:.10T},{:.10T},{:.10T},{},{},{},{},{:.10T},", + "{:.10f},{:.10f},{:.10f},{:.10f},{:.10f},{:.10f},{},{},{},{},{:.10f},", state.dataLoopNodes->Node(SensedNode).MassFlowRate, state.dataLoopNodes->Node(ActuatedNode).MassFlowRateMinAvail, state.dataLoopNodes->Node(ActuatedNode).MassFlowRateMaxAvail, @@ -2432,7 +2422,7 @@ void TraceIndividualController(EnergyPlusData &state, // Convergence analysis print(TraceFile, - "{:.10T},{:.10T},{:.10T},{:.10T},{:.10T},{:.10T},{:.10T},{:.10T},{},{},{:.10T},", + "{:.10f},{:.10f},{:.10f},{:.10f},{:.10f},{:.10f},{:.10f},{:.10f},{},{},{:.10f},", state.dataLoopNodes->Node(SensedNode).MassFlowRate, state.dataLoopNodes->Node(ActuatedNode).MassFlowRateMinAvail, state.dataLoopNodes->Node(ActuatedNode).MassFlowRateMaxAvail, @@ -2458,7 +2448,7 @@ void TraceIndividualController(EnergyPlusData &state, // Masss flow rate // Convergence analysis print(TraceFile, - "{:.10T},{:.10T},{:.10T},{:.10T},{:.10T},{:.10T},{:.10T},{:.10T},{},{},{:.10T},", + "{:.10f},{:.10f},{:.10f},{:.10f},{:.10f},{:.10f},{:.10f},{:.10f},{},{},{:.10f},", state.dataLoopNodes->Node(SensedNode).MassFlowRate, state.dataLoopNodes->Node(ActuatedNode).MassFlowRateMinAvail, state.dataLoopNodes->Node(ActuatedNode).MassFlowRateMaxAvail, @@ -2571,7 +2561,7 @@ std::string MakeHVACTimeIntervalString(const EnergyPlusData &state) // This function creates a string describing the current time interval of the system // time step. - return EnergyPlus::format("{} - {}", General::CreateTimeString(GetPreviousHVACTime(state)), General::CreateTimeString(GetCurrentHVACTime(state))); + return std::format("{} - {}", General::CreateTimeString(GetPreviousHVACTime(state)), General::CreateTimeString(GetCurrentHVACTime(state))); } void CheckControllerListOrder(EnergyPlusData &state) @@ -2647,8 +2637,8 @@ void CheckControllerListOrder(EnergyPlusData &state) // we have a flow order problem with water coil controllers ShowSevereError(state, "CheckControllerListOrder: A water coil controller list has the wrong order"); ShowContinueError(state, - EnergyPlus::format("Check the AirLoopHVAC:ControllerList for the air loop called \"{}\"", - state.dataAirSystemsData->PrimaryAirSystems(AirSysNum).Name)); + std::format("Check the AirLoopHVAC:ControllerList for the air loop called \"{}\"", + state.dataAirSystemsData->PrimaryAirSystems(AirSysNum).Name)); ShowContinueError(state, "When there are multiple Controller:WaterCoil objects for the same air loop, they need to be " "listed in the proper order."); @@ -2778,8 +2768,8 @@ int GetControllerIndex(EnergyPlusData &state, std::string const &ControllerName if (ControllerIndex == 0) { ShowFatalError( state, - EnergyPlus::format("ManageControllers: Invalid controller={}. The only valid controller type for an AirLoopHVAC is Controller:WaterCoil.", - ControllerName)); + std::format("ManageControllers: Invalid controller={}. The only valid controller type for an AirLoopHVAC is Controller:WaterCoil.", + ControllerName)); } return ControllerIndex; diff --git a/src/EnergyPlus/HVACFourPipeBeam.cc b/src/EnergyPlus/HVACFourPipeBeam.cc index 3278a47bf64..9a7533d055c 100644 --- a/src/EnergyPlus/HVACFourPipeBeam.cc +++ b/src/EnergyPlus/HVACFourPipeBeam.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -492,9 +493,8 @@ namespace FourPipeBeam { } } if (!airNodeFound) { - ShowSevereError(state, EnergyPlus::format("The outlet air node from the {} = {}", cCurrentModuleObject, thisBeam->name)); - ShowContinueError(state, - EnergyPlus::format("did not have a matching Zone Equipment Inlet Node, Node ={}", state.dataIPShortCut->cAlphaArgs(5))); + ShowSevereError(state, std::format("The outlet air node from the {} = {}", cCurrentModuleObject, thisBeam->name)); + ShowContinueError(state, std::format("did not have a matching Zone Equipment Inlet Node, Node ={}", state.dataIPShortCut->cAlphaArgs(5))); ErrorsFound = true; } @@ -502,7 +502,7 @@ namespace FourPipeBeam { state.dataFourPipeBeam->FourPipeBeams.push_back(thisBeam); return thisBeam; } - ShowFatalError(state, EnergyPlus::format("{}Errors found in getting input. Preceding conditions cause termination.", routineName)); + ShowFatalError(state, std::format("{}Errors found in getting input. Preceding conditions cause termination.", routineName)); return nullptr; } @@ -574,7 +574,7 @@ namespace FourPipeBeam { this->cWInNodeNum, _); if (errFlag) { - ShowFatalError(state, EnergyPlus::format("{} Program terminated for previous conditions.", routineName)); + ShowFatalError(state, std::format("{} Program terminated for previous conditions.", routineName)); } } if (this->beamHeatingPresent) { @@ -589,7 +589,7 @@ namespace FourPipeBeam { this->hWInNodeNum, _); if (errFlag) { - ShowFatalError(state, EnergyPlus::format("{} Program terminated for previous conditions.", routineName)); + ShowFatalError(state, std::format("{} Program terminated for previous conditions.", routineName)); } } this->plantLoopScanFlag = false; @@ -600,10 +600,10 @@ namespace FourPipeBeam { if (this->aDUNum != 0) { if (!CheckZoneEquipmentList(state, "ZONEHVAC:AIRDISTRIBUTIONUNIT", state.dataDefineEquipment->AirDistUnit(this->aDUNum).Name)) { ShowSevereError(state, - EnergyPlus::format("{}: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", - routineName, - state.dataDefineEquipment->AirDistUnit(this->aDUNum).Name)); - ShowContinueError(state, EnergyPlus::format("...Unit=[{},{}] will not be simulated.", this->unitType, this->name)); + std::format("{}: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", + routineName, + state.dataDefineEquipment->AirDistUnit(this->aDUNum).Name)); + ShowContinueError(state, std::format("...Unit=[{},{}] will not be simulated.", this->unitType, this->name)); } this->zoneEquipmentListChecked = true; } @@ -817,7 +817,7 @@ namespace FourPipeBeam { int pltSizCoolNum = MyPlantSizingIndex(state, "four pipe beam unit", this->name, this->cWInNodeNum, this->cWOutNodeNum, ErrorsFound); if (pltSizCoolNum == 0) { ShowSevereError(state, "Autosizing of water flow requires a cooling loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in {} Object={}", this->unitType, this->name)); + ShowContinueError(state, std::format("Occurs in {} Object={}", this->unitType, this->name)); ErrorsFound = true; } else { this->cWTempIn = state.dataSize->PlantSizData(pltSizCoolNum).ExitTemp; @@ -864,10 +864,10 @@ namespace FourPipeBeam { int SolFlag = 0; General::SolveRoot(state, ErrTolerance, 50, SolFlag, mDotAirSolutionCooling, f, minFlow, maxFlowCool); if (SolFlag == -1) { - ShowWarningError(state, EnergyPlus::format("Cooling load sizing search failed in four pipe beam unit called {}", this->name)); + ShowWarningError(state, std::format("Cooling load sizing search failed in four pipe beam unit called {}", this->name)); ShowContinueError(state, " Iteration limit exceeded in calculating size for design cooling load"); } else if (SolFlag == -2) { - ShowWarningError(state, EnergyPlus::format("Cooling load sizing search failed in four pipe beam unit called {}", this->name)); + ShowWarningError(state, std::format("Cooling load sizing search failed in four pipe beam unit called {}", this->name)); ShowContinueError(state, " Bad size limits"); } } @@ -888,7 +888,7 @@ namespace FourPipeBeam { int pltSizHeatNum = MyPlantSizingIndex(state, "four pipe beam unit", this->name, this->hWInNodeNum, this->hWOutNodeNum, ErrorsFound); if (pltSizHeatNum == 0) { ShowSevereError(state, "Autosizing of water flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in {} Object={}", this->unitType, this->name)); + ShowContinueError(state, std::format("Occurs in {} Object={}", this->unitType, this->name)); ErrorsFound = true; } else { this->hWTempIn = state.dataSize->PlantSizData(pltSizHeatNum).ExitTemp; @@ -935,10 +935,10 @@ namespace FourPipeBeam { int SolFlag = 0; General::SolveRoot(state, ErrTolerance, 50, SolFlag, mDotAirSolutionHeating, f, 0.0, maxFlowHeat); if (SolFlag == -1) { - ShowWarningError(state, EnergyPlus::format("Heating load sizing search failed in four pipe beam unit called {}", this->name)); + ShowWarningError(state, std::format("Heating load sizing search failed in four pipe beam unit called {}", this->name)); ShowContinueError(state, " Iteration limit exceeded in calculating size for design heating load"); } else if (SolFlag == -2) { - ShowWarningError(state, EnergyPlus::format("Heating load sizing search failed in four pipe beam unit called {}", this->name)); + ShowWarningError(state, std::format("Heating load sizing search failed in four pipe beam unit called {}", this->name)); ShowContinueError(state, " Bad size limits"); } } diff --git a/src/EnergyPlus/HVACHXAssistedCoolingCoil.cc b/src/EnergyPlus/HVACHXAssistedCoolingCoil.cc index f1ab81454e5..eca2da9b282 100644 --- a/src/EnergyPlus/HVACHXAssistedCoolingCoil.cc +++ b/src/EnergyPlus/HVACHXAssistedCoolingCoil.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -405,29 +406,28 @@ namespace HVACHXAssistedCoolingCoil { ShowContinueError( state, EnergyPlus::format("Heat exchanger supply air outlet node name=\"{}\"", state.dataLoopNodes->NodeID(SupplyAirOutletNode))); - ShowContinueError( - state, EnergyPlus::format("Cooling coil air inlet node name=\"{}\"", state.dataLoopNodes->NodeID(CoolingCoilInletNodeNum))); + ShowContinueError(state, + std::format("Cooling coil air inlet node name=\"{}\"", state.dataLoopNodes->NodeID(CoolingCoilInletNodeNum))); ErrorsFound = true; } CoolingCoilOutletNodeNum = state.dataCoilCoolingDX->coilCoolingDXs[thisHXCoil.CoolingCoilIndex].evapOutletNodeIndex; if (SecondaryAirInletNode != CoolingCoilOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); ShowContinueError(state, "Node names are inconsistent in heat exchanger and cooling coil object."); ShowContinueError(state, - EnergyPlus::format("The secondary air inlet node name in heat exchanger {}=\"{}\"", - HVAC::hxTypeNames[(int)thisHXCoil.hxType], - thisHXCoil.HeatExchangerName)); - ShowContinueError(state, - EnergyPlus::format("must match the cooling coil air outlet node name in {}=\"{}\"", - HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], - thisHXCoil.CoolingCoilName)); + std::format("The secondary air inlet node name in heat exchanger {}=\"{}\"", + HVAC::hxTypeNames[(int)thisHXCoil.hxType], + thisHXCoil.HeatExchangerName)); ShowContinueError(state, - EnergyPlus::format("Heat exchanger secondary air inlet node name =\"{}\".", - state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + std::format("must match the cooling coil air outlet node name in {}=\"{}\"", + HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], + thisHXCoil.CoolingCoilName)); ShowContinueError( state, - EnergyPlus::format("Cooling coil air outlet node name =\"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); + std::format("Heat exchanger secondary air inlet node name =\"{}\".", state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + ShowContinueError( + state, std::format("Cooling coil air outlet node name =\"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); ErrorsFound = true; } @@ -436,49 +436,47 @@ namespace HVACHXAssistedCoolingCoil { CoolingCoilErrFlag = false; CoolingCoilInletNodeNum = DXCoils::GetCoilInletNode(state, AlphArray(4), thisHXCoil.CoolingCoilName, CoolingCoilErrFlag); if (CoolingCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, std::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } if (SupplyAirOutletNode != CoolingCoilInletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); ShowContinueError(state, "Node names are inconsistent in heat exchanger and cooling coil object."); ShowContinueError(state, - EnergyPlus::format("The supply air outlet node name in heat exchanger = {}=\"{}\"", - HVAC::hxTypeNames[(int)thisHXCoil.hxType], - thisHXCoil.HeatExchangerName)); + std::format("The supply air outlet node name in heat exchanger = {}=\"{}\"", + HVAC::hxTypeNames[(int)thisHXCoil.hxType], + thisHXCoil.HeatExchangerName)); ShowContinueError(state, - EnergyPlus::format("must match the cooling coil inlet node name in = {}=\"{}\"", - HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], - thisHXCoil.CoolingCoilName)); + std::format("must match the cooling coil inlet node name in = {}=\"{}\"", + HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], + thisHXCoil.CoolingCoilName)); ShowContinueError( - state, - EnergyPlus::format("Heat exchanger supply air outlet node name=\"{}\"", state.dataLoopNodes->NodeID(SupplyAirOutletNode))); - ShowContinueError( - state, EnergyPlus::format("Cooling coil air inlet node name=\"{}\"", state.dataLoopNodes->NodeID(CoolingCoilInletNodeNum))); + state, std::format("Heat exchanger supply air outlet node name=\"{}\"", state.dataLoopNodes->NodeID(SupplyAirOutletNode))); + ShowContinueError(state, + std::format("Cooling coil air inlet node name=\"{}\"", state.dataLoopNodes->NodeID(CoolingCoilInletNodeNum))); ErrorsFound = true; } CoolingCoilErrFlag = false; CoolingCoilOutletNodeNum = DXCoils::GetCoilOutletNode( state, HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], thisHXCoil.CoolingCoilName, CoolingCoilErrFlag); if (CoolingCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, std::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } if (SecondaryAirInletNode != CoolingCoilOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); ShowContinueError(state, "Node names are inconsistent in heat exchanger and cooling coil object."); ShowContinueError(state, - EnergyPlus::format("The secondary air inlet node name in heat exchanger ={}=\"{}\"", - HVAC::hxTypeNames[(int)thisHXCoil.hxType], - thisHXCoil.HeatExchangerName)); - ShowContinueError(state, - EnergyPlus::format("must match the cooling coil air outlet node name in = {}=\"{}\".", - HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], - thisHXCoil.CoolingCoilName)); + std::format("The secondary air inlet node name in heat exchanger ={}=\"{}\"", + HVAC::hxTypeNames[(int)thisHXCoil.hxType], + thisHXCoil.HeatExchangerName)); ShowContinueError(state, - EnergyPlus::format("Heat exchanger secondary air inlet node name =\"{}\".", - state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + std::format("must match the cooling coil air outlet node name in = {}=\"{}\".", + HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], + thisHXCoil.CoolingCoilName)); ShowContinueError( state, - EnergyPlus::format("Cooling coil air outlet node name =\"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); + std::format("Heat exchanger secondary air inlet node name =\"{}\".", state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + ShowContinueError( + state, std::format("Cooling coil air outlet node name =\"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); ErrorsFound = true; } @@ -488,49 +486,47 @@ namespace HVACHXAssistedCoolingCoil { CoolingCoilInletNodeNum = VariableSpeedCoils::GetCoilInletNodeVariableSpeed(state, AlphArray(4), thisHXCoil.CoolingCoilName, CoolingCoilErrFlag); if (CoolingCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, std::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } if (SupplyAirOutletNode != CoolingCoilInletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); ShowContinueError(state, "Node names are inconsistent in heat exchanger and cooling coil object."); ShowContinueError(state, - EnergyPlus::format("The supply air outlet node name in heat exchanger = {}=\"{}\"", - HVAC::hxTypeNames[(int)thisHXCoil.hxType], - thisHXCoil.HeatExchangerName)); + std::format("The supply air outlet node name in heat exchanger = {}=\"{}\"", + HVAC::hxTypeNames[(int)thisHXCoil.hxType], + thisHXCoil.HeatExchangerName)); ShowContinueError(state, - EnergyPlus::format("must match the cooling coil inlet node name in = {}=\"{}\"", - HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], - thisHXCoil.CoolingCoilName)); - ShowContinueError( - state, - EnergyPlus::format("Heat exchanger supply air outlet node name=\"{}\"", state.dataLoopNodes->NodeID(SupplyAirOutletNode))); + std::format("must match the cooling coil inlet node name in = {}=\"{}\"", + HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], + thisHXCoil.CoolingCoilName)); ShowContinueError( - state, EnergyPlus::format("Cooling coil air inlet node name=\"{}\"", state.dataLoopNodes->NodeID(CoolingCoilInletNodeNum))); + state, std::format("Heat exchanger supply air outlet node name=\"{}\"", state.dataLoopNodes->NodeID(SupplyAirOutletNode))); + ShowContinueError(state, + std::format("Cooling coil air inlet node name=\"{}\"", state.dataLoopNodes->NodeID(CoolingCoilInletNodeNum))); ErrorsFound = true; } CoolingCoilErrFlag = false; CoolingCoilOutletNodeNum = VariableSpeedCoils::GetCoilOutletNodeVariableSpeed(state, AlphArray(4), thisHXCoil.CoolingCoilName, CoolingCoilErrFlag); if (CoolingCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, std::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } if (SecondaryAirInletNode != CoolingCoilOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); ShowContinueError(state, "Node names are inconsistent in heat exchanger and cooling coil object."); ShowContinueError(state, - EnergyPlus::format("The secondary air inlet node name in heat exchanger ={}=\"{}\"", - HVAC::hxTypeNames[(int)thisHXCoil.hxType], - thisHXCoil.HeatExchangerName)); - ShowContinueError(state, - EnergyPlus::format("must match the cooling coil air outlet node name in = {}=\"{}\".", - HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], - thisHXCoil.CoolingCoilName)); + std::format("The secondary air inlet node name in heat exchanger ={}=\"{}\"", + HVAC::hxTypeNames[(int)thisHXCoil.hxType], + thisHXCoil.HeatExchangerName)); ShowContinueError(state, - EnergyPlus::format("Heat exchanger secondary air inlet node name =\"{}\".", - state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + std::format("must match the cooling coil air outlet node name in = {}=\"{}\".", + HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], + thisHXCoil.CoolingCoilName)); ShowContinueError( state, - EnergyPlus::format("Cooling coil air outlet node name =\"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); + std::format("Heat exchanger secondary air inlet node name =\"{}\".", state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + ShowContinueError( + state, std::format("Cooling coil air outlet node name =\"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); ErrorsFound = true; } } @@ -648,25 +644,25 @@ namespace HVACHXAssistedCoolingCoil { HXErrFlag = false; SupplyAirInletNode = HeatRecovery::GetSupplyInletNode(state, thisHXCoil.HeatExchangerName, HXErrFlag); if (HXErrFlag) { - ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, std::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } HXErrFlag = false; SupplyAirOutletNode = HeatRecovery::GetSupplyOutletNode(state, thisHXCoil.HeatExchangerName, HXErrFlag); if (HXErrFlag) { - ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, std::format("...Occurs in {}=\"{}", CurrentModuleObject, thisHXCoil.Name)); } HXErrFlag = false; SecondaryAirInletNode = HeatRecovery::GetSecondaryInletNode(state, thisHXCoil.HeatExchangerName, HXErrFlag); if (HXErrFlag) { - ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, std::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } HXErrFlag = false; SecondaryAirOutletNode = HeatRecovery::GetSecondaryOutletNode(state, thisHXCoil.HeatExchangerName, HXErrFlag); if (HXErrFlag) { - ShowContinueError(state, EnergyPlus::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, std::format("...Occurs in {}=\"{}\"", CurrentModuleObject, thisHXCoil.Name)); } if (Util::SameString(AlphArray(4), "Coil:Cooling:Water") || Util::SameString(AlphArray(4), "Coil:Cooling:Water:DetailedGeometry")) { @@ -685,55 +681,53 @@ namespace HVACHXAssistedCoolingCoil { HVACControllers::GetControllerNameAndIndex( state, CoolingCoilWaterInletNodeNum, thisHXCoil.ControllerName, thisHXCoil.ControllerIndex, CoolingCoilErrFlag); if (CoolingCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", CurrentModuleObject, thisHXCoil.Name)); } if (SupplyAirOutletNode != CoolingCoilInletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); ShowContinueError(state, "Node names are inconsistent in heat exchanger and cooling coil object."); ShowContinueError(state, - EnergyPlus::format("The supply air outlet node name in heat exchanger = {}=\"{}\"", - HVAC::hxTypeNames[(int)thisHXCoil.hxType], - thisHXCoil.HeatExchangerName)); + std::format("The supply air outlet node name in heat exchanger = {}=\"{}\"", + HVAC::hxTypeNames[(int)thisHXCoil.hxType], + thisHXCoil.HeatExchangerName)); ShowContinueError(state, - EnergyPlus::format("must match the cooling coil inlet node name in = {}=\"{}\"", - HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], - thisHXCoil.CoolingCoilName)); - ShowContinueError( - state, - EnergyPlus::format("Heat exchanger supply air outlet node name =\"{}\"", state.dataLoopNodes->NodeID(SupplyAirOutletNode))); + std::format("must match the cooling coil inlet node name in = {}=\"{}\"", + HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], + thisHXCoil.CoolingCoilName)); ShowContinueError( - state, EnergyPlus::format("Cooling coil air inlet node name = \"{}\"", state.dataLoopNodes->NodeID(CoolingCoilInletNodeNum))); + state, std::format("Heat exchanger supply air outlet node name =\"{}\"", state.dataLoopNodes->NodeID(SupplyAirOutletNode))); + ShowContinueError(state, + std::format("Cooling coil air inlet node name = \"{}\"", state.dataLoopNodes->NodeID(CoolingCoilInletNodeNum))); ErrorsFound = true; } CoolingCoilErrFlag = false; CoolingCoilOutletNodeNum = WaterCoils::GetCoilOutletNode( state, HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], thisHXCoil.CoolingCoilName, CoolingCoilErrFlag); if (CoolingCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", CurrentModuleObject, thisHXCoil.Name)); } if (SecondaryAirInletNode != CoolingCoilOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); ShowContinueError(state, "Node names are inconsistent in heat exchanger and cooling coil object."); ShowContinueError(state, - EnergyPlus::format("The secondary air inlet node name in heat exchanger = {}=\"{}\"", - HVAC::hxTypeNames[(int)thisHXCoil.hxType], - thisHXCoil.HeatExchangerName)); + std::format("The secondary air inlet node name in heat exchanger = {}=\"{}\"", + HVAC::hxTypeNames[(int)thisHXCoil.hxType], + thisHXCoil.HeatExchangerName)); ShowContinueError(state, - EnergyPlus::format("must match the cooling coil air outlet node name in = {}=\"{}\".", - HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], - thisHXCoil.CoolingCoilName)); - ShowContinueError(state, - EnergyPlus::format("Heat exchanger secondary air inlet node name = \"{}\".", - state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + std::format("must match the cooling coil air outlet node name in = {}=\"{}\".", + HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType], + thisHXCoil.CoolingCoilName)); ShowContinueError( state, - EnergyPlus::format("Cooling coil air outlet node name = \"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); + std::format("Heat exchanger secondary air inlet node name = \"{}\".", state.dataLoopNodes->NodeID(SecondaryAirInletNode))); + ShowContinueError( + state, std::format("Cooling coil air outlet node name = \"{}\".", state.dataLoopNodes->NodeID(CoolingCoilOutletNodeNum))); ErrorsFound = true; } } else { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Invalid {}=\"{}\"", cAlphaFields(4), HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType])); + ShowWarningError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisHXCoil.Name)); + ShowContinueError(state, std::format("Invalid {}=\"{}\"", cAlphaFields(4), HVAC::coilTypeNames[(int)thisHXCoil.coolCoilType])); ErrorsFound = true; } Node::TestCompSet(state, @@ -818,7 +812,7 @@ namespace HVACHXAssistedCoolingCoil { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Previous error condition causes termination.", RoutineName)); + ShowFatalError(state, std::format("{}Previous error condition causes termination.", RoutineName)); } } @@ -1021,16 +1015,16 @@ namespace HVACHXAssistedCoolingCoil { if (thisHXCoil.MaxIterCounter < 1) { ++thisHXCoil.MaxIterCounter; ShowWarningError(state, - EnergyPlus::format("{} \"{}\" -- Exceeded max iterations ({}) while calculating operating conditions.", - HVAC::coilTypeNames[(int)thisHXCoil.hxAssistedCoilType], - thisHXCoil.Name, - MaxIter)); + std::format("{} \"{}\" -- Exceeded max iterations ({}) while calculating operating conditions.", + HVAC::coilTypeNames[(int)thisHXCoil.hxAssistedCoilType], + thisHXCoil.Name, + MaxIter)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{} \"{}\" -- Exceeded max iterations error continues...", - HVAC::coilTypeNames[(int)thisHXCoil.hxAssistedCoilType], - thisHXCoil.Name), + std::format("{} \"{}\" -- Exceeded max iterations error continues...", + HVAC::coilTypeNames[(int)thisHXCoil.hxAssistedCoilType], + thisHXCoil.Name), thisHXCoil.MaxIterIndex); } } @@ -1072,9 +1066,9 @@ namespace HVACHXAssistedCoolingCoil { if (HXDXCoilIndex == 0) { if (!CurrentModuleObject.empty()) { - ShowSevereError(state, fmt::format("{}, GetHXDXCoilIndex: HX Assisted Cooling Coil not found={}", CurrentModuleObject, HXDXCoilName)); + ShowSevereError(state, std::format("{}, GetHXDXCoilIndex: HX Assisted Cooling Coil not found={}", CurrentModuleObject, HXDXCoilName)); } else { - ShowSevereError(state, EnergyPlus::format("GetHXDXCoilIndex: HX Assisted Cooling Coil not found={}", HXDXCoilName)); + ShowSevereError(state, std::format("GetHXDXCoilIndex: HX Assisted Cooling Coil not found={}", HXDXCoilName)); } ErrorsFound = true; } @@ -1115,7 +1109,7 @@ namespace HVACHXAssistedCoolingCoil { } if (HXAssistedCoilNum == 0) { - ShowFatalError(state, EnergyPlus::format("CheckHXAssistedCoolingCoilSchedule: HX Assisted Coil not found={}", CompName)); + ShowFatalError(state, std::format("CheckHXAssistedCoolingCoilSchedule: HX Assisted Coil not found={}", CompName)); } CompIndex = HXAssistedCoilNum; Value = 1.0; // not scheduled? @@ -1124,19 +1118,18 @@ namespace HVACHXAssistedCoolingCoil { if (HXAssistedCoilNum > state.dataHVACAssistedCC->TotalNumHXAssistedCoils || HXAssistedCoilNum < 1) { ShowFatalError( state, - EnergyPlus::format("CheckHXAssistedCoolingCoilSchedule: Invalid CompIndex passed={}, Number of Heating Coils={}, Coil name={}", - HXAssistedCoilNum, - state.dataHVACAssistedCC->TotalNumHXAssistedCoils, - CompName)); + std::format("CheckHXAssistedCoolingCoilSchedule: Invalid CompIndex passed={}, Number of Heating Coils={}, Coil name={}", + HXAssistedCoilNum, + state.dataHVACAssistedCC->TotalNumHXAssistedCoils, + CompName)); } if (CompName != state.dataHVACAssistedCC->HXAssistedCoil(HXAssistedCoilNum).Name) { ShowFatalError( state, - EnergyPlus::format( - "CheckHXAssistedCoolingCoilSchedule: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - HXAssistedCoilNum, - CompName, - state.dataHVACAssistedCC->HXAssistedCoil(HXAssistedCoilNum).Name)); + std::format("CheckHXAssistedCoolingCoilSchedule: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + HXAssistedCoilNum, + CompName, + state.dataHVACAssistedCC->HXAssistedCoil(HXAssistedCoilNum).Name)); } Value = 1.0; // not scheduled? @@ -1220,7 +1213,7 @@ namespace HVACHXAssistedCoolingCoil { } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format("GetCoilCapacity: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilCapacity: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ShowContinueError(state, "... Coil Capacity returned as -1000."); ErrorsFound = true; CoilCapacity = -1000.0; @@ -1271,7 +1264,7 @@ namespace HVACHXAssistedCoolingCoil { return state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).hxAssistedCoilType; } if (PrintWarning) { - ShowSevereError(state, EnergyPlus::format("GetCoilGroupTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilGroupTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); } ErrorsFound = true; return HVAC::CoilType::Invalid; @@ -1311,7 +1304,7 @@ namespace HVACHXAssistedCoolingCoil { return state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).coolCoilType; } if (PrintWarning) { - ShowSevereError(state, EnergyPlus::format("GetCoilObjectTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilObjectTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); } ErrorsFound = true; return HVAC::CoilType::Invalid; @@ -1349,7 +1342,7 @@ namespace HVACHXAssistedCoolingCoil { if (WhichCoil != 0) { return state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).HXAssistedCoilInletNodeNum; } - ShowSevereError(state, EnergyPlus::format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return 0; } @@ -1401,14 +1394,14 @@ namespace HVACHXAssistedCoolingCoil { ErrorsFound); } else { // even though validated in Get, still check. ShowSevereError(state, - EnergyPlus::format("GetCoilWaterInletNode: Invalid Cooling Coil for HX Assisted Coil, Type=\"{}\" Name=\"{}\"", - HVAC::coilTypeNames[(int)state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).coolCoilType], - CoilName)); + std::format("GetCoilWaterInletNode: Invalid Cooling Coil for HX Assisted Coil, Type=\"{}\" Name=\"{}\"", + HVAC::coilTypeNames[(int)state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).coolCoilType], + CoilName)); ErrorsFound = true; NodeNumber = 0; // Autodesk:Return Added line to set return value } } else { - ShowSevereError(state, EnergyPlus::format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -1448,7 +1441,7 @@ namespace HVACHXAssistedCoolingCoil { if (WhichCoil != 0) { return state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).HXAssistedCoilOutletNodeNum; } - ShowSevereError(state, EnergyPlus::format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}", CoilType, CoilName)); ErrorsFound = true; return 0; } @@ -1485,7 +1478,7 @@ namespace HVACHXAssistedCoolingCoil { if (WhichCoil != 0) { return std::string{HVAC::coilTypeNames[(int)state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).coolCoilType]}; } - ShowSevereError(state, EnergyPlus::format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return ""; } @@ -1522,7 +1515,7 @@ namespace HVACHXAssistedCoolingCoil { if (WhichCoil != 0) { return state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).CoolingCoilName; } - ShowSevereError(state, EnergyPlus::format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return ""; } @@ -1560,7 +1553,7 @@ namespace HVACHXAssistedCoolingCoil { // this should be the index to the DX cooling coil object, not the HXAssisted object return state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).CoolingCoilIndex; } - ShowSevereError(state, EnergyPlus::format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return 0; } @@ -1597,7 +1590,7 @@ namespace HVACHXAssistedCoolingCoil { if (WhichCoil != 0) { return std::string{HVAC::coilTypeNames[(int)state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).coolCoilType]}; } - ShowSevereError(state, EnergyPlus::format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return ""; } @@ -1635,7 +1628,7 @@ namespace HVACHXAssistedCoolingCoil { CoolingCoilType = HVAC::coilTypeNames[(int)state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).coolCoilType]; CoolingCoilName = state.dataHVACAssistedCC->HXAssistedCoil(WhichCoil).CoolingCoilName; } else { - ShowSevereError(state, EnergyPlus::format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; CoolingCoilType = ""; CoolingCoilName = ""; @@ -1692,13 +1685,12 @@ namespace HVACHXAssistedCoolingCoil { } if (WhichCoil == 0) { - ShowSevereError(state, - EnergyPlus::format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; MaxWaterFlowRate = -1000.0; } } else { - ShowSevereError(state, EnergyPlus::format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; MaxWaterFlowRate = -1000.0; } @@ -1748,12 +1740,12 @@ namespace HVACHXAssistedCoolingCoil { } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format("GetHXCoilAirFlowRate: Could not find HX, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetHXCoilAirFlowRate: Could not find HX, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; MaxAirFlowRate = -1000.0; } } else { - ShowSevereError(state, EnergyPlus::format("GetHXCoilAirFlowRate: Could not find HX, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetHXCoilAirFlowRate: Could not find HX, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; MaxAirFlowRate = -1000.0; } diff --git a/src/EnergyPlus/HVACManager.cc b/src/EnergyPlus/HVACManager.cc index 1a6860c5f4d..7af63fbc939 100644 --- a/src/EnergyPlus/HVACManager.cc +++ b/src/EnergyPlus/HVACManager.cc @@ -47,15 +47,17 @@ // C++ Headers #include - +#include #include // ObjexxFCL Headers #include #include -// EnergyPlus Headers +// Local Headers #include + +// EnergyPlus Headers #include #include #include @@ -2971,10 +2973,9 @@ void SetHeatToReturnAirFlag(EnergyPlusData &state) auto const &thisSpace = state.dataHeatBal->space(spaceNum); for (int SurfNum = thisSpace.HTSurfaceFirst; SurfNum <= thisSpace.HTSurfaceLast; ++SurfNum) { if (state.dataSurface->SurfWinAirflowDestination(SurfNum) == DataSurfaces::WindowAirFlowDestination::Return) { - ShowWarningError( - state, - EnergyPlus::format("For zone={} return air heat gain from air flow windows will be applied to the zone air.", - thisZone.Name)); + ShowWarningError(state, + std::format("For zone={} return air heat gain from air flow windows will be applied to the zone air.", + thisZone.Name)); ShowContinueError(state, " This zone has no return air or is served by an on/off HVAC system."); } } @@ -3056,8 +3057,8 @@ void CheckAirLoopFlowBalance(EnergyPlusData &state) Real64 unbalancedExhaustDelta = thisAirLoopFlow.SupFlow - thisAirLoopFlow.OAFlow - thisAirLoopFlow.SysRetFlow; if (unbalancedExhaustDelta > HVAC::SmallMassFlow) { ShowSevereError(state, - EnergyPlus::format("CheckAirLoopFlowBalance: AirLoopHVAC {} is unbalanced. Supply is > return plus outdoor air.", - state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).Name)); + std::format("CheckAirLoopFlowBalance: AirLoopHVAC {} is unbalanced. Supply is > return plus outdoor air.", + state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, EnergyPlus::format(" Flows [m3/s at standard density]: Supply={:.6R} Return={:.6R} Outdoor Air={:.6R}", @@ -3087,30 +3088,28 @@ void ConvergenceErrors(EnergyPlusData &state, const auto &arrayRef = HVACNotConverged; if (std::any_of(std::begin(arrayRef), std::end(arrayRef), [](bool i) { return i; })) { - ShowContinueError(state, - EnergyPlus::format("Air System Named = {} did not converge for {}", - state.dataAirLoop->AirToZoneNodeInfo(AirSysNum).AirLoopName, - CaseName)); + ShowContinueError( + state, + std::format("Air System Named = {} did not converge for {}", state.dataAirLoop->AirToZoneNodeInfo(AirSysNum).AirLoopName, CaseName)); ShowContinueError(state, "Check values should be zero. Most Recent values listed first."); std::string HistoryTrace; for (int StackDepth = 0; StackDepth < DataConvergParams::ConvergLogStackDepth; ++StackDepth) { HistoryTrace += EnergyPlus::format("{:.6R},", DemandToSupply[StackDepth]); } - ShowContinueError(state, EnergyPlus::format("Demand-to-Supply interface {} check value iteration history trace: {}", CaseName, HistoryTrace)); + ShowContinueError(state, std::format("Demand-to-Supply interface {} check value iteration history trace: {}", CaseName, HistoryTrace)); HistoryTrace = ""; for (int StackDepth = 0; StackDepth < DataConvergParams::ConvergLogStackDepth; ++StackDepth) { HistoryTrace += EnergyPlus::format("{:.6R},", SupplyDeck1ToDemand[StackDepth]); } - ShowContinueError(state, - EnergyPlus::format("Supply-to-demand interface deck 1 {} check value iteration history trace: {}", CaseName, HistoryTrace)); + ShowContinueError(state, std::format("Supply-to-demand interface deck 1 {} check value iteration history trace: {}", CaseName, HistoryTrace)); if (state.dataAirLoop->AirToZoneNodeInfo(AirSysNum).NumSupplyNodes >= 2) { HistoryTrace = ""; for (int StackDepth = 0; StackDepth < DataConvergParams::ConvergLogStackDepth; ++StackDepth) { HistoryTrace += EnergyPlus::format("{:.6R},", SupplyDeck2ToDemand[StackDepth]); } - ShowContinueError( - state, EnergyPlus::format("Supply-to-demand interface deck 2 {} check value iteration history trace: {}", CaseName, HistoryTrace)); + ShowContinueError(state, + std::format("Supply-to-demand interface deck 2 {} check value iteration history trace: {}", CaseName, HistoryTrace)); } } // energy not converged } diff --git a/src/EnergyPlus/HVACMultiSpeedHeatPump.cc b/src/EnergyPlus/HVACMultiSpeedHeatPump.cc index f5b91b52c7e..854ea21707f 100644 --- a/src/EnergyPlus/HVACMultiSpeedHeatPump.cc +++ b/src/EnergyPlus/HVACMultiSpeedHeatPump.cc @@ -47,13 +47,16 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include #include -// EnergyPlus Headers +// Local Headers #include + +// EnergyPlus Headers #include #include #include @@ -742,15 +745,14 @@ namespace HVACMultiSpeedHeatPump { HeatingCoilOutletNode = DXCoils::GetCoilOutletNode(state, Alphas(10), Alphas(11), LocalError); if (LocalError) { ShowSevereError(state, EnergyPlus::format("The outlet node number of {} is not found \"{}\"", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; LocalError = false; } thisMSHP.MinOATCompressorHeating = DXCoils::GetMinOATCompressor(state, thisMSHP.DXHeatCoilIndex, LocalError); if (LocalError) { ShowContinueError( - state, - EnergyPlus::format("...for heating coil. Occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + state, std::format("...for heating coil. Occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); LocalError = false; } Node::SetUpCompSets(state, @@ -768,14 +770,14 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.HeatCoilNum = state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Coil:Heating:Electric:MultiStage", Alphas(11)); if (thisMSHP.HeatCoilNum <= 0) { - ShowSevereError( - state, EnergyPlus::format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("{} \"{}\" not found.", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, EnergyPlus::format("{} must be Coil:Heating:Electric:MultiStage ", cAlphaFields(10))); + ShowSevereError(state, + std::format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("{} \"{}\" not found.", cAlphaFields(11), Alphas(11))); + ShowContinueError(state, std::format("{} must be Coil:Heating:Electric:MultiStage ", cAlphaFields(10))); ShowFatalError(state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", - RoutineName, - state.dataHVACMultiSpdHP->CurrentModuleObject)); + std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", + RoutineName, + state.dataHVACMultiSpdHP->CurrentModuleObject)); ErrorsFound = true; } } else { @@ -783,14 +785,14 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.HeatCoilNum = state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Coil:Heating:Gas:MultiStage", Alphas(11)); if (thisMSHP.HeatCoilNum <= 0) { - ShowSevereError( - state, EnergyPlus::format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("{} \"{}\" not found.", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, EnergyPlus::format("{} must be Coil:Heating:Gas:MultiStage ", cAlphaFields(10))); + ShowSevereError(state, + std::format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("{} \"{}\" not found.", cAlphaFields(11), Alphas(11))); + ShowContinueError(state, std::format("{} must be Coil:Heating:Gas:MultiStage ", cAlphaFields(10))); ShowFatalError(state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", - RoutineName, - state.dataHVACMultiSpdHP->CurrentModuleObject)); + std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", + RoutineName, + state.dataHVACMultiSpdHP->CurrentModuleObject)); ErrorsFound = true; } } @@ -802,22 +804,22 @@ namespace HVACMultiSpeedHeatPump { HeatingCoils::GetCoilIndex(state, thisMSHP.HeatCoilName, thisMSHP.HeatCoilIndex, LocalError); } if (LocalError) { - ShowSevereError(state, EnergyPlus::format("The index of {} is not found \"{}\"", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("The index of {} is not found \"{}\"", cAlphaFields(11), Alphas(11))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; LocalError = false; } HeatingCoilInletNode = HeatingCoils::GetCoilInletNode(state, Alphas(10), Alphas(11), LocalError); if (LocalError) { - ShowSevereError(state, EnergyPlus::format("The inlet node number of {} is not found \"{}\"", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("The inlet node number of {} is not found \"{}\"", cAlphaFields(11), Alphas(11))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; LocalError = false; } HeatingCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, Alphas(10), Alphas(11), LocalError); if (LocalError) { - ShowSevereError(state, EnergyPlus::format("The outlet node number of {} is not found \"{}\"", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("The outlet node number of {} is not found \"{}\"", cAlphaFields(11), Alphas(11))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; LocalError = false; } @@ -842,7 +844,7 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.heatCoilType = HVAC::CoilType::HeatingWater; ValidateComponent(state, Alphas(10), Alphas(11), IsNotOK, state.dataHVACMultiSpdHP->CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -851,8 +853,7 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; thisMSHP.CoilControlNode = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", thisMSHP.HeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -860,8 +861,7 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; thisMSHP.MaxCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", thisMSHP.HeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -870,8 +870,7 @@ namespace HVACMultiSpeedHeatPump { HeatingCoilInletNode = WaterCoils::GetCoilInletNode(state, "Coil:Heating:Water", thisMSHP.HeatCoilName, errFlag); thisMSHP.CoilAirInletNode = HeatingCoilInletNode; if (errFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -879,8 +878,7 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; HeatingCoilOutletNode = WaterCoils::GetCoilOutletNode(state, "Coil:Heating:Water", thisMSHP.HeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } Node::SetUpCompSets(state, @@ -895,8 +893,7 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.heatCoilType = HVAC::CoilType::HeatingSteam; ValidateComponent(state, Alphas(10), Alphas(11), IsNotOK, state.dataHVACMultiSpdHP->CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, - EnergyPlus::format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } else { // mine data from heating coil object @@ -906,10 +903,9 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.HeatCoilNum == 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} illegal {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, cAlphaFields(10), thisMSHP.HeatCoilName)); - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -917,8 +913,7 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; thisMSHP.CoilControlNode = SteamCoils::GetCoilAirOutletNode(state, "Coil:Heating:Steam", thisMSHP.HeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -934,8 +929,7 @@ namespace HVACMultiSpeedHeatPump { HeatingCoilInletNode = SteamCoils::GetCoilAirInletNode(state, thisMSHP.HeatCoilNum, thisMSHP.HeatCoilName, errFlag); thisMSHP.CoilAirInletNode = HeatingCoilInletNode; if (errFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -943,8 +937,7 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; HeatingCoilOutletNode = SteamCoils::GetCoilAirOutletNode(state, thisMSHP.HeatCoilNum, thisMSHP.HeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -958,12 +951,12 @@ namespace HVACMultiSpeedHeatPump { } } else { ShowSevereError(state, - EnergyPlus::format("The allowed {} are Coil:Heating:DX:MultiSpeed, Coil:Heating:Electric:MultiStage, and " - "Coil:Heating:Gas:MultiStage in {} \"{}\"", - cAlphaFields(10), - state.dataHVACMultiSpdHP->CurrentModuleObject, - Alphas(1))); - ShowContinueError(state, EnergyPlus::format("The entered {} = \"{}\".", cAlphaFields(10), Alphas(10))); + std::format("The allowed {} are Coil:Heating:DX:MultiSpeed, Coil:Heating:Electric:MultiStage, and " + "Coil:Heating:Gas:MultiStage in {} \"{}\"", + cAlphaFields(10), + state.dataHVACMultiSpdHP->CurrentModuleObject, + Alphas(1))); + ShowContinueError(state, std::format("The entered {} = \"{}\".", cAlphaFields(10), Alphas(10))); ErrorsFound = true; } @@ -971,52 +964,50 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.coolCoilType = HVAC::CoilType::CoolingDXMultiSpeed; thisMSHP.DXCoolCoilName = Alphas(13); if (state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Coil:Cooling:DX:MultiSpeed", Alphas(13)) <= 0) { - ShowSevereError(state, - EnergyPlus::format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("{} \"{}\" not found.", cAlphaFields(13), Alphas(13))); - ShowContinueError(state, EnergyPlus::format("{} must be Coil:Cooling:DX:MultiSpeed ", cAlphaFields(12))); + ShowSevereError(state, std::format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("{} \"{}\" not found.", cAlphaFields(13), Alphas(13))); + ShowContinueError(state, std::format("{} must be Coil:Cooling:DX:MultiSpeed ", cAlphaFields(12))); ShowFatalError(state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", - RoutineName, - state.dataHVACMultiSpdHP->CurrentModuleObject)); + std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", + RoutineName, + state.dataHVACMultiSpdHP->CurrentModuleObject)); ErrorsFound = true; } LocalError = false; DXCoils::GetDXCoilIndex(state, thisMSHP.DXCoolCoilName, thisMSHP.DXCoolCoilIndex, LocalError, "Coil:Cooling:DX:MultiSpeed"); if (LocalError) { - ShowSevereError(state, EnergyPlus::format("The index of {} is not found \"{}\"", cAlphaFields(13), Alphas(13))); - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("The index of {} is not found \"{}\"", cAlphaFields(13), Alphas(13))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; LocalError = false; } CoolingCoilInletNode = DXCoils::GetCoilInletNode(state, Alphas(12), Alphas(13), LocalError); if (LocalError) { - ShowSevereError(state, EnergyPlus::format("The inlet node number of {} is not found \"{}\"", cAlphaFields(13), Alphas(13))); - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("The inlet node number of {} is not found \"{}\"", cAlphaFields(13), Alphas(13))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; LocalError = false; } CoolingCoilOutletNode = DXCoils::GetCoilOutletNode(state, Alphas(12), Alphas(13), LocalError); if (LocalError) { - ShowSevereError(state, EnergyPlus::format("The outlet node number of {} is not found \"{}\"", cAlphaFields(13), Alphas(13))); - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("The outlet node number of {} is not found \"{}\"", cAlphaFields(13), Alphas(13))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; LocalError = false; } thisMSHP.MinOATCompressorCooling = DXCoils::GetMinOATCompressor(state, thisMSHP.DXCoolCoilIndex, LocalError); if (LocalError) { ShowContinueError( - state, - EnergyPlus::format("...for cooling coil. Occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + state, std::format("...for cooling coil. Occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); LocalError = false; } } else { ShowSevereError(state, - EnergyPlus::format("The allowed {} is Coil:Cooling:DX:MultiSpeed in {} \"{}\"", - cAlphaFields(12), - state.dataHVACMultiSpdHP->CurrentModuleObject, - Alphas(1))); - ShowContinueError(state, EnergyPlus::format("The entered {} = \"{}\".", cAlphaFields(12), Alphas(12))); + std::format("The allowed {} is Coil:Cooling:DX:MultiSpeed in {} \"{}\"", + cAlphaFields(12), + state.dataHVACMultiSpdHP->CurrentModuleObject, + Alphas(1))); + ShowContinueError(state, std::format("The entered {} = \"{}\".", cAlphaFields(12), Alphas(12))); ErrorsFound = true; } Node::SetUpCompSets(state, @@ -1034,9 +1025,9 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; thisMSHP.SuppHeatCoilNum = HeatingCoils::GetHeatingCoilIndex(state, "Coil:Heating:Fuel", Alphas(15), errFlag); if (thisMSHP.SuppHeatCoilNum <= 0 || errFlag) { - ShowContinueError( - state, EnergyPlus::format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("{} of type Coil:Heating:Fuel \"{}\" not found.", cAlphaFields(15), Alphas(15))); + ShowContinueError(state, + std::format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("{} of type Coil:Heating:Fuel \"{}\" not found.", cAlphaFields(15), Alphas(15))); ErrorsFound = true; } @@ -1044,15 +1035,15 @@ namespace HVACMultiSpeedHeatPump { LocalError = false; SuppHeatCoilInletNode = HeatingCoils::GetCoilInletNode(state, Alphas(14), Alphas(15), LocalError); if (LocalError) { - ShowSevereError(state, EnergyPlus::format("The inlet node number of {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("The inlet node number of {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; LocalError = false; } SuppHeatCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, Alphas(14), Alphas(15), LocalError); if (LocalError) { - ShowSevereError(state, EnergyPlus::format("The outlet node number of {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("The outlet node number of {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; LocalError = false; } @@ -1060,8 +1051,8 @@ namespace HVACMultiSpeedHeatPump { // Get supplemental heating coil capacity to see if it is autosize thisMSHP.DesignSuppHeatingCapacity = HeatingCoils::GetCoilCapacity(state, Alphas(14), Alphas(15), LocalError); if (LocalError) { - ShowSevereError(state, EnergyPlus::format("The capacity {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("The capacity {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; LocalError = false; } @@ -1078,9 +1069,9 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; thisMSHP.SuppHeatCoilNum = HeatingCoils::GetHeatingCoilIndex(state, "Coil:Heating:Electric", Alphas(15), errFlag); if (thisMSHP.SuppHeatCoilNum <= 0 || errFlag) { - ShowContinueError( - state, EnergyPlus::format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("{} of type Coil:Heating:Electric \"{}\" not found.", cAlphaFields(15), Alphas(15))); + ShowContinueError(state, + std::format("Configuration error in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("{} of type Coil:Heating:Electric \"{}\" not found.", cAlphaFields(15), Alphas(15))); ErrorsFound = true; } @@ -1088,15 +1079,15 @@ namespace HVACMultiSpeedHeatPump { LocalError = false; SuppHeatCoilInletNode = HeatingCoils::GetCoilInletNode(state, Alphas(14), Alphas(15), LocalError); if (LocalError) { - ShowSevereError(state, EnergyPlus::format("The inlet node number of {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("The inlet node number of {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; LocalError = false; } SuppHeatCoilOutletNode = HeatingCoils::GetCoilOutletNode(state, Alphas(14), Alphas(15), LocalError); if (LocalError) { - ShowSevereError(state, EnergyPlus::format("The outlet node number of {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("The outlet node number of {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; LocalError = false; } @@ -1104,8 +1095,8 @@ namespace HVACMultiSpeedHeatPump { // Get supplemental heating coil capacity to see if it is autosize thisMSHP.DesignSuppHeatingCapacity = HeatingCoils::GetCoilCapacity(state, Alphas(14), Alphas(15), LocalError); if (LocalError) { - ShowSevereError(state, EnergyPlus::format("The capacity {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("The capacity {} is not found \"{}\"", cAlphaFields(15), Alphas(15))); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; LocalError = false; } @@ -1123,7 +1114,7 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.suppHeatCoilType = HVAC::CoilType::HeatingWater; ValidateComponent(state, Alphas(14), thisMSHP.SuppHeatCoilName, IsNotOK, state.dataHVACMultiSpdHP->CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { // mine data from heating coil object @@ -1131,8 +1122,7 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; thisMSHP.SuppCoilControlNode = WaterCoils::GetCoilWaterInletNode(state, "Coil:Heating:Water", thisMSHP.SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -1141,8 +1131,7 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.MaxSuppCoilFluidFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", thisMSHP.SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -1151,8 +1140,7 @@ namespace HVACMultiSpeedHeatPump { SuppHeatCoilInletNode = WaterCoils::GetCoilInletNode(state, "Coil:Heating:Water", thisMSHP.SuppHeatCoilName, errFlag); thisMSHP.SuppCoilAirInletNode = SuppHeatCoilInletNode; if (errFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -1161,8 +1149,7 @@ namespace HVACMultiSpeedHeatPump { SuppHeatCoilOutletNode = WaterCoils::GetCoilOutletNode(state, "Coil:Heating:Water", thisMSHP.SuppHeatCoilName, errFlag); thisMSHP.SuppCoilAirOutletNode = SuppHeatCoilOutletNode; if (errFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } Node::SetUpCompSets(state, @@ -1178,8 +1165,7 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.suppHeatCoilType = HVAC::CoilType::HeatingSteam; ValidateComponent(state, Alphas(14), thisMSHP.SuppHeatCoilName, IsNotOK, state.dataHVACMultiSpdHP->CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, - EnergyPlus::format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("...occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } else { // mine data from heating coil object @@ -1188,10 +1174,9 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.SuppHeatCoilNum == 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} illegal {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, cAlphaFields(14), thisMSHP.SuppHeatCoilName)); - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -1199,8 +1184,7 @@ namespace HVACMultiSpeedHeatPump { errFlag = false; thisMSHP.SuppCoilControlNode = SteamCoils::GetCoilAirOutletNode(state, "Coil:Heating:Steam", thisMSHP.SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -1216,8 +1200,7 @@ namespace HVACMultiSpeedHeatPump { SuppHeatCoilInletNode = SteamCoils::GetCoilAirInletNode(state, thisMSHP.SuppHeatCoilNum, thisMSHP.SuppHeatCoilName, errFlag); thisMSHP.SuppCoilAirInletNode = SuppHeatCoilInletNode; if (errFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -1226,8 +1209,7 @@ namespace HVACMultiSpeedHeatPump { SuppHeatCoilOutletNode = SteamCoils::GetCoilAirOutletNode(state, thisMSHP.SuppHeatCoilNum, thisMSHP.SuppHeatCoilName, errFlag); thisMSHP.SuppCoilAirOutletNode = SuppHeatCoilOutletNode; if (errFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ErrorsFound = true; } @@ -1243,11 +1225,11 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.suppHeatCoilType == HVAC::CoilType::Invalid) { ShowSevereError(state, - EnergyPlus::format("{}, \"{}\", {} is not allowed = {}", - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name, - cAlphaFields(14), - Alphas(14))); + std::format("{}, \"{}\", {} is not allowed = {}", + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name, + cAlphaFields(14), + Alphas(14))); ShowContinueError(state, "Valid choices are Coil:Heating:Fuel,Coil:Heating:Electric,Coil:Heating:Steam,or Coil:Heating:Water"); ErrorsFound = true; } @@ -1262,7 +1244,7 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.SuppMaxOATemp > 21.0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}, \"{}\", {} is greater than 21.0", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cNumericFields(3))); ShowContinueError(state, EnergyPlus::format("The input value is {:.2R}", Numbers(3))); ErrorsFound = true; @@ -1274,18 +1256,18 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.AuxOffCyclePower = Numbers(5); if (thisMSHP.AuxOnCyclePower < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}, \"{}\", A negative value for {} is not allowed ", - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name, - cNumericFields(4))); + std::format("{}, \"{}\", A negative value for {} is not allowed ", + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name, + cNumericFields(4))); ErrorsFound = true; } if (thisMSHP.AuxOffCyclePower < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}, \"{}\", A negative value for {} is not allowed ", - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name, - cNumericFields(5))); + std::format("{}, \"{}\", A negative value for {} is not allowed ", + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name, + cNumericFields(5))); ErrorsFound = true; } @@ -1304,9 +1286,9 @@ namespace HVACMultiSpeedHeatPump { Node::CompFluidStream::Tertiary, Node::ObjectIsNotParent); if (thisMSHP.HeatRecInletNodeNum == 0) { - ShowSevereError(state, - EnergyPlus::format( - "{}, \"{}\", Missing {}.", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cAlphaFields(16))); + ShowSevereError( + state, + std::format("{}, \"{}\", Missing {}.", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cAlphaFields(16))); ErrorsFound = true; } thisMSHP.HeatRecOutletNodeNum = GetOnlySingleNode(state, @@ -1319,9 +1301,9 @@ namespace HVACMultiSpeedHeatPump { Node::CompFluidStream::Tertiary, Node::ObjectIsNotParent); if (thisMSHP.HeatRecOutletNodeNum == 0) { - ShowSevereError(state, - EnergyPlus::format( - "{}, \"{}\", Missing {}.", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cAlphaFields(17))); + ShowSevereError( + state, + std::format("{}, \"{}\", Missing {}.", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cAlphaFields(17))); ErrorsFound = true; } Node::TestCompSet( @@ -1337,28 +1319,28 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.HeatRecOutletNodeNum = 0; if (!lAlphaBlanks(16) || !lAlphaBlanks(17)) { ShowWarningError(state, - EnergyPlus::format("Since {} = 0.0, heat recovery is inactive for {} = {}", - cNumericFields(6), - state.dataHVACMultiSpdHP->CurrentModuleObject, - Alphas(1))); - ShowContinueError(state, EnergyPlus::format("However, {} or {} was specified.", cAlphaFields(16), cAlphaFields(17))); + std::format("Since {} = 0.0, heat recovery is inactive for {} = {}", + cNumericFields(6), + state.dataHVACMultiSpdHP->CurrentModuleObject, + Alphas(1))); + ShowContinueError(state, std::format("However, {} or {} was specified.", cAlphaFields(16), cAlphaFields(17))); } } thisMSHP.MaxHeatRecOutletTemp = Numbers(7); if (thisMSHP.MaxHeatRecOutletTemp < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}, \"{}\", The value for {} is below 0.0", - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name, - cNumericFields(7))); + std::format("{}, \"{}\", The value for {} is below 0.0", + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name, + cNumericFields(7))); ErrorsFound = true; } if (thisMSHP.MaxHeatRecOutletTemp > 100.0) { ShowSevereError(state, - EnergyPlus::format("{}, \"{}\", The value for {} is above 100.0", - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name, - cNumericFields(7))); + std::format("{}, \"{}\", The value for {} is above 100.0", + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name, + cNumericFields(7))); ErrorsFound = true; } @@ -1366,7 +1348,7 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.IdleVolumeAirRate < 0.0 && thisMSHP.IdleVolumeAirRate != DataSizing::AutoSize) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}, \"{}\", {} cannot be less than zero.", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cNumericFields(8))); ErrorsFound = true; } @@ -1385,9 +1367,9 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.NumOfSpeedHeating < 2 || thisMSHP.NumOfSpeedHeating > 4) { if (thisMSHP.heatCoilType == HVAC::CoilType::HeatingDXMultiSpeed) { ShowSevereError(state, - EnergyPlus::format("{}, The maximum {} is 4, and the minimum number is 2", - state.dataHVACMultiSpdHP->CurrentModuleObject, - cNumericFields(9))); + std::format("{}, The maximum {} is 4, and the minimum number is 2", + state.dataHVACMultiSpdHP->CurrentModuleObject, + cNumericFields(9))); ShowContinueError(state, EnergyPlus::format("The input value is {:.0R}", Numbers(9))); ErrorsFound = true; } @@ -1395,9 +1377,9 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.NumOfSpeedCooling = Numbers(10); if (thisMSHP.NumOfSpeedCooling < 2 || thisMSHP.NumOfSpeedCooling > 4) { ShowSevereError(state, - EnergyPlus::format("{}, The maximum {} is 4, and the minimum number is 2", - state.dataHVACMultiSpdHP->CurrentModuleObject, - cNumericFields(10))); + std::format("{}, The maximum {} is 4, and the minimum number is 2", + state.dataHVACMultiSpdHP->CurrentModuleObject, + cNumericFields(10))); ShowContinueError(state, EnergyPlus::format("The input value is {:.0R}", Numbers(10))); ErrorsFound = true; } @@ -1413,10 +1395,10 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.heatCoilType == HVAC::CoilType::HeatingDXMultiSpeed) { if (thisMSHP.HeatVolumeFlowRate(i) <= 0.0 && thisMSHP.HeatVolumeFlowRate(i) != DataSizing::AutoSize) { ShowSevereError(state, - EnergyPlus::format("{}, \"{}\", {} must be greater than zero.", - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name, - cNumericFields(10 + i))); + std::format("{}, \"{}\", {} must be greater than zero.", + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name, + cNumericFields(10 + i))); ErrorsFound = true; } } @@ -1437,9 +1419,8 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.HeatVolumeFlowRate(i) < thisMSHP.HeatVolumeFlowRate(j)) { ShowSevereError( state, - EnergyPlus::format( - "{}, \"{}\", {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cNumericFields(10 + i))); - ShowContinueError(state, EnergyPlus::format(" cannot be less than {}", cNumericFields(10 + j))); + std::format("{}, \"{}\", {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cNumericFields(10 + i))); + ShowContinueError(state, std::format(" cannot be less than {}", cNumericFields(10 + j))); ErrorsFound = true; } } @@ -1461,10 +1442,10 @@ namespace HVACMultiSpeedHeatPump { thisMSHP.CoolVolumeFlowRate(i) = Numbers(14 + i); if (thisMSHP.CoolVolumeFlowRate(i) <= 0.0 && thisMSHP.CoolVolumeFlowRate(i) != DataSizing::AutoSize) { ShowSevereError(state, - EnergyPlus::format("{}, \"{}\", {} must be greater than zero.", - state.dataHVACMultiSpdHP->CurrentModuleObject, - thisMSHP.Name, - cNumericFields(14 + i))); + std::format("{}, \"{}\", {} must be greater than zero.", + state.dataHVACMultiSpdHP->CurrentModuleObject, + thisMSHP.Name, + cNumericFields(14 + i))); ErrorsFound = true; } } @@ -1484,9 +1465,8 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.CoolVolumeFlowRate(i) < thisMSHP.CoolVolumeFlowRate(j)) { ShowSevereError( state, - EnergyPlus::format( - "{}, \"{}\", {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cNumericFields(14 + i))); - ShowContinueError(state, EnergyPlus::format(" cannot be less than {}", cNumericFields(14 + j))); + std::format("{}, \"{}\", {}", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name, cNumericFields(14 + i))); + ShowContinueError(state, std::format(" cannot be less than {}", cNumericFields(14 + j))); ErrorsFound = true; } } @@ -1496,108 +1476,97 @@ namespace HVACMultiSpeedHeatPump { // Check node integrity if (thisMSHP.fanPlace == HVAC::FanPlace::BlowThru) { if (thisMSHP.FanInletNode != thisMSHP.AirInletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); - ShowContinueError(state, - EnergyPlus::format("When a blow through fan is specified, the fan inlet node name must be the same as the {}", - cAlphaFields(3))); + ShowSevereError(state, std::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError( - state, EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(thisMSHP.FanInletNode))); + state, + std::format("When a blow through fan is specified, the fan inlet node name must be the same as the {}", cAlphaFields(3))); ShowContinueError(state, - EnergyPlus::format("...{} = {}", cAlphaFields(3), state.dataLoopNodes->NodeID(thisMSHP.AirInletNodeNum))); + std::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(thisMSHP.FanInletNode))); + ShowContinueError(state, std::format("...{} = {}", cAlphaFields(3), state.dataLoopNodes->NodeID(thisMSHP.AirInletNodeNum))); ErrorsFound = true; } if (thisMSHP.FanOutletNode != CoolingCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, std::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError( state, "When a blow through fan is specified, the fan outlet node name must be the same as the cooling coil inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(thisMSHP.FanOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(thisMSHP.FanOutletNode))); + ShowContinueError(state, std::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, std::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError(state, "The cooling coil outlet node name must be the same as the heating coil inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + std::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ErrorsFound = true; } if (HeatingCoilOutletNode != SuppHeatCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, std::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError(state, "When a blow through fan is specified, the heating coil outlet node name must be the same as the reheat coil " "inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...Reheat coil inlet node name = {}", state.dataLoopNodes->NodeID(SuppHeatCoilInletNode))); + ShowContinueError(state, + std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, + std::format("...Reheat coil inlet node name = {}", state.dataLoopNodes->NodeID(SuppHeatCoilInletNode))); ErrorsFound = true; } if (SuppHeatCoilOutletNode != thisMSHP.AirOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); - ShowContinueError( - state, EnergyPlus::format("The supplemental heating coil outlet node name must be the same as the {}", cAlphaFields(4))); - ShowContinueError(state, - EnergyPlus::format("...Supplemental heating coil outlet node name = {}", - state.dataLoopNodes->NodeID(SuppHeatCoilOutletNode))); + ShowSevereError(state, std::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError(state, - EnergyPlus::format("...{} = {}", cAlphaFields(4), state.dataLoopNodes->NodeID(thisMSHP.AirOutletNodeNum))); + std::format("The supplemental heating coil outlet node name must be the same as the {}", cAlphaFields(4))); + ShowContinueError( + state, + std::format("...Supplemental heating coil outlet node name = {}", state.dataLoopNodes->NodeID(SuppHeatCoilOutletNode))); + ShowContinueError(state, std::format("...{} = {}", cAlphaFields(4), state.dataLoopNodes->NodeID(thisMSHP.AirOutletNodeNum))); ErrorsFound = true; } } else { if (CoolingCoilInletNode != thisMSHP.AirInletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); - ShowContinueError( - state, - EnergyPlus::format("When a draw through fan is specified, the cooling coil inlet node name must be the same as the {}", - cAlphaFields(3))); + ShowSevereError(state, std::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError(state, - EnergyPlus::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); - ShowContinueError(state, - EnergyPlus::format("...{} = {}", cAlphaFields(3), state.dataLoopNodes->NodeID(thisMSHP.AirInletNodeNum))); + std::format("When a draw through fan is specified, the cooling coil inlet node name must be the same as the {}", + cAlphaFields(3))); + ShowContinueError(state, std::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + ShowContinueError(state, std::format("...{} = {}", cAlphaFields(3), state.dataLoopNodes->NodeID(thisMSHP.AirInletNodeNum))); ErrorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, std::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError(state, "The cooling coil outlet node name must be the same as the heating coil inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + std::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ErrorsFound = true; } if (HeatingCoilOutletNode != thisMSHP.FanInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, std::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError( state, "When a draw through fan is specified, the heating coil outlet node name must be the same as the fan inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(thisMSHP.FanInletNode))); + ShowContinueError(state, + std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, + std::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(thisMSHP.FanInletNode))); ErrorsFound = true; } if (thisMSHP.FanOutletNode != SuppHeatCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, std::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError( state, "When a draw through fan is specified, the fan outlet node name must be the same as the reheat coil inlet node name."); - ShowContinueError(state, - EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(thisMSHP.FanOutletNode))); - ShowContinueError(state, - EnergyPlus::format("...Reheat coil inlet node name = {}", state.dataLoopNodes->NodeID(SuppHeatCoilInletNode))); + ShowContinueError(state, std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(thisMSHP.FanOutletNode))); + ShowContinueError(state, std::format("...Reheat coil inlet node name = {}", state.dataLoopNodes->NodeID(SuppHeatCoilInletNode))); ErrorsFound = true; } if (SuppHeatCoilOutletNode != thisMSHP.AirOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); - ShowContinueError(state, EnergyPlus::format("The reheat coil outlet node name must be the same as the {}", cAlphaFields(4))); - ShowContinueError( - state, EnergyPlus::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(SuppHeatCoilOutletNode))); + ShowSevereError(state, std::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowContinueError(state, std::format("The reheat coil outlet node name must be the same as the {}", cAlphaFields(4))); ShowContinueError(state, - EnergyPlus::format("...{} = {}", cAlphaFields(4), state.dataLoopNodes->NodeID(thisMSHP.AirOutletNodeNum))); + std::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(SuppHeatCoilOutletNode))); + ShowContinueError(state, std::format("...{} = {}", cAlphaFields(4), state.dataLoopNodes->NodeID(thisMSHP.AirOutletNodeNum))); ErrorsFound = true; } } @@ -1606,38 +1575,35 @@ namespace HVACMultiSpeedHeatPump { if (thisMSHP.heatCoilType == HVAC::CoilType::HeatingDXMultiSpeed) { i = DXCoils::GetDXCoilNumberOfSpeeds(state, Alphas(10), Alphas(11), ErrorsFound); if (thisMSHP.NumOfSpeedHeating != i) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, std::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError( - state, - EnergyPlus::format("The {} is not equal to the number defined in {} = {}", cNumericFields(9), cAlphaFields(11), Alphas(11))); + state, std::format("The {} is not equal to the number defined in {} = {}", cNumericFields(9), cAlphaFields(11), Alphas(11))); ErrorsFound = true; } } else if (thisMSHP.heatCoilType == HVAC::CoilType::HeatingElectricMultiStage || thisMSHP.heatCoilType == HVAC::CoilType::HeatingGasMultiStage) { i = HeatingCoils::GetHeatingCoilNumberOfStages(state, Alphas(10), Alphas(11), ErrorsFound); if (thisMSHP.NumOfSpeedHeating != i) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, std::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError( - state, - EnergyPlus::format("The {} is not equal to the number defined in {} = {}", cNumericFields(9), cAlphaFields(11), Alphas(11))); + state, std::format("The {} is not equal to the number defined in {} = {}", cNumericFields(9), cAlphaFields(11), Alphas(11))); ErrorsFound = true; } } i = DXCoils::GetDXCoilNumberOfSpeeds(state, Alphas(12), Alphas(13), ErrorsFound); if (thisMSHP.NumOfSpeedCooling != i) { - ShowSevereError(state, EnergyPlus::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); + ShowSevereError(state, std::format("For {} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, thisMSHP.Name)); ShowContinueError( - state, - EnergyPlus::format("The {} is not equal to the number defined in {} = {}", cNumericFields(10), cAlphaFields(13), Alphas(13))); + state, std::format("The {} is not equal to the number defined in {} = {}", cNumericFields(10), cAlphaFields(13), Alphas(13))); ErrorsFound = true; } } if (ErrorsFound) { ShowFatalError(state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", - RoutineName, - state.dataHVACMultiSpdHP->CurrentModuleObject)); + std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", + RoutineName, + state.dataHVACMultiSpdHP->CurrentModuleObject)); } // End of multispeed heat pump @@ -2127,10 +2093,10 @@ namespace HVACMultiSpeedHeatPump { if (MSHeatPump(MSHeatPumpNum).ZoneSequenceCoolingNum == 0 || MSHeatPump(MSHeatPumpNum).ZoneSequenceHeatingNum == 0) { ShowSevereError( state, - EnergyPlus::format("AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed, \"{}\": Airloop air terminal in the zone equipment list for " - "zone = {} not found or is not allowed Zone Equipment Cooling or Heating Sequence = 0.", - MSHeatPump(MSHeatPumpNum).Name, - MSHeatPump(MSHeatPumpNum).ControlZoneName)); + std::format("AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed, \"{}\": Airloop air terminal in the zone equipment list for " + "zone = {} not found or is not allowed Zone Equipment Cooling or Heating Sequence = 0.", + MSHeatPump(MSHeatPumpNum).Name, + MSHeatPump(MSHeatPumpNum).ControlZoneName)); ShowFatalError(state, "Subroutine InitMSHeatPump: Errors found in getting AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed input. Preceding " "condition(s) causes termination."); @@ -2172,8 +2138,7 @@ namespace HVACMultiSpeedHeatPump { if (CntrlZoneTerminalUnitMassFlowRateMax >= HVAC::SmallAirVolFlow) { MSHeatPump(MSHeatPumpNum).FlowFraction = CntrlZoneTerminalUnitMassFlowRateMax / SumOfMassFlowRateMax; } else { - ShowSevereError(state, - EnergyPlus::format("{} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); + ShowSevereError(state, std::format("{} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); ShowContinueError(state, " The Fraction of Supply Air Flow That Goes Through the Controlling Zone is set to 1."); } BaseSizer::reportSizerOutput(state, @@ -2314,30 +2279,28 @@ namespace HVACMultiSpeedHeatPump { if (MSHeatPump(MSHeatPumpNum).FanVolFlow < MSHeatPump(MSHeatPumpNum).CoolVolumeFlowRate(NumOfSpeedCooling)) { ShowWarningError( state, - EnergyPlus::format("{} - air flow rate = {:.7T} in fan object {} is less than the MSHP system air flow rate when cooling is " - "required ({:.7T}).", - state.dataHVACMultiSpdHP->CurrentModuleObject, - MSHeatPump(MSHeatPumpNum).FanVolFlow, - MSHeatPump(MSHeatPumpNum).FanName, - MSHeatPump(MSHeatPumpNum).CoolVolumeFlowRate(NumOfSpeedCooling))); + std::format("{} - air flow rate = {:.7f} in fan object {} is less than the MSHP system air flow rate when cooling is " + "required ({:.7f}).", + state.dataHVACMultiSpdHP->CurrentModuleObject, + MSHeatPump(MSHeatPumpNum).FanVolFlow, + MSHeatPump(MSHeatPumpNum).FanName, + MSHeatPump(MSHeatPumpNum).CoolVolumeFlowRate(NumOfSpeedCooling))); ShowContinueError( state, " The MSHP system flow rate when cooling is required is reset to the fan flow rate and the simulation continues."); ShowContinueError( - state, - EnergyPlus::format(" Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); + state, std::format(" Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); MSHeatPump(MSHeatPumpNum).CoolVolumeFlowRate(NumOfSpeedCooling) = MSHeatPump(MSHeatPumpNum).FanVolFlow; // Check flow rates in other speeds and ensure flow rates are not above the max flow rate for (i = NumOfSpeedCooling - 1; i >= 1; --i) { if (MSHeatPump(MSHeatPumpNum).CoolVolumeFlowRate(i) > MSHeatPump(MSHeatPumpNum).CoolVolumeFlowRate(i + 1)) { ShowContinueError( state, - EnergyPlus::format(" The MSHP system flow rate when cooling is required is reset to the flow rate at higher speed " - "and the simulation continues at Speed{}.", - i)); - ShowContinueError(state, - EnergyPlus::format(" Occurs in {} = {}", - state.dataHVACMultiSpdHP->CurrentModuleObject, - MSHeatPump(MSHeatPumpNum).Name)); + std::format(" The MSHP system flow rate when cooling is required is reset to the flow rate at higher speed " + "and the simulation continues at Speed{}.", + i)); + ShowContinueError( + state, + std::format(" Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); MSHeatPump(MSHeatPumpNum).CoolVolumeFlowRate(i) = MSHeatPump(MSHeatPumpNum).CoolVolumeFlowRate(i + 1); } } @@ -2345,29 +2308,28 @@ namespace HVACMultiSpeedHeatPump { if (MSHeatPump(MSHeatPumpNum).FanVolFlow < MSHeatPump(MSHeatPumpNum).HeatVolumeFlowRate(NumOfSpeedHeating)) { ShowWarningError( state, - EnergyPlus::format("{} - air flow rate = {:.7T} in fan object {} is less than the MSHP system air flow rate when heating is " - "required ({:.7T}).", - state.dataHVACMultiSpdHP->CurrentModuleObject, - MSHeatPump(MSHeatPumpNum).FanVolFlow, - MSHeatPump(MSHeatPumpNum).FanName, - MSHeatPump(MSHeatPumpNum).HeatVolumeFlowRate(NumOfSpeedHeating))); + std::format("{} - air flow rate = {:.7f} in fan object {} is less than the MSHP system air flow rate when heating is " + "required ({:.7f}).", + state.dataHVACMultiSpdHP->CurrentModuleObject, + MSHeatPump(MSHeatPumpNum).FanVolFlow, + MSHeatPump(MSHeatPumpNum).FanName, + MSHeatPump(MSHeatPumpNum).HeatVolumeFlowRate(NumOfSpeedHeating))); ShowContinueError( state, " The MSHP system flow rate when heating is required is reset to the fan flow rate and the simulation continues."); ShowContinueError( - state, - EnergyPlus::format(" Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); + state, std::format(" Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); MSHeatPump(MSHeatPumpNum).HeatVolumeFlowRate(NumOfSpeedHeating) = MSHeatPump(MSHeatPumpNum).FanVolFlow; for (i = NumOfSpeedHeating - 1; i >= 1; --i) { if (MSHeatPump(MSHeatPumpNum).HeatVolumeFlowRate(i) > MSHeatPump(MSHeatPumpNum).HeatVolumeFlowRate(i + 1)) { ShowContinueError( state, - EnergyPlus::format(" The MSHP system flow rate when heating is required is reset to the flow rate at higher speed " - "and the simulation continues at Speed{}.", - i)); + std::format(" The MSHP system flow rate when heating is required is reset to the flow rate at higher speed " + "and the simulation continues at Speed{}.", + i)); ShowContinueError(state, - EnergyPlus::format(" Occurs in {} system = {}", - state.dataHVACMultiSpdHP->CurrentModuleObject, - MSHeatPump(MSHeatPumpNum).Name)); + std::format(" Occurs in {} system = {}", + state.dataHVACMultiSpdHP->CurrentModuleObject, + MSHeatPump(MSHeatPumpNum).Name)); MSHeatPump(MSHeatPumpNum).HeatVolumeFlowRate(i) = MSHeatPump(MSHeatPumpNum).HeatVolumeFlowRate(i + 1); } } @@ -2376,18 +2338,17 @@ namespace HVACMultiSpeedHeatPump { MSHeatPump(MSHeatPumpNum).IdleVolumeAirRate != 0.0) { ShowWarningError( state, - EnergyPlus::format("{} - air flow rate = {:.7T} in fan object {} is less than the MSHP system air flow rate when no heating " - "or cooling is needed ({:.7T}).", - state.dataHVACMultiSpdHP->CurrentModuleObject, - MSHeatPump(MSHeatPumpNum).FanVolFlow, - MSHeatPump(MSHeatPumpNum).FanName, - MSHeatPump(MSHeatPumpNum).IdleVolumeAirRate)); + std::format("{} - air flow rate = {:.7f} in fan object {} is less than the MSHP system air flow rate when no heating " + "or cooling is needed ({:.7f}).", + state.dataHVACMultiSpdHP->CurrentModuleObject, + MSHeatPump(MSHeatPumpNum).FanVolFlow, + MSHeatPump(MSHeatPumpNum).FanName, + MSHeatPump(MSHeatPumpNum).IdleVolumeAirRate)); ShowContinueError(state, " The MSHP system flow rate when no heating or cooling is needed is reset to the fan flow rate and the " "simulation continues."); ShowContinueError( - state, - EnergyPlus::format(" Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); + state, std::format(" Occurs in {} = {}", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump(MSHeatPumpNum).Name)); MSHeatPump(MSHeatPumpNum).IdleVolumeAirRate = MSHeatPump(MSHeatPumpNum).FanVolFlow; } RhoAir = state.dataEnvrn->StdRhoAir; @@ -2510,8 +2471,7 @@ namespace HVACMultiSpeedHeatPump { ShowWarningError(state, "ZoneControl:Thermostat:StagedDualSetpoint is found, but is not applied to this " "AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed object = "); - ShowContinueError(state, - EnergyPlus::format("{}. Please make correction. Simulation continues...", MSHeatPump(MSHeatPumpNum).Name)); + ShowContinueError(state, std::format("{}. Please make correction. Simulation continues...", MSHeatPump(MSHeatPumpNum).Name)); MSHeatPump(MSHeatPumpNum).MyStagedFlag = false; } } @@ -2587,11 +2547,10 @@ namespace HVACMultiSpeedHeatPump { ++MSHeatPump(MSHeatPumpNum).CoolCountAvail; ShowWarningError( state, - EnergyPlus::format( - "{} is ready to perform cooling, but its DX cooling coil = {} is not available at Available Schedule = {}.", - MSHeatPump(MSHeatPumpNum).Name, - MSHeatPump(MSHeatPumpNum).DXCoolCoilName, - coilAvailSched->Name)); + std::format("{} is ready to perform cooling, but its DX cooling coil = {} is not available at Available Schedule = {}.", + MSHeatPump(MSHeatPumpNum).Name, + MSHeatPump(MSHeatPumpNum).DXCoolCoilName, + coilAvailSched->Name)); ShowContinueErrorTimeStamp(state, EnergyPlus::format("Availability schedule returned={:.1R}", coilAvailSched->getCurrentVal())); } else { @@ -2619,11 +2578,10 @@ namespace HVACMultiSpeedHeatPump { ++MSHeatPump(MSHeatPumpNum).HeatCountAvail; ShowWarningError( state, - EnergyPlus::format( - "{} is ready to perform heating, but its DX heating coil = {} is not available at Available Schedule = {}.", - MSHeatPump(MSHeatPumpNum).Name, - MSHeatPump(MSHeatPumpNum).DXCoolCoilName, - coilAvailSched->Name)); + std::format("{} is ready to perform heating, but its DX heating coil = {} is not available at Available Schedule = {}.", + MSHeatPump(MSHeatPumpNum).Name, + MSHeatPump(MSHeatPumpNum).DXCoolCoilName, + coilAvailSched->Name)); ShowContinueErrorTimeStamp(state, EnergyPlus::format("Availability schedule returned={:.1R}", coilAvailSched->getCurrentVal())); } else { @@ -2868,7 +2826,7 @@ namespace HVACMultiSpeedHeatPump { MSHeatPump.CoolVolumeFlowRate(i) = state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).DesMainVolFlow; if (MSHeatPump.FanVolFlow < MSHeatPump.CoolVolumeFlowRate(i) && MSHeatPump.FanVolFlow != DataSizing::AutoSize) { MSHeatPump.CoolVolumeFlowRate(i) = MSHeatPump.FanVolFlow; - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump.Name)); + ShowWarningError(state, std::format("{} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump.Name)); ShowContinueError(state, "The supply air flow rate at high speed is less than the autosized value for the supply air flow rate " "in cooling mode. Consider autosizing the fan for this simulation."); @@ -2891,7 +2849,7 @@ namespace HVACMultiSpeedHeatPump { BaseSizer::reportSizerOutput(state, state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump.Name, - EnergyPlus::format("Speed {} Supply Air Flow Rate During Cooling Operation [m3/s]", i), + std::format("Speed {} Supply Air Flow Rate During Cooling Operation [m3/s]", i), MSHeatPump.CoolVolumeFlowRate(i)); } } @@ -2905,7 +2863,7 @@ namespace HVACMultiSpeedHeatPump { MSHeatPump.HeatVolumeFlowRate(i) = state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).DesMainVolFlow; if (MSHeatPump.FanVolFlow < MSHeatPump.HeatVolumeFlowRate(i) && MSHeatPump.FanVolFlow != DataSizing::AutoSize) { MSHeatPump.HeatVolumeFlowRate(i) = MSHeatPump.FanVolFlow; - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump.Name)); + ShowWarningError(state, std::format("{} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump.Name)); ShowContinueError(state, "The supply air flow rate at high speed is less than the autosized value for the maximum air flow rate " "in heating mode. Consider autosizing the fan for this simulation."); @@ -2928,7 +2886,7 @@ namespace HVACMultiSpeedHeatPump { BaseSizer::reportSizerOutput(state, state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump.Name, - EnergyPlus::format("Speed{}Supply Air Flow Rate During Heating Operation [m3/s]", i), + std::format("Speed{}Supply Air Flow Rate During Heating Operation [m3/s]", i), MSHeatPump.HeatVolumeFlowRate(i)); } } @@ -2940,7 +2898,7 @@ namespace HVACMultiSpeedHeatPump { MSHeatPump.IdleVolumeAirRate = state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).DesMainVolFlow; if (MSHeatPump.FanVolFlow < MSHeatPump.IdleVolumeAirRate && MSHeatPump.FanVolFlow != DataSizing::AutoSize) { MSHeatPump.IdleVolumeAirRate = MSHeatPump.FanVolFlow; - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump.Name)); + ShowWarningError(state, std::format("{} \"{}\"", state.dataHVACMultiSpdHP->CurrentModuleObject, MSHeatPump.Name)); ShowContinueError(state, "The supply air flow rate is less than the autosized value for the maximum air flow rate when no heating or " "cooling is needed. Consider autosizing the fan for this simulation."); @@ -3492,8 +3450,7 @@ namespace HVACMultiSpeedHeatPump { if (state.dataHVACMultiSpdHP->ErrCountCyc == 0) { ++state.dataHVACMultiSpdHP->ErrCountCyc; // TODO: Why is the error count shared among all heat pump units? ShowWarningError( - state, - EnergyPlus::format("Iteration limit exceeded calculating DX unit cycling ratio, for unit={}", MSHeatPump.Name)); + state, std::format("Iteration limit exceeded calculating DX unit cycling ratio, for unit={}", MSHeatPump.Name)); ShowContinueErrorTimeStamp(state, EnergyPlus::format("Cycling ratio returned={:.2R}", PartLoadFrac)); } else { ++state.dataHVACMultiSpdHP->ErrCountCyc; @@ -3506,9 +3463,9 @@ namespace HVACMultiSpeedHeatPump { } } } else if (SolFla == -2) { - ShowFatalError(state, - EnergyPlus::format("DX unit cycling ratio calculation failed: cycling limits exceeded, for unit={}", - MSHeatPump.DXCoolCoilName)); + ShowFatalError( + state, + std::format("DX unit cycling ratio calculation failed: cycling limits exceeded, for unit={}", MSHeatPump.DXCoolCoilName)); } } else { // Check to see which speed to meet the load @@ -3577,8 +3534,7 @@ namespace HVACMultiSpeedHeatPump { if (state.dataHVACMultiSpdHP->ErrCountVar == 0) { ++state.dataHVACMultiSpdHP->ErrCountVar; ShowWarningError( - state, - EnergyPlus::format("Iteration limit exceeded calculating DX unit speed ratio, for unit={}", MSHeatPump.Name)); + state, std::format("Iteration limit exceeded calculating DX unit speed ratio, for unit={}", MSHeatPump.Name)); ShowContinueErrorTimeStamp( state, EnergyPlus::format("Speed ratio returned=[{:.2R}], Speed number ={}", SpeedRatio, SpeedNum)); } else { @@ -3593,8 +3549,8 @@ namespace HVACMultiSpeedHeatPump { } } else if (SolFla == -2) { ShowFatalError(state, - EnergyPlus::format("DX unit compressor speed calculation failed: speed limits exceeded, for unit={}", - MSHeatPump.DXCoolCoilName)); + std::format("DX unit compressor speed calculation failed: speed limits exceeded, for unit={}", + MSHeatPump.DXCoolCoilName)); } } } else { @@ -3631,9 +3587,9 @@ namespace HVACMultiSpeedHeatPump { if (!state.dataGlobal->WarmupFlag) { if (state.dataHVACMultiSpdHP->ErrCountCyc == 0) { ++state.dataHVACMultiSpdHP->ErrCountCyc; - ShowWarningError(state, - EnergyPlus::format("Iteration limit exceeded calculating DX unit cycling ratio, for unit={}", - MSHeatPump.Name)); + ShowWarningError( + state, + std::format("Iteration limit exceeded calculating DX unit cycling ratio, for unit={}", MSHeatPump.Name)); ShowContinueErrorTimeStamp(state, EnergyPlus::format("Cycling ratio returned={:.2R}", PartLoadFrac)); } else { ++state.dataHVACMultiSpdHP->ErrCountCyc; @@ -3647,8 +3603,8 @@ namespace HVACMultiSpeedHeatPump { } } else if (SolFla == -2) { ShowFatalError(state, - EnergyPlus::format("DX unit cycling ratio calculation failed: cycling limits exceeded, for unit={}", - MSHeatPump.DXCoolCoilName)); + std::format("DX unit cycling ratio calculation failed: cycling limits exceeded, for unit={}", + MSHeatPump.DXCoolCoilName)); } } else { FullOutput = LowOutput; @@ -3710,10 +3666,9 @@ namespace HVACMultiSpeedHeatPump { if (!state.dataGlobal->WarmupFlag) { if (state.dataHVACMultiSpdHP->ErrCountVar == 0) { ++state.dataHVACMultiSpdHP->ErrCountVar; - ShowWarningError( - state, - EnergyPlus::format("Iteration limit exceeded calculating DX unit speed ratio, for unit={}", - MSHeatPump.Name)); + ShowWarningError(state, + std::format("Iteration limit exceeded calculating DX unit speed ratio, for unit={}", + MSHeatPump.Name)); ShowContinueErrorTimeStamp( state, EnergyPlus::format("Speed ratio returned=[{:.2R}], Speed number ={}", SpeedRatio, SpeedNum)); } else { @@ -3728,10 +3683,9 @@ namespace HVACMultiSpeedHeatPump { } } } else if (SolFla == -2) { - ShowFatalError( - state, - EnergyPlus::format("DX unit compressor speed calculation failed: speed limits exceeded, for unit={}", - MSHeatPump.DXCoolCoilName)); + ShowFatalError(state, + std::format("DX unit compressor speed calculation failed: speed limits exceeded, for unit={}", + MSHeatPump.DXCoolCoilName)); } } else { SpeedRatio = 1.0; @@ -4422,28 +4376,27 @@ namespace HVACMultiSpeedHeatPump { if (SolFlag == -1) { if (MSHeatPump.HotWaterCoilMaxIterIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", - CurrentModuleObject, - MSHeatPump.Name)); + std::format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", + CurrentModuleObject, + MSHeatPump.Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError( - state, - EnergyPlus::format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); + state, std::format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed (iteration limit [{}]) for {}=\"{}", - SolveMaxIter, - CurrentModuleObject, - MSHeatPump.Name), + std::format("CalcNonDXHeatingCoils: Hot water coil control failed (iteration limit [{}]) for {}=\"{}", + SolveMaxIter, + CurrentModuleObject, + MSHeatPump.Name), MSHeatPump.HotWaterCoilMaxIterIndex); } else if (SolFlag == -2) { if (MSHeatPump.HotWaterCoilMaxIterIndex2 == 0) { ShowWarningMessage( state, - EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", - CurrentModuleObject, - MSHeatPump.Name)); + std::format("CalcNonDXHeatingCoils: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", + CurrentModuleObject, + MSHeatPump.Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "...Bad hot water maximum flow rate limits"); ShowContinueError(state, EnergyPlus::format("...Given minimum water flow rate={:.3R} kg/s", MinWaterFlow)); diff --git a/src/EnergyPlus/HVACSingleDuctInduc.cc b/src/EnergyPlus/HVACSingleDuctInduc.cc index e988baae6d7..e5019718d61 100644 --- a/src/EnergyPlus/HVACSingleDuctInduc.cc +++ b/src/EnergyPlus/HVACSingleDuctInduc.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -527,9 +528,9 @@ namespace HVACSingleDuctInduc { EnergyPlus::format("InitIndUnit: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", state.dataDefineEquipment->AirDistUnit(state.dataHVACSingleDuctInduc->IndUnit(Loop).ADUNum).Name)); ShowContinueError(state, - EnergyPlus::format("...Unit=[{},{}] will not be simulated.", - state.dataHVACSingleDuctInduc->IndUnit(Loop).UnitType, - state.dataHVACSingleDuctInduc->IndUnit(Loop).Name)); + std::format("...Unit=[{},{}] will not be simulated.", + state.dataHVACSingleDuctInduc->IndUnit(Loop).UnitType, + state.dataHVACSingleDuctInduc->IndUnit(Loop).Name)); } } @@ -695,9 +696,9 @@ namespace HVACSingleDuctInduc { if ((std::abs(MaxTotAirVolFlowDes - MaxTotAirVolFlowUser) / MaxTotAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeHVACSingleDuctInduction: Potential issue with equipment sizing for {} = \"{}\".", - indUnit.UnitType, - indUnit.Name)); + std::format("SizeHVACSingleDuctInduction: Potential issue with equipment sizing for {} = \"{}\".", + indUnit.UnitType, + indUnit.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Total Air Flow Rate of {:.5R} [m3/s]", MaxTotAirVolFlowUser)); ShowContinueError( @@ -764,7 +765,7 @@ namespace HVACSingleDuctInduc { } } else { ShowSevereError(state, "Autosizing of water flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in {} Object={}", indUnit.UnitType, indUnit.Name)); + ShowContinueError(state, std::format("Occurs in {} Object={}", indUnit.UnitType, indUnit.Name)); ErrorsFound = true; } indUnit.MaxVolHotWaterFlow = MaxVolHotWaterFlowDes; @@ -795,11 +796,10 @@ namespace HVACSingleDuctInduc { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxVolHotWaterFlowDes - MaxVolHotWaterFlowUser) / MaxVolHotWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizeHVACSingleDuctInduction: Potential issue with equipment sizing for {} = \"{}\".", - indUnit.UnitType, - indUnit.Name)); + ShowMessage(state, + std::format("SizeHVACSingleDuctInduction: Potential issue with equipment sizing for {} = \"{}\".", + indUnit.UnitType, + indUnit.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Hot Water Flow Rate of {:.5R} [m3/s]", MaxVolHotWaterFlowUser)); @@ -871,7 +871,7 @@ namespace HVACSingleDuctInduc { } } else { ShowSevereError(state, "Autosizing of water flow requires a cooling loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in {} Object={}", indUnit.UnitType, indUnit.Name)); + ShowContinueError(state, std::format("Occurs in {} Object={}", indUnit.UnitType, indUnit.Name)); ErrorsFound = true; } indUnit.MaxVolColdWaterFlow = MaxVolColdWaterFlowDes; @@ -890,11 +890,10 @@ namespace HVACSingleDuctInduc { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxVolColdWaterFlowDes - MaxVolColdWaterFlowUser) / MaxVolColdWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizeHVACSingleDuctInduction: Potential issue with equipment sizing for {} = \"{}\".", - indUnit.UnitType, - indUnit.Name)); + ShowMessage(state, + std::format("SizeHVACSingleDuctInduction: Potential issue with equipment sizing for {} = \"{}\".", + indUnit.UnitType, + indUnit.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Cold Water Flow Rate of {:.5R} [m3/s]", MaxVolColdWaterFlowUser)); @@ -1032,28 +1031,26 @@ namespace HVACSingleDuctInduc { General::SolveRoot(state, ErrTolerance, SolveMaxIter, SolFlag, HWFlow, f, MinHotWaterFlow, MaxHotWaterFlow); if (SolFlag == -1) { if (indUnit.HWCoilFailNum1 == 0) { - ShowWarningMessage(state, - EnergyPlus::format("SimFourPipeIndUnit: Hot water coil control failed for {}=\"{}\"", - indUnit.UnitType, - indUnit.Name)); + ShowWarningMessage( + state, + std::format("SimFourPipeIndUnit: Hot water coil control failed for {}=\"{}\"", indUnit.UnitType, indUnit.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError( - state, EnergyPlus::format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); + ShowContinueError(state, + std::format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("SimFourPipeIndUnit: Hot water coil control failed (iteration limit [{}]) for {}=\"{}\"", - SolveMaxIter, - indUnit.UnitType, - indUnit.Name), + std::format("SimFourPipeIndUnit: Hot water coil control failed (iteration limit [{}]) for {}=\"{}\"", + SolveMaxIter, + indUnit.UnitType, + indUnit.Name), indUnit.HWCoilFailNum1); } else if (SolFlag == -2) { if (indUnit.HWCoilFailNum2 == 0) { - ShowWarningMessage( - state, - EnergyPlus::format("SimFourPipeIndUnit: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", - indUnit.UnitType, - indUnit.Name)); + ShowWarningMessage(state, + std::format("SimFourPipeIndUnit: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", + indUnit.UnitType, + indUnit.Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "...Bad hot water maximum flow rate limits"); ShowContinueError(state, EnergyPlus::format("...Given minimum water flow rate={:.3R} kg/s", MinHotWaterFlow)); @@ -1085,28 +1082,26 @@ namespace HVACSingleDuctInduc { General::SolveRoot(state, ErrTolerance, SolveMaxIter, SolFlag, CWFlow, f, MinColdWaterFlow, MaxColdWaterFlow); if (SolFlag == -1) { if (indUnit.CWCoilFailNum1 == 0) { - ShowWarningMessage(state, - EnergyPlus::format("SimFourPipeIndUnit: Cold water coil control failed for {}=\"{}\"", - indUnit.UnitType, - indUnit.Name)); + ShowWarningMessage( + state, + std::format("SimFourPipeIndUnit: Cold water coil control failed for {}=\"{}\"", indUnit.UnitType, indUnit.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError( - state, EnergyPlus::format(" Iteration limit [{}] exceeded in calculating cold water mass flow rate", SolveMaxIter)); + ShowContinueError(state, + std::format(" Iteration limit [{}] exceeded in calculating cold water mass flow rate", SolveMaxIter)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("SimFourPipeIndUnit: Cold water coil control failed (iteration limit [{}]) for {}=\"{}", - SolveMaxIter, - indUnit.UnitType, - indUnit.Name), + std::format("SimFourPipeIndUnit: Cold water coil control failed (iteration limit [{}]) for {}=\"{}", + SolveMaxIter, + indUnit.UnitType, + indUnit.Name), indUnit.CWCoilFailNum1); } else if (SolFlag == -2) { if (indUnit.CWCoilFailNum2 == 0) { - ShowWarningMessage( - state, - EnergyPlus::format("SimFourPipeIndUnit: Cold water coil control failed (maximum flow limits) for {}=\"{}\"", - indUnit.UnitType, - indUnit.Name)); + ShowWarningMessage(state, + std::format("SimFourPipeIndUnit: Cold water coil control failed (maximum flow limits) for {}=\"{}\"", + indUnit.UnitType, + indUnit.Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "...Bad cold water maximum flow rate limits"); ShowContinueError(state, EnergyPlus::format("...Given minimum water flow rate={:.3R} kg/s", MinColdWaterFlow)); diff --git a/src/EnergyPlus/HVACSizingSimulationManager.cc b/src/EnergyPlus/HVACSizingSimulationManager.cc index 7dae23866ad..ad4cd35dbc1 100644 --- a/src/EnergyPlus/HVACSizingSimulationManager.cc +++ b/src/EnergyPlus/HVACSizingSimulationManager.cc @@ -290,9 +290,9 @@ void ManageHVACSizingSimulation(EnergyPlusData &state, bool &ErrorsFound) state.dataReportFlag->cWarmupDay = fmt::to_string(state.dataReportFlag->NumOfWarmupDays); DisplayString(state, "Warming up {" + state.dataReportFlag->cWarmupDay + '}'); } else if (state.dataGlobal->DayOfSim == 1) { - DisplayString( - state, - fmt::format("Starting HVAC Sizing Simulation at {} for {}", state.dataEnvrn->CurMnDy, state.dataEnvrn->EnvironmentName)); + DisplayString(state, + EnergyPlus::format( + "Starting HVAC Sizing Simulation at {} for {}", state.dataEnvrn->CurMnDy, state.dataEnvrn->EnvironmentName)); static constexpr std::string_view Format_700("Environment:WarmupDays,{:3}\n"); print(state.files.eio, Format_700, state.dataReportFlag->NumOfWarmupDays); } else if (state.dataReportFlag->DisplayPerfSimulationFlag) { diff --git a/src/EnergyPlus/HVACStandAloneERV.cc b/src/EnergyPlus/HVACStandAloneERV.cc index b7cfdf74ed3..9a363bfe0a9 100644 --- a/src/EnergyPlus/HVACStandAloneERV.cc +++ b/src/EnergyPlus/HVACStandAloneERV.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -462,49 +463,47 @@ void GetStandAloneERV(EnergyPlusData &state) standAloneERV.AirVolFlowPerOccupant = Numbers(4); if (standAloneERV.SupplyAirVolFlow == DataSizing::AutoSize && standAloneERV.DesignSAFanVolFlowRate != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, std::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError(state, - EnergyPlus::format("... When autosizing ERV, supply air fan = {} \"{}\" must also be autosized.", - HVAC::fanTypeNames[(int)standAloneERV.supplyAirFanType], - standAloneERV.SupplyAirFanName)); + std::format("... When autosizing ERV, supply air fan = {} \"{}\" must also be autosized.", + HVAC::fanTypeNames[(int)standAloneERV.supplyAirFanType], + standAloneERV.SupplyAirFanName)); } if (standAloneERV.ExhaustAirVolFlow == DataSizing::AutoSize && standAloneERV.DesignEAFanVolFlowRate != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, std::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError(state, - EnergyPlus::format("... When autosizing ERV, exhaust air fan = {} \"{}\" must also be autosized.", - HVAC::fanTypeNames[(int)standAloneERV.exhaustAirFanType], - standAloneERV.ExhaustAirFanName)); + std::format("... When autosizing ERV, exhaust air fan = {} \"{}\" must also be autosized.", + HVAC::fanTypeNames[(int)standAloneERV.exhaustAirFanType], + standAloneERV.ExhaustAirFanName)); } if (standAloneERV.SupplyAirVolFlow == DataSizing::AutoSize && HXSupAirFlowRate != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, std::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError( state, - EnergyPlus::format( - "... When autosizing ERV {}, nominal supply air flow rate for heat exchanger with name = {} must also be autosized.", - cNumericFields(1), - standAloneERV.HeatExchangerName)); + std::format("... When autosizing ERV {}, nominal supply air flow rate for heat exchanger with name = {} must also be autosized.", + cNumericFields(1), + standAloneERV.HeatExchangerName)); } if (standAloneERV.ExhaustAirVolFlow == DataSizing::AutoSize && HXSupAirFlowRate != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, std::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError( state, - EnergyPlus::format( - "... When autosizing ERV {}, nominal supply air flow rate for heat exchanger with name = {} must also be autosized.", - cNumericFields(2), - standAloneERV.HeatExchangerName)); + std::format("... When autosizing ERV {}, nominal supply air flow rate for heat exchanger with name = {} must also be autosized.", + cNumericFields(2), + standAloneERV.HeatExchangerName)); } // Compare the ERV SA flow rates to SA fan object. if (standAloneERV.DesignSAFanVolFlowRate != DataSizing::AutoSize && standAloneERV.SupplyAirVolFlow != DataSizing::AutoSize) { if (standAloneERV.SupplyAirVolFlow > standAloneERV.DesignSAFanVolFlowRate) { ShowWarningError(state, - EnergyPlus::format("{} = {} has a {} > Max Volume Flow Rate defined in the associated fan object, should be <=", - CurrentModuleObject, - standAloneERV.Name, - cNumericFields(1))); + std::format("{} = {} has a {} > Max Volume Flow Rate defined in the associated fan object, should be <=", + CurrentModuleObject, + standAloneERV.Name, + cNumericFields(1))); ShowContinueError(state, EnergyPlus::format("... Entered value={:.2R}... Fan [{} \"{}\"] Max Value = {:.2R}", standAloneERV.SupplyAirVolFlow, @@ -512,33 +511,30 @@ void GetStandAloneERV(EnergyPlusData &state) standAloneERV.SupplyAirFanName, standAloneERV.DesignSAFanVolFlowRate)); ShowContinueError( - state, - EnergyPlus::format(" The ERV {} is reset to the supply air fan flow rate and the simulation continues.", cNumericFields(1))); + state, std::format(" The ERV {} is reset to the supply air fan flow rate and the simulation continues.", cNumericFields(1))); standAloneERV.SupplyAirVolFlow = standAloneERV.DesignSAFanVolFlowRate; } } if (standAloneERV.SupplyAirVolFlow != DataSizing::AutoSize) { if (standAloneERV.SupplyAirVolFlow <= 0.0) { - ShowSevereError( - state, - EnergyPlus::format("{} = {} has a {} <= 0.0, it must be >0.0", CurrentModuleObject, standAloneERV.Name, cNumericFields(1))); + ShowSevereError(state, + std::format("{} = {} has a {} <= 0.0, it must be >0.0", CurrentModuleObject, standAloneERV.Name, cNumericFields(1))); ShowContinueError(state, EnergyPlus::format("... Entered value={:.2R}", standAloneERV.SupplyAirVolFlow)); ErrorsFound = true; } } else { if (standAloneERV.AirVolFlowPerFloorArea == 0.0 && standAloneERV.AirVolFlowPerOccupant == 0.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, std::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError( state, - EnergyPlus::format( + std::format( "... Autosizing {} requires at least one input for {} or {}.", cNumericFields(1), cNumericFields(3), cNumericFields(4))); ErrorsFound = true; } // both inputs must be autosized if (standAloneERV.ExhaustAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); - ShowContinueError(state, - EnergyPlus::format("... When autosizing, {} and {} must both be autosized.", cNumericFields(1), cNumericFields(2))); + ShowSevereError(state, std::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowContinueError(state, std::format("... When autosizing, {} and {} must both be autosized.", cNumericFields(1), cNumericFields(2))); ErrorsFound = true; } } @@ -547,10 +543,10 @@ void GetStandAloneERV(EnergyPlusData &state) if (standAloneERV.DesignEAFanVolFlowRate != DataSizing::AutoSize && standAloneERV.ExhaustAirVolFlow != DataSizing::AutoSize) { if (standAloneERV.ExhaustAirVolFlow > standAloneERV.DesignEAFanVolFlowRate) { ShowWarningError(state, - EnergyPlus::format("{} = {} has an {} > Max Volume Flow Rate defined in the associated fan object, should be <=", - CurrentModuleObject, - standAloneERV.Name, - cNumericFields(2))); + std::format("{} = {} has an {} > Max Volume Flow Rate defined in the associated fan object, should be <=", + CurrentModuleObject, + standAloneERV.Name, + cNumericFields(2))); ShowContinueError(state, EnergyPlus::format("... Entered value={:.2R}... Fan [{}:{}] Max Value = {:.2R}", standAloneERV.ExhaustAirVolFlow, @@ -558,32 +554,29 @@ void GetStandAloneERV(EnergyPlusData &state) standAloneERV.ExhaustAirFanName, standAloneERV.DesignEAFanVolFlowRate)); ShowContinueError( - state, - EnergyPlus::format(" The ERV {} is reset to the exhaust air fan flow rate and the simulation continues.", cNumericFields(2))); + state, std::format(" The ERV {} is reset to the exhaust air fan flow rate and the simulation continues.", cNumericFields(2))); standAloneERV.ExhaustAirVolFlow = standAloneERV.DesignEAFanVolFlowRate; } } if (standAloneERV.ExhaustAirVolFlow != DataSizing::AutoSize) { if (standAloneERV.ExhaustAirVolFlow <= 0.0) { - ShowSevereError( - state, - EnergyPlus::format("{} = {} has an {} <= 0.0, it must be >0.0", CurrentModuleObject, standAloneERV.Name, cNumericFields(2))); + ShowSevereError(state, + std::format("{} = {} has an {} <= 0.0, it must be >0.0", CurrentModuleObject, standAloneERV.Name, cNumericFields(2))); ShowContinueError(state, EnergyPlus::format("... Entered value={:.2R}", standAloneERV.ExhaustAirVolFlow)); ErrorsFound = true; } } else { if (standAloneERV.AirVolFlowPerFloorArea == 0.0 && standAloneERV.AirVolFlowPerOccupant == 0.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowSevereError(state, std::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); ShowContinueError( state, - EnergyPlus::format( + std::format( "... Autosizing {} requires at least one input for {} or {}.", cNumericFields(2), cNumericFields(3), cNumericFields(4))); ErrorsFound = true; } if (standAloneERV.SupplyAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); - ShowContinueError(state, - EnergyPlus::format("... When autosizing, {} and {} must both be autosized.", cNumericFields(1), cNumericFields(2))); + ShowSevereError(state, std::format("{} \"{}\"", CurrentModuleObject, standAloneERV.Name)); + ShowContinueError(state, std::format("... When autosizing, {} and {} must both be autosized.", cNumericFields(1), cNumericFields(2))); ErrorsFound = true; } } @@ -624,23 +617,22 @@ void GetStandAloneERV(EnergyPlusData &state) if (state.dataInputProcessing->inputProcessor->getObjectItemNum( state, "HeatExchanger:AirToAir:SensibleAndLatent", standAloneERV.HeatExchangerName) <= 0) { ShowSevereError(state, - EnergyPlus::format("{} heat exchanger type HeatExchanger:AirToAir:SensibleAndLatent not found = {}", - CurrentModuleObject, - standAloneERV.HeatExchangerName)); + std::format("{} heat exchanger type HeatExchanger:AirToAir:SensibleAndLatent not found = {}", + CurrentModuleObject, + standAloneERV.HeatExchangerName)); ErrorsFound = true; } // Verify supply air fan name in Stand Alone ERV object matches name of valid fan object if (standAloneERV.supplyAirFanType != HVAC::FanType::SystemModel) { if (state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Fan:OnOff", standAloneERV.SupplyAirFanName) <= 0) { - ShowSevereError( - state, EnergyPlus::format("{} supply fan type Fan:OnOff not found = {}", CurrentModuleObject, standAloneERV.SupplyAirFanName)); + ShowSevereError(state, + std::format("{} supply fan type Fan:OnOff not found = {}", CurrentModuleObject, standAloneERV.SupplyAirFanName)); ErrorsFound = true; } } else { if (state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Fan:SystemModel", standAloneERV.SupplyAirFanName) <= 0) { ShowSevereError( - state, - EnergyPlus::format("{} supply fan type Fan:SystemModel not found = {}", CurrentModuleObject, standAloneERV.SupplyAirFanName)); + state, std::format("{} supply fan type Fan:SystemModel not found = {}", CurrentModuleObject, standAloneERV.SupplyAirFanName)); ErrorsFound = true; } } @@ -648,15 +640,14 @@ void GetStandAloneERV(EnergyPlusData &state) // Verify exhaust air fan name in Stand Alone ERV object matches name of valid fan object if (standAloneERV.exhaustAirFanType != HVAC::FanType::SystemModel) { if (state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Fan:OnOff", standAloneERV.ExhaustAirFanName) <= 0) { - ShowSevereError( - state, EnergyPlus::format("{} exhaust fan type Fan:OnOff not found = {}", CurrentModuleObject, standAloneERV.ExhaustAirFanName)); + ShowSevereError(state, + std::format("{} exhaust fan type Fan:OnOff not found = {}", CurrentModuleObject, standAloneERV.ExhaustAirFanName)); ErrorsFound = true; } } else { if (state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Fan:SystemModel", standAloneERV.ExhaustAirFanName) <= 0) { ShowSevereError( - state, - EnergyPlus::format("{} exhaust fan type Fan:SystemModel not found = {}", CurrentModuleObject, standAloneERV.ExhaustAirFanName)); + state, std::format("{} exhaust fan type Fan:SystemModel not found = {}", CurrentModuleObject, standAloneERV.ExhaustAirFanName)); ErrorsFound = true; } } @@ -690,9 +681,9 @@ void GetStandAloneERV(EnergyPlusData &state) AirFlowRate = state.dataHVACStandAloneERV->StandAloneERV(WhichERV).SupplyAirVolFlow; state.dataHVACStandAloneERV->StandAloneERV(WhichERV).ControllerIndex = OutAirNum; } else { - ShowSevereError(state, - EnergyPlus::format( - "GetERVController: Could not find ZoneHVAC:EnergyRecoveryVentilator with {} = \"{}\"", cAlphaFields(1), Alphas(1))); + ShowSevereError( + state, + std::format("GetERVController: Could not find ZoneHVAC:EnergyRecoveryVentilator with {} = \"{}\"", cAlphaFields(1), Alphas(1))); ErrorsFound = true; AirFlowRate = -1000.0; } @@ -743,8 +734,8 @@ void GetStandAloneERV(EnergyPlusData &state) if (!lAlphaBlanks(2)) { thisOAController.EnthalpyCurvePtr = Curve::GetCurveIndex(state, Alphas(2)); if (Curve::GetCurveIndex(state, Alphas(2)) == 0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("...{} not found:{}", cAlphaFields(2), Alphas(2))); + ShowSevereError(state, std::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("...{} not found:{}", cAlphaFields(2), Alphas(2))); ErrorsFound = true; } else { // Verify Curve Object, only legal types are Quadratic and Cubic @@ -773,8 +764,8 @@ void GetStandAloneERV(EnergyPlusData &state) } } else if ((!lAlphaBlanks(3)) && (!lAlphaBlanks(4))) { if ((lNumericBlanks(1)) && (lNumericBlanks(3)) && (lNumericBlanks(4)) && lAlphaBlanks(2)) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("... Invalid {}{} = {}{}", cAlphaFields(3), cAlphaFields(4), Alphas(3), Alphas(4))); + ShowWarningError(state, std::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("... Invalid {}{} = {}{}", cAlphaFields(3), cAlphaFields(4), Alphas(3), Alphas(4))); ShowContinueError(state, "... Assumed NO EXHAUST AIR TEMP LIMIT and NO EXHAUST AIR ENTHALPY LIMIT."); thisOAController.Econo = MixedAir::EconoOp::NoEconomizer; } else { @@ -784,8 +775,8 @@ void GetStandAloneERV(EnergyPlusData &state) } } else if ((lAlphaBlanks(3)) && (!lAlphaBlanks(4))) { if ((lNumericBlanks(1)) && (lNumericBlanks(3)) && (lNumericBlanks(4)) && lAlphaBlanks(2)) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("... Invalid {} = {}", cAlphaFields(4), Alphas(4))); + ShowWarningError(state, std::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("... Invalid {} = {}", cAlphaFields(4), Alphas(4))); ShowContinueError(state, "... Assumed NO EXHAUST AIR ENTHALPY LIMIT."); thisOAController.Econo = MixedAir::EconoOp::NoEconomizer; } else { @@ -795,8 +786,8 @@ void GetStandAloneERV(EnergyPlusData &state) } } else if ((!lAlphaBlanks(3)) && (lAlphaBlanks(4))) { if ((lNumericBlanks(1)) && (lNumericBlanks(3)) && (lNumericBlanks(4)) && lAlphaBlanks(2)) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("... Invalid {} = {}", cAlphaFields(3), Alphas(3))); + ShowWarningError(state, std::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("... Invalid {} = {}", cAlphaFields(3), Alphas(3))); ShowContinueError(state, "... Assumed NO EXHAUST AIR TEMP LIMIT "); thisOAController.Econo = MixedAir::EconoOp::NoEconomizer; } else { @@ -829,9 +820,9 @@ void GetStandAloneERV(EnergyPlusData &state) ZoneNodeFound = true; } if (!ZoneNodeFound) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "... Did not find Air Node (Zone with Humidistat)"); - ShowContinueError(state, EnergyPlus::format("... Specified {} = {}", cAlphaFields(7), Alphas(7))); + ShowContinueError(state, std::format("... Specified {} = {}", cAlphaFields(7), Alphas(7))); ShowContinueError(state, "... A ZoneHVAC:EquipmentConnections object must be specified for this zone."); ErrorsFound = true; } else { @@ -844,14 +835,14 @@ void GetStandAloneERV(EnergyPlusData &state) break; } if (!HStatFound) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "... Did not find zone humidistat"); ShowContinueError(state, "... A ZoneControl:Humidistat object must be specified for this zone."); ErrorsFound = true; } } } else { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError(state, "... Did not find Air Node (Zone with Humidistat)"); ShowContinueError(state, "... A ZoneHVAC:EquipmentConnections object must be specified for this zone."); ErrorsFound = true; @@ -859,9 +850,9 @@ void GetStandAloneERV(EnergyPlusData &state) if (Numbers(5) <= 0.0 && NumNumbers > 4) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("... {} must be greater than 0.", cNumericFields(5))); - ShowContinueError(state, EnergyPlus::format("... {} is reset to 1 and the simulation continues.", cNumericFields(5))); + ShowWarningError(state, std::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("... {} must be greater than 0.", cNumericFields(5))); + ShowContinueError(state, std::format("... {} is reset to 1 and the simulation continues.", cNumericFields(5))); HighRHOARatio = 1.0; @@ -881,9 +872,9 @@ void GetStandAloneERV(EnergyPlusData &state) } } else if (!Util::SameString(Alphas(6), "No") && NumAlphas > 4 && (!lAlphaBlanks(5))) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("... Invalid {} = {}", cAlphaFields(6), Alphas(6))); - ShowContinueError(state, EnergyPlus::format("... {} is assumed to be \"No\" and the simulation continues.", cAlphaFields(6))); + ShowWarningError(state, std::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("... Invalid {} = {}", cAlphaFields(6), Alphas(6))); + ShowContinueError(state, std::format("... {} is assumed to be \"No\" and the simulation continues.", cAlphaFields(6))); } // IF(Util::SameString(Alphas(6),'Yes'))THEN thisOAController.HighRHOAFlowRatio = HighRHOARatio; @@ -902,16 +893,15 @@ void GetStandAloneERV(EnergyPlusData &state) state.dataHVACStandAloneERV->StandAloneERV(WhichERV).DesignSAFanVolFlowRate != DataSizing::AutoSize) { if (state.dataHVACStandAloneERV->StandAloneERV(WhichERV).SupplyAirVolFlow * HighRHOARatio > state.dataHVACStandAloneERV->StandAloneERV(WhichERV).DesignSAFanVolFlowRate) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("{} \"{}\"", CurrentModuleObject, Alphas(1))); ShowContinueError(state, EnergyPlus::format("... A {} was entered as {:.4R}", cNumericFields(5), HighRHOARatio)); ShowContinueError(state, "... This flow ratio results in a Supply Air Volume Flow Rate through the ERV which is greater than the " "Max Volume specified in the supply air fan object."); - ShowContinueError( - state, - EnergyPlus::format("... Associated fan object = {} \"{}\"", - HVAC::fanTypeNames[(int)state.dataHVACStandAloneERV->StandAloneERV(WhichERV).supplyAirFanType], - state.dataHVACStandAloneERV->StandAloneERV(WhichERV).SupplyAirFanName)); + ShowContinueError(state, + std::format("... Associated fan object = {} \"{}\"", + HVAC::fanTypeNames[(int)state.dataHVACStandAloneERV->StandAloneERV(WhichERV).supplyAirFanType], + state.dataHVACStandAloneERV->StandAloneERV(WhichERV).SupplyAirFanName)); ShowContinueError(state, EnergyPlus::format("... Modified value = {:.2R}", state.dataHVACStandAloneERV->StandAloneERV(WhichERV).SupplyAirVolFlow * HighRHOARatio)); @@ -927,16 +917,15 @@ void GetStandAloneERV(EnergyPlusData &state) state.dataHVACStandAloneERV->StandAloneERV(WhichERV).DesignEAFanVolFlowRate != DataSizing::AutoSize) { if (state.dataHVACStandAloneERV->StandAloneERV(WhichERV).ExhaustAirVolFlow * HighRHOARatio > state.dataHVACStandAloneERV->StandAloneERV(WhichERV).DesignEAFanVolFlowRate) { - ShowWarningError(state, EnergyPlus::format("ZoneHVAC:EnergyRecoveryVentilator:Controller \"{}\"", Alphas(1))); + ShowWarningError(state, std::format("ZoneHVAC:EnergyRecoveryVentilator:Controller \"{}\"", Alphas(1))); ShowContinueError(state, EnergyPlus::format("... A {} was entered as {:.4R}", cNumericFields(5), HighRHOARatio)); ShowContinueError(state, "... This flow ratio results in an Exhaust Air Volume Flow Rate through the ERV which is greater than the " "Max Volume specified in the exhaust air fan object."); - ShowContinueError( - state, - EnergyPlus::format("... Associated fan object = {} \"{}\"", - HVAC::fanTypeNames[(int)state.dataHVACStandAloneERV->StandAloneERV(WhichERV).exhaustAirFanType], - state.dataHVACStandAloneERV->StandAloneERV(WhichERV).ExhaustAirFanName)); + ShowContinueError(state, + std::format("... Associated fan object = {} \"{}\"", + HVAC::fanTypeNames[(int)state.dataHVACStandAloneERV->StandAloneERV(WhichERV).exhaustAirFanType], + state.dataHVACStandAloneERV->StandAloneERV(WhichERV).ExhaustAirFanName)); ShowContinueError(state, EnergyPlus::format("... Modified value = {:.2R}", state.dataHVACStandAloneERV->StandAloneERV(WhichERV).ExhaustAirVolFlow * HighRHOARatio)); @@ -1122,9 +1111,9 @@ void InitStandAloneERV(EnergyPlusData &state, continue; } ShowSevereError(state, - EnergyPlus::format("InitStandAloneERV: Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - state.dataHVACStandAloneERV->StandAloneERV(Loop).UnitType, - state.dataHVACStandAloneERV->StandAloneERV(Loop).Name)); + std::format("InitStandAloneERV: Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + state.dataHVACStandAloneERV->StandAloneERV(Loop).UnitType, + state.dataHVACStandAloneERV->StandAloneERV(Loop).Name)); } } @@ -1392,11 +1381,10 @@ void SizeStandAloneERV(EnergyPlusData &state, int const StandAloneERVNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(DesignSAFanVolFlowRateDes - DesignSAFanVolFlowRateUser) / DesignSAFanVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizeStandAloneERV: Potential issue with equipment sizing for ZoneHVAC:EnergyRecoveryVentilator {} {}", - HVAC::fanTypeNames[(int)state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).supplyAirFanType], - state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).SupplyAirFanName)); + ShowMessage(state, + std::format("SizeStandAloneERV: Potential issue with equipment sizing for ZoneHVAC:EnergyRecoveryVentilator {} {}", + HVAC::fanTypeNames[(int)state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).supplyAirFanType], + state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).SupplyAirFanName)); ShowContinueError(state, EnergyPlus::format("User-Specified Supply Fan Maximum Flow Rate of {:.5R} [m3/s]", DesignSAFanVolFlowRateUser)); ShowContinueError(state, @@ -1524,9 +1512,9 @@ void CalcStandAloneERV(EnergyPlusData &state, Real64 TotalSupplyMassFlow = state.dataLoopNodes->Node(SupInletNode).MassFlowRate; if (TotalExhaustMassFlow > TotalSupplyMassFlow && !state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance) { ShowWarningError(state, - EnergyPlus::format("For {} \"{}\" there is unbalanced exhaust air flow.", - state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).UnitType, - state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).Name)); + std::format("For {} \"{}\" there is unbalanced exhaust air flow.", + state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).UnitType, + state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).Name)); ShowContinueError( state, EnergyPlus::format("... The exhaust air mass flow rate = {:.6R}", state.dataLoopNodes->Node(ExhaustInletNode).MassFlowRate)); ShowContinueError( @@ -1600,7 +1588,7 @@ Real64 GetSupplyAirFlowRate(EnergyPlusData &state, } } - ShowSevereError(state, EnergyPlus::format("Could not find ZoneHVAC:EnergyRecoveryVentilator with Controller Name=\"{}\"", ERVCtrlName)); + ShowSevereError(state, std::format("Could not find ZoneHVAC:EnergyRecoveryVentilator with Controller Name=\"{}\"", ERVCtrlName)); ErrorsFound = true; return -1000.0; } diff --git a/src/EnergyPlus/HVACUnitaryBypassVAV.cc b/src/EnergyPlus/HVACUnitaryBypassVAV.cc index fd6ef743ce8..924a59ae783 100644 --- a/src/EnergyPlus/HVACUnitaryBypassVAV.cc +++ b/src/EnergyPlus/HVACUnitaryBypassVAV.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -380,7 +381,7 @@ namespace HVACUnitaryBypassVAV { cbvav.MaxCoolAirVolFlow = Numbers(1); if (cbvav.MaxCoolAirVolFlow <= 0.0 && cbvav.MaxCoolAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7T}", CurrentModuleObject, cNumericFields(1), Numbers(1))); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7f}", CurrentModuleObject, cNumericFields(1), Numbers(1))); ShowContinueError(state, EnergyPlus::format("{} must be greater than zero.", cNumericFields(1))); ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); ErrorsFound = true; @@ -388,7 +389,7 @@ namespace HVACUnitaryBypassVAV { cbvav.MaxHeatAirVolFlow = Numbers(2); if (cbvav.MaxHeatAirVolFlow <= 0.0 && cbvav.MaxHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7T}", CurrentModuleObject, cNumericFields(2), Numbers(2))); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7f}", CurrentModuleObject, cNumericFields(2), Numbers(2))); ShowContinueError(state, EnergyPlus::format("{} must be greater than zero.", cNumericFields(2))); ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); ErrorsFound = true; @@ -396,7 +397,7 @@ namespace HVACUnitaryBypassVAV { cbvav.MaxNoCoolHeatAirVolFlow = Numbers(3); if (cbvav.MaxNoCoolHeatAirVolFlow < 0.0 && cbvav.MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7T}", CurrentModuleObject, cNumericFields(3), Numbers(3))); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7f}", CurrentModuleObject, cNumericFields(3), Numbers(3))); ShowContinueError(state, EnergyPlus::format("{} must be greater than or equal to zero.", cNumericFields(3))); ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); ErrorsFound = true; @@ -404,7 +405,7 @@ namespace HVACUnitaryBypassVAV { cbvav.CoolOutAirVolFlow = Numbers(4); if (cbvav.CoolOutAirVolFlow < 0.0 && cbvav.CoolOutAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7T}", CurrentModuleObject, cNumericFields(4), Numbers(4))); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7f}", CurrentModuleObject, cNumericFields(4), Numbers(4))); ShowContinueError(state, EnergyPlus::format("{} must be greater than or equal to zero.", cNumericFields(4))); ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); ErrorsFound = true; @@ -412,7 +413,7 @@ namespace HVACUnitaryBypassVAV { cbvav.HeatOutAirVolFlow = Numbers(5); if (cbvav.HeatOutAirVolFlow < 0.0 && cbvav.HeatOutAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7T}", CurrentModuleObject, cNumericFields(5), Numbers(5))); + ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7f}", CurrentModuleObject, cNumericFields(5), Numbers(5))); ShowContinueError(state, EnergyPlus::format("{} must be greater than or equal to zero.", cNumericFields(5))); ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); ErrorsFound = true; @@ -420,9 +421,9 @@ namespace HVACUnitaryBypassVAV { cbvav.NoCoolHeatOutAirVolFlow = Numbers(6); if (cbvav.NoCoolHeatOutAirVolFlow < 0.0 && cbvav.NoCoolHeatOutAirVolFlow != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} illegal {} = {:.7T}", CurrentModuleObject, cNumericFields(6), Numbers(6))); - ShowContinueError(state, EnergyPlus::format("{} must be greater than or equal to zero.", cNumericFields(6))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); + ShowSevereError(state, std::format("{} illegal {} = {:.7f}", CurrentModuleObject, cNumericFields(6), Numbers(6))); + ShowContinueError(state, std::format("{} must be greater than or equal to zero.", cNumericFields(6))); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); ErrorsFound = true; } @@ -491,19 +492,17 @@ namespace HVACUnitaryBypassVAV { cbvav.plenumIndex = ZonePlenum::getReturnPlenumIndexFromInletNode(state, cbvav.PlenumMixerInletAirNode); cbvav.mixerIndex = MixerComponent::getZoneMixerIndexFromInletNode(state, cbvav.PlenumMixerInletAirNode); if (cbvav.plenumIndex > 0 && cbvav.mixerIndex > 0) { - ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, cbvav.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal connection for {} = \"{}\".", cAlphaFields(20), Alphas(20))); + ShowSevereError(state, std::format("{}: {}", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, std::format("Illegal connection for {} = \"{}\".", cAlphaFields(20), Alphas(20))); ShowContinueError( - state, - EnergyPlus::format("{} cannot be connected to both an AirloopHVAC:ReturnPlenum and an AirloopHVAC:ZoneMixer.", cAlphaFields(20))); + state, std::format("{} cannot be connected to both an AirloopHVAC:ReturnPlenum and an AirloopHVAC:ZoneMixer.", cAlphaFields(20))); ErrorsFound = true; } else if (cbvav.plenumIndex == 0 && cbvav.mixerIndex == 0 && cbvav.PlenumMixerInletAirNode > 0) { - ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, cbvav.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal connection for {} = \"{}\".", cAlphaFields(20), Alphas(20))); - ShowContinueError( - state, - EnergyPlus::format("{} must be connected to an AirloopHVAC:ReturnPlenum or AirloopHVAC:ZoneMixer. No connection found.", - cAlphaFields(20))); + ShowSevereError(state, std::format("{}: {}", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, std::format("Illegal connection for {} = \"{}\".", cAlphaFields(20), Alphas(20))); + ShowContinueError(state, + std::format("{} must be connected to an AirloopHVAC:ReturnPlenum or AirloopHVAC:ZoneMixer. No connection found.", + cAlphaFields(20))); ErrorsFound = true; } @@ -543,13 +542,13 @@ namespace HVACUnitaryBypassVAV { bool errFlag = false; ValidateComponent(state, cbvav.OAMixType, cbvav.OAMixName, errFlag, CurrentModuleObject); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("specified in {} = \"{}\".", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, std::format("specified in {} = \"{}\".", CurrentModuleObject, cbvav.Name)); ErrorsFound = true; } else { // Get OA Mixer node numbers OANodeNums = MixedAir::GetOAMixerNodeNumbers(state, cbvav.OAMixName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("that was specified in {} = {}", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, std::format("that was specified in {} = {}", CurrentModuleObject, cbvav.Name)); ShowContinueError(state, "..OutdoorAir:Mixer is required. Enter an OutdoorAir:Mixer object with this name."); ErrorsFound = true; } else { @@ -561,25 +560,25 @@ namespace HVACUnitaryBypassVAV { } if (cbvav.MixerInletAirNode != OANodeNums(3)) { - ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, cbvav.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(5), MixerInletNodeName)); - ShowContinueError(state, - EnergyPlus::format("{} must be the same as the return air stream node specified in the OutdoorAir:Mixer object.", - cAlphaFields(5))); + ShowSevereError(state, std::format("{}: {}", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, std::format("Illegal {} = {}.", cAlphaFields(5), MixerInletNodeName)); + ShowContinueError( + state, + std::format("{} must be the same as the return air stream node specified in the OutdoorAir:Mixer object.", cAlphaFields(5))); ErrorsFound = true; } if (cbvav.MixerInletAirNode == cbvav.AirInNode) { - ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, cbvav.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(5), MixerInletNodeName)); - ShowContinueError(state, EnergyPlus::format("{} must be different than the {}.", cAlphaFields(5), cAlphaFields(4))); + ShowSevereError(state, std::format("{}: {}", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, std::format("Illegal {} = {}.", cAlphaFields(5), MixerInletNodeName)); + ShowContinueError(state, std::format("{} must be different than the {}.", cAlphaFields(5), cAlphaFields(4))); ErrorsFound = true; } if (cbvav.SplitterOutletAirNode == cbvav.AirOutNode) { - ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, cbvav.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(6), SplitterOutletNodeName)); - ShowContinueError(state, EnergyPlus::format("{} must be different than the {}.", cAlphaFields(6), cAlphaFields(7))); + ShowSevereError(state, std::format("{}: {}", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, std::format("Illegal {} = {}.", cAlphaFields(6), SplitterOutletNodeName)); + ShowContinueError(state, std::format("{} must be different than the {}.", cAlphaFields(6), cAlphaFields(7))); ErrorsFound = true; } @@ -607,16 +606,16 @@ namespace HVACUnitaryBypassVAV { if (cbvav.fanPlace == HVAC::FanPlace::DrawThru) { if (cbvav.SplitterOutletAirNode != fanOutletNode) { - ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, cbvav.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(6), SplitterOutletNodeName)); + ShowSevereError(state, std::format("{}: {}", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, std::format("Illegal {} = {}.", cAlphaFields(6), SplitterOutletNodeName)); ShowContinueError( state, - EnergyPlus::format("{} must be the same as the fan outlet node specified in {} = {}: {} when draw through {} is selected.", - cAlphaFields(6), - cAlphaFields(10), - Alphas(10), - cbvav.FanName, - cAlphaFields(11))); + std::format("{} must be the same as the fan outlet node specified in {} = {}: {} when draw through {} is selected.", + cAlphaFields(6), + cAlphaFields(10), + Alphas(10), + cbvav.FanName, + cAlphaFields(11))); ErrorsFound = true; } } @@ -624,28 +623,26 @@ namespace HVACUnitaryBypassVAV { if (cbvav.FanVolFlow != DataSizing::AutoSize) { if (cbvav.FanVolFlow < cbvav.MaxCoolAirVolFlow && cbvav.MaxCoolAirVolFlow != DataSizing::AutoSize) { ShowWarningError(state, - EnergyPlus::format("{} - air flow rate = {:.7T} in {} = {} is less than the ", - CurrentModuleObject, - cbvav.FanVolFlow, - cAlphaFields(11), - cbvav.FanName) + + std::format("{} - air flow rate = {:.7f} in {} = {} is less than the ", + CurrentModuleObject, + cbvav.FanVolFlow, + cAlphaFields(11), + cbvav.FanName) + cNumericFields(1)); - ShowContinueError(state, - EnergyPlus::format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(1))); - ShowContinueError(state, EnergyPlus::format(" Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, std::format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(1))); + ShowContinueError(state, std::format(" Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); cbvav.MaxCoolAirVolFlow = cbvav.FanVolFlow; } if (cbvav.FanVolFlow < cbvav.MaxHeatAirVolFlow && cbvav.MaxHeatAirVolFlow != DataSizing::AutoSize) { ShowWarningError(state, - EnergyPlus::format("{} - air flow rate = {:.7T} in {} = {} is less than the ", - CurrentModuleObject, - cbvav.FanVolFlow, - cAlphaFields(11), - cbvav.FanName) + + std::format("{} - air flow rate = {:.7f} in {} = {} is less than the ", + CurrentModuleObject, + cbvav.FanVolFlow, + cAlphaFields(11), + cbvav.FanName) + cNumericFields(2)); - ShowContinueError(state, - EnergyPlus::format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(2))); - ShowContinueError(state, EnergyPlus::format(" Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, std::format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(2))); + ShowContinueError(state, std::format(" Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); cbvav.MaxHeatAirVolFlow = cbvav.FanVolFlow; } } @@ -653,20 +650,18 @@ namespace HVACUnitaryBypassVAV { // only check that OA flow in cooling is >= SA flow in cooling when they are not autosized if (cbvav.CoolOutAirVolFlow > cbvav.MaxCoolAirVolFlow && cbvav.CoolOutAirVolFlow != DataSizing::AutoSize && cbvav.MaxCoolAirVolFlow != DataSizing::AutoSize) { - ShowWarningError(state, - EnergyPlus::format("{}: {} cannot be greater than {}", CurrentModuleObject, cNumericFields(4), cNumericFields(1))); - ShowContinueError(state, EnergyPlus::format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(4))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); + ShowWarningError(state, std::format("{}: {} cannot be greater than {}", CurrentModuleObject, cNumericFields(4), cNumericFields(1))); + ShowContinueError(state, std::format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(4))); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); cbvav.CoolOutAirVolFlow = cbvav.FanVolFlow; } // only check that SA flow in heating is >= OA flow in heating when they are not autosized if (cbvav.HeatOutAirVolFlow > cbvav.MaxHeatAirVolFlow && cbvav.HeatOutAirVolFlow != DataSizing::AutoSize && cbvav.MaxHeatAirVolFlow != DataSizing::AutoSize) { - ShowWarningError(state, - EnergyPlus::format("{}: {} cannot be greater than {}", CurrentModuleObject, cNumericFields(5), cNumericFields(2))); - ShowContinueError(state, EnergyPlus::format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(5))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); + ShowWarningError(state, std::format("{}: {} cannot be greater than {}", CurrentModuleObject, cNumericFields(5), cNumericFields(2))); + ShowContinueError(state, std::format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(5))); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); cbvav.HeatOutAirVolFlow = cbvav.FanVolFlow; } @@ -678,7 +673,7 @@ namespace HVACUnitaryBypassVAV { DXCoilErrFlag = false; DXCoils::GetDXCoilIndex(state, cbvav.DXCoolCoilName, cbvav.DXCoolCoilIndexNum, DXCoilErrFlag, thisCoolCoilType); if (DXCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); ErrorsFound = true; } else { cbvav.DXCoilInletNode = state.dataDXCoils->DXCoil(cbvav.DXCoolCoilIndexNum).AirInNode; @@ -690,7 +685,7 @@ namespace HVACUnitaryBypassVAV { cbvav.DXCoolCoilIndexNum = VariableSpeedCoils::GetCoilIndexVariableSpeed(state, thisCoolCoilType, cbvav.DXCoolCoilName, DXCoilErrFlag); if (DXCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); ErrorsFound = true; } else { cbvav.DXCoilInletNode = state.dataVariableSpeedCoils->VarSpeedCoil(cbvav.DXCoolCoilIndexNum).AirInletNodeNum; @@ -702,9 +697,8 @@ namespace HVACUnitaryBypassVAV { HVAC::CoilType ActualCoolCoilType = HVACHXAssistedCoolingCoil::GetCoilObjectTypeNum(state, thisCoolCoilType, cbvav.DXCoolCoilName, DXErrorsFound); if (DXErrorsFound) { - ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, cbvav.Name)); - ShowContinueError(state, - EnergyPlus::format("CoilSystem:Cooling:DX:HeatExchangerAssisted \"{}\" not found.", cbvav.DXCoolCoilName)); + ShowSevereError(state, std::format("{}: {}", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, std::format("CoilSystem:Cooling:DX:HeatExchangerAssisted \"{}\" not found.", cbvav.DXCoolCoilName)); ErrorsFound = true; } else { if (ActualCoolCoilType == HVAC::CoilType::CoolingDXSingleSpeed) { @@ -715,7 +709,7 @@ namespace HVACUnitaryBypassVAV { DXCoilErrFlag, "Coil:Cooling:DX:SingleSpeed"); if (DXCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); ErrorsFound = true; } else { // the "coil" nodes are actually the parent nodes of the wrapped HX @@ -733,7 +727,7 @@ namespace HVACUnitaryBypassVAV { HVACHXAssistedCoolingCoil::GetHXDXCoilName(state, thisCoolCoilType, cbvav.DXCoolCoilName, DXCoilErrFlag), DXCoilErrFlag); if (DXCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); ErrorsFound = true; } else { cbvav.DXCoilInletNode = state.dataVariableSpeedCoils->VarSpeedCoil(cbvav.DXCoolCoilIndexNum).AirInletNodeNum; @@ -743,7 +737,7 @@ namespace HVACUnitaryBypassVAV { } else if (ActualCoolCoilType == HVAC::CoilType::CoolingDX) { cbvav.DXCoolCoilIndexNum = CoilCoolingDX::factory(state, cbvav.DXCoolCoilName); if (cbvav.DXCoolCoilIndexNum == -1) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); ErrorsFound = true; } else { auto const &newCoil = state.dataCoilCoolingDX->coilCoolingDXs[cbvav.DXCoolCoilIndexNum]; @@ -757,7 +751,7 @@ namespace HVACUnitaryBypassVAV { DXCoilErrFlag = false; DXCoils::GetDXCoilIndex(state, cbvav.DXCoolCoilName, cbvav.DXCoolCoilIndexNum, DXCoilErrFlag, thisCoolCoilType); if (DXCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); ErrorsFound = true; } else { cbvav.DXCoilInletNode = state.dataDXCoils->DXCoil(cbvav.DXCoolCoilIndexNum).AirInNode; @@ -786,12 +780,12 @@ namespace HVACUnitaryBypassVAV { } else { if (!lAlphaBlanks(13)) { - ShowWarningError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, cbvav.Name)); + ShowWarningError(state, std::format("{}: {}", CurrentModuleObject, cbvav.Name)); ShowContinueError( state, - EnergyPlus::format("{} = {} not found. Supply air fan operating mode set to constant operation and simulation continues.", - cAlphaFields(13), - Alphas(13))); + std::format("{} = {} not found. Supply air fan operating mode set to constant operation and simulation continues.", + cAlphaFields(13), + Alphas(13))); } cbvav.fanOp = HVAC::FanOp::Continuous; if (cbvav.MaxNoCoolHeatAirVolFlow == 0.0) { @@ -806,15 +800,14 @@ namespace HVACUnitaryBypassVAV { if (cbvav.FanVolFlow < cbvav.MaxNoCoolHeatAirVolFlow && cbvav.MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize && cbvav.MaxNoCoolHeatAirVolFlow != 0.0) { ShowWarningError(state, - EnergyPlus::format("{} - air flow rate = {:.7T} in {} = {} is less than ", - CurrentModuleObject, - cbvav.FanVolFlow, - cAlphaFields(11), - cbvav.FanName) + + std::format("{} - air flow rate = {:.7f} in {} = {} is less than ", + CurrentModuleObject, + cbvav.FanVolFlow, + cAlphaFields(11), + cbvav.FanName) + cNumericFields(3)); - ShowContinueError(state, - EnergyPlus::format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(3))); - ShowContinueError(state, EnergyPlus::format(" Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, std::format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(3))); + ShowContinueError(state, std::format(" Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); cbvav.MaxNoCoolHeatAirVolFlow = cbvav.FanVolFlow; } } @@ -822,10 +815,9 @@ namespace HVACUnitaryBypassVAV { // that MaxNoCoolHeatAirVolFlow is /= 0 (trigger to use compressor ON flow, see AirFlowControl variable initialization above) if (cbvav.NoCoolHeatOutAirVolFlow > cbvav.MaxNoCoolHeatAirVolFlow && cbvav.NoCoolHeatOutAirVolFlow != DataSizing::AutoSize && cbvav.MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize && cbvav.MaxNoCoolHeatAirVolFlow != 0.0) { - ShowWarningError(state, - EnergyPlus::format("{}: {} cannot be greater than {}", CurrentModuleObject, cNumericFields(6), cNumericFields(3))); - ShowContinueError(state, EnergyPlus::format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(6))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); + ShowWarningError(state, std::format("{}: {} cannot be greater than {}", CurrentModuleObject, cNumericFields(6), cNumericFields(3))); + ShowContinueError(state, std::format(" {} is reset to the fan flow rate and the simulation continues.", cNumericFields(6))); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); cbvav.NoCoolHeatOutAirVolFlow = cbvav.FanVolFlow; } @@ -839,7 +831,7 @@ namespace HVACUnitaryBypassVAV { DXCoils::GetDXCoilIndex( state, cbvav.HeatCoilName, cbvav.DXHeatCoilIndexNum, DXCoilErrFlag, HVAC::coilTypeNamesUC[static_cast(cbvav.heatCoilType)]); if (DXCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); ErrorsFound = true; } else { cbvav.MinOATCompressor = state.dataDXCoils->DXCoil(cbvav.DXHeatCoilIndexNum).MinOATCompressor; @@ -850,7 +842,7 @@ namespace HVACUnitaryBypassVAV { cbvav.DXHeatCoilIndexNum = VariableSpeedCoils::GetCoilIndexVariableSpeed( state, HVAC::coilTypeNames[(int)cbvav.heatCoilType], cbvav.HeatCoilName, DXCoilErrFlag); if (DXCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); ErrorsFound = true; } else { cbvav.MinOATCompressor = state.dataVariableSpeedCoils->VarSpeedCoil(cbvav.DXHeatCoilIndexNum).MinOATCompressor; @@ -860,7 +852,7 @@ namespace HVACUnitaryBypassVAV { } else if (cbvav.heatCoilType == HVAC::CoilType::HeatingGasOrOtherFuel || cbvav.heatCoilType == HVAC::CoilType::HeatingElectric) { HeatingCoils::GetCoilIndex(state, cbvav.HeatCoilName, cbvav.DXHeatCoilIndexNum, DXCoilErrFlag); if (DXCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); ErrorsFound = true; } else { cbvav.MinOATCompressor = -999.9; @@ -870,7 +862,7 @@ namespace HVACUnitaryBypassVAV { } else if (cbvav.heatCoilType == HVAC::CoilType::HeatingWater) { cbvav.DXHeatCoilIndexNum = WaterCoils::GetWaterCoilIndex(state, "COIL:HEATING:WATER", cbvav.HeatCoilName, DXCoilErrFlag); if (DXCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); ErrorsFound = true; } else { cbvav.CoilControlNode = state.dataWaterCoils->WaterCoil(cbvav.DXHeatCoilIndexNum).WaterInletNodeNum; @@ -881,7 +873,7 @@ namespace HVACUnitaryBypassVAV { } else if (cbvav.heatCoilType == HVAC::CoilType::HeatingSteam) { cbvav.HeatCoilIndex = SteamCoils::GetSteamCoilIndex(state, "COIL:HEATING:STEAM", cbvav.HeatCoilName, DXCoilErrFlag); if (DXCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); + ShowContinueError(state, std::format("...occurs in {} \"{}\"", cbvav.UnitType, cbvav.Name)); ErrorsFound = true; } else { cbvav.HeatingCoilInletNode = state.dataSteamCoils->SteamCoil(cbvav.HeatCoilIndex).AirInletNodeNum; @@ -897,19 +889,18 @@ namespace HVACUnitaryBypassVAV { } if (cbvav.DXCoilOutletNode != cbvav.HeatingCoilInletNode) { - ShowSevereError(state, - EnergyPlus::format("{} illegal coil placement. Cooling coil must be upstream of heating coil.", CurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); + ShowSevereError(state, std::format("{} illegal coil placement. Cooling coil must be upstream of heating coil.", CurrentModuleObject)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); ErrorsFound = true; } if (cbvav.fanPlace == HVAC::FanPlace::BlowThru) { if (cbvav.SplitterOutletAirNode != cbvav.HeatingCoilOutletNode) { - ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, cbvav.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(6), SplitterOutletNodeName)); + ShowSevereError(state, std::format("{}: {}", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, std::format("Illegal {} = {}.", cAlphaFields(6), SplitterOutletNodeName)); ShowContinueError( state, - EnergyPlus::format( + std::format( "{} must be the same as the outlet node specified in the heating coil object = {}: {} when blow through {} is selected.", cAlphaFields(6), HVAC::coilTypeNamesUC[static_cast(cbvav.heatCoilType)], @@ -918,29 +909,29 @@ namespace HVACUnitaryBypassVAV { ErrorsFound = true; } if (cbvav.MixerMixedAirNode != cbvav.FanInletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, cbvav.Name)); + ShowSevereError(state, std::format("{}: {}", CurrentModuleObject, cbvav.Name)); ShowContinueError( state, - EnergyPlus::format("Illegal {}. The fan inlet node name must be the same as the mixed air node specified in the {} = {} " - "when blow through {} is selected.", - cAlphaFields(11), - cAlphaFields(9), - cbvav.OAMixName, - cAlphaFields(12))); + std::format("Illegal {}. The fan inlet node name must be the same as the mixed air node specified in the {} = {} " + "when blow through {} is selected.", + cAlphaFields(11), + cAlphaFields(9), + cbvav.OAMixName, + cAlphaFields(12))); ErrorsFound = true; } } if (cbvav.fanPlace == HVAC::FanPlace::DrawThru) { if (cbvav.MixerMixedAirNode != cbvav.DXCoilInletNode) { - ShowSevereError(state, EnergyPlus::format("{}: {}", CurrentModuleObject, cbvav.Name)); + ShowSevereError(state, std::format("{}: {}", CurrentModuleObject, cbvav.Name)); ShowContinueError( state, - EnergyPlus::format("Illegal cooling coil placement. The cooling coil inlet node name must be the same as the mixed air " - "node specified in the {} = {} when draw through {} is selected.", - cAlphaFields(9), - cbvav.OAMixName, - cAlphaFields(12))); + std::format("Illegal cooling coil placement. The cooling coil inlet node name must be the same as the mixed air " + "node specified in the {} = {} when draw through {} is selected.", + cAlphaFields(9), + cbvav.OAMixName, + cAlphaFields(12))); ErrorsFound = true; } } @@ -954,8 +945,8 @@ namespace HVACUnitaryBypassVAV { } else if (Util::SameString(Alphas(18), "LoadPriority")) { cbvav.PriorityControl = PriorityCtrlMode::LoadPriority; } else { - ShowSevereError(state, EnergyPlus::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(18), Alphas(18))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); + ShowSevereError(state, std::format("{} illegal {} = {}", CurrentModuleObject, cAlphaFields(18), Alphas(18))); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); ShowContinueError(state, "Valid choices are CoolingPriority, HeatingPriority, ZonePriority or LoadPriority."); ErrorsFound = true; } @@ -973,10 +964,9 @@ namespace HVACUnitaryBypassVAV { } if (cbvav.MinLATCooling > cbvav.MaxLATHeating) { - ShowWarningError(state, EnergyPlus::format("{}: illegal leaving air temperature specified.", CurrentModuleObject)); - ShowContinueError(state, - EnergyPlus::format("Resetting {} equal to {} and the simulation continues.", cNumericFields(7), cNumericFields(8))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); + ShowWarningError(state, std::format("{}: illegal leaving air temperature specified.", CurrentModuleObject)); + ShowContinueError(state, std::format("Resetting {} equal to {} and the simulation continues.", cNumericFields(7), cNumericFields(8))); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); cbvav.MinLATCooling = cbvav.MaxLATHeating; } @@ -989,27 +979,25 @@ namespace HVACUnitaryBypassVAV { if (cbvav.coolCoilType == HVAC::CoilType::CoolingDXTwoStageWHumControl) { cbvav.DehumidControlType = DehumidControl::Multimode; } else { - ShowWarningError(state, EnergyPlus::format("Invalid {} = {}", cAlphaFields(19), Alphas(19))); - ShowContinueError(state, EnergyPlus::format("In {} \"{}\".", CurrentModuleObject, cbvav.Name)); - ShowContinueError(state, - EnergyPlus::format("Valid only with {} = Coil:Cooling:DX:TwoStageWithHumidityControlMode.", cAlphaFields(14))); - ShowContinueError(state, EnergyPlus::format("Setting {} to \"None\" and the simulation continues.", cAlphaFields(19))); + ShowWarningError(state, std::format("Invalid {} = {}", cAlphaFields(19), Alphas(19))); + ShowContinueError(state, std::format("In {} \"{}\".", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, std::format("Valid only with {} = Coil:Cooling:DX:TwoStageWithHumidityControlMode.", cAlphaFields(14))); + ShowContinueError(state, std::format("Setting {} to \"None\" and the simulation continues.", cAlphaFields(19))); cbvav.DehumidControlType = DehumidControl::None; } } else if (Util::SameString(Alphas(19), "CoolReheat")) { if (cbvav.coolCoilType == HVAC::CoilType::CoolingDXTwoStageWHumControl) { cbvav.DehumidControlType = DehumidControl::CoolReheat; } else { - ShowWarningError(state, EnergyPlus::format("Invalid {} = {}", cAlphaFields(19), Alphas(19))); - ShowContinueError(state, EnergyPlus::format("In {} \"{}\".", CurrentModuleObject, cbvav.Name)); - ShowContinueError(state, - EnergyPlus::format("Valid only with {} = Coil:Cooling:DX:TwoStageWithHumidityControlMode.", cAlphaFields(14))); - ShowContinueError(state, EnergyPlus::format("Setting {} to \"None\" and the simulation continues.", cAlphaFields(19))); + ShowWarningError(state, std::format("Invalid {} = {}", cAlphaFields(19), Alphas(19))); + ShowContinueError(state, std::format("In {} \"{}\".", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, std::format("Valid only with {} = Coil:Cooling:DX:TwoStageWithHumidityControlMode.", cAlphaFields(14))); + ShowContinueError(state, std::format("Setting {} to \"None\" and the simulation continues.", cAlphaFields(19))); cbvav.DehumidControlType = DehumidControl::None; } } else { - ShowSevereError(state, EnergyPlus::format("Invalid {} ={}", cAlphaFields(19), Alphas(19))); - ShowContinueError(state, EnergyPlus::format("In {} \"{}\".", CurrentModuleObject, cbvav.Name)); + ShowSevereError(state, std::format("Invalid {} ={}", cAlphaFields(19), Alphas(19))); + ShowContinueError(state, std::format("In {} \"{}\".", CurrentModuleObject, cbvav.Name)); } if (NumNumbers > 8) { @@ -1024,11 +1012,10 @@ namespace HVACUnitaryBypassVAV { if (cbvav.fanType != fanType2) { ShowWarningError( state, - EnergyPlus::format( - "{} has {} = {} which is inconsistent with the fan object.", CurrentModuleObject, cAlphaFields(10), Alphas(10))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); - ShowContinueError( - state, EnergyPlus::format(" The fan object ({}) is actually a valid fan type and the simulation continues.", cbvav.FanName)); + std::format("{} has {} = {} which is inconsistent with the fan object.", CurrentModuleObject, cAlphaFields(10), Alphas(10))); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, + std::format(" The fan object ({}) is actually a valid fan type and the simulation continues.", cbvav.FanName)); ShowContinueError(state, " Node connections errors may result due to the inconsistent fan type."); } } @@ -1126,11 +1113,10 @@ namespace HVACUnitaryBypassVAV { FoundTstatZone = true; } if (!FoundTstatZone) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, cbvav.Name)); - ShowContinueError( - state, - EnergyPlus::format("Thermostat not found in zone = {} and the simulation continues.", - state.dataZoneEquip->ZoneEquipConfig(cbvav.ControlledZoneNum(AirLoopZoneNum)).ZoneName)); + ShowWarningError(state, std::format("{} \"{}\"", CurrentModuleObject, cbvav.Name)); + ShowContinueError(state, + std::format("Thermostat not found in zone = {} and the simulation continues.", + state.dataZoneEquip->ZoneEquipConfig(cbvav.ControlledZoneNum(AirLoopZoneNum)).ZoneName)); ShowContinueError(state, "This zone will not be controlled to a temperature setpoint."); } int zoneNum = cbvav.ControlledZoneNum(AirLoopZoneNum); @@ -1147,7 +1133,7 @@ namespace HVACUnitaryBypassVAV { if (cbvav.ZoneSequenceCoolingNum(AirLoopZoneNum) == 0 || cbvav.ZoneSequenceHeatingNum(AirLoopZoneNum) == 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass, \"{}\": Airloop air terminal in the zone equipment list for " "zone = {} not found or is not allowed Zone Equipment Cooling or Heating Sequence = 0.", cbvav.Name, @@ -1165,7 +1151,7 @@ namespace HVACUnitaryBypassVAV { } // CBVAVNum = 1,NumCBVAV if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("GetCBVAV: Errors found in getting {} input.", CurrentModuleObject)); + ShowFatalError(state, std::format("GetCBVAV: Errors found in getting {} input.", CurrentModuleObject)); } for (int CBVAVNum = 1; CBVAVNum <= NumCBVAV; ++CBVAVNum) { @@ -1406,7 +1392,7 @@ namespace HVACUnitaryBypassVAV { } if (ErrorsFound) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", "AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass", cBVAV.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", "AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass", cBVAV.Name)); } // fill outlet node for heating coil cBVAV.CoilOutletNode = DataPlant::CompData::getPlantComponent(state, cBVAV.plantLoc).NodeNumOut; @@ -1471,8 +1457,7 @@ namespace HVACUnitaryBypassVAV { ErrorFlag = false; Real64 CoilMaxVolFlowRate = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", cBVAV.HeatCoilName, ErrorFlag); if (ErrorFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", "AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass", cBVAV.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", "AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass", cBVAV.Name)); } if (CoilMaxVolFlowRate != DataSizing::AutoSize) { Real64 FluidDensity = cBVAV.plantLoc.loop->glycol->getDensity(state, Constant::HWInitConvTemp, RoutineName); @@ -1489,8 +1474,7 @@ namespace HVACUnitaryBypassVAV { ErrorFlag = false; Real64 CoilMaxVolFlowRate = SteamCoils::GetCoilMaxSteamFlowRate(state, cBVAV.HeatCoilIndex, ErrorFlag); if (ErrorFlag) { - ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", "AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass", cBVAV.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", "AirLoopHVAC:UnitaryHeatCool:VAVChangeoverBypass", cBVAV.Name)); } if (CoilMaxVolFlowRate != DataSizing::AutoSize) { Real64 FluidDensity = @@ -1518,88 +1502,88 @@ namespace HVACUnitaryBypassVAV { if (cBVAV.FanVolFlow < cBVAV.MaxCoolAirVolFlow) { ShowWarningError( state, - EnergyPlus::format("{} - air flow rate = {:.7T} in fan object {} is less than the maximum CBVAV system air flow rate when " - "cooling is required ({:.7T}).", - CurrentModuleObject, - cBVAV.FanVolFlow, - cBVAV.FanName, - cBVAV.MaxCoolAirVolFlow)); + std::format("{} - air flow rate = {:.7f} in fan object {} is less than the maximum CBVAV system air flow rate when " + "cooling is required ({:.7f}).", + CurrentModuleObject, + cBVAV.FanVolFlow, + cBVAV.FanName, + cBVAV.MaxCoolAirVolFlow)); ShowContinueError( state, " The CBVAV system flow rate when cooling is required is reset to the fan flow rate and the simulation continues."); - ShowContinueError(state, EnergyPlus::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); + ShowContinueError(state, std::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); cBVAV.MaxCoolAirVolFlow = cBVAV.FanVolFlow; } if (cBVAV.FanVolFlow < cBVAV.MaxHeatAirVolFlow) { ShowWarningError( state, - EnergyPlus::format("{} - air flow rate = {:.7T} in fan object {} is less than the maximum CBVAV system air flow rate when " - "heating is required ({:.7T}).", - CurrentModuleObject, - cBVAV.FanVolFlow, - cBVAV.FanName, - cBVAV.MaxHeatAirVolFlow)); + std::format("{} - air flow rate = {:.7f} in fan object {} is less than the maximum CBVAV system air flow rate when " + "heating is required ({:.7f}).", + CurrentModuleObject, + cBVAV.FanVolFlow, + cBVAV.FanName, + cBVAV.MaxHeatAirVolFlow)); ShowContinueError( state, " The CBVAV system flow rate when heating is required is reset to the fan flow rate and the simulation continues."); - ShowContinueError(state, EnergyPlus::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); + ShowContinueError(state, std::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); cBVAV.MaxHeatAirVolFlow = cBVAV.FanVolFlow; } if (cBVAV.FanVolFlow < cBVAV.MaxNoCoolHeatAirVolFlow && cBVAV.MaxNoCoolHeatAirVolFlow != 0.0) { ShowWarningError( state, - EnergyPlus::format("{} - air flow rate = {:.7T} in fan object {} is less than the maximum CBVAV system air flow rate when " - "no heating or cooling is needed ({:.7T}).", - CurrentModuleObject, - cBVAV.FanVolFlow, - cBVAV.FanName, - cBVAV.MaxNoCoolHeatAirVolFlow)); + std::format("{} - air flow rate = {:.7f} in fan object {} is less than the maximum CBVAV system air flow rate when " + "no heating or cooling is needed ({:.7f}).", + CurrentModuleObject, + cBVAV.FanVolFlow, + cBVAV.FanName, + cBVAV.MaxNoCoolHeatAirVolFlow)); ShowContinueError(state, " The CBVAV system flow rate when no heating or cooling is needed is reset to the fan flow rate and the " "simulation continues."); - ShowContinueError(state, EnergyPlus::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); + ShowContinueError(state, std::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); cBVAV.MaxNoCoolHeatAirVolFlow = cBVAV.FanVolFlow; } // Check fan versus outdoor air flow rates if (cBVAV.FanVolFlow < cBVAV.CoolOutAirVolFlow) { ShowWarningError( state, - EnergyPlus::format("{} - air flow rate = {:.7T} in fan object {} is less than the maximum CBVAV outdoor air flow rate when " - "cooling is required ({:.7T}).", - CurrentModuleObject, - cBVAV.FanVolFlow, - cBVAV.FanName, - cBVAV.CoolOutAirVolFlow)); + std::format("{} - air flow rate = {:.7f} in fan object {} is less than the maximum CBVAV outdoor air flow rate when " + "cooling is required ({:.7f}).", + CurrentModuleObject, + cBVAV.FanVolFlow, + cBVAV.FanName, + cBVAV.CoolOutAirVolFlow)); ShowContinueError( state, " The CBVAV outdoor flow rate when cooling is required is reset to the fan flow rate and the simulation continues."); - ShowContinueError(state, EnergyPlus::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); + ShowContinueError(state, std::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); cBVAV.CoolOutAirVolFlow = cBVAV.FanVolFlow; } if (cBVAV.FanVolFlow < cBVAV.HeatOutAirVolFlow) { ShowWarningError( state, - EnergyPlus::format("{} - air flow rate = {:.7T} in fan object {} is less than the maximum CBVAV outdoor air flow rate when " - "heating is required ({:.7T}).", - CurrentModuleObject, - cBVAV.FanVolFlow, - cBVAV.FanName, - cBVAV.HeatOutAirVolFlow)); + std::format("{} - air flow rate = {:.7f} in fan object {} is less than the maximum CBVAV outdoor air flow rate when " + "heating is required ({:.7f}).", + CurrentModuleObject, + cBVAV.FanVolFlow, + cBVAV.FanName, + cBVAV.HeatOutAirVolFlow)); ShowContinueError( state, " The CBVAV outdoor flow rate when heating is required is reset to the fan flow rate and the simulation continues."); - ShowContinueError(state, EnergyPlus::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); + ShowContinueError(state, std::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); cBVAV.HeatOutAirVolFlow = cBVAV.FanVolFlow; } if (cBVAV.FanVolFlow < cBVAV.NoCoolHeatOutAirVolFlow) { ShowWarningError( state, - EnergyPlus::format("{} - air flow rate = {:.7T} in fan object {} is less than the maximum CBVAV outdoor air flow rate when " - "no heating or cooling is needed ({:.7T}).", - CurrentModuleObject, - cBVAV.FanVolFlow, - cBVAV.FanName, - cBVAV.NoCoolHeatOutAirVolFlow)); + std::format("{} - air flow rate = {:.7f} in fan object {} is less than the maximum CBVAV outdoor air flow rate when " + "no heating or cooling is needed ({:.7f}).", + CurrentModuleObject, + cBVAV.FanVolFlow, + cBVAV.FanName, + cBVAV.NoCoolHeatOutAirVolFlow)); ShowContinueError(state, " The CBVAV outdoor flow rate when no heating or cooling is needed is reset to the fan flow rate and the " "simulation continues."); - ShowContinueError(state, EnergyPlus::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); + ShowContinueError(state, std::format(" Occurs in Changeover-bypass VAV system = {}", cBVAV.Name)); cBVAV.NoCoolHeatOutAirVolFlow = cBVAV.FanVolFlow; } int MixerOutsideAirNode = cBVAV.MixerOutsideAirNode; @@ -1702,7 +1686,7 @@ namespace HVACUnitaryBypassVAV { if (cBVAV.DehumidControlType != DehumidControl::None) { if (state.dataLoopNodes->Node(OutNode).HumRatMax == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowWarningError(state, EnergyPlus::format("Unitary System:VAV:ChangeOverBypass = {}", cBVAV.Name)); + ShowWarningError(state, std::format("Unitary System:VAV:ChangeOverBypass = {}", cBVAV.Name)); ShowContinueError(state, "Use SetpointManager:SingleZone:Humidity:Maximum to place a humidity setpoint at the air outlet node of " "the unitary system."); @@ -1715,7 +1699,7 @@ namespace HVACUnitaryBypassVAV { state.dataLoopNodes->NodeSetpointCheck(OutNode).needsSetpointChecking = false; if (EMSSetPointCheck) { // There is no plugin anyways, so we now we have a bad condition. - ShowWarningError(state, EnergyPlus::format("Unitary System:VAV:ChangeOverBypass = {}", cBVAV.Name)); + ShowWarningError(state, std::format("Unitary System:VAV:ChangeOverBypass = {}", cBVAV.Name)); ShowContinueError(state, "Use SetpointManager:SingleZone:Humidity:Maximum to place a humidity setpoint at the air outlet node " "of the unitary system."); @@ -1868,7 +1852,7 @@ namespace HVACUnitaryBypassVAV { cBVAV.MaxCoolAirVolFlow = state.dataSize->FinalSysSizing(curSysNum).DesMainVolFlow; if (cBVAV.FanVolFlow < cBVAV.MaxCoolAirVolFlow && cBVAV.FanVolFlow != DataSizing::AutoSize) { cBVAV.MaxCoolAirVolFlow = cBVAV.FanVolFlow; - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", cBVAV.UnitType, cBVAV.Name)); + ShowWarningError(state, std::format("{} \"{}\"", cBVAV.UnitType, cBVAV.Name)); ShowContinueError(state, "The CBVAV system supply air fan air flow rate is less than the autosized value for the maximum air flow rate " "in cooling mode. Consider autosizing the fan for this simulation."); @@ -1890,7 +1874,7 @@ namespace HVACUnitaryBypassVAV { cBVAV.MaxHeatAirVolFlow = state.dataSize->FinalSysSizing(curSysNum).DesMainVolFlow; if (cBVAV.FanVolFlow < cBVAV.MaxHeatAirVolFlow && cBVAV.FanVolFlow != DataSizing::AutoSize) { cBVAV.MaxHeatAirVolFlow = cBVAV.FanVolFlow; - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", cBVAV.UnitType, cBVAV.Name)); + ShowWarningError(state, std::format("{} \"{}\"", cBVAV.UnitType, cBVAV.Name)); ShowContinueError(state, "The CBVAV system supply air fan air flow rate is less than the autosized value for the maximum air flow rate " "in heating mode. Consider autosizing the fan for this simulation."); @@ -1912,7 +1896,7 @@ namespace HVACUnitaryBypassVAV { cBVAV.MaxNoCoolHeatAirVolFlow = state.dataSize->FinalSysSizing(curSysNum).DesMainVolFlow; if (cBVAV.FanVolFlow < cBVAV.MaxNoCoolHeatAirVolFlow && cBVAV.FanVolFlow != DataSizing::AutoSize) { cBVAV.MaxNoCoolHeatAirVolFlow = cBVAV.FanVolFlow; - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", cBVAV.UnitType, cBVAV.Name)); + ShowWarningError(state, std::format("{} \"{}\"", cBVAV.UnitType, cBVAV.Name)); ShowContinueError(state, "The CBVAV system supply air fan air flow rate is less than the autosized value for the maximum air flow rate " "when no heating or cooling is needed. Consider autosizing the fan for this simulation."); @@ -1937,7 +1921,7 @@ namespace HVACUnitaryBypassVAV { cBVAV.CoolOutAirVolFlow = state.dataSize->FinalSysSizing(curSysNum).DesOutAirVolFlow; if (cBVAV.FanVolFlow < cBVAV.CoolOutAirVolFlow && cBVAV.FanVolFlow != DataSizing::AutoSize) { cBVAV.CoolOutAirVolFlow = cBVAV.FanVolFlow; - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", cBVAV.UnitType, cBVAV.Name)); + ShowWarningError(state, std::format("{} \"{}\"", cBVAV.UnitType, cBVAV.Name)); ShowContinueError(state, "The CBVAV system supply air fan air flow rate is less than the autosized value for the outdoor air flow rate " "in cooling mode. Consider autosizing the fan for this simulation."); @@ -2159,8 +2143,8 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.HXDXIterationExceeded; ShowWarningError( state, - EnergyPlus::format("Iteration limit exceeded calculating HX assisted DX unit part-load ratio, for unit = {}", - cBVAV.DXCoolCoilName)); + std::format("Iteration limit exceeded calculating HX assisted DX unit part-load ratio, for unit = {}", + cBVAV.DXCoolCoilName)); ShowContinueError(state, EnergyPlus::format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); ShowContinueErrorTimeStamp( state, "The calculated part-load ratio will be used and the simulation continues. Occurrence info:"); @@ -2182,7 +2166,7 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.HXDXIterationFailed; ShowSevereError( state, - EnergyPlus::format( + std::format( "HX assisted DX unit part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", cBVAV.DXCoolCoilName)); ShowContinueErrorTimeStamp( @@ -2247,9 +2231,9 @@ namespace HVACUnitaryBypassVAV { if (SolFla == -1 && !state.dataGlobal->WarmupFlag) { if (cBVAV.DXIterationExceeded < 1) { ++cBVAV.DXIterationExceeded; - ShowWarningError(state, - EnergyPlus::format("Iteration limit exceeded calculating DX unit part-load ratio, for unit = {}", - cBVAV.DXCoolCoilName)); + ShowWarningError( + state, + std::format("Iteration limit exceeded calculating DX unit part-load ratio, for unit = {}", cBVAV.DXCoolCoilName)); ShowContinueError(state, EnergyPlus::format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); ShowContinueErrorTimeStamp( state, "The calculated part-load ratio will be used and the simulation continues. Occurrence info:"); @@ -2271,8 +2255,8 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.DXIterationFailed; ShowSevereError( state, - EnergyPlus::format("DX unit part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", - cBVAV.DXCoolCoilName)); + std::format("DX unit part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", + cBVAV.DXCoolCoilName)); ShowContinueErrorTimeStamp( state, EnergyPlus::format( @@ -2476,21 +2460,21 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.DXIterationExceeded; ShowWarningError( state, - EnergyPlus::format("{} - Iteration limit exceeded calculating VS DX coil speed ratio for coil named " - "{}, in Unitary system named{}", - HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)], - cBVAV.DXCoolCoilName, - cBVAV.Name)); + std::format("{} - Iteration limit exceeded calculating VS DX coil speed ratio for coil named " + "{}, in Unitary system named{}", + HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)], + cBVAV.DXCoolCoilName, + cBVAV.Name)); ShowContinueError(state, EnergyPlus::format("Calculated speed ratio = {:.4R}", SpeedRatio)); ShowContinueErrorTimeStamp( state, "The calculated speed ratio will be used and the simulation continues. Occurrence info:"); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Iteration limit exceeded calculating speed ratio error " - "continues. Speed Ratio statistics follow.", - HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)], - cBVAV.DXCoolCoilName), + std::format("{} \"{}\" - Iteration limit exceeded calculating speed ratio error " + "continues. Speed Ratio statistics follow.", + HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)], + cBVAV.DXCoolCoilName), cBVAV.DXIterationExceededIndex, LocalPartLoadFrac, LocalPartLoadFrac); @@ -2501,11 +2485,11 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.DXIterationFailed; ShowWarningError( state, - EnergyPlus::format("{} - DX unit speed ratio calculation failed: solver limits exceeded, for coil " - "named {}, in Unitary system named{}", - HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)], - cBVAV.DXCoolCoilName, - cBVAV.Name)); + std::format("{} - DX unit speed ratio calculation failed: solver limits exceeded, for coil " + "named {}, in Unitary system named{}", + HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)], + cBVAV.DXCoolCoilName, + cBVAV.Name)); ShowContinueError(state, EnergyPlus::format("Estimated speed ratio = {:.3R}", TempSpeedReqst / TempSpeedOut)); ShowContinueErrorTimeStamp( @@ -2513,7 +2497,7 @@ namespace HVACUnitaryBypassVAV { } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\" - DX unit speed ratio calculation failed error continues. speed ratio statistics follow.", HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)], cBVAV.DXCoolCoilName), @@ -2554,11 +2538,11 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.DXCyclingIterationExceeded; ShowWarningError( state, - EnergyPlus::format("{} - Iteration limit exceeded calculating VS DX unit low speed cycling ratio, " - "for coil named {}, in Unitary system named{}", - HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)], - cBVAV.DXCoolCoilName, - cBVAV.Name)); + std::format("{} - Iteration limit exceeded calculating VS DX unit low speed cycling ratio, " + "for coil named {}, in Unitary system named{}", + HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)], + cBVAV.DXCoolCoilName, + cBVAV.Name)); ShowContinueError( state, EnergyPlus::format("Estimated cycling ratio = {:.3R}", (TempSpeedReqst / TempSpeedOut))); ShowContinueError(state, EnergyPlus::format("Calculated cycling ratio = {:.3R}", LocalPartLoadFrac)); @@ -2567,10 +2551,10 @@ namespace HVACUnitaryBypassVAV { } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format(" {} \"{}\" - Iteration limit exceeded calculating low speed cycling ratio " - "error continues. Sensible PLR statistics follow.", - HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)], - cBVAV.DXCoolCoilName), + std::format(" {} \"{}\" - Iteration limit exceeded calculating low speed cycling ratio " + "error continues. Sensible PLR statistics follow.", + HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)], + cBVAV.DXCoolCoilName), cBVAV.DXCyclingIterationExceededIndex, LocalPartLoadFrac, LocalPartLoadFrac); @@ -2582,10 +2566,9 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.DXCyclingIterationFailed; ShowWarningError( state, - EnergyPlus::format( - "{} - DX unit low speed cycling ratio calculation failed: limits exceeded, for unit = {}", - HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)], - cBVAV.Name)); + std::format("{} - DX unit low speed cycling ratio calculation failed: limits exceeded, for unit = {}", + HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)], + cBVAV.Name)); ShowContinueError( state, EnergyPlus::format("Estimated low speed cycling ratio = {:.3R}", TempSpeedReqst / TempSpeedOut)); @@ -2595,10 +2578,10 @@ namespace HVACUnitaryBypassVAV { } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - DX unit low speed cycling ratio calculation failed error " - "continues. cycling ratio statistics follow.", - HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)], - cBVAV.DXCoolCoilName), + std::format("{} \"{}\" - DX unit low speed cycling ratio calculation failed error " + "continues. cycling ratio statistics follow.", + HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)], + cBVAV.DXCoolCoilName), cBVAV.DXCyclingIterationFailedIndex, LocalPartLoadFrac, LocalPartLoadFrac); @@ -2668,8 +2651,7 @@ namespace HVACUnitaryBypassVAV { if (cBVAV.MMDXIterationExceeded < 1) { ++cBVAV.MMDXIterationExceeded; ShowWarningError( - state, - EnergyPlus::format("Iteration limit exceeded calculating DX unit part-load ratio, for unit={}", cBVAV.Name)); + state, std::format("Iteration limit exceeded calculating DX unit part-load ratio, for unit={}", cBVAV.Name)); ShowContinueErrorTimeStamp(state, EnergyPlus::format("Part-load ratio returned = {:.2R}", PartLoadFrac)); ShowContinueErrorTimeStamp( state, "The calculated part-load ratio will be used and the simulation continues. Occurrence info:"); @@ -2691,8 +2673,8 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.MMDXIterationFailed; ShowSevereError( state, - EnergyPlus::format("DX unit part-load ratio calculation failed: part-load ratio limits exceeded, for unit={}", - cBVAV.Name)); + std::format("DX unit part-load ratio calculation failed: part-load ratio limits exceeded, for unit={}", + cBVAV.Name)); ShowContinueError(state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); ShowContinueErrorTimeStamp( state, "The estimated part-load ratio will be used and the simulation continues. Occurrence info:"); @@ -2750,8 +2732,8 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.DMDXIterationExceeded; ShowWarningError( state, - EnergyPlus::format( - "Iteration limit exceeded calculating DX unit dehumidifying part-load ratio, for unit = {}", cBVAV.Name)); + std::format("Iteration limit exceeded calculating DX unit dehumidifying part-load ratio, for unit = {}", + cBVAV.Name)); ShowContinueErrorTimeStamp(state, EnergyPlus::format("Part-load ratio returned={:.2R}", PartLoadFrac)); ShowContinueErrorTimeStamp( state, "The calculated part-load ratio will be used and the simulation continues. Occurrence info:"); @@ -2771,11 +2753,10 @@ namespace HVACUnitaryBypassVAV { state.dataLoopNodes->Node(cBVAV.DXCoilOutletNode).Temp))); if (cBVAV.DMDXIterationFailed < 1) { ++cBVAV.DMDXIterationFailed; - ShowSevereError( - state, - EnergyPlus::format("DX unit dehumidifying part-load ratio calculation failed: part-load ratio limits " - "exceeded, for unit = {}", - cBVAV.Name)); + ShowSevereError(state, + std::format("DX unit dehumidifying part-load ratio calculation failed: part-load ratio limits " + "exceeded, for unit = {}", + cBVAV.Name)); ShowContinueError(state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); ShowContinueErrorTimeStamp( state, "The estimated part-load ratio will be used and the simulation continues. Occurrence info:"); @@ -2846,8 +2827,8 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.CRDXIterationExceeded; ShowWarningError( state, - EnergyPlus::format("Iteration limit exceeded calculating DX unit cool reheat part-load ratio, for unit = {}", - cBVAV.Name)); + std::format("Iteration limit exceeded calculating DX unit cool reheat part-load ratio, for unit = {}", + cBVAV.Name)); ShowContinueErrorTimeStamp(state, EnergyPlus::format("Part-load ratio returned = {:.2R}", PartLoadFrac)); ShowContinueErrorTimeStamp( state, "The calculated part-load ratio will be used and the simulation continues. Occurrence info:"); @@ -2869,7 +2850,7 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.CRDXIterationFailed; ShowSevereError( state, - EnergyPlus::format( + std::format( "DX unit cool reheat part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", cBVAV.Name)); ShowContinueError(state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); @@ -2895,9 +2876,9 @@ namespace HVACUnitaryBypassVAV { state.dataHVACUnitaryBypassVAV->SaveCompressorPLR = state.dataDXCoils->DXCoilPartLoadRatio(cBVAV.DXCoolCoilIndexNum); } break; default: { - ShowFatalError(state, - EnergyPlus::format("SimCBVAV System: Invalid DX Cooling Coil={}", - HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)])); + ShowFatalError( + state, + std::format("SimCBVAV System: Invalid DX Cooling Coil={}", HVAC::coilTypeNamesUC[static_cast(cBVAV.coolCoilType)])); } break; } } else { // IF(OutdoorDryBulbTemp .GE. cBVAV%MinOATCompressor)THEN @@ -3041,17 +3022,16 @@ namespace HVACUnitaryBypassVAV { PartLoadFrac, OnOffAirFlowRatio); if (SolFla == -1 && !state.dataGlobal->WarmupFlag) { - ShowWarningError(state, - EnergyPlus::format("Iteration limit exceeded calculating DX unit part-load ratio, for unit = {}", - cBVAV.HeatCoilName)); + ShowWarningError( + state, + std::format("Iteration limit exceeded calculating DX unit part-load ratio, for unit = {}", cBVAV.HeatCoilName)); ShowContinueError(state, EnergyPlus::format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); ShowContinueErrorTimeStamp(state, "The calculated part-load ratio will be used and the simulation continues. Occurrence info:"); } else if (SolFla == -2 && !state.dataGlobal->WarmupFlag) { - ShowSevereError( - state, - EnergyPlus::format("DX unit part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", - cBVAV.HeatCoilName)); + ShowSevereError(state, + std::format("DX unit part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", + cBVAV.HeatCoilName)); ShowContinueErrorTimeStamp( state, EnergyPlus::format("A part-load ratio of {:.3R}will be used and the simulation continues. Occurrence info:", @@ -3242,21 +3222,21 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.DXHeatIterationExceeded; ShowWarningError( state, - EnergyPlus::format("{} - Iteration limit exceeded calculating VS DX coil speed ratio for coil named {}, in " - "Unitary system named{}", - HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], - cBVAV.HeatCoilName, - cBVAV.Name)); + std::format("{} - Iteration limit exceeded calculating VS DX coil speed ratio for coil named {}, in " + "Unitary system named{}", + HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], + cBVAV.HeatCoilName, + cBVAV.Name)); ShowContinueError(state, EnergyPlus::format("Calculated speed ratio = {:.4R}", SpeedRatio)); ShowContinueErrorTimeStamp( state, "The calculated speed ratio will be used and the simulation continues. Occurrence info:"); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Iteration limit exceeded calculating speed ratio error continues. " - "Speed Ratio statistics follow.", - HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], - cBVAV.HeatCoilName), + std::format("{} \"{}\" - Iteration limit exceeded calculating speed ratio error continues. " + "Speed Ratio statistics follow.", + HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], + cBVAV.HeatCoilName), cBVAV.DXHeatIterationExceededIndex, LocalPartLoadFrac, LocalPartLoadFrac); @@ -3268,20 +3248,19 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.DXHeatIterationFailed; ShowWarningError( state, - EnergyPlus::format("{} - DX unit speed ratio calculation failed: solver limits exceeded, for coil named {}, " - "in Unitary system named{}", - HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], - cBVAV.HeatCoilName, - cBVAV.Name)); + std::format("{} - DX unit speed ratio calculation failed: solver limits exceeded, for coil named {}, " + "in Unitary system named{}", + HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], + cBVAV.HeatCoilName, + cBVAV.Name)); ShowContinueErrorTimeStamp(state, " Speed ratio will be set to 0.5, and the simulation continues. Occurrence info:"); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{} \"{}\" - DX unit speed ratio calculation failed error continues. speed ratio statistics follow.", - HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], - cBVAV.HeatCoilName), + std::format("{} \"{}\" - DX unit speed ratio calculation failed error continues. speed ratio statistics follow.", + HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], + cBVAV.HeatCoilName), cBVAV.DXHeatIterationFailedIndex, SpeedRatio, SpeedRatio); @@ -3312,25 +3291,24 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.DXHeatCyclingIterationExceeded; ShowWarningError( state, - EnergyPlus::format("{} - Iteration limit exceeded calculating VS DX unit low speed cycling ratio, for coil " - "named {}, in Unitary system named{}", - HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], - cBVAV.HeatCoilName, - cBVAV.Name)); + std::format("{} - Iteration limit exceeded calculating VS DX unit low speed cycling ratio, for coil " + "named {}, in Unitary system named{}", + HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], + cBVAV.HeatCoilName, + cBVAV.Name)); ShowContinueError(state, EnergyPlus::format("Estimated cycling ratio = {:.3R}", (DesOutTemp / TempSpeedOut))); ShowContinueError(state, EnergyPlus::format("Calculated cycling ratio = {:.3R}", LocalPartLoadFrac)); ShowContinueErrorTimeStamp( state, "The calculated cycling ratio will be used and the simulation continues. Occurrence info:"); } - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} \"{}\" - Iteration limit exceeded calculating low speed cycling ratio " - "error continues. Sensible PLR statistics follow.", - HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], - cBVAV.HeatCoilName), - cBVAV.DXHeatCyclingIterationExceededIndex, - LocalPartLoadFrac, - LocalPartLoadFrac); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} \"{}\" - Iteration limit exceeded calculating low speed cycling ratio " + "error continues. Sensible PLR statistics follow.", + HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], + cBVAV.HeatCoilName), + cBVAV.DXHeatCyclingIterationExceededIndex, + LocalPartLoadFrac, + LocalPartLoadFrac); } } else if (SolFla == -2) { @@ -3339,24 +3317,23 @@ namespace HVACUnitaryBypassVAV { ++cBVAV.DXHeatCyclingIterationFailed; ShowWarningError( state, - EnergyPlus::format("{} - DX unit low speed cycling ratio calculation failed: limits exceeded, for unit = {}", - HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], - cBVAV.Name)); + std::format("{} - DX unit low speed cycling ratio calculation failed: limits exceeded, for unit = {}", + HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], + cBVAV.Name)); ShowContinueError(state, EnergyPlus::format("Estimated low speed cycling ratio = {:.3R}", (DesOutTemp - TempNoOutput) / (TempSpeedOutSpeed1 - TempNoOutput))); ShowContinueErrorTimeStamp( state, "The estimated low speed cycling ratio will be used and the simulation continues. Occurrence info:"); } - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} \"{}\" - DX unit low speed cycling ratio calculation failed error " - "continues. cycling ratio statistics follow.", - HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], - cBVAV.HeatCoilName), - cBVAV.DXHeatCyclingIterationFailedIndex, - LocalPartLoadFrac, - LocalPartLoadFrac); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} \"{}\" - DX unit low speed cycling ratio calculation failed error " + "continues. cycling ratio statistics follow.", + HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)], + cBVAV.HeatCoilName), + cBVAV.DXHeatCyclingIterationFailedIndex, + LocalPartLoadFrac, + LocalPartLoadFrac); } LocalPartLoadFrac = (DesOutTemp - TempNoOutput) / (TempSpeedOutSpeed1 - TempNoOutput); } @@ -3398,8 +3375,8 @@ namespace HVACUnitaryBypassVAV { CalcNonDXHeatingCoils(state, CBVAVNum, FirstHVACIteration, QHeater, cBVAV.fanOp, QHeaterActual); } break; default: { - ShowFatalError( - state, EnergyPlus::format("SimCBVAV System: Invalid Heating Coil={}", HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)])); + ShowFatalError(state, + std::format("SimCBVAV System: Invalid Heating Coil={}", HVAC::coilTypeNamesUC[static_cast(cBVAV.heatCoilType)])); } break; } @@ -3910,26 +3887,24 @@ namespace HVACUnitaryBypassVAV { if (SolFlag == -1) { if (cbvav.HotWaterCoilMaxIterIndex == 0) { ShowWarningMessage( - state, - EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", cbvav.UnitType, cbvav.Name)); + state, std::format("CalcNonDXHeatingCoils: Hot water coil control failed for {}=\"{}\"", cbvav.UnitType, cbvav.Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError( - state, EnergyPlus::format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); + ShowContinueError(state, + std::format(" Iteration limit [{}] exceeded in calculating hot water mass flow rate", SolveMaxIter)); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed (iteration limit [{}]) for {}=\"{}", - SolveMaxIter, - cbvav.UnitType, - cbvav.Name), + std::format("CalcNonDXHeatingCoils: Hot water coil control failed (iteration limit [{}]) for {}=\"{}", + SolveMaxIter, + cbvav.UnitType, + cbvav.Name), cbvav.HotWaterCoilMaxIterIndex); } else if (SolFlag == -2) { if (cbvav.HotWaterCoilMaxIterIndex2 == 0) { - ShowWarningMessage( - state, - EnergyPlus::format("CalcNonDXHeatingCoils: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", - cbvav.UnitType, - cbvav.Name)); + ShowWarningMessage(state, + std::format("CalcNonDXHeatingCoils: Hot water coil control failed (maximum flow limits) for {}=\"{}\"", + cbvav.UnitType, + cbvav.Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "...Bad hot water maximum flow rate limits"); ShowContinueError(state, EnergyPlus::format("...Given minimum water flow rate={:.3R} kg/s", MinWaterFlow)); diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc index 26838cb6732..4307a88be4b 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc @@ -49,6 +49,7 @@ #include #include #include +#include #include // ObjexxFCL Headers @@ -599,12 +600,12 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) if (vrf.CoolCapFTErrorIndex == 0) { ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); ShowContinueError(state, - EnergyPlus::format(" Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", + EnergyPlus::format(" Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3f}).", TotCoolCapTempModFac)); ShowContinueError( state, - EnergyPlus::format(" Negative value occurs using an outdoor air temperature of {:.1T} C and an average indoor air " - "wet-bulb temperature of {:.1T} C.", + EnergyPlus::format(" Negative value occurs using an outdoor air temperature of {:.1f} C and an average indoor air " + "wet-bulb temperature of {:.1f} C.", CondInletTemp, InletAirWetBulbC)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); @@ -628,12 +629,12 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); ShowContinueError( state, - EnergyPlus::format(" Cooling Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3T}).", + EnergyPlus::format(" Cooling Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3f}).", TotCoolEIRTempModFac)); ShowContinueError( state, - EnergyPlus::format(" Negative value occurs using an outdoor air temperature of {:.1T} C and an average indoor air " - "wet-bulb temperature of {:.1T} C.", + EnergyPlus::format(" Negative value occurs using an outdoor air temperature of {:.1f} C and an average indoor air " + "wet-bulb temperature of {:.1f} C.", CondInletTemp, InletAirWetBulbC)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); @@ -666,12 +667,12 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) if (vrf.CoolCapFTErrorIndex == 0) { ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); ShowContinueError(state, - EnergyPlus::format(" Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", + EnergyPlus::format(" Cooling Capacity Modifier curve (function of temperature) output is negative ({:.3f}).", TotCoolCapTempModFac)); ShowContinueError( state, - EnergyPlus::format(" Negative value occurs using an outdoor air temperature of {:.1T} C and an average indoor air " - "wet-bulb temperature of {:.1T} C.", + EnergyPlus::format(" Negative value occurs using an outdoor air temperature of {:.1f} C and an average indoor air " + "wet-bulb temperature of {:.1f} C.", CondInletTemp, InletAirWetBulbC)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); @@ -692,21 +693,19 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) if (!state.dataGlobal->WarmupFlag && NumTUInCoolingMode > 0) { if (vrf.EIRFTempCoolErrorIndex == 0) { ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); - ShowContinueError( - state, - EnergyPlus::format(" Cooling Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3T}).", - TotCoolEIRTempModFac)); - ShowContinueError( - state, - EnergyPlus::format(" Negative value occurs using an outdoor air temperature of {:.1T} C and an average indoor air " - "wet-bulb temperature of {:.1T} C.", - CondInletTemp, - InletAirWetBulbC)); + ShowContinueError(state, + std::format(" Cooling Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3f}).", + TotCoolEIRTempModFac)); + ShowContinueError(state, + std::format(" Negative value occurs using an outdoor air temperature of {:.1f} C and an average indoor air " + "wet-bulb temperature of {:.1f} C.", + CondInletTemp, + InletAirWetBulbC)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\": Cooling Energy Input Ratio Modifier curve (function of temperature) output is negative warning continues...", PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], vrf.Name), @@ -784,27 +783,25 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) if (TotHeatCapTempModFac < 0.0) { if (!state.dataGlobal->WarmupFlag && NumTUInHeatingMode > 0) { if (vrf.HeatCapFTErrorIndex == 0) { - ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); - ShowContinueError(state, - EnergyPlus::format(" Heating Capacity Modifier curve (function of temperature) output is negative ({:.3T}).", - TotHeatCapTempModFac)); + ShowSevereMessage(state, std::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); + ShowContinueError( + state, + std::format(" Heating Capacity Modifier curve (function of temperature) output is negative ({:.3f}).", TotHeatCapTempModFac)); switch (vrf.HeatingPerformanceOATType) { case HVAC::OATType::DryBulb: { - ShowContinueError( - state, - EnergyPlus::format(" Negative value occurs using an outdoor air temperature of {:.1T} C and an average indoor air " - "dry-bulb temperature of {:.1T} C.", - CondInletTemp, - InletAirDryBulbC)); + ShowContinueError(state, + std::format(" Negative value occurs using an outdoor air temperature of {:.1f} C and an average indoor air " + "dry-bulb temperature of {:.1f} C.", + CondInletTemp, + InletAirDryBulbC)); } break; case HVAC::OATType::WetBulb: { - ShowContinueError( - state, - EnergyPlus::format(" Negative value occurs using an outdoor air wet-bulb temperature of {:.1T} C and an average " - "indoor air wet-bulb temperature of {:.1T} C.", - OutdoorWetBulb, - InletAirWetBulbC)); + ShowContinueError(state, + std::format(" Negative value occurs using an outdoor air wet-bulb temperature of {:.1f} C and an average " + "indoor air wet-bulb temperature of {:.1f} C.", + OutdoorWetBulb, + InletAirWetBulbC)); } break; default: // should never get here @@ -815,10 +812,9 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{} \"{}\": Heating Capacity Ratio Modifier curve (function of temperature) output is negative warning continues...", - PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], - vrf.Name), + std::format("{} \"{}\": Heating Capacity Ratio Modifier curve (function of temperature) output is negative warning continues...", + PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], + vrf.Name), vrf.HeatCapFTErrorIndex, TotHeatCapTempModFac, TotHeatCapTempModFac); @@ -829,25 +825,24 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) if (TotHeatEIRTempModFac < 0.0) { if (!state.dataGlobal->WarmupFlag && NumTUInHeatingMode > 0) { if (vrf.EIRFTempHeatErrorIndex == 0) { - ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); - ShowContinueError( - state, - EnergyPlus::format(" Heating Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3T}).", - TotHeatEIRTempModFac)); + ShowSevereMessage(state, std::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); + ShowContinueError(state, + std::format(" Heating Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3f}).", + TotHeatEIRTempModFac)); switch (vrf.HeatingPerformanceOATType) { case HVAC::OATType::DryBulb: { ShowContinueError(state, - EnergyPlus::format(" Negative value occurs using an outdoor air dry-bulb temperature of {:.1T} C and an " - "average indoor air dry-bulb temperature of {:.1T} C.", - CondInletTemp, - InletAirDryBulbC)); + std::format(" Negative value occurs using an outdoor air dry-bulb temperature of {:.1f} C and an " + "average indoor air dry-bulb temperature of {:.1f} C.", + CondInletTemp, + InletAirDryBulbC)); } break; case HVAC::OATType::WetBulb: { ShowContinueError(state, - EnergyPlus::format(" Negative value occurs using an outdoor air wet-bulb temperature of {:.1T} C and an " - "average indoor air wet-bulb temperature of {:.1T} C.", - OutdoorWetBulb, - InletAirWetBulbC)); + std::format(" Negative value occurs using an outdoor air wet-bulb temperature of {:.1f} C and an " + "average indoor air wet-bulb temperature of {:.1f} C.", + OutdoorWetBulb, + InletAirWetBulbC)); } break; default: break; @@ -856,7 +851,7 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\": Heating Energy Input Ratio Modifier curve (function of temperature) output is negative warning continues...", PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], vrf.Name), @@ -904,26 +899,24 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) if (DefrostEIRTempModFac < 0.0) { if (!state.dataGlobal->WarmupFlag) { if (vrf.DefrostHeatErrorIndex == 0) { - ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); + ShowSevereMessage(state, std::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), vrf.Name)); ShowContinueError( state, - EnergyPlus::format( - " Defrost Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3T}).", - DefrostEIRTempModFac)); - ShowContinueError( - state, - EnergyPlus::format(" Negative value occurs using an outdoor air dry-bulb temperature of {:.1T} C and an " - "average indoor air wet-bulb temperature of {:.1T} C.", - OutdoorDryBulb, - InletAirWetBulbC)); + std::format(" Defrost Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3f}).", + DefrostEIRTempModFac)); + ShowContinueError(state, + std::format(" Negative value occurs using an outdoor air dry-bulb temperature of {:.1f} C and an " + "average indoor air wet-bulb temperature of {:.1f} C.", + OutdoorDryBulb, + InletAirWetBulbC)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\": Defrost Energy Input Ratio Modifier curve (function of temperature) " - "output is negative warning continues...", - PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], - vrf.Name), + std::format("{} \"{}\": Defrost Energy Input Ratio Modifier curve (function of temperature) " + "output is negative warning continues...", + PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], + vrf.Name), vrf.DefrostHeatErrorIndex, DefrostEIRTempModFac, DefrostEIRTempModFac); @@ -1170,15 +1163,14 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) if (EIRFPLRModFac < 0.0) { if (vrf.CoolEIRFPLRErrorIndex == 0) { - ShowSevereMessage(state, fmt::format("{} \"{}\":", std::string(cVRFTypes(VRF_HeatPump)), vrf.Name)); - ShowContinueError(state, - EnergyPlus::format(" Cooling EIR Modifier curve (function of PLR) output is negative ({:.3T}).", EIRFPLRModFac)); - ShowContinueError(state, EnergyPlus::format(" Negative value occurs using a cooling Part Load Ratio (PLR) of {:.2T}.", CoolingPLR)); + ShowSevereMessage(state, std::format("{} \"{}\":", std::string(cVRFTypes(VRF_HeatPump)), vrf.Name)); + ShowContinueError(state, std::format(" Cooling EIR Modifier curve (function of PLR) output is negative ({:.3f}).", EIRFPLRModFac)); + ShowContinueError(state, std::format(" Negative value occurs using a cooling Part Load Ratio (PLR) of {:.2f}.", CoolingPLR)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - fmt::format("{} \"{}\": Cooling EIR Modifier curve (function of PLR) output is negative warning continues...", + std::format("{} \"{}\": Cooling EIR Modifier curve (function of PLR) output is negative warning continues...", PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], vrf.Name), vrf.CoolEIRFPLRErrorIndex, @@ -1211,15 +1203,14 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond) if (EIRFPLRModFac < 0.0) { if (vrf.HeatEIRFPLRErrorIndex == 0) { - ShowSevereMessage(state, fmt::format("{} \"{}\":", std::string(cVRFTypes(VRF_HeatPump)), vrf.Name)); - ShowContinueError(state, - EnergyPlus::format(" Heating EIR Modifier curve (function of PLR) output is negative ({:.3T}).", EIRFPLRModFac)); - ShowContinueError(state, EnergyPlus::format(" Negative value occurs using a heating Part Load Ratio (PLR) of {:.2T}.", HeatingPLR)); + ShowSevereMessage(state, std::format("{} \"{}\":", std::string(cVRFTypes(VRF_HeatPump)), vrf.Name)); + ShowContinueError(state, std::format(" Heating EIR Modifier curve (function of PLR) output is negative ({:.3f}).", EIRFPLRModFac)); + ShowContinueError(state, std::format(" Negative value occurs using a heating Part Load Ratio (PLR) of {:.2f}.", HeatingPLR)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - fmt::format("{} \"{}\": Heating EIR Modifier curve (function of PLR) output is negative warning continues...", + std::format("{} \"{}\": Heating EIR Modifier curve (function of PLR) output is negative warning continues...", PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], vrf.Name), vrf.HeatEIRFPLRErrorIndex, @@ -1408,9 +1399,8 @@ void GetVRFInput(EnergyPlusData &state) if (ErrorsFound) { ShowFatalError( state, - EnergyPlus::format( - "{}Errors found in getting AirConditioner:VariableRefrigerantFlow system input. Preceding condition(s) causes termination.", - RoutineName)); + std::format("{}Errors found in getting AirConditioner:VariableRefrigerantFlow system input. Preceding condition(s) causes termination.", + RoutineName)); } } @@ -1808,19 +1798,19 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) auto [MinCurvePLR, MinCurveVal, MaxCurvePLR, MaxCurveVal] = checkCurveMinMaxOutput(thisVrfSys.CoolPLFFPLR); if (MinCurveVal < 0.7) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\" has out of range values.", cAlphaFieldNames(12), cAlphaArgs(12))); - ShowContinueError( - state, EnergyPlus::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, std::format("...{}=\"{}\" has out of range values.", cAlphaFieldNames(12), cAlphaArgs(12))); + ShowContinueError(state, + std::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2f} is {:.3f}", MinCurvePLR, MinCurveVal)); ShowContinueError(state, "...Setting curve minimum to 0.7 and simulation continues."); Curve::SetCurveOutputMinValue(state, thisVrfSys.CoolPLFFPLR, ErrorsFound, 0.7); } if (MaxCurveVal > 1.0) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\" has out of range values.", cAlphaFieldNames(12), cAlphaArgs(12))); - ShowContinueError( - state, EnergyPlus::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, std::format("...{}=\"{}\" has out of range values.", cAlphaFieldNames(12), cAlphaArgs(12))); + ShowContinueError(state, + std::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2f} is {:.3f}", MaxCurvePLR, MaxCurveVal)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisVrfSys.CoolPLFFPLR, ErrorsFound, 1.0); } @@ -1836,12 +1826,12 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) thisVrfSys.MinOATHeating = rNumericArgs(8); thisVrfSys.MaxOATHeating = rNumericArgs(9); if (thisVrfSys.MinOATHeating >= thisVrfSys.MaxOATHeating) { - ShowSevereError(state, EnergyPlus::format("{}, \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); + ShowSevereError(state, std::format("{}, \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); ShowContinueError(state, - EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(8), - thisVrfSys.MinOATHeating, - thisVrfSys.MaxOATHeating)); + std::format("... {} ({:.3f}) must be less than maximum ({:.3f}).", + cNumericFieldNames(8), + thisVrfSys.MinOATHeating, + thisVrfSys.MaxOATHeating)); ErrorsFound = true; } @@ -1946,7 +1936,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}, \"{}\" illegal {} input for this object = {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(19), cAlphaArgs(19))); ShowContinueError(state, "... input must be WETBULBTEMPERATURE or DRYBULBTEMPERATURE."); ErrorsFound = true; @@ -2002,19 +1992,19 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) auto [MinCurvePLR, MinCurveVal, MaxCurvePLR, MaxCurveVal] = checkCurveMinMaxOutput(thisVrfSys.HeatPLFFPLR); if (MinCurveVal < 0.7) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\" has out of range values.", cAlphaFieldNames(23), cAlphaArgs(23))); - ShowContinueError( - state, EnergyPlus::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2T} is {:.3T}", MinCurvePLR, MinCurveVal)); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, std::format("...{}=\"{}\" has out of range values.", cAlphaFieldNames(23), cAlphaArgs(23))); + ShowContinueError(state, + std::format("...Curve minimum must be >= 0.7, curve min at PLR = {:.2f} is {:.3f}", MinCurvePLR, MinCurveVal)); ShowContinueError(state, "...Setting curve minimum to 0.7 and simulation continues."); Curve::SetCurveOutputMinValue(state, thisVrfSys.HeatPLFFPLR, ErrorsFound, 0.7); } if (MaxCurveVal > 1.0) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\" has out of range values.", cAlphaFieldNames(23), cAlphaArgs(23))); - ShowContinueError( - state, EnergyPlus::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2T} is {:.3T}", MaxCurvePLR, MaxCurveVal)); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, std::format("...{}=\"{}\" has out of range values.", cAlphaFieldNames(23), cAlphaArgs(23))); + ShowContinueError(state, + std::format("...Curve maximum must be <= 1.0, curve max at PLR = {:.2f} is {:.3f}", MaxCurvePLR, MaxCurveVal)); ShowContinueError(state, "...Setting curve maximum to 1.0 and simulation continues."); Curve::SetCurveOutputMaxValue(state, thisVrfSys.HeatPLFFPLR, ErrorsFound, 1.0); } @@ -2028,21 +2018,20 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfSys.CoolEIRFPLR1 > 0) { Curve::GetCurveMinMaxValues(state, thisVrfSys.CoolEIRFPLR1, minEIRfLowPLRXInput, maxEIRfLowPLRXInput); if (minEIRfLowPLRXInput > thisVrfSys.MinPLR) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, EnergyPlus::format("...{} = {} has out of range value.", cAlphaFieldNames(9), cAlphaArgs(9))); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, std::format("...{} = {} has out of range value.", cAlphaFieldNames(9), cAlphaArgs(9))); ShowContinueError(state, - EnergyPlus::format("...Curve minimum value of X = {:.3T} must be <= Minimum Heat Pump Part-Load Ratio = {:.3T}.", - minEIRfLowPLRXInput, - thisVrfSys.MinPLR)); + std::format("...Curve minimum value of X = {:.3f} must be <= Minimum Heat Pump Part-Load Ratio = {:.3f}.", + minEIRfLowPLRXInput, + thisVrfSys.MinPLR)); ErrorsFound = true; } if (maxEIRfLowPLRXInput < 1.0) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", suspicious", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, EnergyPlus::format("...{} = {} has unexpected value.", cAlphaFieldNames(9), cAlphaArgs(9))); - ShowContinueError( - state, - EnergyPlus::format("...Curve maximum value of X = {:.3T} should be 1 and will result in lower energy use than expected.", - maxEIRfLowPLRXInput)); + ShowWarningError(state, std::format("{}{}=\"{}\", suspicious", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, std::format("...{} = {} has unexpected value.", cAlphaFieldNames(9), cAlphaArgs(9))); + ShowContinueError(state, + std::format("...Curve maximum value of X = {:.3f} should be 1 and will result in lower energy use than expected.", + maxEIRfLowPLRXInput)); } minEIRfLowPLRXInput = 0.0; maxEIRfLowPLRXInput = 0.0; @@ -2050,21 +2039,20 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfSys.HeatEIRFPLR1 > 0) { Curve::GetCurveMinMaxValues(state, thisVrfSys.HeatEIRFPLR1, minEIRfLowPLRXInput, maxEIRfLowPLRXInput); if (minEIRfLowPLRXInput > thisVrfSys.MinPLR) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, EnergyPlus::format("...{} = {} has out of range value.", cAlphaFieldNames(20), cAlphaArgs(20))); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, std::format("...{} = {} has out of range value.", cAlphaFieldNames(20), cAlphaArgs(20))); ShowContinueError(state, - EnergyPlus::format("...Curve minimum value of X = {:.3T} must be <= Minimum Heat Pump Part-Load Ratio = {:.3T}.", - minEIRfLowPLRXInput, - thisVrfSys.MinPLR)); + std::format("...Curve minimum value of X = {:.3f} must be <= Minimum Heat Pump Part-Load Ratio = {:.3f}.", + minEIRfLowPLRXInput, + thisVrfSys.MinPLR)); ErrorsFound = true; } if (maxEIRfLowPLRXInput < 1.0) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", suspicious", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, EnergyPlus::format("...{} = {} has unexpected value.", cAlphaFieldNames(20), cAlphaArgs(20))); - ShowContinueError( - state, - EnergyPlus::format("...Curve maximum value of X = {:.3T} should be 1 and will result in lower energy use than expected.", - maxEIRfLowPLRXInput)); + ShowWarningError(state, std::format("{}{}=\"{}\", suspicious", RoutineName, cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, std::format("...{} = {} has unexpected value.", cAlphaFieldNames(20), cAlphaArgs(20))); + ShowContinueError(state, + std::format("...Curve maximum value of X = {:.3f} should be 1 and will result in lower energy use than expected.", + maxEIRfLowPLRXInput)); } } @@ -2074,14 +2062,13 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfSys.ThermostatPriority == ThermostatCtrlType::MasterThermostatPriority) { if (thisVrfSys.MasterZonePtr == 0) { - ShowSevereError(state, EnergyPlus::format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, - EnergyPlus::format("{} must be entered when {} = {}", cAlphaFieldNames(24), cAlphaFieldNames(25), cAlphaArgs(25))); + ShowSevereError(state, std::format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, std::format("{} must be entered when {} = {}", cAlphaFieldNames(24), cAlphaFieldNames(25), cAlphaArgs(25))); ErrorsFound = true; } } else if (thisVrfSys.ThermostatPriority == ThermostatCtrlType::Invalid) { - ShowSevereError(state, EnergyPlus::format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFieldNames(25), cAlphaArgs(25))); + ShowSevereError(state, std::format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFieldNames(25), cAlphaArgs(25))); ErrorsFound = true; } @@ -2096,8 +2083,8 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) thisVrfSys.ZoneTUListPtr = Util::FindItemInList(cAlphaArgs(27), state.dataHVACVarRefFlow->TerminalUnitList); if (thisVrfSys.ZoneTUListPtr == 0) { - ShowSevereError(state, EnergyPlus::format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, EnergyPlus::format("{} = {} not found.", cAlphaFieldNames(27), cAlphaArgs(27))); + ShowSevereError(state, std::format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, std::format("{} = {} not found.", cAlphaFieldNames(27), cAlphaArgs(27))); ErrorsFound = true; } @@ -2108,8 +2095,8 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else if (Util::SameString(cAlphaArgs(28), "Yes")) { thisVrfSys.HeatRecoveryUsed = true; } else { - ShowSevereError(state, EnergyPlus::format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFieldNames(28), cAlphaArgs(28))); + ShowSevereError(state, std::format("{} = \"{}\"", cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFieldNames(28), cAlphaArgs(28))); ErrorsFound = true; } } @@ -2153,8 +2140,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) thisVrfSys.DefrostStrategy = static_cast(getEnumValue(StandardRatings::DefrostStratUC, cAlphaArgs(31))); if (thisVrfSys.DefrostStrategy == StandardRatings::DefrostStrat::Invalid) { ShowSevereError( - state, - EnergyPlus::format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(31), cAlphaArgs(31))); + state, std::format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(31), cAlphaArgs(31))); ErrorsFound = true; } } else { @@ -2167,8 +2153,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfSys.DefrostControl == StandardRatings::HPdefrostControl::Invalid) { ShowSevereError( - state, - EnergyPlus::format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(32), cAlphaArgs(32))); + state, std::format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(32), cAlphaArgs(32))); ErrorsFound = true; } @@ -2189,17 +2174,16 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) cAlphaFieldNames(33)); // Field Name } else { if (thisVrfSys.DefrostStrategy == StandardRatings::DefrostStrat::ReverseCycle) { - ShowSevereError(state, - EnergyPlus::format( - "{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(33), cAlphaArgs(33))); + ShowSevereError( + state, + std::format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(33), cAlphaArgs(33))); ErrorsFound = true; } } } else { if (thisVrfSys.DefrostStrategy == StandardRatings::DefrostStrat::ReverseCycle) { ShowSevereError( - state, - EnergyPlus::format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(33), cAlphaArgs(33))); + state, std::format("{}, \"{}\" {} not found: {}", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(33), cAlphaArgs(33))); ErrorsFound = true; } } @@ -2209,8 +2193,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfSys.DefrostCapacity == 0.0 && thisVrfSys.DefrostStrategy == StandardRatings::DefrostStrat::Resistive) { ShowWarningError( state, - EnergyPlus::format( - "{}, \"{}\" {} = 0.0 for defrost strategy = RESISTIVE.", cCurrentModuleObject, thisVrfSys.Name, cNumericFieldNames(21))); + std::format("{}, \"{}\" {} = 0.0 for defrost strategy = RESISTIVE.", cCurrentModuleObject, thisVrfSys.Name, cNumericFieldNames(21))); } thisVrfSys.MaxOATDefrost = rNumericArgs(22); @@ -2226,12 +2209,12 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) thisVrfSys.CondenserType = DataHeatBalance::RefrigCondenserType::Water; thisVrfSys.VRFType = PlantEquipmentType::HeatPumpVRF; if (thisVrfSys.HeatingPerformanceOATType == HVAC::OATType::WetBulb) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisVrfSys.Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", cAlphaFieldNames(34), cAlphaArgs(34))); - ShowContinueError(state, EnergyPlus::format("Illegal {} input for this object = {}", cAlphaFieldNames(19), cAlphaArgs(19))); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisVrfSys.Name)); + ShowContinueError(state, std::format("{} = {}", cAlphaFieldNames(34), cAlphaArgs(34))); + ShowContinueError(state, std::format("Illegal {} input for this object = {}", cAlphaFieldNames(19), cAlphaArgs(19))); ShowContinueError(state, "... input must be DRYBULBTEMPERATURE when Condenser Type is WaterCooled."); - ShowContinueError( - state, EnergyPlus::format("... {} will be reset to DRYBULBTEMPERATURE and simulation continues.", cAlphaFieldNames(19))); + ShowContinueError(state, + std::format("... {} will be reset to DRYBULBTEMPERATURE and simulation continues.", cAlphaFieldNames(19))); } } if (thisVrfSys.CondenserType == DataHeatBalance::RefrigCondenserType::Invalid) { @@ -2261,11 +2244,11 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) Node::ObjectIsNotParent); if (!CheckOutAirNodeNumber(state, thisVrfSys.CondenserNodeNum)) { ShowSevereError(state, - EnergyPlus::format("{}, \"{}\" {} not a valid Outdoor Air Node = {}", - cCurrentModuleObject, - thisVrfSys.Name, - cAlphaFieldNames(35), - cAlphaArgs(35))); + std::format("{}, \"{}\" {} not a valid Outdoor Air Node = {}", + cCurrentModuleObject, + thisVrfSys.Name, + cAlphaFieldNames(35), + cAlphaArgs(35))); ShowContinueError(state, "...node name does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); ErrorsFound = true; } @@ -2298,15 +2281,15 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) Node::ObjectIsNotParent); TestCompSet(state, cCurrentModuleObject, thisVrfSys.Name, cAlphaArgs(35), cAlphaArgs(36), "Condenser Water Nodes"); } else if (lAlphaFieldBlanks(36) && thisVrfSys.CondenserType == DataHeatBalance::RefrigCondenserType::Water) { - ShowSevereError(state, EnergyPlus::format("{}, \"{}\" {} is blank.", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(36))); + ShowSevereError(state, std::format("{}, \"{}\" {} is blank.", cCurrentModuleObject, thisVrfSys.Name, cAlphaFieldNames(36))); ShowContinueError(state, "...node name must be entered when Condenser Type = WaterCooled."); ErrorsFound = true; } if (lAlphaFieldBlanks(23)) { if (thisVrfSys.CondenserType == DataHeatBalance::RefrigCondenserType::Water) { - ShowSevereError(state, EnergyPlus::format("{}, \"{}\" {} is blank.", cCurrentModuleObject, thisVrfSys.Name, cNumericFieldNames(23))); - ShowContinueError(state, EnergyPlus::format("...input is required when {} = {}", cAlphaFieldNames(34), cAlphaArgs(34))); + ShowSevereError(state, std::format("{}, \"{}\" {} is blank.", cCurrentModuleObject, thisVrfSys.Name, cNumericFieldNames(23))); + ShowContinueError(state, std::format("...input is required when {} = {}", cAlphaFieldNames(34), cAlphaArgs(34))); ErrorsFound = true; } } else { @@ -2335,7 +2318,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) // Basin heater power as a function of temperature must be greater than or equal to 0 thisVrfSys.BasinHeaterPowerFTempDiff = rNumericArgs(27); if (rNumericArgs(27) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}, \"{}\" {} must be >= 0", cCurrentModuleObject, thisVrfSys.Name, cNumericFieldNames(27))); + ShowSevereError(state, std::format("{}, \"{}\" {} must be >= 0", cCurrentModuleObject, thisVrfSys.Name, cNumericFieldNames(27))); ErrorsFound = true; } @@ -2347,7 +2330,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfSys.BasinHeaterSetPointTemp < 2.0) { ShowWarningError( state, - EnergyPlus::format( + std::format( "{}, \"{}\" {} is less than 2 deg C. Freezing could occur.", cCurrentModuleObject, thisVrfSys.Name, cNumericFieldNames(28))); } } @@ -2374,20 +2357,18 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) thisVrfSys.MinOATHeatRecovery = rNumericArgs(29); if (thisVrfSys.MinOATHeatRecovery < thisVrfSys.MinOATCooling || thisVrfSys.MinOATHeatRecovery < thisVrfSys.MinOATHeating) { ShowWarningError(state, - EnergyPlus::format("{} = \"{}\", {} is less than the minimum temperature in heat pump mode.", - cCurrentModuleObject, - thisVrfSys.Name, - cNumericFieldNames(29))); - ShowContinueError(state, EnergyPlus::format("...{} = {:.2T} C", cNumericFieldNames(29), thisVrfSys.MinOATHeatRecovery)); - ShowContinueError(state, - EnergyPlus::format("...Minimum Outdoor Temperature in Cooling Mode = {:.2T} C", thisVrfSys.MinOATCooling)); - ShowContinueError(state, - EnergyPlus::format("...Minimum Outdoor Temperature in Heating Mode = {:.2T} C", thisVrfSys.MinOATHeating)); + std::format("{} = \"{}\", {} is less than the minimum temperature in heat pump mode.", + cCurrentModuleObject, + thisVrfSys.Name, + cNumericFieldNames(29))); + ShowContinueError(state, std::format("...{} = {:.2f} C", cNumericFieldNames(29), thisVrfSys.MinOATHeatRecovery)); + ShowContinueError(state, std::format("...Minimum Outdoor Temperature in Cooling Mode = {:.2f} C", thisVrfSys.MinOATCooling)); + ShowContinueError(state, std::format("...Minimum Outdoor Temperature in Heating Mode = {:.2f} C", thisVrfSys.MinOATHeating)); ShowContinueError(state, "...Minimum Outdoor Temperature in Heat Recovery Mode reset to greater of cooling or heating minimum " "temperature and simulation continues."); thisVrfSys.MinOATHeatRecovery = max(thisVrfSys.MinOATCooling, thisVrfSys.MinOATHeating); - ShowContinueError(state, EnergyPlus::format("... adjusted {} = {:.2T} C", cNumericFieldNames(29), thisVrfSys.MinOATHeatRecovery)); + ShowContinueError(state, std::format("... adjusted {} = {:.2f} C", cNumericFieldNames(29), thisVrfSys.MinOATHeatRecovery)); } } if (lAlphaFieldBlanks(30)) { @@ -2396,20 +2377,18 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) thisVrfSys.MaxOATHeatRecovery = rNumericArgs(30); if (thisVrfSys.MaxOATHeatRecovery > thisVrfSys.MaxOATCooling || thisVrfSys.MaxOATHeatRecovery > thisVrfSys.MaxOATHeating) { ShowWarningError(state, - EnergyPlus::format("{} = \"{}\", {} is greater than the maximum temperature in heat pump mode.", - cCurrentModuleObject, - thisVrfSys.Name, - cNumericFieldNames(30))); - ShowContinueError(state, EnergyPlus::format("...{} = {:.2T} C", cNumericFieldNames(30), thisVrfSys.MaxOATHeatRecovery)); - ShowContinueError(state, - EnergyPlus::format("...Maximum Outdoor Temperature in Cooling Mode = {:.2T} C", thisVrfSys.MaxOATCooling)); - ShowContinueError(state, - EnergyPlus::format("...Maximum Outdoor Temperature in Heating Mode = {:.2T} C", thisVrfSys.MaxOATHeating)); + std::format("{} = \"{}\", {} is greater than the maximum temperature in heat pump mode.", + cCurrentModuleObject, + thisVrfSys.Name, + cNumericFieldNames(30))); + ShowContinueError(state, std::format("...{} = {:.2f} C", cNumericFieldNames(30), thisVrfSys.MaxOATHeatRecovery)); + ShowContinueError(state, std::format("...Maximum Outdoor Temperature in Cooling Mode = {:.2f} C", thisVrfSys.MaxOATCooling)); + ShowContinueError(state, std::format("...Maximum Outdoor Temperature in Heating Mode = {:.2f} C", thisVrfSys.MaxOATHeating)); ShowContinueError(state, "...Maximum Outdoor Temperature in Heat Recovery Mode reset to lesser of cooling or heating minimum " "temperature and simulation continues."); thisVrfSys.MaxOATHeatRecovery = min(thisVrfSys.MaxOATCooling, thisVrfSys.MaxOATHeating); - ShowContinueError(state, EnergyPlus::format("... adjusted {} = {:.2T} C", cNumericFieldNames(30), thisVrfSys.MaxOATHeatRecovery)); + ShowContinueError(state, std::format("... adjusted {} = {:.2f} C", cNumericFieldNames(30), thisVrfSys.MaxOATHeatRecovery)); } } @@ -2551,19 +2530,19 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfFluidCtrl.MinOATCooling >= thisVrfFluidCtrl.MaxOATCooling) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrl.Name + "\""); ShowContinueError(state, - EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(3), - thisVrfFluidCtrl.MinOATCooling, - thisVrfFluidCtrl.MaxOATCooling)); + std::format("... {} ({:.3f}) must be less than maximum ({:.3f}).", + cNumericFieldNames(3), + thisVrfFluidCtrl.MinOATCooling, + thisVrfFluidCtrl.MaxOATCooling)); ErrorsFound = true; } if (thisVrfFluidCtrl.MinOATHeating >= thisVrfFluidCtrl.MaxOATHeating) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrl.Name + "\""); ShowContinueError(state, - EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(5), - thisVrfFluidCtrl.MinOATHeating, - thisVrfFluidCtrl.MaxOATHeating)); + std::format("... {} ({:.3f}) must be less than maximum ({:.3f}).", + cNumericFieldNames(5), + thisVrfFluidCtrl.MinOATHeating, + thisVrfFluidCtrl.MaxOATHeating)); ErrorsFound = true; } @@ -2591,19 +2570,19 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfFluidCtrl.IUEvapTempLow >= thisVrfFluidCtrl.IUEvapTempHigh) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrl.Name + "\""); ShowContinueError(state, - EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(11), - thisVrfFluidCtrl.IUEvapTempLow, - thisVrfFluidCtrl.IUEvapTempHigh)); + std::format("... {} ({:.3f}) must be less than maximum ({:.3f}).", + cNumericFieldNames(11), + thisVrfFluidCtrl.IUEvapTempLow, + thisVrfFluidCtrl.IUEvapTempHigh)); ErrorsFound = true; } if (thisVrfFluidCtrl.IUCondTempLow >= thisVrfFluidCtrl.IUCondTempHigh) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrl.Name + "\""); ShowContinueError(state, - EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(13), - thisVrfFluidCtrl.IUCondTempLow, - thisVrfFluidCtrl.IUCondTempHigh)); + std::format("... {} ({:.3f}) must be less than maximum ({:.3f}).", + cNumericFieldNames(13), + thisVrfFluidCtrl.IUCondTempLow, + thisVrfFluidCtrl.IUCondTempHigh)); ErrorsFound = true; } @@ -2636,9 +2615,9 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) ShowSevereError(state, std::string{RoutineName} + cCurrentModuleObject + "=\"" + thisVrfFluidCtrl.Name + "\", invalid"); ShowContinueError( state, - EnergyPlus::format("...illegal {} type for this object = {}", - cAlphaFieldNames(6), - Curve::objectNames[static_cast(state.dataCurveManager->curves(indexOUEvapTempCurve)->curveType)])); + std::format("...illegal {} type for this object = {}", + cAlphaFieldNames(6), + Curve::objectNames[static_cast(state.dataCurveManager->curves(indexOUEvapTempCurve)->curveType)])); ShowContinueError(state, "... Curve type must be Quadratic."); ErrorsFound = true; } @@ -2668,9 +2647,9 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) ShowSevereError(state, std::string{RoutineName} + cCurrentModuleObject + "=\"" + thisVrfFluidCtrl.Name + "\", invalid"); ShowContinueError( state, - EnergyPlus::format("...illegal {} type for this object = {}", - cAlphaFieldNames(7), - Curve::objectNames[static_cast(state.dataCurveManager->curves(indexOUCondTempCurve)->curveType)])); + std::format("...illegal {} type for this object = {}", + cAlphaFieldNames(7), + Curve::objectNames[static_cast(state.dataCurveManager->curves(indexOUCondTempCurve)->curveType)])); ShowContinueError(state, "... Curve type must be Quadratic."); ErrorsFound = true; } @@ -2697,7 +2676,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) thisVrfFluidCtrl.RefPipEquLen = 1.2 * thisVrfFluidCtrl.RefPipLen; ShowWarningError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrl.Name + "\", invalid \" " + cNumericFieldNames(19) + "\" value."); ShowContinueError(state, "...Equivalent length of main pipe should be greater than or equal to the actual length."); - ShowContinueError(state, EnergyPlus::format("...The value is recalculated based on the provided \"{}\" value.", cNumericFieldNames(18))); + ShowContinueError(state, std::format("...The value is recalculated based on the provided \"{}\" value.", cNumericFieldNames(18))); } // Crank case @@ -2826,9 +2805,9 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { ShowSevereError(state, std::string{RoutineName} + cCurrentModuleObject + "=\"" + thisVrfFluidCtrl.Name + "\", invalid"); ShowContinueError(state, - EnergyPlus::format("...not found {}=\"{}\".", - cAlphaFieldNames(Count2Index + 2 * NumCompSpd), - cAlphaArgs(Count2Index + 2 * NumCompSpd))); + std::format("...not found {}=\"{}\".", + cAlphaFieldNames(Count2Index + 2 * NumCompSpd), + cAlphaArgs(Count2Index + 2 * NumCompSpd))); } ErrorsFound = true; } else { @@ -2856,9 +2835,9 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { ShowSevereError(state, std::string{RoutineName} + cCurrentModuleObject + "=\"" + thisVrfFluidCtrl.Name + "\", invalid"); ShowContinueError(state, - EnergyPlus::format("...not found {}=\"{}\".", - cAlphaFieldNames(Count2Index + 2 * NumCompSpd + 1), - cAlphaArgs(Count2Index + 2 * NumCompSpd + 1))); + std::format("...not found {}=\"{}\".", + cAlphaFieldNames(Count2Index + 2 * NumCompSpd + 1), + cAlphaArgs(Count2Index + 2 * NumCompSpd + 1))); } ErrorsFound = true; } else { @@ -2954,28 +2933,28 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfFluidCtrlHR.MinOATCooling >= thisVrfFluidCtrlHR.MaxOATCooling) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrlHR.Name + "\""); ShowContinueError(state, - EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(3), - thisVrfFluidCtrlHR.MinOATCooling, - thisVrfFluidCtrlHR.MaxOATCooling)); + std::format("... {} ({:.3f}) must be less than maximum ({:.3f}).", + cNumericFieldNames(3), + thisVrfFluidCtrlHR.MinOATCooling, + thisVrfFluidCtrlHR.MaxOATCooling)); ErrorsFound = true; } if (thisVrfFluidCtrlHR.MinOATHeating >= thisVrfFluidCtrlHR.MaxOATHeating) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrlHR.Name + "\""); ShowContinueError(state, - EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(5), - thisVrfFluidCtrlHR.MinOATHeating, - thisVrfFluidCtrlHR.MaxOATHeating)); + std::format("... {} ({:.3f}) must be less than maximum ({:.3f}).", + cNumericFieldNames(5), + thisVrfFluidCtrlHR.MinOATHeating, + thisVrfFluidCtrlHR.MaxOATHeating)); ErrorsFound = true; } if (thisVrfFluidCtrlHR.MinOATHeatRecovery >= thisVrfFluidCtrlHR.MaxOATHeatRecovery) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrlHR.Name + "\""); ShowContinueError(state, - EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(7), - thisVrfFluidCtrlHR.MinOATHeating, - thisVrfFluidCtrlHR.MaxOATHeating)); + std::format("... {} ({:.3f}) must be less than maximum ({:.3f}).", + cNumericFieldNames(7), + thisVrfFluidCtrlHR.MinOATHeating, + thisVrfFluidCtrlHR.MaxOATHeating)); ErrorsFound = true; } if (thisVrfFluidCtrlHR.MinOATHeatRecovery < thisVrfFluidCtrlHR.MinOATCooling && @@ -2983,32 +2962,28 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) ShowWarningError(state, cCurrentModuleObject + " = \"" + thisVrfFluidCtrlHR.Name + "\", " + cNumericFieldNames(7) + " is less than the minimum temperature in heat pump mode."); - ShowContinueError(state, EnergyPlus::format("...{} = {:.2T} C", cNumericFieldNames(7), thisVrfFluidCtrlHR.MinOATHeatRecovery)); - ShowContinueError(state, - EnergyPlus::format("...Minimum Outdoor Temperature in Cooling Mode = {:.2T} C", thisVrfFluidCtrlHR.MinOATCooling)); - ShowContinueError(state, - EnergyPlus::format("...Minimum Outdoor Temperature in Heating Mode = {:.2T} C", thisVrfFluidCtrlHR.MinOATHeating)); + ShowContinueError(state, std::format("...{} = {:.2f} C", cNumericFieldNames(7), thisVrfFluidCtrlHR.MinOATHeatRecovery)); + ShowContinueError(state, std::format("...Minimum Outdoor Temperature in Cooling Mode = {:.2f} C", thisVrfFluidCtrlHR.MinOATCooling)); + ShowContinueError(state, std::format("...Minimum Outdoor Temperature in Heating Mode = {:.2f} C", thisVrfFluidCtrlHR.MinOATHeating)); ShowContinueError(state, "...Minimum Outdoor Temperature in Heat Recovery Mode reset to lesser of cooling or heating minimum temperature " "and simulation continues."); thisVrfFluidCtrlHR.MinOATHeatRecovery = min(thisVrfFluidCtrlHR.MinOATCooling, thisVrfFluidCtrlHR.MinOATHeating); - ShowContinueError(state, EnergyPlus::format("... adjusted {} = {:.2T} C", cNumericFieldNames(7), thisVrfFluidCtrlHR.MinOATHeatRecovery)); + ShowContinueError(state, std::format("... adjusted {} = {:.2f} C", cNumericFieldNames(7), thisVrfFluidCtrlHR.MinOATHeatRecovery)); } if (thisVrfFluidCtrlHR.MaxOATHeatRecovery > thisVrfFluidCtrlHR.MaxOATCooling && thisVrfFluidCtrlHR.MaxOATHeatRecovery > thisVrfFluidCtrlHR.MaxOATHeating) { ShowWarningError(state, cCurrentModuleObject + " = \"" + thisVrfFluidCtrlHR.Name + "\", " + cNumericFieldNames(8) + " is greater than the maximum temperature in heat pump mode."); - ShowContinueError(state, EnergyPlus::format("...{} = {:.2T} C", cNumericFieldNames(8), thisVrfFluidCtrlHR.MaxOATHeatRecovery)); - ShowContinueError(state, - EnergyPlus::format("...Maximum Outdoor Temperature in Cooling Mode = {:.2T} C", thisVrfFluidCtrlHR.MaxOATCooling)); - ShowContinueError(state, - EnergyPlus::format("...Maximum Outdoor Temperature in Heating Mode = {:.2T} C", thisVrfFluidCtrlHR.MaxOATHeating)); + ShowContinueError(state, std::format("...{} = {:.2f} C", cNumericFieldNames(8), thisVrfFluidCtrlHR.MaxOATHeatRecovery)); + ShowContinueError(state, std::format("...Maximum Outdoor Temperature in Cooling Mode = {:.2f} C", thisVrfFluidCtrlHR.MaxOATCooling)); + ShowContinueError(state, std::format("...Maximum Outdoor Temperature in Heating Mode = {:.2f} C", thisVrfFluidCtrlHR.MaxOATHeating)); ShowContinueError(state, "...Maximum Outdoor Temperature in Heat Recovery Mode reset to greater of cooling or heating maximum temperature " "and simulation continues."); thisVrfFluidCtrlHR.MaxOATHeatRecovery = max(thisVrfFluidCtrlHR.MaxOATCooling, thisVrfFluidCtrlHR.MaxOATHeating); - ShowContinueError(state, EnergyPlus::format("... adjusted {} = {:.2T} C", cNumericFieldNames(8), thisVrfFluidCtrlHR.MaxOATHeatRecovery)); + ShowContinueError(state, std::format("... adjusted {} = {:.2f} C", cNumericFieldNames(8), thisVrfFluidCtrlHR.MaxOATHeatRecovery)); } // IU Control Type @@ -3032,19 +3007,19 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (thisVrfFluidCtrlHR.IUEvapTempLow >= thisVrfFluidCtrlHR.IUEvapTempHigh) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrlHR.Name + "\""); ShowContinueError(state, - EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(11), - thisVrfFluidCtrlHR.IUEvapTempLow, - thisVrfFluidCtrlHR.IUEvapTempHigh)); + std::format("... {} ({:.3f}) must be less than maximum ({:.3f}).", + cNumericFieldNames(11), + thisVrfFluidCtrlHR.IUEvapTempLow, + thisVrfFluidCtrlHR.IUEvapTempHigh)); ErrorsFound = true; } if (thisVrfFluidCtrlHR.IUCondTempLow >= thisVrfFluidCtrlHR.IUCondTempHigh) { ShowSevereError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrlHR.Name + "\""); ShowContinueError(state, - EnergyPlus::format("... {} ({:.3T}) must be less than maximum ({:.3T}).", - cNumericFieldNames(13), - thisVrfFluidCtrlHR.IUCondTempLow, - thisVrfFluidCtrlHR.IUCondTempHigh)); + std::format("... {} ({:.3f}) must be less than maximum ({:.3f}).", + cNumericFieldNames(13), + thisVrfFluidCtrlHR.IUCondTempLow, + thisVrfFluidCtrlHR.IUCondTempHigh)); ErrorsFound = true; } @@ -3095,11 +3070,10 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) thisVrfFluidCtrlHR.C3Te = state.dataCurveManager->curves(indexOUEvapTempCurve)->coeff[2]; } else { ShowSevereError(state, std::string{RoutineName} + cCurrentModuleObject + "=\"" + thisVrfFluidCtrlHR.Name + "\", invalid"); - ShowContinueError( - state, - EnergyPlus::format("...illegal {} type for this object = {}", - cAlphaFieldNames(6), - Curve::objectNames[static_cast(state.dataCurveManager->curves(indexOUEvapTempCurve)->curveType)])); + ShowContinueError(state, + std::format("...illegal {} type for this object = {}", + cAlphaFieldNames(6), + Curve::objectNames[static_cast(state.dataCurveManager->curves(indexOUEvapTempCurve)->curveType)])); ShowContinueError(state, "... Curve type must be Quadratic."); ErrorsFound = true; } @@ -3124,11 +3098,10 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) thisVrfFluidCtrlHR.C3Tc = state.dataCurveManager->curves(indexOUCondTempCurve)->coeff[2]; } else { ShowSevereError(state, std::string{RoutineName} + cCurrentModuleObject + "=\"" + thisVrfFluidCtrlHR.Name + "\", invalid"); - ShowContinueError( - state, - EnergyPlus::format("...illegal {} type for this object = {}", - cAlphaFieldNames(7), - Curve::objectNames[static_cast(state.dataCurveManager->curves(indexOUCondTempCurve)->curveType)])); + ShowContinueError(state, + std::format("...illegal {} type for this object = {}", + cAlphaFieldNames(7), + Curve::objectNames[static_cast(state.dataCurveManager->curves(indexOUCondTempCurve)->curveType)])); ShowContinueError(state, "... Curve type must be Quadratic."); ErrorsFound = true; } @@ -3155,7 +3128,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) ShowWarningError(state, cCurrentModuleObject + ", \"" + thisVrfFluidCtrlHR.Name + "\", invalid \" " + cNumericFieldNames(26) + "\" value."); ShowContinueError(state, "...Equivalent length of main pipe should be greater than or equal to the actual length."); - ShowContinueError(state, EnergyPlus::format("...The value is recalculated based on the provided \"{}\" value.", cNumericFieldNames(25))); + ShowContinueError(state, std::format("...The value is recalculated based on the provided \"{}\" value.", cNumericFieldNames(25))); } // Crank case @@ -3274,9 +3247,9 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { ShowSevereError(state, std::string{RoutineName} + cCurrentModuleObject + "=\"" + thisVrfFluidCtrlHR.Name + "\", invalid"); ShowContinueError(state, - EnergyPlus::format("...not found {}=\"{}\".", - cAlphaFieldNames(Count2Index + 2 * NumCompSpd), - cAlphaArgs(Count2Index + 2 * NumCompSpd))); + std::format("...not found {}=\"{}\".", + cAlphaFieldNames(Count2Index + 2 * NumCompSpd), + cAlphaArgs(Count2Index + 2 * NumCompSpd))); } ErrorsFound = true; } else { @@ -3304,9 +3277,9 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { ShowSevereError(state, std::string{RoutineName} + cCurrentModuleObject + "=\"" + thisVrfFluidCtrlHR.Name + "\", invalid"); ShowContinueError(state, - EnergyPlus::format("...not found {}=\"{}\".", - cAlphaFieldNames(Count2Index + 2 * NumCompSpd + 1), - cAlphaArgs(Count2Index + 2 * NumCompSpd + 1))); + std::format("...not found {}=\"{}\".", + cAlphaFieldNames(Count2Index + 2 * NumCompSpd + 1), + cAlphaArgs(Count2Index + 2 * NumCompSpd + 1))); } ErrorsFound = true; } else { @@ -3450,7 +3423,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else if (thisVrfTU.fanType != state.dataFans->fans(thisVrfTU.FanIndex)->type) { ShowSevereError(state, cCurrentModuleObject + " = " + thisVrfTU.Name); ShowContinueError(state, "Fan type specified = " + cAlphaArgs(7)); - ShowContinueError(state, EnergyPlus::format("Actual type of fan {} = {}", FanName, HVAC::fanTypeNames[(int)thisVrfTU.fanType])); + ShowContinueError(state, std::format("Actual type of fan {} = {}", FanName, HVAC::fanTypeNames[(int)thisVrfTU.fanType])); ErrorsFound = true; } @@ -3501,8 +3474,8 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) 0.0, Clusive::In, 1.0, - EnergyPlus::format("For fan type = {}, operating mode must be continuous (schedule values > 0).", - HVAC::fanTypeNames[(int)HVAC::FanType::Constant])); + std::format("For fan type = {}, operating mode must be continuous (schedule values > 0).", + HVAC::fanTypeNames[(int)HVAC::FanType::Constant])); ErrorsFound = true; } } // IF (FanType_Num == HVAC::FanType_SimpleOnOff .OR. FanType_Num == HVAC::FanType_SimpleConstVolume)THEN @@ -3629,8 +3602,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { ShowSevereError(state, cCurrentModuleObject + " \"" + thisVrfTU.Name + "\""); ShowContinueError( - state, - EnergyPlus::format("... when checking {} \"{}\"", HVAC::coilTypeNames[(int)thisVrfTU.coolCoilType], cAlphaArgs(12))); + state, std::format("... when checking {} \"{}\"", HVAC::coilTypeNames[(int)thisVrfTU.coolCoilType], cAlphaArgs(12))); ShowContinueError(state, "... terminal unit not connected to condenser."); ShowContinueError(state, "... check that terminal unit is specified in a terminal unit list object."); ShowContinueError(state, @@ -3700,8 +3672,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { ShowSevereError(state, cCurrentModuleObject + " \"" + thisVrfTU.Name + "\""); ShowContinueError( - state, - EnergyPlus::format("... when checking {} \"{}\"", HVAC::coilTypeNames[(int)thisVrfTU.coolCoilType], cAlphaArgs(12) + "\"")); + state, std::format("... when checking {} \"{}\"", HVAC::coilTypeNames[(int)thisVrfTU.coolCoilType], cAlphaArgs(12) + "\"")); ShowContinueError(state, "... terminal unit not connected to condenser."); ShowContinueError(state, "... check that terminal unit is specified in a terminal unit list object."); ShowContinueError( @@ -3957,8 +3928,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { ShowSevereError(state, cCurrentModuleObject + " \"" + thisVrfTU.Name + "\""); ShowContinueError( - state, - EnergyPlus::format("... when checking {} \"{}\"", HVAC::coilTypeNames[(int)thisVrfTU.heatCoilType], cAlphaArgs(14))); + state, std::format("... when checking {} \"{}\"", HVAC::coilTypeNames[(int)thisVrfTU.heatCoilType], cAlphaArgs(14))); ShowContinueError(state, "... terminal unit not connected to condenser."); ShowContinueError(state, "... check that terminal unit is specified in a terminal unit list object."); ShowContinueError(state, @@ -4173,7 +4143,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) if (state.dataHVACVarRefFlow->VRF(thisVrfTU.VRFSysNum).HeatingPerformanceOATType == HVAC::OATType::WetBulb) { checkCurveIsNormalizedToOne( state, - EnergyPlus::format("GetDXCoils: {}", HVAC::coilTypeNames[(int)thisVrfTU.heatCoilType]), + std::format("GetDXCoils: {}", HVAC::coilTypeNames[(int)thisVrfTU.heatCoilType]), DXCoils::GetDXCoilName( state, thisVrfTU.HeatCoilIndex, ErrorsFound, HVAC::coilTypeNames[(int)thisVrfTU.heatCoilType]), GetDXCoilCapFTCurveIndex(state, thisVrfTU.HeatCoilIndex, ErrorsFound), @@ -4184,7 +4154,7 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else if (state.dataHVACVarRefFlow->VRF(thisVrfTU.VRFSysNum).HeatingPerformanceOATType == HVAC::OATType::DryBulb) { checkCurveIsNormalizedToOne( state, - EnergyPlus::format("GetDXCoils: {}", HVAC::coilTypeNames[(int)thisVrfTU.heatCoilType]), + std::format("GetDXCoils: {}", HVAC::coilTypeNames[(int)thisVrfTU.heatCoilType]), DXCoils::GetDXCoilName( state, thisVrfTU.HeatCoilIndex, ErrorsFound, HVAC::coilTypeNames[(int)thisVrfTU.heatCoilType]), GetDXCoilCapFTCurveIndex(state, thisVrfTU.HeatCoilIndex, ErrorsFound), @@ -4203,8 +4173,8 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } } else { ShowSevereError(state, cCurrentModuleObject + " \"" + thisVrfTU.Name + "\""); - ShowContinueError( - state, EnergyPlus::format("... when checking {} \"{}\"", HVAC::coilTypeNames[(int)thisVrfTU.heatCoilType], cAlphaArgs(14))); + ShowContinueError(state, + std::format("... when checking {} \"{}\"", HVAC::coilTypeNames[(int)thisVrfTU.heatCoilType], cAlphaArgs(14))); ShowContinueError(state, "... terminal unit not connected to condenser."); ShowContinueError(state, "... check that terminal unit is specified in a terminal unit list object."); ShowContinueError( @@ -4686,9 +4656,8 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) int const tuPtr = thisTUList.ZoneTUPtr(VRFTUNum); if (tuPtr == 0) { // TU name in zone terminal unit list not found - ShowSevereError(state, EnergyPlus::format("ZoneTerminalUnitList \"{}\"", thisTUList.Name)); - ShowContinueError(state, - EnergyPlus::format("...Zone Terminal Unit = {} improperly connected to system.", thisTUList.ZoneTUName(VRFTUNum))); + ShowSevereError(state, std::format("ZoneTerminalUnitList \"{}\"", thisTUList.Name)); + ShowContinueError(state, std::format("...Zone Terminal Unit = {} improperly connected to system.", thisTUList.ZoneTUName(VRFTUNum))); ShowContinueError(state, "...either the ZoneHVAC:TerminalUnit:VariableRefrigerantFlow object does not exist,"); ShowContinueError(state, "...the ZoneHVAC:TerminalUnit:VariableRefrigerantFlow object name is misspelled,"); ShowContinueError(state, "...or the ZoneTerminalUnitList object is not named in an AirConditioner:VariableRefrigerantFlow object."); @@ -4699,9 +4668,9 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) auto &thisVRFSys = state.dataHVACVarRefFlow->VRF(sysNum); if (thisTUList.NumTUInList == 1 && thisVRFSys.VRFAlgorithmType == AlgorithmType::SysCurve) { if (thisVRFSys.HeatRecoveryUsed) { - ShowWarningError(state, EnergyPlus::format("ZoneTerminalUnitList \"{}\"", thisTUList.Name)); + ShowWarningError(state, std::format("ZoneTerminalUnitList \"{}\"", thisTUList.Name)); ShowWarningError(state, "...Only 1 Terminal Unit connected to system and heat recovery is selected."); - ShowContinueError(state, EnergyPlus::format("...Heat recovery will be disabled for {}.", thisVRFSys.Name)); + ShowContinueError(state, std::format("...Heat recovery will be disabled for {}.", thisVRFSys.Name)); thisVRFSys.HeatRecoveryUsed = false; } } @@ -4713,21 +4682,20 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) // warn when number of ZoneTerminalUnitList different from number of AirConditioner:VariableRefrigerantFlow if (state.dataHVACVarRefFlow->NumVRFTULists != state.dataHVACVarRefFlow->NumVRFCond) { ShowSevereError(state, - EnergyPlus::format("The number of AirConditioner:VariableRefrigerantFlow objects ({}) does not match the number of " - "ZoneTerminalUnitList objects ({}).", - state.dataHVACVarRefFlow->NumVRFCond, - state.dataHVACVarRefFlow->NumVRFTULists)); + std::format("The number of AirConditioner:VariableRefrigerantFlow objects ({}) does not match the number of " + "ZoneTerminalUnitList objects ({}).", + state.dataHVACVarRefFlow->NumVRFCond, + state.dataHVACVarRefFlow->NumVRFTULists)); for (int NumCond = 1; NumCond <= state.dataHVACVarRefFlow->NumVRFCond; ++NumCond) { if (state.dataHVACVarRefFlow->VRF(NumCond).ZoneTUListPtr > 0) { - ShowContinueError( - state, - EnergyPlus::format("...AirConditioner:VariableRefrigerantFlow = {} specifies Zone Terminal Unit List Name = {}", - state.dataHVACVarRefFlow->VRF(NumCond).Name, - state.dataHVACVarRefFlow->TerminalUnitList(state.dataHVACVarRefFlow->VRF(NumCond).ZoneTUListPtr).Name)); + ShowContinueError(state, + std::format("...AirConditioner:VariableRefrigerantFlow = {} specifies Zone Terminal Unit List Name = {}", + state.dataHVACVarRefFlow->VRF(NumCond).Name, + state.dataHVACVarRefFlow->TerminalUnitList(state.dataHVACVarRefFlow->VRF(NumCond).ZoneTUListPtr).Name)); } else { ShowContinueError(state, - EnergyPlus::format("...AirConditioner:VariableRefrigerantFlow = {} Zone Terminal Unit List Name not found.", - state.dataHVACVarRefFlow->VRF(NumCond).Name)); + std::format("...AirConditioner:VariableRefrigerantFlow = {} Zone Terminal Unit List Name not found.", + state.dataHVACVarRefFlow->VRF(NumCond).Name)); } } ShowContinueError(state, "...listing ZoneTerminalUnitList objects."); @@ -4921,14 +4889,14 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) OutputProcessor::StoreType::Average, thisVrf.Name); SetupOutputVariable(state, - EnergyPlus::format("VRF Heat Pump Cooling {} Rate", sFuelType), + std::format("VRF Heat Pump Cooling {} Rate", sFuelType), Constant::Units::W, thisVrf.ElecCoolingPower, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, thisVrf.Name); SetupOutputVariable(state, - EnergyPlus::format("VRF Heat Pump Cooling {} Energy", sFuelType), + std::format("VRF Heat Pump Cooling {} Energy", sFuelType), Constant::Units::J, thisVrf.CoolElecConsumption, OutputProcessor::TimeStepType::System, @@ -4938,14 +4906,14 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) OutputProcessor::Group::HVAC, OutputProcessor::EndUseCat::Cooling); SetupOutputVariable(state, - EnergyPlus::format("VRF Heat Pump Heating {} Rate", sFuelType), + std::format("VRF Heat Pump Heating {} Rate", sFuelType), Constant::Units::W, thisVrf.ElecHeatingPower, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, thisVrf.Name); SetupOutputVariable(state, - EnergyPlus::format("VRF Heat Pump Heating {} Energy", sFuelType), + std::format("VRF Heat Pump Heating {} Energy", sFuelType), Constant::Units::J, thisVrf.HeatElecConsumption, OutputProcessor::TimeStepType::System, @@ -5111,14 +5079,14 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound) } else { // defrost energy applied to fuel type SetupOutputVariable(state, - EnergyPlus::format("VRF Heat Pump Defrost {} Rate", sFuelType), + std::format("VRF Heat Pump Defrost {} Rate", sFuelType), Constant::Units::W, thisVrf.DefrostPower, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, thisVrf.Name); SetupOutputVariable(state, - EnergyPlus::format("VRF Heat Pump Defrost {} Energy", sFuelType), + std::format("VRF Heat Pump Defrost {} Energy", sFuelType), Constant::Units::J, thisVrf.DefrostConsumption, OutputProcessor::TimeStepType::System, @@ -5353,11 +5321,11 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & // the following is checked regardless of fan placement if (CoolingCoilPresent && HeatingCoilPresent) { if (coolCoilAirOutNode != heatCoilAirInNode) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "The cooling coil air outlet node name must match the heating coil air inlet node name."); if (coolCoilAirOutNode > 0 && heatCoilAirInNode > 0) { - ShowContinueError(state, EnergyPlus::format("... Cooling coil air outlet node = {}", nodeID(coolCoilAirOutNode))); - ShowContinueError(state, EnergyPlus::format("... Heating coil air inlet node = {}", nodeID(heatCoilAirInNode))); + ShowContinueError(state, std::format("... Cooling coil air outlet node = {}", nodeID(coolCoilAirOutNode))); + ShowContinueError(state, std::format("... Heating coil air inlet node = {}", nodeID(heatCoilAirInNode))); } ErrorsFound = true; } @@ -5367,38 +5335,38 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & if (fanPlace == HVAC::FanPlace::DrawThru || !FanPresent) { if (OAMixerUsed) { if (VRFTUInletNodeNum != VRFTUOAMixerRetNodeNum) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "... For draw thru or no fan when an OA mixer is specified the terminal unit " "inlet node name must match the OA mixer return air stream node name."); if (VRFTUInletNodeNum > 0 && VRFTUOAMixerRetNodeNum > 0) { - ShowContinueError(state, EnergyPlus::format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); - ShowContinueError(state, EnergyPlus::format("... OA mixer return air stream node name = {}.", nodeID(VRFTUOAMixerRetNodeNum))); + ShowContinueError(state, std::format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); + ShowContinueError(state, std::format("... OA mixer return air stream node name = {}.", nodeID(VRFTUOAMixerRetNodeNum))); } ErrorsFound = true; } // check mixer outlet with next component if (CoolingCoilPresent) { if (VRFTUOAMixerMixedNodeNum != coolCoilAirInNode) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "... For draw thru or no fan when an OA mixer is specified and a cooling coil is present " "the OA mixer mixed air node name must match the cooling coil inlet node name."); if (VRFTUOAMixerMixedNodeNum > 0 && coolCoilAirInNode > 0) { - ShowContinueError(state, EnergyPlus::format("... OA mixer mixed air node name = {}.", nodeID(VRFTUOAMixerMixedNodeNum))); - ShowContinueError(state, EnergyPlus::format("... Cooling coil inlet node name = {}.", nodeID(coolCoilAirInNode))); + ShowContinueError(state, std::format("... OA mixer mixed air node name = {}.", nodeID(VRFTUOAMixerMixedNodeNum))); + ShowContinueError(state, std::format("... Cooling coil inlet node name = {}.", nodeID(coolCoilAirInNode))); } ErrorsFound = true; } } else if (HeatingCoilPresent) { if (VRFTUOAMixerMixedNodeNum != heatCoilAirInNode) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "... For draw thru or no fan when an OA mixer is specified and a cooling coil is not present " "the OA mixer mixed air node name must match the heating coil inlet node name."); if (VRFTUOAMixerMixedNodeNum > 0 && heatCoilAirInNode > 0) { - ShowContinueError(state, EnergyPlus::format("... OA mixer mixed air node name = {}.", nodeID(VRFTUOAMixerMixedNodeNum))); - ShowContinueError(state, EnergyPlus::format("... Heating coil inlet node name = {}.", nodeID(heatCoilAirInNode))); + ShowContinueError(state, std::format("... OA mixer mixed air node name = {}.", nodeID(VRFTUOAMixerMixedNodeNum))); + ShowContinueError(state, std::format("... Heating coil inlet node name = {}.", nodeID(heatCoilAirInNode))); } ErrorsFound = true; } @@ -5406,26 +5374,26 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & } else { // OAMixer not used if (CoolingCoilPresent) { if (VRFTUInletNodeNum != coolCoilAirInNode) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError( state, "... For draw thru or no fan when no OA mixer is specified and a cooling coil is present the terminal unit inlet " "node name must match the cooling coil inlet node name."); if (VRFTUInletNodeNum > 0 && coolCoilAirInNode > 0) { - ShowContinueError(state, EnergyPlus::format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); - ShowContinueError(state, EnergyPlus::format("... Cooling coil inlet node name = {}.", nodeID(coolCoilAirInNode))); + ShowContinueError(state, std::format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); + ShowContinueError(state, std::format("... Cooling coil inlet node name = {}.", nodeID(coolCoilAirInNode))); } ErrorsFound = true; } } else if (HeatingCoilPresent) { if (VRFTUInletNodeNum != heatCoilAirInNode) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "... For draw thru or no fan when no cooling coil or OA mixer is specified the terminal unit inlet " "node name must match the heating coil inlet node name."); if (VRFTUInletNodeNum > 0 && heatCoilAirInNode > 0) { - ShowContinueError(state, EnergyPlus::format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); - ShowContinueError(state, EnergyPlus::format("... Heating coil inlet node name = {}.", nodeID(heatCoilAirInNode))); + ShowContinueError(state, std::format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); + ShowContinueError(state, std::format("... Heating coil inlet node name = {}.", nodeID(heatCoilAirInNode))); } ErrorsFound = true; } @@ -5434,25 +5402,25 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & } if (fanPlace == HVAC::FanPlace::BlowThru && !OAMixerUsed) { if (VRFTUInletNodeNum != fanInletNode) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "... For blow thru fan when no OA mixer is specified the terminal unit inlet " "node name must match the fan inlet node name."); if (VRFTUInletNodeNum > 0 && fanInletNode > 0) { - ShowContinueError(state, EnergyPlus::format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); - ShowContinueError(state, EnergyPlus::format("... Fan inlet node name = {}.", nodeID(fanInletNode))); + ShowContinueError(state, std::format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); + ShowContinueError(state, std::format("... Fan inlet node name = {}.", nodeID(fanInletNode))); } ErrorsFound = true; } } else if (OAMixerUsed) { // when OA mixer is used TU inlet = OAMixer return node regardless of fan placement if (VRFTUInletNodeNum != VRFTUOAMixerRetNodeNum) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "... When an OA mixer is specified the terminal unit inlet " "node name must match the OA mixer return node name."); if (VRFTUInletNodeNum > 0 && VRFTUOAMixerRetNodeNum > 0) { - ShowContinueError(state, EnergyPlus::format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); - ShowContinueError(state, EnergyPlus::format("... Fan inlet node name = {}.", nodeID(VRFTUOAMixerRetNodeNum))); + ShowContinueError(state, std::format("... Terminal unit inlet node name = {}.", nodeID(VRFTUInletNodeNum))); + ShowContinueError(state, std::format("... Fan inlet node name = {}.", nodeID(VRFTUOAMixerRetNodeNum))); } ErrorsFound = true; } @@ -5461,26 +5429,26 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & if (CoolingCoilPresent) { if (fanPlace == HVAC::FanPlace::BlowThru) { if (fanOutletNode != coolCoilAirInNode) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "... For blow thru fan when a cooling coil is present " "fan outlet node name must match the cooling coil inlet node name."); if (fanOutletNode > 0 && coolCoilAirInNode > 0) { - ShowContinueError(state, EnergyPlus::format("... The fan outlet node name = {}.", nodeID(fanOutletNode))); - ShowContinueError(state, EnergyPlus::format("... Cooling coil inlet node name = {}.", nodeID(coolCoilAirInNode))); + ShowContinueError(state, std::format("... The fan outlet node name = {}.", nodeID(fanOutletNode))); + ShowContinueError(state, std::format("... Cooling coil inlet node name = {}.", nodeID(coolCoilAirInNode))); } ErrorsFound = true; } } if (!HeatingCoilPresent && fanPlace == HVAC::FanPlace::DrawThru) { if (coolCoilAirOutNode != fanInletNode) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "... For draw thru fan when a heating coil is not present " "the cooling coil outlet node name must match the fan inlet node name."); if (coolCoilAirOutNode > 0 && fanInletNode > 0) { - ShowContinueError(state, EnergyPlus::format("... Cooling coil outlet node name = {}.", nodeID(coolCoilAirOutNode))); - ShowContinueError(state, EnergyPlus::format("... The fan inlet node name = {}.", nodeID(fanInletNode))); + ShowContinueError(state, std::format("... Cooling coil outlet node name = {}.", nodeID(coolCoilAirOutNode))); + ShowContinueError(state, std::format("... The fan inlet node name = {}.", nodeID(fanInletNode))); } ErrorsFound = true; } @@ -5489,13 +5457,13 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & if (HeatingCoilPresent) { if (fanPlace == HVAC::FanPlace::DrawThru) { if (heatCoilAirOutNode != fanInletNode) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "... For draw thru fan when a heating coil is present " "the heating coil outlet node name must match the fan inlet node name."); if (heatCoilAirOutNode > 0 && fanInletNode > 0) { - ShowContinueError(state, EnergyPlus::format("... Heating coil outlet node name = {}.", nodeID(heatCoilAirOutNode))); - ShowContinueError(state, EnergyPlus::format("... The fan inlet node name = {}.", nodeID(fanInletNode))); + ShowContinueError(state, std::format("... Heating coil outlet node name = {}.", nodeID(heatCoilAirOutNode))); + ShowContinueError(state, std::format("... The fan inlet node name = {}.", nodeID(fanInletNode))); } ErrorsFound = true; } @@ -5503,76 +5471,73 @@ void CheckVRFTUNodeConnections(EnergyPlusData &state, int const VRFTUNum, bool & } if (SuppHeatingCoilPresent) { if (SuppHeatCoilAirOutletNode != VRFTUOutletNodeNum) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "... The supplemental heating coil outlet node name must match the terminal unit outlet node name."); if (SuppHeatCoilAirOutletNode > 0 && VRFTUOutletNodeNum > 0) { - ShowContinueError(state, - EnergyPlus::format("... Supplemental heating coil outlet node name = {}.", nodeID(SuppHeatCoilAirOutletNode))); - ShowContinueError(state, EnergyPlus::format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); + ShowContinueError(state, std::format("... Supplemental heating coil outlet node name = {}.", nodeID(SuppHeatCoilAirOutletNode))); + ShowContinueError(state, std::format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); } ErrorsFound = true; } if (fanPlace == HVAC::FanPlace::DrawThru) { if (fanOutletNode != SuppHeatCoilAirInletNode) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "... For draw thru fan when a supplemental heating coil is present " "the fan outlet node name must match the supplemental heating coil inlet node name."); if (fanOutletNode > 0 && SuppHeatCoilAirInletNode > 0) { - ShowContinueError(state, EnergyPlus::format("... Fan outlet node name = {}.", nodeID(fanOutletNode))); - ShowContinueError(state, - EnergyPlus::format("... Supplemental heating coil inlet node name = {}.", nodeID(SuppHeatCoilAirInletNode))); + ShowContinueError(state, std::format("... Fan outlet node name = {}.", nodeID(fanOutletNode))); + ShowContinueError(state, std::format("... Supplemental heating coil inlet node name = {}.", nodeID(SuppHeatCoilAirInletNode))); } ErrorsFound = true; } } else { if (heatCoilAirOutNode != SuppHeatCoilAirInletNode) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "... For blow thru or no fan when a supplemental heating coil is present the heating " "coil outlet node name must match the supplemental heating coil inlet node name."); if (heatCoilAirOutNode > 0 && SuppHeatCoilAirInletNode > 0) { - ShowContinueError(state, EnergyPlus::format("... Heating coil outlet node name = {}.", nodeID(heatCoilAirOutNode))); - ShowContinueError(state, - EnergyPlus::format("... Supplemental heating coil inlet node name = {}.", nodeID(SuppHeatCoilAirInletNode))); + ShowContinueError(state, std::format("... Heating coil outlet node name = {}.", nodeID(heatCoilAirOutNode))); + ShowContinueError(state, std::format("... Supplemental heating coil inlet node name = {}.", nodeID(SuppHeatCoilAirInletNode))); } ErrorsFound = true; } } } else if (CoolingCoilPresent && !HeatingCoilPresent && (fanPlace == HVAC::FanPlace::BlowThru || !FanPresent)) { if (coolCoilAirOutNode != VRFTUOutletNodeNum) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "... For blow through or no fan and no heating or supplemental heating coil the cooling coil outlet node name must " "match the terminal unit outlet node name."); if (coolCoilAirOutNode > 0 && VRFTUOutletNodeNum > 0) { - ShowContinueError(state, EnergyPlus::format("... Cooling coil outlet node name = {}.", nodeID(coolCoilAirOutNode))); - ShowContinueError(state, EnergyPlus::format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); + ShowContinueError(state, std::format("... Cooling coil outlet node name = {}.", nodeID(coolCoilAirOutNode))); + ShowContinueError(state, std::format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); } ErrorsFound = true; } if (fanPlace == HVAC::FanPlace::DrawThru) { if (fanOutletNode != VRFTUOutletNodeNum) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "... For draw through fan and no supplemental heating coil the fan outlet node name must " "match the terminal unit outlet node name."); if (fanOutletNode > 0 && VRFTUOutletNodeNum > 0) { - ShowContinueError(state, EnergyPlus::format("... Fan outlet node name = {}.", nodeID(fanOutletNode))); - ShowContinueError(state, EnergyPlus::format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); + ShowContinueError(state, std::format("... Fan outlet node name = {}.", nodeID(fanOutletNode))); + ShowContinueError(state, std::format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); } ErrorsFound = true; } } } else if (fanPlace == HVAC::FanPlace::DrawThru) { if (fanOutletNode != VRFTUOutletNodeNum) { - ShowSevereError(state, fmt::format("{}=\"{}\",", cTerminalUnitType, cTUName)); + ShowSevereError(state, std::format("{}=\"{}\",", cTerminalUnitType, cTUName)); ShowContinueError(state, "... For draw through fan and no supplemental heating coil the fan outlet node name must " "match the terminal unit outlet node name."); if (fanOutletNode > 0 && VRFTUOutletNodeNum > 0) { - ShowContinueError(state, EnergyPlus::format("... Fan outlet node name = {}.", nodeID(fanOutletNode))); - ShowContinueError(state, EnergyPlus::format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); + ShowContinueError(state, std::format("... Fan outlet node name = {}.", nodeID(fanOutletNode))); + ShowContinueError(state, std::format("... Terminal unit outlet node name = {}.", nodeID(VRFTUOutletNodeNum))); } ErrorsFound = true; } @@ -5712,7 +5677,7 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool state, HVAC::coilTypeNames[(int)vrfTU1.suppHeatCoilType], vrfTU1.SuppHeatCoilName, vrfTU1.MaxHeatAirVolFlow, errFlag); if (errFlag) { - ShowFatalError(state, EnergyPlus::format("{}: Program terminated for previous conditions.", RoutineName)); + ShowFatalError(state, std::format("{}: Program terminated for previous conditions.", RoutineName)); } vrfTU1.SuppHeatCoilFluidMaxFlow = WaterCoils::GetCoilMaxWaterFlowRate(state, "Coil:Heating:Water", vrfTU1.SuppHeatCoilName, ErrorsFound); @@ -5733,7 +5698,7 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool PlantUtilities::ScanPlantLoopsForObject( state, vrfTU1.SuppHeatCoilName, PlantEquipmentType::CoilSteamAirHeating, vrfTU1.SuppHeatCoilPlantLoc, errFlag, _, _, _, _, _); if (errFlag) { - ShowFatalError(state, EnergyPlus::format("{}: Program terminated for previous conditions.", RoutineName)); + ShowFatalError(state, std::format("{}: Program terminated for previous conditions.", RoutineName)); } vrfTU1.SuppHeatCoilFluidMaxFlow = SteamCoils::GetCoilMaxSteamFlowRate(state, vrfTU1.SuppHeatCoilIndex, ErrorsFound); if (vrfTU1.SuppHeatCoilFluidMaxFlow > 0.0) { @@ -5817,17 +5782,17 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (ZoneNodeNotFound) { ShowSevereError( state, - EnergyPlus::format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow \"{}\" Zone terminal unit air inlet node name " - "must be the same as a zone inlet or exhaust node name.", - vrfTU.Name)); + std::format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow \"{}\" Zone terminal unit air inlet node name " + "must be the same as a zone inlet or exhaust node name.", + vrfTU.Name)); ShowContinueError(state, "... Zone inlet and exhaust node name is specified in ZoneHVAC:EquipmentConnections object."); ShowContinueError(state, - EnergyPlus::format("... Zone terminal unit inlet node name = {}", - state.dataLoopNodes->NodeID(vrfTU.VRFTUInletNodeNum))); + std::format("... Zone terminal unit inlet node name = {}", + state.dataLoopNodes->NodeID(vrfTU.VRFTUInletNodeNum))); ShowContinueError(state, - EnergyPlus::format("... Zone terminal unit outlet node name = {}", - state.dataLoopNodes->NodeID(vrfTU.VRFTUOutletNodeNum))); + std::format("... Zone terminal unit outlet node name = {}", + state.dataLoopNodes->NodeID(vrfTU.VRFTUOutletNodeNum))); } } goto EquipList_exit; @@ -5877,8 +5842,7 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool goto EquipList_exit; } if (!AirNodeFound && vrfTU.ZoneNum > 0) { - ShowSevereError(state, - EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Did not find Air node (Zone with Thermostat or Thermal Comfort Thermostat)."); // ShowContinueError(state, format("specified Controlling Zone or Thermostat Location name = {}{}", //, // loc_controlZoneName)); @@ -5966,7 +5930,7 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } } } else { - ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Did not find ZoneHVAC:EquipmentList connected to this VRF terminal unit."); errorsFound = true; } @@ -6039,19 +6003,19 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool vrfTU.isSetPointControlled = true; if (vrfTU.fanOpModeSched != nullptr) { if (vrfTU.fanOpModeSched->getCurrentVal() == 0.0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); + ShowSevereError(state, std::format("{} = {}", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); ShowContinueError(state, "When using set point control, fan operating mode must be continuous (fan " "operating mode schedule values > 0)."); ShowContinueError(state, - EnergyPlus::format("Error found in Supply Air Fan Operating Mode Schedule Name = {}", - vrfTU.fanOpModeSched->Name)); + std::format("Error found in Supply Air Fan Operating Mode Schedule Name = {}", + vrfTU.fanOpModeSched->Name)); ShowContinueError(state, "...schedule values must be (>0., <=1.)"); ErrorsFound = true; } } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); + ShowSevereError(state, std::format("{} = {}", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); ShowContinueError(state, " The Fraction of Supply Air Flow That Goes Through the Controlling Zone is set to 1."); vrfTU.controlZoneMassFlowFrac = 1.0; BaseSizer::reportSizerOutput(state, @@ -6071,12 +6035,12 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (vrfTU.isInZone && state.dataAirLoop->AirLoopInputsFilled) { if (vrfTU.fanPlace == HVAC::FanPlace::Invalid) { - ShowSevereError(state, EnergyPlus::format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow = {}", vrfTU.Name)); + ShowSevereError(state, std::format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow = {}", vrfTU.Name)); ShowContinueError(state, "Illegal Supply Air Fan Placement."); ErrorsFound = true; } if (vrfTU.FanIndex == 0) { - ShowSevereError(state, EnergyPlus::format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow = {}", vrfTU.Name)); + ShowSevereError(state, std::format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow = {}", vrfTU.Name)); ShowContinueError(state, "VRF Terminal Unit fan is required when used as zone equipment."); ErrorsFound = true; } @@ -6115,8 +6079,7 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (missingSetPoint) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError( - state, - EnergyPlus::format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow: Missing temperature setpoint for {}", vrfTU.Name)); + state, std::format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow: Missing temperature setpoint for {}", vrfTU.Name)); ShowContinueError(state, "...use a Setpoint Manager to establish a setpoint at the TU or coil(s) outlet node."); ErrorsFound = true; } else if (state.dataGlobal->AnyEnergyManagementSystemInModel) { @@ -6138,9 +6101,8 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (SPNotFound && state.dataAirLoop->AirLoopInputsFilled) { ShowSevereError( state, - EnergyPlus::format( - "ZoneHVAC:TerminalUnit:VariableRefrigerantFlow: Missing temperature setpoint for unitary system = {}", - vrfTU.Name)); + std::format("ZoneHVAC:TerminalUnit:VariableRefrigerantFlow: Missing temperature setpoint for unitary system = {}", + vrfTU.Name)); ShowContinueError(state, "...use a Setpoint Manager to establish a setpoint at the TU or coil(s) outlet node."); ShowContinueError(state, "...or use an EMS actuator to establish a temperature setpoint at the coil control node."); ErrorsFound = true; @@ -6156,10 +6118,10 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool continue; } ShowSevereError(state, - EnergyPlus::format("InitVRF: VRF Terminal Unit = [{},{}] is not on any ZoneHVAC:EquipmentList, AirloopHVAC or " - "AirLoopHVAC:OutdoorAirSystem:EquipmentList. It will not be simulated.", - tuTypeNames[(int)vrfTU.type], - vrfTU.Name)); + std::format("InitVRF: VRF Terminal Unit = [{},{}] is not on any ZoneHVAC:EquipmentList, AirloopHVAC or " + "AirLoopHVAC:OutdoorAirSystem:EquipmentList. It will not be simulated.", + tuTypeNames[(int)vrfTU.type], + vrfTU.Name)); ShowContinueError(state, "...The VRF AC System associated with this terminal unit may also not be simulated."); } } @@ -6186,12 +6148,12 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } if (ZoneNodeNotFound && !vrfTU1.isInAirLoop) { ShowSevereError(state, - EnergyPlus::format("{} \"{}\" Zone terminal unit air inlet node name must be the same as a zone exhaust node name.", - cCurrentModuleObject, - vrfTU1.Name)); + std::format("{} \"{}\" Zone terminal unit air inlet node name must be the same as a zone exhaust node name.", + cCurrentModuleObject, + vrfTU1.Name)); ShowContinueError(state, "... Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object."); - ShowContinueError( - state, EnergyPlus::format("... Zone terminal unit inlet node name = {}", state.dataLoopNodes->NodeID(vrfTU1.VRFTUInletNodeNum))); + ShowContinueError(state, + std::format("... Zone terminal unit inlet node name = {}", state.dataLoopNodes->NodeID(vrfTU1.VRFTUInletNodeNum))); ErrorsFound = true; } } @@ -6199,16 +6161,14 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (vrfTU1.isInZone && !vrfTU1.ATMixerExists && vrfTU1.OAMixerUsed) { Array1D_int OANodeNums = MixedAir::GetOAMixerNodeNumbers(state, vrfTU1.OAMixerName, errFlag); if (vrfTU1.VRFTUInletNodeNum != OANodeNums(3)) { - ShowSevereError(state, - EnergyPlus::format( - "{} \"{}\" Zone terminal unit air inlet node name must be the same as the OutdoorAir:Mixer return air node name.", - cCurrentModuleObject, - vrfTU1.Name)); - ShowContinueError( + ShowSevereError( state, - EnergyPlus::format("... Zone terminal unit air inlet node name = {}", state.dataLoopNodes->NodeID(vrfTU1.VRFTUInletNodeNum))); - ShowContinueError(state, - EnergyPlus::format("... OutdoorAir:Mixer return air node name = {}", state.dataLoopNodes->NodeID(OANodeNums(3)))); + std::format("{} \"{}\" Zone terminal unit air inlet node name must be the same as the OutdoorAir:Mixer return air node name.", + cCurrentModuleObject, + vrfTU1.Name)); + ShowContinueError( + state, std::format("... Zone terminal unit air inlet node name = {}", state.dataLoopNodes->NodeID(vrfTU1.VRFTUInletNodeNum))); + ShowContinueError(state, std::format("... OutdoorAir:Mixer return air node name = {}", state.dataLoopNodes->NodeID(OANodeNums(3)))); ErrorsFound = true; } } @@ -6234,13 +6194,12 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } if (ZoneNodeNotFound) { ShowSevereError(state, - EnergyPlus::format("{} \"{}\" Zone terminal unit air outlet node name must be the same as a zone inlet node name.", - cCurrentModuleObject, - vrfTU1.Name)); + std::format("{} \"{}\" Zone terminal unit air outlet node name must be the same as a zone inlet node name.", + cCurrentModuleObject, + vrfTU1.Name)); ShowContinueError(state, "... Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object."); ShowContinueError( - state, - EnergyPlus::format("... Zone terminal unit outlet node name = {}", state.dataLoopNodes->NodeID(vrfTU1.VRFTUOutletNodeNum))); + state, std::format("... Zone terminal unit outlet node name = {}", state.dataLoopNodes->NodeID(vrfTU1.VRFTUOutletNodeNum))); ErrorsFound = true; } } @@ -6248,24 +6207,24 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (vrfTU1.isInZone && vrfTU1.ATMixerExists) { // check that OA flow in cooling must be set to zero when connected to DOAS if (vrfTU1.CoolOutAirVolFlow != 0) { - ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, vrfTU1.Name)); - ShowContinueError(state, EnergyPlus::format(".. Cooling Outdoor Air Flow Rate must be zero when {}", cCurrentModuleObject)); + ShowWarningError(state, std::format("{} = {}", cCurrentModuleObject, vrfTU1.Name)); + ShowContinueError(state, std::format(".. Cooling Outdoor Air Flow Rate must be zero when {}", cCurrentModuleObject)); ShowContinueError(state, "..object is connected to central dedicated outdoor air system via AirTerminal:SingleDuct:Mixer"); ShowContinueError(state, ".. Cooling Outdoor Air Flow Rate is set to 0 and simulation continues."); vrfTU1.CoolOutAirVolFlow = 0; } // check that OA flow in heating must be set to zero when connected to DOAS if (vrfTU1.HeatOutAirVolFlow != 0) { - ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, vrfTU1.Name)); - ShowContinueError(state, EnergyPlus::format(".. Heating Outdoor Air Flow Rate must be zero when {}", cCurrentModuleObject)); + ShowWarningError(state, std::format("{} = {}", cCurrentModuleObject, vrfTU1.Name)); + ShowContinueError(state, std::format(".. Heating Outdoor Air Flow Rate must be zero when {}", cCurrentModuleObject)); ShowContinueError(state, "..object is connected to central dedicated outdoor air system via AirTerminal:SingleDuct:Mixer"); ShowContinueError(state, ".. Heating Outdoor Air Flow Rate is set to 0 and simulation continues."); vrfTU1.HeatOutAirVolFlow = 0; } // check that OA flow in no cooling and no heating must be set to zero when connected to DOAS if (vrfTU1.NoCoolHeatOutAirVolFlow != 0) { - ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, vrfTU1.Name)); - ShowContinueError(state, EnergyPlus::format(".. No Load Outdoor Air Flow Rate must be zero when {}", cCurrentModuleObject)); + ShowWarningError(state, std::format("{} = {}", cCurrentModuleObject, vrfTU1.Name)); + ShowContinueError(state, std::format(".. No Load Outdoor Air Flow Rate must be zero when {}", cCurrentModuleObject)); ShowContinueError(state, "..object is connected to central dedicated outdoor air system via AirTerminal:SingleDuct:Mixer"); ShowContinueError(state, ".. No Load Outdoor Air Flow Rate is set to 0 and simulation continues."); vrfTU1.NoCoolHeatOutAirVolFlow = 0; @@ -6478,8 +6437,7 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } if (vrfTU.MaxCoolAirVolFlow > vrfTU.ActualFanVolFlowRate) { - ShowWarningError(state, - EnergyPlus::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); + ShowWarningError(state, std::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); ShowContinueError(state, "... has Supply Air Flow Rate During Cooling Operation > Max Fan Volume Flow Rate, should be <="); ShowContinueError( state, EnergyPlus::format("... Supply Air Flow Rate During Cooling Operation = {:.4R} m3/s", vrfTU.MaxCoolAirVolFlow)); @@ -6491,8 +6449,7 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } if (vrfTU.MaxNoCoolAirVolFlow > vrfTU.ActualFanVolFlowRate) { - ShowWarningError(state, - EnergyPlus::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); + ShowWarningError(state, std::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); ShowContinueError(state, "... has Supply Air Flow Rate When No Cooling is Needed > Max Fan Volume Flow Rate, should be <="); ShowContinueError( state, EnergyPlus::format("... Supply Air Flow Rate When No Cooling is Needed = {:.4R} m3/s", vrfTU.MaxNoCoolAirVolFlow)); @@ -6505,8 +6462,7 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } if (vrfTU.CoolOutAirVolFlow > vrfTU.MaxCoolAirVolFlow) { - ShowWarningError(state, - EnergyPlus::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); + ShowWarningError(state, std::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); ShowContinueError( state, "...The Outdoor Air Flow Rate During Cooling Operation exceeds the Supply Air Flow Rate During Cooling Operation."); @@ -6519,8 +6475,7 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } if (vrfTU.MaxHeatAirVolFlow > vrfTU.ActualFanVolFlowRate) { - ShowWarningError(state, - EnergyPlus::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); + ShowWarningError(state, std::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); ShowContinueError(state, "... has Supply Air Flow Rate During Heating Operation > Max Fan Volume Flow Rate, should be <="); ShowContinueError( state, EnergyPlus::format("... Supply Air Flow Rate During Heating Operation = {:.4R} m3/s", vrfTU.MaxHeatAirVolFlow)); @@ -6532,8 +6487,7 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } if (vrfTU.MaxNoHeatAirVolFlow > vrfTU.ActualFanVolFlowRate) { - ShowWarningError(state, - EnergyPlus::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); + ShowWarningError(state, std::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); ShowContinueError(state, "... has Supply Air Flow Rate When No Heating is Needed > Max Fan Volume Flow Rate, should be <="); ShowContinueError( state, EnergyPlus::format("... Supply Air Flow Rate When No Heating is Needed = {:.4R} m3/s", vrfTU.MaxNoHeatAirVolFlow)); @@ -6546,8 +6500,7 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } if (vrfTU.HeatOutAirVolFlow > vrfTU.MaxHeatAirVolFlow) { - ShowWarningError(state, - EnergyPlus::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); + ShowWarningError(state, std::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); ShowContinueError( state, "...The Outdoor Air Flow Rate During Heating Operation exceeds the Supply Air Flow Rate During Heating Operation."); @@ -6560,8 +6513,7 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } if (vrfTU.NoCoolHeatOutAirVolFlow > vrfTU.ActualFanVolFlowRate) { - ShowWarningError(state, - EnergyPlus::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); + ShowWarningError(state, std::format("InitVRF: VRF Terminal Unit = [{}, \"{}\"]", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); ShowContinueError( state, "... has a Outdoor Air Flow Rate When No Cooling or Heating is Needed > Max Fan Volume Flow Rate, should be <="); ShowContinueError(state, @@ -6680,26 +6632,25 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (any(state.dataHVACVarRefFlow->TerminalUnitList(TUListIndex).CoolingCoilAvailable)) { if (state.dataHVACVarRefFlow->VRF(VRFCond).CoolingMaxTempLimitIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("{} \"{}\".", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRF(VRFCond).Name)); + std::format("{} \"{}\".", + cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), + state.dataHVACVarRefFlow->VRF(VRFCond).Name)); ShowContinueError(state, "...InitVRF: VRF Heat Pump Min/Max Operating Temperature in Cooling Mode Limits have been " "exceeded and VRF system is disabled."); if (state.dataHVACVarRefFlow->VRF(VRFCond).CondenserType == DataHeatBalance::RefrigCondenserType::Water) { - ShowContinueError( - state, EnergyPlus::format("... Outdoor Unit Inlet Water Temperature = {:.3T}", OutsideDryBulbTemp)); + ShowContinueError(state, + std::format("... Outdoor Unit Inlet Water Temperature = {:.3f}", OutsideDryBulbTemp)); } else { ShowContinueError( - state, - EnergyPlus::format("... Outdoor Unit Inlet Air Temperature = {:.3T}", OutsideDryBulbTemp)); + state, std::format("... Outdoor Unit Inlet Air Temperature = {:.3f}", OutsideDryBulbTemp)); } ShowContinueError(state, - EnergyPlus::format("... Cooling Minimum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MinOATCooling)); + std::format("... Cooling Minimum Outdoor Unit Inlet Temperature = {:.3f}", + state.dataHVACVarRefFlow->VRF(VRFCond).MinOATCooling)); ShowContinueError(state, - EnergyPlus::format("... Cooling Maximum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATCooling)); + std::format("... Cooling Maximum Outdoor Unit Inlet Temperature = {:.3f}", + state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATCooling)); ShowContinueErrorTimeStamp(state, "... Check VRF Heat Pump Min/Max Outdoor Temperature in Cooling Mode limits."); } ShowRecurringWarningErrorAtEnd(state, @@ -6715,25 +6666,25 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (any(state.dataHVACVarRefFlow->TerminalUnitList(TUListIndex).CoolingCoilAvailable)) { if (state.dataHVACVarRefFlow->VRF(VRFCond).CoolingMaxTempLimitIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("{} \"{}\".", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRF(VRFCond).Name)); + std::format("{} \"{}\".", + cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), + state.dataHVACVarRefFlow->VRF(VRFCond).Name)); ShowContinueError(state, "...InitVRF: VRF Heat Pump Min/Max Operating Temperature in Cooling Mode Limits have been exceeded " "and VRF system is disabled."); if (state.dataHVACVarRefFlow->VRF(VRFCond).CondenserType == DataHeatBalance::RefrigCondenserType::Water) { - ShowContinueError( - state, EnergyPlus::format("... Outdoor Unit Inlet Water Temperature = {:.3T}", OutsideDryBulbTemp)); + ShowContinueError(state, + std::format("... Outdoor Unit Inlet Water Temperature = {:.3f}", OutsideDryBulbTemp)); } else { - ShowContinueError( - state, EnergyPlus::format("... Outdoor Unit Inlet Air Temperature = {:.3T}", OutsideDryBulbTemp)); + ShowContinueError(state, + std::format("... Outdoor Unit Inlet Air Temperature = {:.3f}", OutsideDryBulbTemp)); } ShowContinueError(state, - EnergyPlus::format("... Cooling Minimum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MinOATCooling)); + std::format("... Cooling Minimum Outdoor Unit Inlet Temperature = {:.3f}", + state.dataHVACVarRefFlow->VRF(VRFCond).MinOATCooling)); ShowContinueError(state, - EnergyPlus::format("... Cooling Maximum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATCooling)); + std::format("... Cooling Maximum Outdoor Unit Inlet Temperature = {:.3f}", + state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATCooling)); ShowContinueErrorTimeStamp(state, "... Check VRF Heat Pump Min/Max Outdoor Temperature in Cooling Mode limits."); } ShowRecurringWarningErrorAtEnd(state, @@ -6779,25 +6730,25 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (any(state.dataHVACVarRefFlow->TerminalUnitList(TUListIndex).HeatingCoilAvailable)) { if (state.dataHVACVarRefFlow->VRF(VRFCond).HeatingMaxTempLimitIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("{} \"{}\".", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRF(VRFCond).Name)); + std::format("{} \"{}\".", + cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), + state.dataHVACVarRefFlow->VRF(VRFCond).Name)); ShowContinueError(state, "...InitVRF: VRF Heat Pump Min/Max Operating Temperature in Heating Mode Limits have been " "exceeded and VRF system is disabled."); if (state.dataHVACVarRefFlow->VRF(VRFCond).CondenserType == DataHeatBalance::RefrigCondenserType::Water) { - ShowContinueError( - state, EnergyPlus::format("... Outdoor Unit Inlet Water Temperature = {:.3T}", OutsideDryBulbTemp)); + ShowContinueError(state, + std::format("... Outdoor Unit Inlet Water Temperature = {:.3f}", OutsideDryBulbTemp)); } else { - ShowContinueError( - state, EnergyPlus::format("... Outdoor Unit Inlet Air Temperature = {:.3T}", OutsideDryBulbTemp)); + ShowContinueError(state, + std::format("... Outdoor Unit Inlet Air Temperature = {:.3f}", OutsideDryBulbTemp)); } ShowContinueError(state, - EnergyPlus::format("... Heating Minimum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MinOATHeating)); + std::format("... Heating Minimum Outdoor Unit Inlet Temperature = {:.3f}", + state.dataHVACVarRefFlow->VRF(VRFCond).MinOATHeating)); ShowContinueError(state, - EnergyPlus::format("... Heating Maximum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATHeating)); + std::format("... Heating Maximum Outdoor Unit Inlet Temperature = {:.3f}", + state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATHeating)); ShowContinueErrorTimeStamp(state, "... Check VRF Heat Pump Min/Max Outdoor Temperature in Heating Mode limits."); } ShowRecurringWarningErrorAtEnd(state, @@ -6813,25 +6764,25 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool if (any(state.dataHVACVarRefFlow->TerminalUnitList(TUListIndex).HeatingCoilAvailable)) { if (state.dataHVACVarRefFlow->VRF(VRFCond).HeatingMaxTempLimitIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("{} \"{}\".", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRF(VRFCond).Name)); + std::format("{} \"{}\".", + cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), + state.dataHVACVarRefFlow->VRF(VRFCond).Name)); ShowContinueError(state, "...InitVRF: VRF Heat Pump Min/Max Operating Temperature in Heating Mode Limits have been exceeded " "and VRF system is disabled."); if (state.dataHVACVarRefFlow->VRF(VRFCond).CondenserType == DataHeatBalance::RefrigCondenserType::Water) { - ShowContinueError( - state, EnergyPlus::format("... Outdoor Unit Inlet Water Temperature = {:.3T}", OutsideDryBulbTemp)); + ShowContinueError(state, + std::format("... Outdoor Unit Inlet Water Temperature = {:.3f}", OutsideDryBulbTemp)); } else { - ShowContinueError( - state, EnergyPlus::format("... Outdoor Unit Inlet Air Temperature = {:.3T}", OutsideDryBulbTemp)); + ShowContinueError(state, + std::format("... Outdoor Unit Inlet Air Temperature = {:.3f}", OutsideDryBulbTemp)); } ShowContinueError(state, - EnergyPlus::format("... Heating Minimum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MinOATHeating)); + std::format("... Heating Minimum Outdoor Unit Inlet Temperature = {:.3f}", + state.dataHVACVarRefFlow->VRF(VRFCond).MinOATHeating)); ShowContinueError(state, - EnergyPlus::format("... Heating Maximum Outdoor Unit Inlet Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATHeating)); + std::format("... Heating Maximum Outdoor Unit Inlet Temperature = {:.3f}", + state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATHeating)); ShowContinueErrorTimeStamp(state, "... Check VRF Heat Pump Min/Max Outdoor Temperature in Heating Mode limits."); } ShowRecurringWarningErrorAtEnd(state, @@ -7200,20 +7151,19 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool (any(state.dataHVACVarRefFlow->TerminalUnitList(TUListIndex).HRHeatRequest) && state.dataHVACVarRefFlow->CoolingLoad(VRFCond))) { if (state.dataHVACVarRefFlow->VRF(VRFCond).HRMaxTempLimitIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("{} \"{}\".", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRF(VRFCond).Name)); + std::format("{} \"{}\".", + cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), + state.dataHVACVarRefFlow->VRF(VRFCond).Name)); ShowContinueError(state, "...InitVRF: VRF Heat Pump Min/Max Outdoor Temperature in Heat Recovery Mode Limits have been exceeded and " "VRF heat recovery is disabled."); + ShowContinueError(state, std::format("... Outdoor Dry-Bulb Temperature = {:.3f}", OutsideDryBulbTemp)); ShowContinueError(state, - EnergyPlus::format("... Outdoor Dry-Bulb Temperature = {:.3T}", OutsideDryBulbTemp)); + std::format("... Heat Recovery Minimum Outdoor Dry-Bulb Temperature = {:.3f}", + state.dataHVACVarRefFlow->VRF(VRFCond).MinOATHeatRecovery)); ShowContinueError(state, - EnergyPlus::format("... Heat Recovery Minimum Outdoor Dry-Bulb Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MinOATHeatRecovery)); - ShowContinueError(state, - EnergyPlus::format("... Heat Recovery Maximum Outdoor Dry-Bulb Temperature = {:.3T}", - state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATHeatRecovery)); + std::format("... Heat Recovery Maximum Outdoor Dry-Bulb Temperature = {:.3f}", + state.dataHVACVarRefFlow->VRF(VRFCond).MaxOATHeatRecovery)); ShowContinueErrorTimeStamp(state, "... Check VRF Heat Pump Min/Max Outdoor Temperature in Heat Recovery Mode limits."); ShowContinueError(state, "...the system will operate in heat pump mode when applicable."); } @@ -7269,12 +7219,12 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool } else { if (state.dataHVACVarRefFlow->VRF(VRFCond).HPOperatingModeErrorIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("{} \"{}\".", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRF(VRFCond).Name)); - ShowContinueError(state, - EnergyPlus::format("...InitVRF: Illegal HP operating mode = {:.0T}", - state.dataHVACVarRefFlow->VRF(VRFCond).EMSValueForHPOperatingMode)); + std::format("{} \"{}\".", + cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), + state.dataHVACVarRefFlow->VRF(VRFCond).Name)); + ShowContinueError( + state, + std::format("...InitVRF: Illegal HP operating mode = {:.0f}", state.dataHVACVarRefFlow->VRF(VRFCond).EMSValueForHPOperatingMode)); ShowContinueError(state, "...InitVRF: VRF HP operating mode will not be controlled by EMS."); } ShowRecurringWarningErrorAtEnd(state, @@ -7348,11 +7298,10 @@ void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool SetAverageAirFlow(state, VRFTUNum, 0.0, OnOffAirFlowRatio); if (ErrorsFound) { - ShowFatalError( - state, - EnergyPlus::format("{}: Errors found in getting ZoneHVAC:TerminalUnit:VariableRefrigerantFlow system input. Preceding condition(s) " - "causes termination.", - RoutineName)); + ShowFatalError(state, + std::format("{}: Errors found in getting ZoneHVAC:TerminalUnit:VariableRefrigerantFlow system input. Preceding condition(s) " + "causes termination.", + RoutineName)); } } @@ -8049,9 +7998,9 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(CoolOutAirVolFlowDes - CoolOutAirVolFlowUser) / CoolOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeVRF: Potential issue with equipment sizing for {} {}", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); + ShowMessage( + state, + std::format("SizeVRF: Potential issue with equipment sizing for {} {}", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Outdoor Air Flow Rate During Cooling Operation of {:.5R} [m3/s]", CoolOutAirVolFlowUser)); @@ -8121,9 +8070,9 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(HeatOutAirVolFlowDes - HeatOutAirVolFlowUser) / HeatOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeVRF: Potential issue with equipment sizing for {} {}", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); + ShowMessage( + state, + std::format("SizeVRF: Potential issue with equipment sizing for {} {}", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Outdoor Air Flow Rate During Heating Operation of {:.5R} [m3/s]", HeatOutAirVolFlowUser)); @@ -8200,9 +8149,9 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(NoCoolHeatOutAirVolFlowDes - NoCoolHeatOutAirVolFlowUser) / NoCoolHeatOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeVRF: Potential issue with equipment sizing for {} {}", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); + ShowMessage( + state, + std::format("SizeVRF: Potential issue with equipment sizing for {} {}", tuTypeNames[(int)vrfTU.type], vrfTU.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Outdoor Air Flow Rate When No Cooling or Heating is Needed of {:.5R} [m3/s]", @@ -8372,9 +8321,9 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(CoolingCapacityDes - CoolingCapacityUser) / CoolingCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeVRF: Potential issue with equipment sizing for {} {}", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); + std::format("SizeVRF: Potential issue with equipment sizing for {} {}", + cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), + state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Rated Total Cooling Capacity (gross) of {:.2R} [W]", CoolingCapacityUser)); ShowContinueError(state, @@ -8423,9 +8372,9 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(HeatingCapacityDes - HeatingCapacityUser) / HeatingCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeVRF: Potential issue with equipment sizing for {} {}", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); + std::format("SizeVRF: Potential issue with equipment sizing for {} {}", + cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), + state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Rated Total Heating Capacity of {:.2R} [W]", HeatingCapacityUser)); ShowContinueError( @@ -8582,9 +8531,9 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(CoolingCapacityDes - CoolingCapacityUser) / CoolingCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeVRF: Potential issue with equipment sizing for {} {}", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); + std::format("SizeVRF: Potential issue with equipment sizing for {} {}", + cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), + state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Rated Total Cooling Capacity (gross) of {:.2R} [W]", CoolingCapacityUser)); ShowContinueError( @@ -8596,9 +8545,9 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if ((std::abs(HeatingCapacityDes - HeatingCapacityUser) / HeatingCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeVRF: Potential issue with equipment sizing for {} {}", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); + std::format("SizeVRF: Potential issue with equipment sizing for {} {}", + cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), + state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Rated Total Heating Capacity of {:.2R} [W]", HeatingCapacityUser)); ShowContinueError( @@ -8641,9 +8590,9 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(DefrostCapacityDes - DefrostCapacityUser) / DefrostCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeVRF: Potential issue with equipment sizing for {} {}", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); + std::format("SizeVRF: Potential issue with equipment sizing for {} {}", + cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), + state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Resistive Defrost Heater Capacity of {:.2R} [W]", DefrostCapacityUser)); ShowContinueError( @@ -8683,9 +8632,9 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if ((std::abs(EvapCondAirVolFlowRateDes - EvapCondAirVolFlowRateUser) / EvapCondAirVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeVRF: Potential issue with equipment sizing for {} {}", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); + std::format("SizeVRF: Potential issue with equipment sizing for {} {}", + cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), + state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Evaporative Condenser Air Flow Rate of {:.5R} [m3/s]", EvapCondAirVolFlowRateUser)); @@ -8727,9 +8676,9 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum) if ((std::abs(EvapCondPumpPowerDes - EvapCondPumpPowerUser) / EvapCondPumpPowerUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeVRF: Potential issue with equipment sizing for {} {}", - cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), - state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); + std::format("SizeVRF: Potential issue with equipment sizing for {} {}", + cVRFTypes(state.dataHVACVarRefFlow->VRF(VRFCond).VRFSystemTypeNum), + state.dataHVACVarRefFlow->VRFTU(VRFCond).Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Evaporative Condenser Pump Rated Power Consumption of {:.2R} [W]", EvapCondPumpPowerUser)); @@ -8856,7 +8805,7 @@ void VRFCondenserEquipment::SizeVRFCondenser(EnergyPlusData &state) } else { ShowSevereError(state, "Autosizing of condenser water flow rate requires a condenser loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("... occurs in AirConditioner:VariableRefrigerantFlow object={}", this->Name)); + ShowContinueError(state, std::format("... occurs in AirConditioner:VariableRefrigerantFlow object={}", this->Name)); ShowContinueError(state, "... plant loop name must be referenced in Sizing:Plant object"); ErrorsFound = true; } @@ -9280,11 +9229,10 @@ void VRFTerminalUnitEquipment::ControlVRFToLoad(EnergyPlusData &state, if (SolFla == -1) { if (!FirstHVACIteration && !state.dataGlobal->WarmupFlag) { if (this->IterLimitExceeded == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} \"{}\"", tuTypeNames[(int)this->type], this->Name)); + ShowWarningMessage(state, std::format("{} \"{}\"", tuTypeNames[(int)this->type], this->Name)); ShowContinueError( state, - EnergyPlus::format(" Iteration limit exceeded calculating terminal unit part-load ratio, maximum iterations = {}", - MaxIte)); + std::format(" Iteration limit exceeded calculating terminal unit part-load ratio, maximum iterations = {}", MaxIte)); ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Part-load ratio returned = {:.3R}", PartLoadRatio)); if (thisVRFCond.VRFAlgorithmType == AlgorithmType::FluidTCtrl) { @@ -9296,41 +9244,39 @@ void VRFTerminalUnitEquipment::ControlVRFToLoad(EnergyPlusData &state, this->CalcVRF(state, VRFTUNum, FirstHVACIteration, PartLoadRatio, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); } - ShowContinueError(state, EnergyPlus::format(" Load requested = {:.5T}, Load delivered = {:.5T}", QZnReq, TempOutput)); - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} \"{}\" -- Terminal unit Iteration limit exceeded error continues...", - tuTypeNames[(int)this->type], - this->Name), - this->IterLimitExceeded); + ShowContinueError(state, std::format(" Load requested = {:.5f}, Load delivered = {:.5f}", QZnReq, TempOutput)); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} \"{}\" -- Terminal unit Iteration limit exceeded error continues...", + tuTypeNames[(int)this->type], + this->Name), + this->IterLimitExceeded); } else { - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} \"{}\" -- Terminal unit Iteration limit exceeded error continues...", - tuTypeNames[(int)this->type], - this->Name), - this->IterLimitExceeded); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} \"{}\" -- Terminal unit Iteration limit exceeded error continues...", + tuTypeNames[(int)this->type], + this->Name), + this->IterLimitExceeded); } } } else if (SolFla == -2) { if (!FirstHVACIteration && !state.dataGlobal->WarmupFlag) { if (thisVRFTU.FirstIterfailed == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} \"{}\"", tuTypeNames[(int)this->type], this->Name)); + ShowWarningMessage(state, std::format("{} \"{}\"", tuTypeNames[(int)this->type], this->Name)); ShowContinueError(state, "Terminal unit part-load ratio calculation failed: PLR limits of 0 to 1 exceeded"); ShowContinueError(state, "Please fill out a bug report and forward to the EnergyPlus support group."); ShowContinueErrorTimeStamp(state, ""); ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" -- Terminal unit part-load ratio limits of 0 to 1 exceeded error continues...", - tuTypeNames[(int)this->type], - this->Name), + std::format("{} \"{}\" -- Terminal unit part-load ratio limits of 0 to 1 exceeded error continues...", + tuTypeNames[(int)this->type], + this->Name), this->FirstIterfailed); } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" -- Terminal unit part-load ratio limits of 0 to 1 exceeded error continues...", - tuTypeNames[(int)this->type], - this->Name), + std::format("{} \"{}\" -- Terminal unit part-load ratio limits of 0 to 1 exceeded error continues...", + tuTypeNames[(int)this->type], + this->Name), thisVRFTU.FirstIterfailed); } } @@ -9339,23 +9285,23 @@ void VRFTerminalUnitEquipment::ControlVRFToLoad(EnergyPlusData &state, } else if (SolFla == -2) { if (!FirstHVACIteration && !state.dataGlobal->WarmupFlag) { if (thisVRFTU.FirstIterfailed == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} \"{}\"", tuTypeNames[(int)this->type], this->Name)); + ShowWarningMessage(state, std::format("{} \"{}\"", tuTypeNames[(int)this->type], this->Name)); ShowContinueError(state, "Terminal unit part-load ratio calculation failed: PLR limits of 0 to 1 exceeded"); ShowContinueError(state, "Please fill out a bug report and forward to the EnergyPlus support group."); ShowContinueErrorTimeStamp(state, ""); ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" -- Terminal unit part-load ratio limits of 0 to 1 exceeded error continues...", - tuTypeNames[(int)this->type], - " \"" + this->Name), + std::format("{} \"{}\" -- Terminal unit part-load ratio limits of 0 to 1 exceeded error continues...", + tuTypeNames[(int)this->type], + " \"" + this->Name), this->FirstIterfailed); } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" -- Terminal unit part-load ratio limits of 0 to 1 exceeded error continues...", - tuTypeNames[(int)this->type], - this->Name), + std::format("{} \"{}\" -- Terminal unit part-load ratio limits of 0 to 1 exceeded error continues...", + tuTypeNames[(int)this->type], + this->Name), this->FirstIterfailed); } } @@ -9797,7 +9743,7 @@ void isVRFCoilPresent(EnergyPlusData &state, std::string_view VRFTUName, bool &C CoolCoilPresent = state.dataHVACVarRefFlow->VRFTU(WhichVRFTU).CoolingCoilPresent; HeatCoilPresent = state.dataHVACVarRefFlow->VRFTU(WhichVRFTU).HeatingCoilPresent; } else { - ShowSevereError(state, EnergyPlus::format("isVRFCoilPresent: Could not find VRF TU = \"{}\"", VRFTUName)); + ShowSevereError(state, std::format("isVRFCoilPresent: Could not find VRF TU = \"{}\"", VRFTUName)); } } @@ -10553,7 +10499,7 @@ int GetVRFTUOutAirNodeFromName(EnergyPlusData &state, std::string const &VRFTUNa if (WhichVRFTU != 0) { NodeNum = state.dataHVACVarRefFlow->VRFTU(WhichVRFTU).VRFTUOutletNodeNum; } else { - ShowSevereError(state, EnergyPlus::format("GetVRFTUOutAirNodeFromName: Could not find VRF TU = \"{}\"", VRFTUName)); + ShowSevereError(state, std::format("GetVRFTUOutAirNodeFromName: Could not find VRF TU = \"{}\"", VRFTUName)); errorsFound = true; NodeNum = 0; } @@ -10575,7 +10521,7 @@ int GetVRFTUInAirNodeFromName(EnergyPlusData &state, std::string const &VRFTUNam if (WhichVRFTU != 0) { NodeNum = state.dataHVACVarRefFlow->VRFTU(WhichVRFTU).VRFTUInletNodeNum; } else { - ShowSevereError(state, EnergyPlus::format("GetVRFTUInAirNodeFromName: Could not find VRF TU = \"{}\"", VRFTUName)); + ShowSevereError(state, std::format("GetVRFTUInAirNodeFromName: Could not find VRF TU = \"{}\"", VRFTUName)); errorsFound = true; NodeNum = 0; } @@ -11522,17 +11468,16 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state, c this->RatedCompPower * CurveValue(state, this->OUCoolingPWRFT(NumOfCompSpdInput), Tdischarge, this->EvaporatingTemp); if (CompEvaporatingCAPSpdMin > CompEvaporatingCAPSpdMaxCurrentTsuc) { if (this->CondenserCapErrIdx == 0) { - ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), this->Name)); - ShowContinueErrorTimeStamp( - state, - EnergyPlus::format(" Evaporative Capacity at max speed is smaller than evaporative capacity at min speed, " - "{:.3T} < {:.3T}", - CompEvaporatingCAPSpdMaxCurrentTsuc, - CompEvaporatingCAPSpdMin)); + ShowSevereMessage(state, std::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), this->Name)); + ShowContinueErrorTimeStamp(state, + std::format(" Evaporative Capacity at max speed is smaller than evaporative capacity at min speed, " + "{:.3f} < {:.3f}", + CompEvaporatingCAPSpdMaxCurrentTsuc, + CompEvaporatingCAPSpdMin)); } ShowRecurringSevereErrorAtEnd( state, - EnergyPlus::format("\"{}\" - Evaporative Capacity at max speed is smaller than evaporative capacity at min speed ", this->Name), + std::format("\"{}\" - Evaporative Capacity at max speed is smaller than evaporative capacity at min speed ", this->Name), this->CondenserCapErrIdx, CompEvaporatingCAPSpdMaxCurrentTsuc - CompEvaporatingCAPSpdMin, CompEvaporatingCAPSpdMaxCurrentTsuc - CompEvaporatingCAPSpdMin); @@ -11936,26 +11881,24 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state, c if (DefrostEIRTempModFac < 0.0) { if (!state.dataGlobal->WarmupFlag) { if (this->DefrostHeatErrorIndex == 0) { - ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), this->Name)); + ShowSevereMessage(state, std::format("{} \"{}\":", cVRFTypes(VRF_HeatPump), this->Name)); ShowContinueError( state, - EnergyPlus::format( - " Defrost Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3T}).", - DefrostEIRTempModFac)); - ShowContinueError( - state, - EnergyPlus::format(" Negative value occurs using an outdoor air dry-bulb temperature of {:.1T} C and an " - "average indoor air wet-bulb temperature of {:.1T} C.", - OutdoorDryBulb, - InletAirWetBulbC)); + std::format(" Defrost Energy Input Ratio Modifier curve (function of temperature) output is negative ({:.3f}).", + DefrostEIRTempModFac)); + ShowContinueError(state, + std::format(" Negative value occurs using an outdoor air dry-bulb temperature of {:.1f} C and an " + "average indoor air wet-bulb temperature of {:.1f} C.", + OutdoorDryBulb, + InletAirWetBulbC)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\": Defrost Energy Input Ratio Modifier curve (function of temperature) " - "output is negative warning continues...", - PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], - this->Name), + std::format("{} \"{}\": Defrost Energy Input Ratio Modifier curve (function of temperature) " + "output is negative warning continues...", + PlantEquipTypeNames[static_cast(PlantEquipmentType::HeatPumpVRF)], + this->Name), this->DefrostHeatErrorIndex, DefrostEIRTempModFac, DefrostEIRTempModFac); @@ -12572,26 +12515,25 @@ void VRFTerminalUnitEquipment::ControlVRF_FluidTCtrl(EnergyPlusData &state, if (SolFla == -1) { if (!FirstHVACIteration && !state.dataGlobal->WarmupFlag) { if (this->IterLimitExceeded == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} \"{}\"", tuTypeNames[(int)this->type], this->Name)); + ShowWarningMessage(state, std::format("{} \"{}\"", tuTypeNames[(int)this->type], this->Name)); ShowContinueError( state, - EnergyPlus::format(" Iteration limit exceeded calculating terminal unit part-load ratio, maximum iterations = {}", - MaxIte)); + std::format(" Iteration limit exceeded calculating terminal unit part-load ratio, maximum iterations = {}", MaxIte)); ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Part-load ratio returned = {:.3R}", PartLoadRatio)); this->CalcVRF_FluidTCtrl(state, VRFTUNum, FirstHVACIteration, TempMinPLR, TempOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); - ShowContinueError(state, EnergyPlus::format(" Load requested = {:.5T}, Load delivered = {:.5T}", QZnReq, TempOutput)); + ShowContinueError(state, std::format(" Load requested = {:.5f}, Load delivered = {:.5f}", QZnReq, TempOutput)); ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{} \"{}\" -- Terminal unit Iteration limit exceeded error continues...", - tuTypeNames[(int)this->type], - this->Name), + std::format("{} \"{}\" -- Terminal unit Iteration limit exceeded error continues...", + tuTypeNames[(int)this->type], + this->Name), this->IterLimitExceeded); } else { ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{} \"{}\" -- Terminal unit Iteration limit exceeded error continues...", - tuTypeNames[(int)this->type], - this->Name), + std::format("{} \"{}\" -- Terminal unit Iteration limit exceeded error continues...", + tuTypeNames[(int)this->type], + this->Name), this->IterLimitExceeded); } } @@ -13087,9 +13029,9 @@ void VRFCondenserEquipment::VRFOU_TeTc(EnergyPlusData &state, if (m_air <= 0) { TeTc = this->CondensingTemp; - ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); + ShowSevereMessage(state, std::format(" Unreasonable outdoor unit airflow rate ({:.3f} ) for \"{}\":", m_air, this->Name)); ShowContinueError(state, " This cannot be used to calculate outdoor unit refrigerant temperature."); - ShowContinueError(state, EnergyPlus::format(" Default condensing temperature is used: {:.3T}", TeTc)); + ShowContinueError(state, std::format(" Default condensing temperature is used: {:.3f}", TeTc)); } BF = this->RateBFOUCond; // 0.219; @@ -13105,9 +13047,9 @@ void VRFCondenserEquipment::VRFOU_TeTc(EnergyPlusData &state, if (m_air <= 0) { TeTc = this->EvaporatingTemp; - ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); + ShowSevereMessage(state, std::format(" Unreasonable outdoor unit airflow rate ({:.3f} ) for \"{}\":", m_air, this->Name)); ShowContinueError(state, " This cannot be used to calculate outdoor unit refrigerant temperature."); - ShowContinueError(state, EnergyPlus::format(" Default condensing temperature is used: {:.3T}", TeTc)); + ShowContinueError(state, std::format(" Default condensing temperature is used: {:.3f}", TeTc)); } BF = this->RateBFOUEvap; // 0.45581; @@ -13170,7 +13112,7 @@ Real64 VRFCondenserEquipment::VRFOU_Cap(EnergyPlusData &state, if (OperationMode == HXOpMode::CondMode) { // IU Cooling: OperationMode 0 if (m_air <= 0) { - ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); + ShowSevereMessage(state, std::format(" Unreasonable outdoor unit airflow rate ({:.3f} ) for \"{}\":", m_air, this->Name)); ShowContinueError(state, " This cannot be used to calculate outdoor unit capacity."); } @@ -13183,7 +13125,7 @@ Real64 VRFCondenserEquipment::VRFOU_Cap(EnergyPlusData &state, } else if (OperationMode == HXOpMode::EvapMode) { // IU Heating: OperationMode 1 if (m_air <= 0) { - ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); + ShowSevereMessage(state, std::format(" Unreasonable outdoor unit airflow rate ({:.3f} ) for \"{}\":", m_air, this->Name)); ShowContinueError(state, " This cannot be used to calculate outdoor unit capacity."); } @@ -13207,7 +13149,7 @@ Real64 VRFCondenserEquipment::VRFOU_Cap(EnergyPlusData &state, } else { // Should not come here - ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit operational mode for \"{}\":", this->Name)); + ShowSevereMessage(state, std::format(" Unreasonable outdoor unit operational mode for \"{}\":", this->Name)); ShowContinueError(state, " The operational mode is not correctly set in the function VRFOU_Cap."); } @@ -13281,7 +13223,7 @@ Real64 VRFCondenserEquipment::VRFOU_FlowRate(EnergyPlusData &state, } else { // Should not come here - ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit operational mode for \"{}\":", this->Name)); + ShowSevereMessage(state, std::format(" Unreasonable outdoor unit operational mode for \"{}\":", this->Name)); ShowContinueError(state, " The operational mode is not correctly set in the function VRFOU_Cap."); } @@ -13329,7 +13271,7 @@ Real64 VRFCondenserEquipment::VRFOU_SCSH(EnergyPlusData &state, if (OperationMode == HXOpMode::CondMode) { // Cooling: OperationMode 0 if (m_air <= 0) { - ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); + ShowSevereMessage(state, std::format(" Unreasonable outdoor unit airflow rate ({:.3f} ) for \"{}\":", m_air, this->Name)); ShowContinueError(state, " This cannot be used to calculate outdoor unit subcooling."); } @@ -13348,7 +13290,7 @@ Real64 VRFCondenserEquipment::VRFOU_SCSH(EnergyPlusData &state, } else if (OperationMode == HXOpMode::EvapMode) { // Heating: OperationMode 1 if (m_air <= 0) { - ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit airflow rate ({:.3T} ) for \"{}\":", m_air, this->Name)); + ShowSevereMessage(state, std::format(" Unreasonable outdoor unit airflow rate ({:.3f} ) for \"{}\":", m_air, this->Name)); ShowContinueError(state, " This cannot be used to calculate outdoor unit super heating."); } @@ -13379,7 +13321,7 @@ Real64 VRFCondenserEquipment::VRFOU_SCSH(EnergyPlusData &state, } else { // Should not come here - ShowSevereMessage(state, EnergyPlus::format(" Unreasonable outdoor unit operational mode for \"{}\":", this->Name)); + ShowSevereMessage(state, std::format(" Unreasonable outdoor unit operational mode for \"{}\":", this->Name)); ShowContinueError(state, " The operational mode is not correctly set in the function VRFOU_Cap."); } @@ -14036,10 +13978,10 @@ void VRFCondenserEquipment::VRFOU_CalcCompC(EnergyPlusData &state, if (SolFla == -1) { // show error not converging if (LowLoadTeIterError == 0) { - ShowWarningMessage(state, EnergyPlus::format("{}: low load Te adjustment failed for {}", RoutineName, this->Name)); + ShowWarningMessage(state, std::format("{}: low load Te adjustment failed for {}", RoutineName, this->Name)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError( - state, EnergyPlus::format(" Iteration limit [{}] exceeded in calculating OU evaporating temperature", MaxIter)); + ShowContinueError(state, + std::format(" Iteration limit [{}] exceeded in calculating OU evaporating temperature", MaxIter)); } ShowRecurringWarningErrorAtEnd(state, "Low load calculation Te solution iteration limit exceeded error continues.", @@ -14053,11 +13995,10 @@ void VRFCondenserEquipment::VRFOU_CalcCompC(EnergyPlusData &state, SmallLoadTe = MinOutdoorUnitTe; this->LowLoadTeError2Neg++; if (LowLoadTeError2Neg < 5) { - ShowWarningMessage( - state, - EnergyPlus::format("{}: no Te solution was found for {}, as load < capacity for the whole range of Te", - RoutineName, - this->Name)); + ShowWarningMessage(state, + std::format("{}: no Te solution was found for {}, as load < capacity for the whole range of Te", + RoutineName, + this->Name)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( @@ -14072,11 +14013,10 @@ void VRFCondenserEquipment::VRFOU_CalcCompC(EnergyPlusData &state, SmallLoadTe = T_suction; this->LowLoadTeError2PosTsuc++; if (LowLoadTeError2PosTsuc < 5) { - ShowWarningMessage( - state, - EnergyPlus::format("{}: no Te solution was found for {}, as load > capacity for the full range of Te", - RoutineName, - this->Name)); + ShowWarningMessage(state, + std::format("{}: no Te solution was found for {}, as load > capacity for the full range of Te", + RoutineName, + this->Name)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( @@ -14090,11 +14030,10 @@ void VRFCondenserEquipment::VRFOU_CalcCompC(EnergyPlusData &state, SmallLoadTe = MinOutdoorUnitTe; this->LowLoadTeError2PosOUTe++; if (LowLoadTeError2PosOUTe < 5) { - ShowWarningMessage( - state, - EnergyPlus::format("{}: no Te solution was found for {}, as load > capacity for the full range of Te", - RoutineName, - this->Name)); + ShowWarningMessage(state, + std::format("{}: no Te solution was found for {}, as load > capacity for the full range of Te", + RoutineName, + this->Name)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( diff --git a/src/EnergyPlus/HWBaseboardRadiator.cc b/src/EnergyPlus/HWBaseboardRadiator.cc index 37c71f3ec74..0b5ec5ed454 100644 --- a/src/EnergyPlus/HWBaseboardRadiator.cc +++ b/src/EnergyPlus/HWBaseboardRadiator.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -317,7 +318,7 @@ namespace HWBaseboardRadiator { state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", + EnergyPlus::format("Illegal {} = {:.7f}", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; @@ -352,7 +353,7 @@ namespace HWBaseboardRadiator { ShowSevereError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboardDesign.designName)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", + EnergyPlus::format("Illegal {} = {:.7f}", state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; @@ -365,8 +366,8 @@ namespace HWBaseboardRadiator { state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", - state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); + std::format("Blank field not allowed for {}", + state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } @@ -375,11 +376,11 @@ namespace HWBaseboardRadiator { // Set default convergence tolerance if (thisHWBaseboardDesign.Offset <= 0.0) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was less than the allowable minimum.", - RoutineName, - cCMO_BBRadiator_Water_Design, - thisHWBaseboardDesign.designName, - state.dataIPShortCut->cNumericFieldNames(3))); + std::format("{}{}=\"{}\", {} was less than the allowable minimum.", + RoutineName, + cCMO_BBRadiator_Water_Design, + thisHWBaseboardDesign.designName, + state.dataIPShortCut->cNumericFieldNames(3))); ShowContinueError(state, EnergyPlus::format("...reset to a default value=[{:.2R}].", MaxFraction)); thisHWBaseboardDesign.Offset = 0.001; } @@ -387,21 +388,21 @@ namespace HWBaseboardRadiator { thisHWBaseboardDesign.FracRadiant = state.dataIPShortCut->rNumericArgs(4); if (thisHWBaseboardDesign.FracRadiant < MinFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - cCMO_BBRadiator_Water, - thisHWBaseboardDesign.designName, - state.dataIPShortCut->cNumericFieldNames(4))); + std::format("{}{}=\"{}\", {} was lower than the allowable minimum.", + RoutineName, + cCMO_BBRadiator_Water, + thisHWBaseboardDesign.designName, + state.dataIPShortCut->cNumericFieldNames(4))); ShowContinueError(state, EnergyPlus::format("...reset to minimum value=[{:.2R}].", MinFraction)); thisHWBaseboardDesign.FracRadiant = MinFraction; } if (thisHWBaseboardDesign.FracRadiant > MaxFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_BBRadiator_Water, - thisHWBaseboardDesign.designName, - state.dataIPShortCut->cNumericFieldNames(4))); + std::format("{}{}=\"{}\", {} was higher than the allowable maximum.", + RoutineName, + cCMO_BBRadiator_Water, + thisHWBaseboardDesign.designName, + state.dataIPShortCut->cNumericFieldNames(4))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MaxFraction)); thisHWBaseboardDesign.FracRadiant = MaxFraction; } @@ -409,21 +410,21 @@ namespace HWBaseboardRadiator { thisHWBaseboardDesign.FracDistribPerson = state.dataIPShortCut->rNumericArgs(5); if (thisHWBaseboardDesign.FracDistribPerson < MinFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - cCMO_BBRadiator_Water, - thisHWBaseboardDesign.designName, - state.dataIPShortCut->cNumericFieldNames(5))); + std::format("{}{}=\"{}\", {} was lower than the allowable minimum.", + RoutineName, + cCMO_BBRadiator_Water, + thisHWBaseboardDesign.designName, + state.dataIPShortCut->cNumericFieldNames(5))); ShowContinueError(state, EnergyPlus::format("...reset to minimum value=[{:.3R}].", MinFraction)); thisHWBaseboardDesign.FracDistribPerson = MinFraction; } if (thisHWBaseboardDesign.FracDistribPerson > MaxFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_BBRadiator_Water, - thisHWBaseboardDesign.designName, - state.dataIPShortCut->cNumericFieldNames(5))); + std::format("{}{}=\"{}\", {} was higher than the allowable maximum.", + RoutineName, + cCMO_BBRadiator_Water, + thisHWBaseboardDesign.designName, + state.dataIPShortCut->cNumericFieldNames(5))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.3R}].", MaxFraction)); thisHWBaseboardDesign.FracDistribPerson = MaxFraction; } @@ -512,20 +513,20 @@ namespace HWBaseboardRadiator { thisHWBaseboard.WaterTempAvg = state.dataIPShortCut->rNumericArgs(1); if (thisHWBaseboard.WaterTempAvg > MaxWaterTempAvg + 0.001) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(1))); + std::format("{}{}=\"{}\", {} was higher than the allowable maximum.", + RoutineName, + cCMO_BBRadiator_Water, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(1))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MaxWaterTempAvg)); thisHWBaseboard.WaterTempAvg = MaxWaterTempAvg; } else if (thisHWBaseboard.WaterTempAvg < MinWaterTempAvg - 0.001) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(1))); + std::format("{}{}=\"{}\", {} was lower than the allowable minimum.", + RoutineName, + cCMO_BBRadiator_Water, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(1))); ShowContinueError(state, EnergyPlus::format("...reset to minimum value=[{:.2R}].", MinWaterTempAvg)); thisHWBaseboard.WaterTempAvg = MinWaterTempAvg; } @@ -534,11 +535,11 @@ namespace HWBaseboardRadiator { if (thisHWBaseboard.WaterMassFlowRateStd < LowWaterMassFlowRate - 0.0001 || thisHWBaseboard.WaterMassFlowRateStd > HighWaterMassFlowRate + 0.0001) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} is an invalid Standard Water mass flow rate.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(2))); + std::format("{}{}=\"{}\", {} is an invalid Standard Water mass flow rate.", + RoutineName, + cCMO_BBRadiator_Water, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(2))); ShowContinueError(state, EnergyPlus::format("...reset to a default value=[{:.1R}].", WaterMassFlowDefault)); thisHWBaseboard.WaterMassFlowRateStd = WaterMassFlowDefault; } @@ -549,22 +550,22 @@ namespace HWBaseboardRadiator { if (!state.dataIPShortCut->lNumericFieldBlanks(iHeatDesignCapacityNumericNum)) { thisHWBaseboard.ScaledHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum); if (thisHWBaseboard.ScaledHeatingCapacity < 0.0 && thisHWBaseboard.ScaledHeatingCapacity != DataSizing::AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboard.Name)); + ShowSevereError(state, std::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboard.Name)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum))); + std::format("Illegal {} = {:.7f}", + state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboard.Name)); - ShowContinueError(state, - EnergyPlus::format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboard.Name)); ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", - state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum))); + std::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowContinueError( + state, + std::format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else if (thisHWBaseboard.HeatingCapMethod == DataSizing::CapacityPerFloorArea) { @@ -574,31 +575,31 @@ namespace HWBaseboardRadiator { thisHWBaseboard.ScaledHeatingCapacity = HWBaseboardDesignDataObject.ScaledHeatingCapacity; } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboard.Name)); + ShowSevereError(state, std::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, thisHWBaseboard.Name)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + std::format("Illegal {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ErrorsFound = true; } thisHWBaseboard.WaterVolFlowRateMax = state.dataIPShortCut->rNumericArgs(4); if (std::abs(thisHWBaseboard.WaterVolFlowRateMax) <= MinWaterFlowRate) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was less than the allowable minimum.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(4))); + std::format("{}{}=\"{}\", {} was less than the allowable minimum.", + RoutineName, + cCMO_BBRadiator_Water, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(4))); ShowContinueError(state, EnergyPlus::format("...reset to minimum value=[{:.2R}].", MinWaterFlowRate)); thisHWBaseboard.WaterVolFlowRateMax = MinWaterFlowRate; } else if (thisHWBaseboard.WaterVolFlowRateMax > MaxWaterFlowRate) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(4))); + std::format("{}{}=\"{}\", {} was higher than the allowable maximum.", + RoutineName, + cCMO_BBRadiator_Water, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(4))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MaxWaterFlowRate)); thisHWBaseboard.WaterVolFlowRateMax = MaxWaterFlowRate; } @@ -606,10 +607,10 @@ namespace HWBaseboardRadiator { // Remaining fraction is added to the zone as convective heat transfer if (HWBaseboardDesignDataObject.FracRadiant > MaxFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", Fraction Radiant was higher than the allowable maximum.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}{}=\"{}\", Fraction Radiant was higher than the allowable maximum.", + RoutineName, + cCMO_BBRadiator_Water, + state.dataIPShortCut->cAlphaArgs(1))); HWBaseboardDesignDataObject.FracRadiant = MaxFraction; thisHWBaseboard.FracConvect = 0.0; } else { @@ -628,7 +629,7 @@ namespace HWBaseboardRadiator { ShowSevereError(state, std::string{RoutineName} + cCMO_BBRadiator_Water + "=\"" + state.dataIPShortCut->cAlphaArgs(1) + "\", the number of surface/radiant fraction groups entered was less than the allowable minimum."); - ShowContinueError(state, EnergyPlus::format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); + ShowContinueError(state, std::format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); ErrorsFound = true; thisHWBaseboard.TotSurfToDistrib = 0; // error } @@ -653,21 +654,21 @@ namespace HWBaseboardRadiator { thisHWBaseboard.FracDistribToSurf(SurfNum) = state.dataIPShortCut->rNumericArgs(SurfNum + 4); if (thisHWBaseboard.FracDistribToSurf(SurfNum) > MaxFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {}was greater than the allowable maximum.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(SurfNum + 4))); + std::format("{}{}=\"{}\", {}was greater than the allowable maximum.", + RoutineName, + cCMO_BBRadiator_Water, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(SurfNum + 4))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MaxFraction)); thisHWBaseboard.TotSurfToDistrib = MaxFraction; } if (thisHWBaseboard.FracDistribToSurf(SurfNum) < MinFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {}was less than the allowable minimum.", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(SurfNum + 4))); + std::format("{}{}=\"{}\", {}was less than the allowable minimum.", + RoutineName, + cCMO_BBRadiator_Water, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(SurfNum + 4))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MinFraction)); thisHWBaseboard.TotSurfToDistrib = MinFraction; } @@ -681,26 +682,26 @@ namespace HWBaseboardRadiator { if (AllFracsSummed > (MaxFraction + 0.01)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", Summed radiant fractions for people + surface groups > 1.0", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}{}=\"{}\", Summed radiant fractions for people + surface groups > 1.0", + RoutineName, + cCMO_BBRadiator_Water, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } if ((AllFracsSummed < (MaxFraction - 0.01)) && (HWBaseboardDesignDataObject.FracRadiant > MinFraction)) { // User didn't distribute all of the | radiation warn that some will be lost ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", Summed radiant fractions for people + surface groups < 1.0", - RoutineName, - cCMO_BBRadiator_Water, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}{}=\"{}\", Summed radiant fractions for people + surface groups < 1.0", + RoutineName, + cCMO_BBRadiator_Water, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "The rest of the radiant energy delivered by the baseboard heater will be lost"); } } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}{}Errors found getting input. Program terminates.", RoutineName, cCMO_BBRadiator_Water)); + ShowFatalError(state, std::format("{}{}Errors found getting input. Program terminates.", RoutineName, cCMO_BBRadiator_Water)); } // Setup Report variables for the Coils @@ -1095,9 +1096,9 @@ namespace HWBaseboardRadiator { if ((std::abs(WaterVolFlowRateMaxDes - WaterVolFlowRateMaxUser) / WaterVolFlowRateMaxUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeHWBaseboard: Potential issue with equipment sizing for " - "ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", - hWBaseboard.Name)); + std::format("SizeHWBaseboard: Potential issue with equipment sizing for " + "ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", + hWBaseboard.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Water Flow Rate of {:.5R} [m3/s]", WaterVolFlowRateMaxUser)); @@ -1131,8 +1132,7 @@ namespace HWBaseboardRadiator { hWBaseboard.AirMassFlowRateStd = AirMassFlowRate; // Check Ta,out < Tw,in if (AirOutletTempStd >= WaterInletTempStd) { - ShowSevereError(state, - EnergyPlus::format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); + ShowSevereError(state, std::format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); ShowContinueError(state, "...Air Outlet temperature must be below the Water Inlet temperature"); ShowContinueError(state, EnergyPlus::format("...Air Outlet Temperature=[{:.2R}], Water Inlet Temperature=[{:.2R}].", @@ -1143,8 +1143,7 @@ namespace HWBaseboardRadiator { } // Check Tw,out < Ta,in if (AirInletTempStd >= WaterOutletTempStd) { - ShowSevereError(state, - EnergyPlus::format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); + ShowSevereError(state, std::format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); ShowContinueError(state, "...Water Outlet temperature must be below the Air Inlet temperature"); ShowContinueError(state, EnergyPlus::format("...Air Inlet Temperature=[{:.2R}], Water Outlet Temperature=[{:.2R}].", @@ -1169,7 +1168,7 @@ namespace HWBaseboardRadiator { if (hWBaseboard.WaterVolFlowRateMax == DataSizing::AutoSize || hWBaseboard.RatedCapacity == DataSizing::AutoSize || hWBaseboard.RatedCapacity == 0.0) { ShowSevereError(state, "Autosizing of hot water baseboard requires a heating loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Hot Water Baseboard Heater={}", hWBaseboard.Name)); + ShowContinueError(state, std::format("Occurs in Hot Water Baseboard Heater={}", hWBaseboard.Name)); ErrorsFound = true; } // calculate UA from rated capacities @@ -1188,8 +1187,7 @@ namespace HWBaseboardRadiator { // Check Ta,out < Tw,in if (AirOutletTempStd >= WaterInletTempStd) { - ShowSevereError(state, - EnergyPlus::format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); + ShowSevereError(state, std::format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); ShowContinueError(state, "...Air Outlet temperature must be below the Water Inlet temperature"); ShowContinueError(state, EnergyPlus::format("...Air Outlet Temperature=[{:.2R}], Water Inlet Temperature=[{:.2R}].", @@ -1200,8 +1198,7 @@ namespace HWBaseboardRadiator { } // Check Tw,out < Ta,in if (AirInletTempStd >= WaterOutletTempStd) { - ShowSevereError(state, - EnergyPlus::format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); + ShowSevereError(state, std::format("SizeHWBaseboard: ZoneHVAC:Baseboard:RadiantConvective:Water=\"{}\".", hWBaseboard.Name)); ShowContinueError(state, "...Water Outlet temperature must be below the Air Inlet temperature"); ShowContinueError(state, EnergyPlus::format("...Air Inlet Temperature=[{:.2R}], Water Outlet Temperature=[{:.2R}].", @@ -1508,19 +1505,19 @@ namespace HWBaseboardRadiator { // CR 8074, trap for excessive intensity (throws off surface balance ) if (ThisSurfIntensity > DataHeatBalFanSys::MaxRadHeatFlux) { ShowSevereError(state, "DistributeBBRadGains: excessive thermal radiation heat flux intensity detected"); - ShowContinueError(state, EnergyPlus::format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); + ShowContinueError(state, std::format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); ShowContinueError(state, EnergyPlus::format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCMO_BBRadiator_Water, thisHWBB.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCMO_BBRadiator_Water, thisHWBB.Name)); ShowContinueError(state, EnergyPlus::format("Radiation intensity = {:.2R} [W/m2]", ThisSurfIntensity)); - ShowContinueError(state, EnergyPlus::format("Assign a larger surface area or more surfaces in {}", cCMO_BBRadiator_Water)); + ShowContinueError(state, std::format("Assign a larger surface area or more surfaces in {}", cCMO_BBRadiator_Water)); ShowFatalError(state, "DistributeBBRadGains: excessive thermal radiation heat flux intensity detected"); } } else { ShowSevereError(state, "DistributeBBRadGains: surface not large enough to receive thermal radiation heat flux"); - ShowContinueError(state, EnergyPlus::format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); + ShowContinueError(state, std::format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); ShowContinueError(state, EnergyPlus::format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCMO_BBRadiator_Water, thisHWBB.Name)); - ShowContinueError(state, EnergyPlus::format("Assign a larger surface area or more surfaces in {}", cCMO_BBRadiator_Water)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCMO_BBRadiator_Water, thisHWBB.Name)); + ShowContinueError(state, std::format("Assign a larger surface area or more surfaces in {}", cCMO_BBRadiator_Water)); ShowFatalError(state, "DistributeBBRadGains: surface not large enough to receive thermal radiation heat flux"); } } @@ -1573,7 +1570,7 @@ namespace HWBaseboardRadiator { if (CompIndex == 0) { BaseboardNum = Util::FindItemInList(BaseboardName, state.dataHWBaseboardRad->HWBaseboard, &HWBaseboardParams::Name); if (BaseboardNum == 0) { - ShowFatalError(state, EnergyPlus::format("UpdateHWBaseboardPlantConnection: Specified baseboard not valid ={}", BaseboardName)); + ShowFatalError(state, std::format("UpdateHWBaseboardPlantConnection: Specified baseboard not valid ={}", BaseboardName)); } CompIndex = BaseboardNum; } else { @@ -1581,30 +1578,29 @@ namespace HWBaseboardRadiator { if (BaseboardNum > NumHWBaseboards || BaseboardNum < 1) { ShowFatalError( state, - EnergyPlus::format( - "UpdateHWBaseboardPlantConnection: Invalid CompIndex passed={}, Number of baseboards={}, Entered baseboard name={}", - BaseboardNum, - NumHWBaseboards, - BaseboardName)); + std::format("UpdateHWBaseboardPlantConnection: Invalid CompIndex passed={}, Number of baseboards={}, Entered baseboard name={}", + BaseboardNum, + NumHWBaseboards, + BaseboardName)); } if (state.dataGlobal->KickOffSimulation) { if (BaseboardName != state.dataHWBaseboardRad->HWBaseboard(BaseboardNum).Name) { ShowFatalError( state, - EnergyPlus::format("UpdateHWBaseboardPlantConnection: Invalid CompIndex passed={}, baseboard name={}, stored baseboard Name " - "for that index={}", - BaseboardNum, - BaseboardName, - state.dataHWBaseboardRad->HWBaseboard(BaseboardNum).Name)); + std::format("UpdateHWBaseboardPlantConnection: Invalid CompIndex passed={}, baseboard name={}, stored baseboard Name " + "for that index={}", + BaseboardNum, + BaseboardName, + state.dataHWBaseboardRad->HWBaseboard(BaseboardNum).Name)); } if (BaseboardTypeNum != static_cast(DataPlant::PlantEquipmentType::Baseboard_Rad_Conv_Water)) { ShowFatalError( state, - EnergyPlus::format("UpdateHWBaseboardPlantConnection: Invalid CompIndex passed={}, baseboard name={}, stored baseboard Name " - "for that index={}", - BaseboardNum, - BaseboardName, - DataPlant::PlantEquipTypeNames[BaseboardTypeNum])); + std::format("UpdateHWBaseboardPlantConnection: Invalid CompIndex passed={}, baseboard name={}, stored baseboard Name " + "for that index={}", + BaseboardNum, + BaseboardName, + DataPlant::PlantEquipTypeNames[BaseboardTypeNum])); } } } diff --git a/src/EnergyPlus/HeatBalFiniteDiffManager.cc b/src/EnergyPlus/HeatBalFiniteDiffManager.cc index 2334d98c06d..bba9ae8dc61 100644 --- a/src/EnergyPlus/HeatBalFiniteDiffManager.cc +++ b/src/EnergyPlus/HeatBalFiniteDiffManager.cc @@ -48,14 +48,17 @@ // C++ Headers #include #include +#include #include // ObjexxFCL Headers #include #include -// EnergyPlus Headers +// Third Party Headers #include + +// EnergyPlus Headers #include #include #include @@ -939,7 +942,7 @@ namespace HeatBalFiniteDiffManager { // Setup material layer names actuators int matLay = state.dataConstruction->Construct(ConstrNum).LayerPoint(lay); // Actuator name format: "{SurfName}:{MaterialLayerName}" - std::string actName = fmt::format("{}:{}", state.dataSurface->Surface(Surf).Name, state.dataMaterial->materials(matLay)->Name); + std::string actName = EnergyPlus::format("{}:{}", state.dataSurface->Surface(Surf).Name, state.dataMaterial->materials(matLay)->Name); SurfaceFD(Surf).condMaterialActuators(lay).actuatorName = actName; SurfaceFD(Surf).specHeatMaterialActuators(lay).actuatorName = actName; @@ -1068,42 +1071,42 @@ namespace HeatBalFiniteDiffManager { OutputProcessor::StoreType::Average, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, - EnergyPlus::format("CondFD Surface Heat Flux Node {}", node), + std::format("CondFD Surface Heat Flux Node {}", node), Constant::Units::W_m2, SurfaceFD(SurfNum).QDreport(node), OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, - EnergyPlus::format("CondFD Phase Change State {}", node), + std::format("CondFD Phase Change State {}", node), Constant::Units::None, SurfaceFD(SurfNum).PhaseChangeStateRep(node), OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, - EnergyPlus::format("CondFD Phase Change Previous State {}", node), + std::format("CondFD Phase Change Previous State {}", node), Constant::Units::None, SurfaceFD(SurfNum).PhaseChangeStateOldRep(node), OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, - EnergyPlus::format("CondFD Phase Change Node Temperature {}", node), + std::format("CondFD Phase Change Node Temperature {}", node), Constant::Units::C, SurfaceFD(SurfNum).TDT(node), OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, - EnergyPlus::format("CondFD Phase Change Node Conductivity {}", node), + std::format("CondFD Phase Change Node Conductivity {}", node), Constant::Units::W_mK, SurfaceFD(SurfNum).condNodeReport(node), OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, - EnergyPlus::format("CondFD Phase Change Node Specific Heat {}", node), + std::format("CondFD Phase Change Node Specific Heat {}", node), Constant::Units::J_kgK, SurfaceFD(SurfNum).specHeatNodeReport(node), OutputProcessor::TimeStepType::Zone, @@ -1111,14 +1114,14 @@ namespace HeatBalFiniteDiffManager { state.dataSurface->Surface(SurfNum).Name); if (state.dataGlobal->DisplayAdvancedReportVariables) { SetupOutputVariable(state, - EnergyPlus::format("CondFD Surface Heat Capacitance Outer Half Node {}", node), + std::format("CondFD Surface Heat Capacitance Outer Half Node {}", node), Constant::Units::W_m2K, SurfaceFD(SurfNum).CpDelXRhoS1(node), OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, state.dataSurface->Surface(SurfNum).Name); SetupOutputVariable(state, - EnergyPlus::format("CondFD Surface Heat Capacitance Inner Half Node {}", node), + std::format("CondFD Surface Heat Capacitance Inner Half Node {}", node), Constant::Units::W_m2K, SurfaceFD(SurfNum).CpDelXRhoS2(node), OutputProcessor::TimeStepType::Zone, @@ -1480,7 +1483,7 @@ namespace HeatBalFiniteDiffManager { if (Inodes == 1) { print(state.files.eio, Format_702, - EnergyPlus::format("Node #{}", Inodes), + std::format("Node #{}", Inodes), constructFD.NodeXlocation(Inodes), construct.Name, "Surface Outside Face", @@ -1491,7 +1494,7 @@ namespace HeatBalFiniteDiffManager { if (OutwardMatLayerNum > 0 && OutwardMatLayerNum <= construct.TotLayers) { print(state.files.eio, Format_702, - EnergyPlus::format("Node #{}", Inodes), + std::format("Node #{}", Inodes), constructFD.NodeXlocation(Inodes), construct.Name, constructFD.Name(OutwardMatLayerNum), @@ -1501,7 +1504,7 @@ namespace HeatBalFiniteDiffManager { OutwardMatLayerNum = Layer; print(state.files.eio, Format_702, - EnergyPlus::format("Node #{}", Inodes), + std::format("Node #{}", Inodes), constructFD.NodeXlocation(Inodes), construct.Name, constructFD.Name(OutwardMatLayerNum), @@ -1514,7 +1517,7 @@ namespace HeatBalFiniteDiffManager { ++Inodes; print(state.files.eio, Format_702, - EnergyPlus::format("Node #{}", Inodes), + std::format("Node #{}", Inodes), constructFD.NodeXlocation(Inodes), construct.Name, constructFD.Name(Layer), @@ -2135,7 +2138,7 @@ namespace HeatBalFiniteDiffManager { if (actuatedVal >= 0) { QSSFlux += heatFluxActuator.actuatedValue; } else { - ShowSevereError(state, fmt::format("Surface: {}, Material: {}", surface.Name, mat->Name)); + ShowSevereError(state, std::format("Surface: {}, Material: {}", surface.Name, mat->Name)); ShowContinueError(state, "EMS Actuator does not support negative values"); ShowFatalError(state, "Program terminates due to preceding conditions."); } @@ -2586,7 +2589,7 @@ namespace HeatBalFiniteDiffManager { state.dataSurface->Surface(SurfNum).Name)); ShowContinueErrorTimeStamp(state, ""); if (!state.dataHeatBal->Zone(ZoneNum).TempOutOfBoundsReported) { - ShowContinueError(state, EnergyPlus::format("Zone=\"{}\", Diagnostic Details:", state.dataHeatBal->Zone(ZoneNum).Name)); + ShowContinueError(state, std::format("Zone=\"{}\", Diagnostic Details:", state.dataHeatBal->Zone(ZoneNum).Name)); if (state.dataHeatBal->Zone(ZoneNum).FloorArea > 0.0) { ShowContinueError( state, @@ -2642,7 +2645,7 @@ namespace HeatBalFiniteDiffManager { state.dataSurface->Surface(SurfNum).Name)); ShowContinueErrorTimeStamp(state, ""); if (!state.dataHeatBal->Zone(ZoneNum).TempOutOfBoundsReported) { - ShowContinueError(state, EnergyPlus::format("Zone=\"{}\", Diagnostic Details:", state.dataHeatBal->Zone(ZoneNum).Name)); + ShowContinueError(state, std::format("Zone=\"{}\", Diagnostic Details:", state.dataHeatBal->Zone(ZoneNum).Name)); if (state.dataHeatBal->Zone(ZoneNum).FloorArea > 0.0) { ShowContinueError( state, diff --git a/src/EnergyPlus/HeatBalanceAirManager.cc b/src/EnergyPlus/HeatBalanceAirManager.cc index e3e002c695e..31c5a6b711a 100644 --- a/src/EnergyPlus/HeatBalanceAirManager.cc +++ b/src/EnergyPlus/HeatBalanceAirManager.cc @@ -46,6 +46,7 @@ // POSSIBILITY OF SUCH DAMAGE. // C++ Headers +#include #include // ObjexxFCL Headers @@ -967,11 +968,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (lNumericFieldBlanks(1)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", field {} is blank. 0 Infiltration will result.", - RoutineName, - cCurrentModuleObject, - thisInfiltrationInput.Name, - cNumericFieldNames(1))); + std::format("{}{}=\"{}\", field {} is blank. 0 Infiltration will result.", + RoutineName, + cCurrentModuleObject, + thisInfiltrationInput.Name, + cNumericFieldNames(1))); } else { Real64 spaceFrac = 1.0; if (!thisInfiltrationInput.spaceListActive && (thisInfiltrationInput.numOfSpaces > 1)) { @@ -979,13 +980,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (zoneExteriorTotalSurfArea > 0.0) { spaceFrac = thisSpace.ExteriorTotalSurfArea / zoneExteriorTotalSurfArea; } else { - ShowSevereError( - state, - EnergyPlus::format("{}Zone exterior surface area is zero when allocating Infiltration to Spaces.", RoutineName)); + ShowSevereError(state, + std::format("{}Zone exterior surface area is zero when allocating Infiltration to Spaces.", RoutineName)); ShowContinueError( state, - EnergyPlus::format( - "Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisInfiltrationInput.Name, thisZone.Name)); + std::format("Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisInfiltrationInput.Name, thisZone.Name)); ErrorsFound = true; } } @@ -996,11 +995,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisInfiltration.spaceIndex > 0) { if (thisSpace.ExteriorTotalSurfArea <= 0.0) { ShowWarningError(state, - EnergyPlus::format(R"({}{}="{}", Space="{}" does not have surfaces exposed to outdoors.)", - RoutineName, - cCurrentModuleObject, - thisInfiltrationInput.Name, - thisSpace.Name)); + std::format(R"({}{}="{}", Space="{}" does not have surfaces exposed to outdoors.)", + RoutineName, + cCurrentModuleObject, + thisInfiltrationInput.Name, + thisSpace.Name)); ShowContinueError(state, "Infiltration model is appropriate for exterior spaces not interior spaces, simulation continues."); } } @@ -1052,11 +1051,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (lNumericFieldBlanks(1)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", field {} is blank. 0 Infiltration will result.", - RoutineName, - cCurrentModuleObject, - thisInfiltrationInput.Name, - cNumericFieldNames(1))); + std::format("{}{}=\"{}\", field {} is blank. 0 Infiltration will result.", + RoutineName, + cCurrentModuleObject, + thisInfiltrationInput.Name, + cNumericFieldNames(1))); } else { Real64 spaceFrac = 1.0; if (!thisInfiltrationInput.spaceListActive && (thisInfiltrationInput.numOfSpaces > 1)) { @@ -1064,13 +1063,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (zoneExteriorTotalSurfArea > 0.0) { spaceFrac = thisSpace.ExteriorTotalSurfArea / zoneExteriorTotalSurfArea; } else { - ShowSevereError( - state, - EnergyPlus::format("{}Zone exterior surface area is zero when allocating Infiltration to Spaces.", RoutineName)); + ShowSevereError(state, + std::format("{}Zone exterior surface area is zero when allocating Infiltration to Spaces.", RoutineName)); ShowContinueError( state, - EnergyPlus::format( - "Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisInfiltrationInput.Name, thisZone.Name)); + std::format("Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisInfiltrationInput.Name, thisZone.Name)); ErrorsFound = true; } } @@ -1080,11 +1077,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisInfiltration.spaceIndex > 0) { if (thisSpace.ExteriorTotalSurfArea <= 0.0) { ShowWarningError(state, - EnergyPlus::format(R"({}{}="{}", Space="{}" does not have surfaces exposed to outdoors.)", - RoutineName, - cCurrentModuleObject, - thisInfiltrationInput.Name, - thisSpace.Name)); + std::format(R"({}{}="{}", Space="{}" does not have surfaces exposed to outdoors.)", + RoutineName, + cCurrentModuleObject, + thisInfiltrationInput.Name, + thisSpace.Name)); ShowContinueError(state, "Infiltration model is appropriate for exterior spaces not interior spaces, simulation continues."); } @@ -1412,12 +1409,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisVentilation.DesignLevel = rNumericArgs(1); if (lNumericFieldBlanks(1)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Ventilation will result.", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(4), - cNumericFieldNames(1))); + std::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Ventilation will result.", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(4), + cNumericFieldNames(1))); } break; @@ -1426,14 +1423,13 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (rNumericArgs(2) >= 0.0) { thisVentilation.DesignLevel = rNumericArgs(2) * thisSpace.FloorArea; if (thisSpace.FloorArea <= 0.0) { - ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Floor Area = 0. 0 Ventilation will result.", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(4), - cNumericFieldNames(2))); + ShowWarningError(state, + std::format("{}{}=\"{}\", {} specifies {}, but Space Floor Area = 0. 0 Ventilation will result.", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(4), + cNumericFieldNames(2))); } } else { ShowSevereError(state, @@ -1447,12 +1443,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } if (lNumericFieldBlanks(2)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Ventilation will result.", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(4), - cNumericFieldNames(2))); + std::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Ventilation will result.", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(4), + cNumericFieldNames(2))); } break; @@ -1463,12 +1459,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisSpace.TotOccupants <= 0.0) { ShowWarningError( state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Zone Total Occupants = 0. 0 Ventilation will result.", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + std::format("{}{}=\"{}\", {} specifies {}, but Zone Total Occupants = 0. 0 Ventilation will result.", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } } else { ShowSevereError(state, @@ -1482,12 +1478,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } if (lNumericFieldBlanks(3)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {}specifies {}, but that field is blank. 0 Ventilation will result.", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + std::format("{}{}=\"{}\", {}specifies {}, but that field is blank. 0 Ventilation will result.", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } break; @@ -1497,12 +1493,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisVentilation.DesignLevel = rNumericArgs(4) * thisSpace.Volume / Constant::rSecsInHour; if (thisSpace.Volume <= 0.0) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Volume = 0. 0 Ventilation will result.", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(4), - cNumericFieldNames(4))); + std::format("{}{}=\"{}\", {} specifies {}, but Space Volume = 0. 0 Ventilation will result.", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(4), + cNumericFieldNames(4))); } } else { ShowSevereError(state, @@ -1516,12 +1512,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } if (lNumericFieldBlanks(4)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Ventilation will result.", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(4), - cNumericFieldNames(4))); + std::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Ventilation will result.", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(4), + cNumericFieldNames(4))); } break; @@ -1529,7 +1525,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (Item1 == 1) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", invalid calculation method={}", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4))); ErrorsFound = true; } @@ -1541,12 +1537,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisVentilation.FanType = static_cast(getEnumValue(ventilationTypeNamesUC, cAlphaArgs(5))); if (thisVentilation.FanType == DataHeatBalance::VentilationType::Invalid) { ShowSevereError(state, - EnergyPlus::format(R"({}{}="{}". invalid {}="{}".)", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cAlphaFieldNames(5), - cAlphaArgs(5))); + std::format(R"({}{}="{}". invalid {}="{}".)", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cAlphaFieldNames(5), + cAlphaArgs(5))); ErrorsFound = true; } } @@ -1556,7 +1552,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (Item1 == 1) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", {} must be >=0", RoutineName, cCurrentModuleObject, thisVentilation.Name, cNumericFieldNames(5))); ErrorsFound = true; } @@ -1566,11 +1562,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if ((thisVentilation.FanEfficiency <= 0.0) || (thisVentilation.FanEfficiency > 1.0)) { if (Item1 == 1) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\",{} must be in range >0 and <= 1", - RoutineName, - cCurrentModuleObject, - thisVentilation.Name, - cNumericFieldNames(6))); + std::format("{}{}=\"{}\",{} must be in range >0 and <= 1", + RoutineName, + cCurrentModuleObject, + thisVentilation.Name, + cNumericFieldNames(6))); ErrorsFound = true; } } @@ -1591,7 +1587,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (Item1 == 1) { ShowWarningError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", in {}=\"{}\".", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaFieldNames(2), cAlphaArgs(2))); ShowContinueError(state, "Ventilation Coefficients are all zero. No Ventilation will be reported."); } @@ -1607,11 +1603,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if ((thisVentilation.MinIndoorTemperature < -VentilTempLimit) || (thisVentilation.MinIndoorTemperature > VentilTempLimit)) { if (Item1 == 1) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" must have {} between -100C and 100C.", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(11))); + std::format("{}{}=\"{}\" must have {} between -100C and 100C.", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cNumericFieldNames(11))); ShowContinueError(state, EnergyPlus::format("...value entered=[{:.2R}].", rNumericArgs(11))); ErrorsFound = true; } @@ -1642,8 +1638,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - EnergyPlus::format( - "Both {} and {} provided, {} will be used.", cAlphaFieldNames(6), cAlphaFieldNames(11), cAlphaFieldNames(6))); + std::format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(6), cAlphaFieldNames(11), cAlphaFieldNames(6))); } } @@ -1651,10 +1646,10 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if ((thisVentilation.MaxIndoorTemperature < -VentilTempLimit) || (thisVentilation.MaxIndoorTemperature > VentilTempLimit)) { if (Item1 == 1) { ShowSevereError(state, - EnergyPlus::format("{}{} = {} must have a maximum indoor temperature between -100C and 100C", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1))); + std::format("{}{} = {} must have a maximum indoor temperature between -100C and 100C", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1))); ErrorsFound = true; } } @@ -1684,8 +1679,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - EnergyPlus::format( - "Both {} and {} provided, {} will be used.", cAlphaFieldNames(7), cAlphaFieldNames(12), cAlphaFieldNames(7))); + std::format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(7), cAlphaFieldNames(12), cAlphaFieldNames(7))); } } @@ -1715,8 +1709,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - EnergyPlus::format( - "Both {} and {} provided, {} will be used.", cAlphaFieldNames(8), cAlphaFieldNames(13), cAlphaFieldNames(8))); + std::format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(8), cAlphaFieldNames(13), cAlphaFieldNames(8))); } } @@ -1724,11 +1717,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if ((thisVentilation.MinOutdoorTemperature < -VentilTempLimit) || (thisVentilation.MinOutdoorTemperature > VentilTempLimit)) { if (Item1 == 1) { ShowSevereError(state, - EnergyPlus::format("{}{} statement = {} must have {} between -100C and 100C", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(14))); + std::format("{}{} statement = {} must have {} between -100C and 100C", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cNumericFieldNames(14))); ErrorsFound = true; } } @@ -1758,7 +1751,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - EnergyPlus::format( + std::format( "Both {} and {} provided, {} will be used.", cAlphaFieldNames(9), cNumericFieldNames(14), cAlphaFieldNames(9))); } } @@ -1767,11 +1760,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (Item1 == 1) { if ((thisVentilation.MaxOutdoorTemperature < -VentilTempLimit) || (thisVentilation.MaxOutdoorTemperature > VentilTempLimit)) { ShowSevereError(state, - EnergyPlus::format("{}{} statement = {} must have a {} between -100C and 100C", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(15))); + std::format("{}{} statement = {} must have a {} between -100C and 100C", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cNumericFieldNames(15))); ErrorsFound = true; } } @@ -1801,7 +1794,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - EnergyPlus::format( + std::format( "Both {} and {} provided, {} will be used.", cAlphaFieldNames(10), cNumericFieldNames(15), cAlphaFieldNames(10))); } } @@ -1810,10 +1803,10 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (Item1 == 1) { if ((thisVentilation.MaxWindSpeed < -VentilWSLimit) || (thisVentilation.MaxWindSpeed > VentilWSLimit)) { ShowSevereError(state, - EnergyPlus::format("{}{} statement = {} must have a maximum wind speed between -40 m/s and 40 m/s", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1))); + std::format("{}{} statement = {} must have a maximum wind speed between -40 m/s and 40 m/s", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1))); ErrorsFound = true; } } @@ -2010,8 +2003,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisVentilation.OpenArea < 0.0) { ShowSevereError( state, - EnergyPlus::format( - "{}{}=\"{}\", {} must be positive.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(1))); + std::format("{}{}=\"{}\", {} must be positive.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(1))); ErrorsFound = true; } @@ -2027,7 +2019,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisVentilation.OpenEff != Constant::AutoCalculate && (thisVentilation.OpenEff < 0.0 || thisVentilation.OpenEff > 1.0)) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", {} must be between 0 and 1.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(2))); ErrorsFound = true; } @@ -2036,7 +2028,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisVentilation.EffAngle < 0.0 || thisVentilation.EffAngle >= 360.0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", {} must be between 0 and 360.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(3))); ErrorsFound = true; } @@ -2045,8 +2037,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisVentilation.DH < 0.0) { ShowSevereError( state, - EnergyPlus::format( - "{}{}=\"{}\", {} must be positive.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(4))); + std::format("{}{}=\"{}\", {} must be positive.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(4))); ErrorsFound = true; } @@ -2054,7 +2045,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisVentilation.DiscCoef != Constant::AutoCalculate && (thisVentilation.DiscCoef < 0.0 || thisVentilation.DiscCoef > 1.0)) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", {} must be between 0 and 1.", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cNumericFieldNames(5))); ErrorsFound = true; } @@ -2066,11 +2057,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } if ((thisVentilation.MinIndoorTemperature < -VentilTempLimit) || (thisVentilation.MinIndoorTemperature > VentilTempLimit)) { ShowSevereError(state, - EnergyPlus::format("{}{} statement = {} must have {} between -100C and 100C", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(6))); + std::format("{}{} statement = {} must have {} between -100C and 100C", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cNumericFieldNames(6))); ErrorsFound = true; } @@ -2097,8 +2088,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - EnergyPlus::format( - "Both {} and {} provided, {} will be used.", cAlphaFieldNames(4), cNumericFieldNames(6), cAlphaFieldNames(4))); + std::format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(4), cNumericFieldNames(6), cAlphaFieldNames(4))); } // Max indoor temperature @@ -2109,7 +2099,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } if ((thisVentilation.MaxIndoorTemperature < -VentilTempLimit) || (thisVentilation.MaxIndoorTemperature > VentilTempLimit)) { ShowSevereCustom( - state, eoh, EnergyPlus::format("{} must be between {}C and {}C", cNumericFieldNames(7), -VentilTempLimit, VentilTempLimit)); + state, eoh, std::format("{} must be between {}C and {}C", cNumericFieldNames(7), -VentilTempLimit, VentilTempLimit)); ErrorsFound = true; } @@ -2136,8 +2126,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - EnergyPlus::format( - "Both {} and {} provided, {} will be used.", cAlphaFieldNames(5), cNumericFieldNames(7), cAlphaFieldNames(5))); + std::format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(5), cNumericFieldNames(7), cAlphaFieldNames(5))); } if (!lNumericFieldBlanks(8)) { @@ -2168,19 +2157,18 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - EnergyPlus::format( - "Both {} and {} provided, {} will be used.", cAlphaFieldNames(6), cNumericFieldNames(8), cAlphaFieldNames(6))); + std::format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(6), cNumericFieldNames(8), cAlphaFieldNames(6))); } // Min outdoor temp thisVentilation.MinOutdoorTemperature = !lNumericFieldBlanks(9) ? rNumericArgs(9) : -VentilTempLimit; if ((thisVentilation.MinOutdoorTemperature < -VentilTempLimit) || (thisVentilation.MinOutdoorTemperature > VentilTempLimit)) { ShowSevereError(state, - EnergyPlus::format("{}{} statement = {} must have {} between -100C and 100C", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(9))); + std::format("{}{} statement = {} must have {} between -100C and 100C", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cNumericFieldNames(9))); ErrorsFound = true; } @@ -2208,19 +2196,18 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - EnergyPlus::format( - "Both {} and {} provided, {} will be used.", cAlphaFieldNames(7), cNumericFieldNames(9), cAlphaFieldNames(7))); + std::format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(7), cNumericFieldNames(9), cAlphaFieldNames(7))); } // Max outdoor temp thisVentilation.MaxOutdoorTemperature = !lNumericFieldBlanks(10) ? rNumericArgs(10) : VentilTempLimit; if ((thisVentilation.MaxOutdoorTemperature < -VentilTempLimit) || (thisVentilation.MaxOutdoorTemperature > VentilTempLimit)) { ShowSevereError(state, - EnergyPlus::format("{}{} statement = {} must have a {} between -100C and 100C", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(10))); + std::format("{}{} statement = {} must have a {} between -100C and 100C", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cNumericFieldNames(10))); ErrorsFound = true; } @@ -2248,18 +2235,17 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - EnergyPlus::format( - "Both {} and {} provided, {} will be used.", cAlphaFieldNames(8), cNumericFieldNames(10), cAlphaFieldNames(8))); + std::format("Both {} and {} provided, {} will be used.", cAlphaFieldNames(8), cNumericFieldNames(10), cAlphaFieldNames(8))); } // Max wind speed thisVentilation.MaxWindSpeed = !lNumericFieldBlanks(11) ? rNumericArgs(11) : VentilWSLimit; if ((thisVentilation.MaxWindSpeed < -VentilWSLimit) || (thisVentilation.MaxWindSpeed > VentilWSLimit)) { ShowSevereError(state, - EnergyPlus::format("{}{} statement = {} must have a maximum wind speed between 0 m/s and 40 m/s", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1))); + std::format("{}{} statement = {} must have a maximum wind speed between 0 m/s and 40 m/s", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1))); ErrorsFound = true; } @@ -2475,12 +2461,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisMixing.DesignLevel = rNumericArgs(1); if (lNumericFieldBlanks(1)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(1))); + std::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(1))); } else { Real64 spaceFrac = 1.0; if (!thisMixingInput.spaceListActive && (thisMixingInput.numOfSpaces > 1)) { @@ -2488,11 +2474,10 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (zoneVolume > 0.0) { spaceFrac = thisSpace.Volume / zoneVolume; } else { - ShowSevereError(state, EnergyPlus::format("{}Zone volume is zero when allocating Mixing to Spaces.", RoutineName)); + ShowSevereError(state, std::format("{}Zone volume is zero when allocating Mixing to Spaces.", RoutineName)); ShowContinueError( state, - EnergyPlus::format( - "Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisMixingInput.Name, thisZone.Name)); + std::format("Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisMixingInput.Name, thisZone.Name)); ErrorsFound = true; } } @@ -2507,14 +2492,13 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisMixing.DesignLevel = rNumericArgs(2) * thisSpace.FloorArea; if (thisMixing.spaceIndex > 0) { if (thisZone.FloorArea <= 0.0) { - ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Floor Area = 0. 0 Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(2))); + ShowWarningError(state, + std::format("{}{}=\"{}\", {} specifies {}, but Space Floor Area = 0. 0 Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(2))); } } } else { @@ -2529,12 +2513,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } if (lNumericFieldBlanks(2)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(2))); + std::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(2))); } break; @@ -2543,14 +2527,13 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (rNumericArgs(3) >= 0.0) { thisMixing.DesignLevel = rNumericArgs(3) * thisSpace.TotOccupants; if (thisSpace.TotOccupants <= 0.0) { - ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Total Occupants = 0. 0 Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + ShowWarningError(state, + std::format("{}{}=\"{}\", {} specifies {}, but Space Total Occupants = 0. 0 Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } } else { ShowSevereError(state, @@ -2564,12 +2547,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } if (lNumericFieldBlanks(3)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + std::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } break; @@ -2579,12 +2562,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisMixing.DesignLevel = rNumericArgs(4) * thisSpace.Volume / Constant::rSecsInHour; if (thisSpace.Volume <= 0.0) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Volume = 0. 0 Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(4))); + std::format("{}{}=\"{}\", {} specifies {}, but Space Volume = 0. 0 Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(4))); } } else { ShowSevereError(state, @@ -2598,20 +2581,19 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } if (lNumericFieldBlanks(4)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(4))); + std::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(4))); } break; default: ShowSevereError( state, - EnergyPlus::format( - "{}{}=\"{}\", invalid calculation method={}", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4))); + std::format("{}{}=\"{}\", invalid calculation method={}", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4))); ErrorsFound = true; } @@ -2649,8 +2631,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - EnergyPlus::format( - "{} and {} are provided, {} will be used.", cAlphaFieldNames(6), cNumericFieldNames(5), cAlphaFieldNames(6))); + std::format("{} and {} are provided, {} will be used.", cAlphaFieldNames(6), cNumericFieldNames(5), cAlphaFieldNames(6))); } } @@ -2981,12 +2962,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err thisMixing.DesignLevel = rNumericArgs(1); if (lNumericFieldBlanks(1)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Cross Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(1))); + std::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Cross Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(1))); } else { Real64 spaceFrac = 1.0; if (!thisMixingInput.spaceListActive && (thisMixingInput.numOfSpaces > 1)) { @@ -2994,12 +2975,10 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (zoneVolume > 0.0) { spaceFrac = thisSpace.Volume / zoneVolume; } else { - ShowSevereError(state, - EnergyPlus::format("{}Zone volume is zero when allocating Cross Mixing to Spaces.", RoutineName)); + ShowSevereError(state, std::format("{}Zone volume is zero when allocating Cross Mixing to Spaces.", RoutineName)); ShowContinueError( state, - EnergyPlus::format( - "Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisMixingInput.Name, thisZone.Name)); + std::format("Occurs for {}=\"{}\" in Zone=\"{}\".", cCurrentModuleObject, thisMixingInput.Name, thisZone.Name)); ErrorsFound = true; } } @@ -3016,12 +2995,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisZone.FloorArea <= 0.0) { ShowWarningError( state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Floor Area = 0. 0 Cross Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(2))); + std::format("{}{}=\"{}\", {} specifies {}, but Space Floor Area = 0. 0 Cross Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(2))); } } } else { @@ -3036,12 +3015,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } if (lNumericFieldBlanks(2)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Cross Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(2))); + std::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Cross Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(2))); } break; @@ -3052,12 +3031,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (thisSpace.TotOccupants <= 0.0) { ShowWarningError( state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Total Occupants = 0. 0 Cross Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + std::format("{}{}=\"{}\", {} specifies {}, but Space Total Occupants = 0. 0 Cross Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } } else { ShowSevereError(state, @@ -3071,12 +3050,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } if (lNumericFieldBlanks(3)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Cross Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(3))); + std::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Cross Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(3))); } break; @@ -3085,14 +3064,13 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (rNumericArgs(4) >= 0.0) { thisMixing.DesignLevel = rNumericArgs(4) * thisSpace.Volume / Constant::rSecsInHour; if (thisSpace.Volume <= 0.0) { - ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but Space Volume = 0. 0 Cross Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(4))); + ShowWarningError(state, + std::format("{}{}=\"{}\", {} specifies {}, but Space Volume = 0. 0 Cross Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(4))); } } else { ShowSevereError(state, @@ -3106,20 +3084,19 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } if (lNumericFieldBlanks(4)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Cross Mixing will result.", - RoutineName, - cCurrentModuleObject, - thisMixingInput.Name, - cAlphaFieldNames(4), - cNumericFieldNames(4))); + std::format("{}{}=\"{}\", {} specifies {}, but that field is blank. 0 Cross Mixing will result.", + RoutineName, + cCurrentModuleObject, + thisMixingInput.Name, + cAlphaFieldNames(4), + cNumericFieldNames(4))); } break; default: ShowSevereError( state, - EnergyPlus::format( - "{}{}=\"{}\", invalid calculation method={}", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4))); + std::format("{}{}=\"{}\", invalid calculation method={}", RoutineName, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4))); ErrorsFound = true; } @@ -3131,12 +3108,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } if ((thisMixing.FromZone == 0) && (thisMixing.fromSpaceIndex == 0)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid (not found) {}=\"{}\".", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cAlphaFieldNames(5), - cAlphaArgs(5))); + std::format("{}{}=\"{}\", invalid (not found) {}=\"{}\".", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cAlphaFieldNames(5), + cAlphaArgs(5))); ErrorsFound = true; } thisMixing.DeltaTemperature = rNumericArgs(5); @@ -3164,8 +3141,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err ShowWarningCustom( state, eoh, - EnergyPlus::format( - "{} and {} provided. {} will be used.", cAlphaFieldNames(6), cNumericFieldNames(5), cAlphaFieldNames(6))); + std::format("{} and {} provided. {} will be used.", cAlphaFieldNames(6), cNumericFieldNames(5), cAlphaFieldNames(6))); } } @@ -3257,7 +3233,7 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err int zone1 = state.dataHeatBal->space(space1).zoneNum; int zone2 = state.dataHeatBal->space(space2).zoneNum; auto &thisCrossMizing = state.dataHeatBal->CrossMixing(mixingNum); - thisCrossMizing.Name = fmt::format("Air Boundary Mixing Zones {} and {}", zone1, zone2); + thisCrossMizing.Name = std::format("Air Boundary Mixing Zones {} and {}", zone1, zone2); thisCrossMizing.spaceIndex = space1; thisCrossMizing.ZonePtr = zone1; thisCrossMizing.sched = thisAirBoundaryMixing.sched; @@ -3481,12 +3457,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err int space1Num = Util::FindItemInList(cAlphaArgs(AlphaNum), state.dataHeatBal->space); if ((Zone1Num == 0) && (space1Num == 0)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid (not found) {}=\"{}\".", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cAlphaFieldNames(AlphaNum), - cAlphaArgs(AlphaNum))); + std::format("{}{}=\"{}\", invalid (not found) {}=\"{}\".", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cAlphaFieldNames(AlphaNum), + cAlphaArgs(AlphaNum))); ErrorsFound = true; } else if (Zone1Num == 0) { Zone1Num = state.dataHeatBal->space(space1Num).zoneNum; @@ -3497,12 +3473,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err int space2Num = Util::FindItemInList(cAlphaArgs(AlphaNum), state.dataHeatBal->space); if ((Zone2Num == 0) && (space2Num == 0)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid (not found) {}=\"{}\".", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cAlphaFieldNames(AlphaNum), - cAlphaArgs(AlphaNum))); + std::format("{}{}=\"{}\", invalid (not found) {}=\"{}\".", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cAlphaFieldNames(AlphaNum), + cAlphaArgs(AlphaNum))); ErrorsFound = true; } else if (Zone2Num == 0) { Zone2Num = state.dataHeatBal->space(space2Num).zoneNum; @@ -3511,14 +3487,13 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err int spaceNumA = 0; int spaceNumB = 0; if (Zone1Num == Zone2Num) { - ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\", The same zone name has been entered for both sides of a refrigerated door {}=\"{}\".", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cAlphaFieldNames(AlphaNum), - cAlphaArgs(AlphaNum))); + ShowSevereError(state, + std::format("{}{}=\"{}\", The same zone name has been entered for both sides of a refrigerated door {}=\"{}\".", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cAlphaFieldNames(AlphaNum), + cAlphaArgs(AlphaNum))); ErrorsFound = true; } else if (Zone1Num < Zone2Num) { // zone 1 will come first in soln loop, id zone 2 as mate zone ZoneNumA = Zone1Num; @@ -3597,14 +3572,14 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err } ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", and {}", RoutineName, cCurrentModuleObject, cAlphaArgs(1), zoneA.DoorMixingObjectName(ConnectTest))); ShowContinueError( state, - EnergyPlus::format(" Share same pair of zones: \"{}\" and \"{}\". Only one RefrigerationDoorMixing object is allowed " - "for any unique pair of zones.", - state.dataHeatBal->Zone(ZoneNumA).Name, - state.dataHeatBal->Zone(ZoneNumB).Name)); + std::format(" Share same pair of zones: \"{}\" and \"{}\". Only one RefrigerationDoorMixing object is allowed " + "for any unique pair of zones.", + state.dataHeatBal->Zone(ZoneNumA).Name, + state.dataHeatBal->Zone(ZoneNumB).Name)); ErrorsFound = true; } // ConnectTest } // NumRefDoorconnections > 1 @@ -3629,18 +3604,17 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (lAlphaFieldBlanks(NumbNum)) { zoneA.DoorHeight(ConnectionNumber) = 3.0; // default height of 3 meters ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}{} is blank and the default value of 3.0 will be used.", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(NumbNum))); + std::format("{}{}=\"{}{} is blank and the default value of 3.0 will be used.", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cNumericFieldNames(NumbNum))); } else { zoneA.DoorHeight(ConnectionNumber) = rNumericArgs(NumbNum); if ((zoneA.DoorHeight(ConnectionNumber) < 0) || (zoneA.DoorHeight(ConnectionNumber) > 50.0)) { ShowSevereError( state, - EnergyPlus::format( - "{}{} = {} must have a door height between 0 and 50 meters. ", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + std::format("{}{} = {} must have a door height between 0 and 50 meters. ", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); ErrorsFound = true; } } @@ -3649,17 +3623,17 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err if (lAlphaFieldBlanks(NumbNum)) { zoneA.DoorArea(ConnectionNumber) = 9.0; // default area of 9 m2 ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}{} is blank and the default value of 9 m2 will be used.", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cNumericFieldNames(NumbNum))); + std::format("{}{}=\"{}{} is blank and the default value of 9 m2 will be used.", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cNumericFieldNames(NumbNum))); } else { zoneA.DoorArea(ConnectionNumber) = rNumericArgs(NumbNum); if ((zoneA.DoorArea(ConnectionNumber) < 0) || (zoneA.DoorArea(ConnectionNumber) > 400.0)) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{} = {} must have a door height between 0 and 400 square meters. ", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); ErrorsFound = true; } @@ -3671,11 +3645,11 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err zoneA.Protection(ConnectionNumber) = RefDoorNone; // Default zoneA.DoorProtTypeName(ConnectionNumber) = "None"; // Default ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\" {} is blank. Default of no door protection will be used", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cAlphaFieldNames(AlphaNum))); + std::format("{}{}=\"{}\" {} is blank. Default of no door protection will be used", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cAlphaFieldNames(AlphaNum))); } else { if (cAlphaArgs(AlphaNum) == "NONE") { zoneA.Protection(ConnectionNumber) = RefDoorNone; @@ -3688,12 +3662,12 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err zoneA.DoorProtTypeName(ConnectionNumber) = "StripCurtain"; } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid calculation method={} with alphanum of 5: {}", - RoutineName, - cCurrentModuleObject, - cAlphaArgs(1), - cAlphaArgs(AlphaNum), - cAlphaArgs(5))); + std::format("{}{}=\"{}\", invalid calculation method={} with alphanum of 5: {}", + RoutineName, + cCurrentModuleObject, + cAlphaArgs(1), + cAlphaArgs(AlphaNum), + cAlphaArgs(5))); ErrorsFound = true; } // =none, etc. } // Blank @@ -4165,9 +4139,9 @@ void GetSimpleAirModelInputs(EnergyPlusData &state, bool &ErrorsFound) // IF err state.dataHeatBal->MassConservation(ZoneNum).IsOnlySourceZone) && (state.dataHeatBal->ZoneAirMassFlow.InfiltrationTreatment != DataHeatBalance::InfiltrationFlow::No)) { if (state.dataHeatBal->MassConservation(ZoneNum).InfiltrationPtr == 0) { - ShowSevereError(state, - EnergyPlus::format( - "{}: Infiltration object is not defined for zone = {}", RoutineName, state.dataHeatBal->Zone(ZoneNum).Name)); + ShowSevereError( + state, + std::format("{}: Infiltration object is not defined for zone = {}", RoutineName, state.dataHeatBal->Zone(ZoneNum).Name)); ShowContinueError(state, "Zone air mass flow balance requires infiltration object for source zones of mixing objects"); } } @@ -4274,7 +4248,7 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if cCurrentModuleObject = "RoomAirModelType"; NumOfAirModels = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); if (NumOfAirModels > state.dataGlobal->NumOfZones) { - ShowSevereError(state, EnergyPlus::format("Too many {}. Cannot exceed the number of Zones.", cCurrentModuleObject)); + ShowSevereError(state, std::format("Too many {}. Cannot exceed the number of Zones.", cCurrentModuleObject)); ErrorsFound = true; } if (NumOfAirModels > 0) { @@ -4299,19 +4273,19 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if ZoneNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataHeatBal->Zone); if (ZoneNum != 0) { if (!state.dataRoomAir->AirModel(ZoneNum).Name.empty()) { - ShowSevereError( - state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + ShowContinueError(state, std::format("Entered in {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Duplicate zone name, only one type of roomair model is allowed per zone"); ShowContinueError(state, - EnergyPlus::format("Zone {} was already assigned a roomair model by {} = {}", - state.dataIPShortCut->cAlphaArgs(2), - cCurrentModuleObject, - roomAirModelNamesUC[(int)state.dataRoomAir->AirModel(ZoneNum).AirModel])); + std::format("Zone {} was already assigned a roomair model by {} = {}", + state.dataIPShortCut->cAlphaArgs(2), + cCurrentModuleObject, + roomAirModelNamesUC[(int)state.dataRoomAir->AirModel(ZoneNum).AirModel])); ShowContinueError(state, - EnergyPlus::format("Air Model Type for zone already set to {}", - roomAirModelNamesUC[(int)state.dataRoomAir->AirModel(ZoneNum).AirModel])); - ShowContinueError(state, EnergyPlus::format("Trying to overwrite with model type = {}", state.dataIPShortCut->cAlphaArgs(3))); + std::format("Air Model Type for zone already set to {}", + roomAirModelNamesUC[(int)state.dataRoomAir->AirModel(ZoneNum).AirModel])); + ShowContinueError(state, std::format("Trying to overwrite with model type = {}", state.dataIPShortCut->cAlphaArgs(3))); ErrorsFound = true; } state.dataRoomAir->AirModel(ZoneNum).ZoneName = state.dataIPShortCut->cAlphaArgs(2); @@ -4335,7 +4309,7 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if IsNotOK, "GetRoomAirModelParameters"); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } break; @@ -4351,7 +4325,7 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if IsNotOK, "GetRoomAirModelParameters"); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } break; @@ -4367,7 +4341,7 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if IsNotOK, "GetRoomAirModelParameters"); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } break; @@ -4382,7 +4356,7 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if IsNotOK, "GetRoomAirModelParameters"); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } break; @@ -4397,7 +4371,7 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if IsNotOK, "GetRoomAirModelParameters"); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("In {}={}.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } break; @@ -4411,10 +4385,10 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if state.dataRoomAir->AirModel(ZoneNum).SimAirModel = true; if (state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "AirflowNetwork:SimulationControl") == 0) { ShowSevereError(state, - EnergyPlus::format("In {} = {}: {} = AIRFLOWNETWORK.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(3))); + std::format("In {} = {}: {} = AIRFLOWNETWORK.", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(3))); ShowContinueError(state, "This model requires AirflowNetwork:* objects to form a complete network, including " "AirflowNetwork:Intrazone:Node and AirflowNetwork:Intrazone:Linkage."); @@ -4424,27 +4398,26 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if break; default: - ShowWarningError( - state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); - ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("The mixing air model will be used for Zone ={}", state.dataIPShortCut->cAlphaArgs(2))); + ShowWarningError(state, + std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); + ShowContinueError(state, std::format("Entered in {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("The mixing air model will be used for Zone ={}", state.dataIPShortCut->cAlphaArgs(2))); state.dataRoomAir->AirModel(ZoneNum).AirModel = RoomAir::RoomAirModel::Mixing; } state.dataRoomAir->AirModel(ZoneNum).TempCoupleScheme = static_cast(getEnumValue(couplingSchemeNamesUC, state.dataIPShortCut->cAlphaArgs(4))); if (state.dataRoomAir->AirModel(ZoneNum).TempCoupleScheme == RoomAir::CouplingScheme::Invalid) { - ShowWarningError( - state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(4), state.dataIPShortCut->cAlphaArgs(4))); - ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("The direct coupling scheme will be used for Zone ={}", state.dataIPShortCut->cAlphaArgs(2))); + ShowWarningError(state, + std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(4), state.dataIPShortCut->cAlphaArgs(4))); + ShowContinueError(state, std::format("Entered in {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("The direct coupling scheme will be used for Zone ={}", state.dataIPShortCut->cAlphaArgs(2))); state.dataRoomAir->AirModel(ZoneNum).TempCoupleScheme = RoomAir::CouplingScheme::Direct; } } else { // Zone Not Found - ShowSevereError(state, EnergyPlus::format("{}, Zone not found={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, EnergyPlus::format("occurs in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}, Zone not found={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(2))); + ShowContinueError(state, std::format("occurs in {}={}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } // AirModel_Param_Loop @@ -4486,7 +4459,7 @@ void GetRoomAirModelParameters(EnergyPlusData &state, bool &errFlag) // True if } if (ErrorsFound) { - ShowSevereError(state, EnergyPlus::format("Errors found in processing input for {}", cCurrentModuleObject)); + ShowSevereError(state, std::format("Errors found in processing input for {}", cCurrentModuleObject)); errFlag = true; } } diff --git a/src/EnergyPlus/HeatBalanceHAMTManager.cc b/src/EnergyPlus/HeatBalanceHAMTManager.cc index 23f11877a5d..93c7284709c 100644 --- a/src/EnergyPlus/HeatBalanceHAMTManager.cc +++ b/src/EnergyPlus/HeatBalanceHAMTManager.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include #include // ObjexxFCL Headers @@ -740,19 +741,19 @@ namespace HeatBalanceHAMTManager { } if (matHAMT->ntc < 0) { if (mat->Conductivity > 0) { - ShowWarningError(state, EnergyPlus::format("{}Construction={}", RoutineName, constr.Name)); - ShowContinueError(state, - EnergyPlus::format("Reference Material=\"{}\" does not have thermal conductivity data. Using fixed value.", - matHAMT->Name)); + ShowWarningError(state, std::format("{}Construction={}", RoutineName, constr.Name)); + ShowContinueError( + state, + std::format("Reference Material=\"{}\" does not have thermal conductivity data. Using fixed value.", matHAMT->Name)); matHAMT->ntc = 2; matHAMT->tcwater(1) = 0.0; matHAMT->tcdata(1) = matHAMT->Conductivity; matHAMT->tcwater(2) = matHAMT->isodata(matHAMT->niso); matHAMT->tcdata(2) = matHAMT->Conductivity; } else { - ShowSevereError(state, EnergyPlus::format("{}Construction={}", RoutineName, constr.Name)); - ShowContinueError( - state, EnergyPlus::format("Reference Material=\"{}\" does not have required thermal conductivity data.", matHAMT->Name)); + ShowSevereError(state, std::format("{}Construction={}", RoutineName, constr.Name)); + ShowContinueError(state, + std::format("Reference Material=\"{}\" does not have required thermal conductivity data.", matHAMT->Name)); ++errorCount; } } @@ -776,8 +777,8 @@ namespace HeatBalanceHAMTManager { } --matHAMT->divs; if (matHAMT->divs < 1) { - ShowSevereError(state, EnergyPlus::format("{}Construction={}", RoutineName, constr.Name)); - ShowContinueError(state, EnergyPlus::format("Reference Material=\"{}\" is too thin.", matHAMT->Name)); + ShowSevereError(state, std::format("{}Construction={}", RoutineName, constr.Name)); + ShowContinueError(state, std::format("Reference Material=\"{}\" is too thin.", matHAMT->Name)); ++errorCount; break; } @@ -1049,7 +1050,7 @@ namespace HeatBalanceHAMTManager { for (int cellid = s_hbh->Extcell(sid), concell = 1; cellid <= s_hbh->Intcell(sid); ++cellid, ++concell) { SetupOutputVariable(state, - EnergyPlus::format("HAMT Surface Temperature Cell {}", concell), + std::format("HAMT Surface Temperature Cell {}", concell), Constant::Units::C, s_hbh->cells(cellid).temp, OutputProcessor::TimeStepType::Zone, @@ -1058,7 +1059,7 @@ namespace HeatBalanceHAMTManager { } for (int cellid = s_hbh->Extcell(sid), concell = 1; cellid <= s_hbh->Intcell(sid); ++cellid, ++concell) { SetupOutputVariable(state, - EnergyPlus::format("HAMT Surface Water Content Cell {}", concell), + std::format("HAMT Surface Water Content Cell {}", concell), Constant::Units::kg_kg, s_hbh->cells(cellid).wreport, OutputProcessor::TimeStepType::Zone, @@ -1067,7 +1068,7 @@ namespace HeatBalanceHAMTManager { } for (int cellid = s_hbh->Extcell(sid), concell = 1; cellid <= s_hbh->Intcell(sid); ++cellid, ++concell) { SetupOutputVariable(state, - EnergyPlus::format("HAMT Surface Relative Humidity Cell {}", concell), + std::format("HAMT Surface Relative Humidity Cell {}", concell), Constant::Units::Perc, s_hbh->cells(cellid).rhp, OutputProcessor::TimeStepType::Zone, @@ -1365,9 +1366,9 @@ namespace HeatBalanceHAMTManager { if (!state.dataGlobal->WarmupFlag) { ++s_hbh->qvpErrCount; if (s_hbh->qvpErrCount < 16) { - ShowWarningError(state, - EnergyPlus::format("HeatAndMoistureTransfer: Large Latent Heat for Surface {}", - state.dataSurface->Surface(sid).Name)); + ShowWarningError( + state, + std::format("HeatAndMoistureTransfer: Large Latent Heat for Surface {}", state.dataSurface->Surface(sid).Name)); } else { ShowRecurringWarningErrorAtEnd(state, "HeatAndMoistureTransfer: Large Latent Heat Errors ", s_hbh->qvpErrReport); } @@ -1510,7 +1511,7 @@ namespace HeatBalanceHAMTManager { cell.rhp1 = (phiorsum + vporsum + (wcap * cell.rh) / s_hbh->deltat) / denominator; } else { ShowSevereError(state, "CalcHeatBalHAMT: denominator in calculating RH is zero. Check material properties for accuracy."); - ShowContinueError(state, EnergyPlus::format("...Problem occurs in Material=\"{}\".", s_mat->materials(cell.matid)->Name)); + ShowContinueError(state, std::format("...Problem occurs in Material=\"{}\".", s_mat->materials(cell.matid)->Name)); ShowFatalError(state, "Program terminates due to preceding condition."); } diff --git a/src/EnergyPlus/HeatBalanceIntRadExchange.cc b/src/EnergyPlus/HeatBalanceIntRadExchange.cc index 9eb81adb654..4e800d80ed2 100644 --- a/src/EnergyPlus/HeatBalanceIntRadExchange.cc +++ b/src/EnergyPlus/HeatBalanceIntRadExchange.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -1739,8 +1740,8 @@ namespace HeatBalanceIntRadExchange { } ShowWarningError( state, - EnergyPlus::format("FixViewFactors: View factors not complete. Check for bad surface descriptions or unenclosed zone=\"{}\".", - enclName)); + std::format("FixViewFactors: View factors not complete. Check for bad surface descriptions or unenclosed zone=\"{}\".", + enclName)); ShowContinueError(state, EnergyPlus::format("Enforced reciprocity has tolerance (ideal is " "0)=[{:.6R}], Row Sum (ideal is {})=[{:.2R}].", @@ -1782,8 +1783,8 @@ namespace HeatBalanceIntRadExchange { } else { ShowWarningError( state, - EnergyPlus::format("FixViewFactors: View factors not complete. Check for bad surface descriptions or unenclosed zone=\"{}\".", - enclName)); + std::format("FixViewFactors: View factors not complete. Check for bad surface descriptions or unenclosed zone=\"{}\".", + enclName)); } } if (severeErrorPresent) { @@ -2080,14 +2081,14 @@ namespace HeatBalanceIntRadExchange { // Trap for surfaces that do not exist if (surfNum == 0) { - ShowSevereError(state, EnergyPlus::format("{}Invalid Surface name = {}", routineName, SurfaceName)); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, RadSysName)); + ShowSevereError(state, std::format("{}Invalid Surface name = {}", routineName, SurfaceName)); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, RadSysName)); ErrorsFound = true; return surfNum; } if (RadSysZoneNum == 0) { - ShowSevereError(state, EnergyPlus::format("{}Invalid Zone number passed by {} = {}", routineName, cCurrentModuleObject, RadSysName)); + ShowSevereError(state, std::format("{}Invalid Zone number passed by {} = {}", routineName, cCurrentModuleObject, RadSysName)); ErrorsFound = true; return surfNum; } @@ -2097,17 +2098,17 @@ namespace HeatBalanceIntRadExchange { if (surfZoneNum == 0) { // This should never happen ShowSevereError(state, - EnergyPlus::format("{}Somehow the surface zone number is zero for{} = {} and Surface = {}", - routineName, - cCurrentModuleObject, - RadSysName, - SurfaceName)); // LCOV_EXCL_LINE - ErrorsFound = true; // LCOV_EXCL_LINE + std::format("{}Somehow the surface zone number is zero for{} = {} and Surface = {}", + routineName, + cCurrentModuleObject, + RadSysName, + SurfaceName)); // LCOV_EXCL_LINE + ErrorsFound = true; // LCOV_EXCL_LINE } else if (surfZoneNum != RadSysZoneNum) { - ShowSevereError(state, EnergyPlus::format("{}Surface = {} is not in the same zone as the radiant equipment.", routineName, SurfaceName)); - ShowContinueError(state, EnergyPlus::format("Surface zone or enclosure = {}", state.dataHeatBal->Zone(surfZoneNum).Name)); - ShowContinueError(state, EnergyPlus::format("Radiant equipment zone or enclosure = {}", state.dataHeatBal->Zone(RadSysZoneNum).Name)); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, RadSysName)); + ShowSevereError(state, std::format("{}Surface = {} is not in the same zone as the radiant equipment.", routineName, SurfaceName)); + ShowContinueError(state, std::format("Surface zone or enclosure = {}", state.dataHeatBal->Zone(surfZoneNum).Name)); + ShowContinueError(state, std::format("Radiant equipment zone or enclosure = {}", state.dataHeatBal->Zone(RadSysZoneNum).Name)); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, RadSysName)); ErrorsFound = true; } return surfNum; diff --git a/src/EnergyPlus/HeatBalanceKivaManager.cc b/src/EnergyPlus/HeatBalanceKivaManager.cc index e6fbf7bb126..f61bde1d295 100644 --- a/src/EnergyPlus/HeatBalanceKivaManager.cc +++ b/src/EnergyPlus/HeatBalanceKivaManager.cc @@ -46,13 +46,14 @@ // POSSIBILITY OF SUCH DAMAGE. // C++ Headers +#include // Kiva Headers -#include #ifdef GROUND_PLOT # include # include #endif +#include // EnergyPlus Headers #include @@ -80,14 +81,14 @@ namespace EnergyPlus::HeatBalanceKivaManager { void kivaErrorCallback(const int messageType, const std::string message, void *contextPtr) { if (contextPtr == nullptr) { - throw FatalError(EnergyPlus::format("Unhandled Kiva Error: {}", message)); + throw FatalError(std::format("Unhandled Kiva Error: {}", message)); } std::string fullMessage; std::pair contextPair = *(std::pair *)contextPtr; if (!contextPair.second.empty()) { - fullMessage = EnergyPlus::format("{}: {}", contextPair.second, message); + fullMessage = std::format("{}: {}", contextPair.second, message); } else { - fullMessage = EnergyPlus::format("Kiva: {}", message); + fullMessage = std::format("Kiva: {}", message); } if (messageType == Kiva::MSG_INFO) { ShowMessage(*contextPair.first, fullMessage); @@ -477,7 +478,7 @@ void KivaManager::readWeatherData(EnergyPlusData &state) if (LineResult.eof) { ShowFatalError( state, - EnergyPlus::format( + std::format( "Kiva::ReadWeatherFile: Unexpected End-of-File on EPW Weather file, while reading header information, looking for header={}", Header(HdLine))); } @@ -502,7 +503,7 @@ void KivaManager::readWeatherData(EnergyPlusData &state) if ((Pos == std::string::npos) && (!has_prefixi(Header(HdLine), "COMMENTS"))) { ShowSevereError(state, "Invalid Header line in in.epw -- no commas"); - ShowContinueError(state, EnergyPlus::format("Line={}", LineResult.data)); + ShowContinueError(state, std::format("Line={}", LineResult.data)); ShowFatalError(state, "Previous conditions cause termination."); } if (Pos != std::string::npos) { @@ -695,16 +696,16 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) if (Surfaces(wl).Class == DataSurfaces::SurfaceClass::Floor) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("Foundation:Kiva=\"{}\", only one floor per Foundation:Kiva Object allowed.", - foundationInputs[surface.OSCPtr].name)); + std::format("Foundation:Kiva=\"{}\", only one floor per Foundation:Kiva Object allowed.", + foundationInputs[surface.OSCPtr].name)); } else { ErrorsFound = true; ShowSevereError( state, - EnergyPlus::format("Foundation:Kiva=\"{}\", only floor and wall surfaces are allowed to reference Foundation Outside " - "Boundary Conditions.", - foundationInputs[surface.OSCPtr].name)); - ShowContinueError(state, EnergyPlus::format("Surface=\"{}\", is not a floor or wall.", Surfaces(wl).Name)); + std::format("Foundation:Kiva=\"{}\", only floor and wall surfaces are allowed to reference Foundation Outside " + "Boundary Conditions.", + foundationInputs[surface.OSCPtr].name)); + ShowContinueError(state, std::format("Surface=\"{}\", is not a floor or wall.", Surfaces(wl).Name)); } } else { wallSurfaces.push_back(wl); @@ -733,9 +734,9 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) } else { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("Surface=\"{}\", references a Foundation Outside Boundary Condition but there is no corresponding " - "SURFACEPROPERTY:EXPOSEDFOUNDATIONPERIMETER object defined.", - Surfaces(surfNum).Name)); + std::format("Surface=\"{}\", references a Foundation Outside Boundary Condition but there is no corresponding " + "SURFACEPROPERTY:EXPOSEDFOUNDATIONPERIMETER object defined.", + Surfaces(surfNum).Name)); } Kiva::Polygon floorPolygon; @@ -801,11 +802,11 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) // Enforce quadrilateralism if (numVs > 4) { ShowWarningError(state, - EnergyPlus::format("Foundation:Kiva=\"{}\", wall surfaces with more than four vertices referencing", - foundationInputs[surface.OSCPtr].name)); + std::format("Foundation:Kiva=\"{}\", wall surfaces with more than four vertices referencing", + foundationInputs[surface.OSCPtr].name)); ShowContinueError( state, "...Foundation Outside Boundary Conditions may not be interpreted correctly in the 2D finite difference model."); - ShowContinueError(state, EnergyPlus::format("Surface=\"{}\", has {} vertices.", Surfaces(wl).Name, numVs)); + ShowContinueError(state, std::format("Surface=\"{}\", has {} vertices.", Surfaces(wl).Name, numVs)); ShowContinueError(state, "Consider separating the wall into separate surfaces, each spanning from the floor slab to the top of " "the foundation wall."); @@ -830,11 +831,9 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) } if (perimeter == 0.0) { - ShowWarningError(state, EnergyPlus::format("Foundation:Kiva=\"{}\".", foundationInputs[surface.OSCPtr].name)); - ShowContinueError(state, - EnergyPlus::format(" Wall Surface=\"{}\", does not have any vertices that are", Surfaces(wl).Name)); - ShowContinueError(state, - EnergyPlus::format(" coplanar with the corresponding Floor Surface=\"{}\".", Surfaces(surfNum).Name)); + ShowWarningError(state, std::format("Foundation:Kiva=\"{}\".", foundationInputs[surface.OSCPtr].name)); + ShowContinueError(state, std::format(" Wall Surface=\"{}\", does not have any vertices that are", Surfaces(wl).Name)); + ShowContinueError(state, std::format(" coplanar with the corresponding Floor Surface=\"{}\".", Surfaces(surfNum).Name)); ShowContinueError(state, " Simulation will continue using the distance between the two lowest points in the wall for the " "interface distance."); @@ -915,9 +914,9 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) auto const *mat = materials(c.LayerPoint(layer)); if (mat->ROnly) { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("Construction=\"{}\", constructions referenced by surfaces with a", c.Name)); + ShowSevereError(state, std::format("Construction=\"{}\", constructions referenced by surfaces with a", c.Name)); ShowContinueError(state, "\"Foundation\" Outside Boundary Condition must use only regular material objects"); - ShowContinueError(state, EnergyPlus::format("Material=\"{}\", is not a regular material object", mat->Name)); + ShowContinueError(state, std::format("Material=\"{}\", is not a regular material object", mat->Name)); return ErrorsFound; } @@ -939,11 +938,11 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) auto const *mat = materials(Constructs(surface.Construction).LayerPoint[i]); if (mat->ROnly) { ErrorsFound = true; - ShowSevereError(state, - EnergyPlus::format("Construction=\"{}\", constructions referenced by surfaces with a", - Constructs(surface.Construction).Name)); + ShowSevereError( + state, + std::format("Construction=\"{}\", constructions referenced by surfaces with a", Constructs(surface.Construction).Name)); ShowContinueError(state, "\"Foundation\" Outside Boundary Condition must use only regular material objects"); - ShowContinueError(state, EnergyPlus::format("Material=\"{}\", is not a regular material object", mat->Name)); + ShowContinueError(state, std::format("Material=\"{}\", is not a regular material object", mat->Name)); return ErrorsFound; } @@ -997,22 +996,21 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) if (fnd.deepGroundDepth > initDeepGroundDepth) { ShowWarningError(state, - EnergyPlus::format("Foundation:Kiva=\"{}\", the autocalculated deep ground depth ({:.3T} m) is shallower than " - "foundation construction elements ({:.3T} m)", - foundationInputs[surface.OSCPtr].name, - initDeepGroundDepth, - fnd.deepGroundDepth - 1.0)); + std::format("Foundation:Kiva=\"{}\", the autocalculated deep ground depth ({:.3f} m) is shallower than " + "foundation construction elements ({:.3f} m)", + foundationInputs[surface.OSCPtr].name, + initDeepGroundDepth, + fnd.deepGroundDepth - 1.0)); ShowContinueError( - state, - EnergyPlus::format("The deep ground depth will be set one meter below the lowest element ({:.3T} m)", fnd.deepGroundDepth)); + state, std::format("The deep ground depth will be set one meter below the lowest element ({:.3f} m)", fnd.deepGroundDepth)); } // polygon fnd.polygon = floorPolygon; - std::pair contexPair2{ - &state, EnergyPlus::format("Foundation:Kiva=\"{}\"", foundationInputs[surface.OSCPtr].name)}; + std::pair contexPair2{&state, + std::format("Foundation:Kiva=\"{}\"", foundationInputs[surface.OSCPtr].name)}; Kiva::setMessageCallback(kivaErrorCallback, &contexPair2); // point surface to associated ground instance(s) @@ -1049,9 +1047,9 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) assignKivaInstances = false; if (remainingExposedPerimeter < -0.1) { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("For Floor Surface=\"{}\", the Wall surfaces referencing", Surfaces(surfNum).Name)); - ShowContinueError( - state, EnergyPlus::format(" the same Foundation:Kiva=\"{}\" have", foundationInputs[Surfaces(surfNum).OSCPtr].name)); + ShowSevereError(state, std::format("For Floor Surface=\"{}\", the Wall surfaces referencing", Surfaces(surfNum).Name)); + ShowContinueError(state, + std::format(" the same Foundation:Kiva=\"{}\" have", foundationInputs[Surfaces(surfNum).OSCPtr].name)); ShowContinueError(state, " a combined length greater than the exposed perimeter of the foundation."); ShowContinueError(state, " Ensure that each Wall surface shares at least one edge with the corresponding"); ShowContinueError(state, " Floor surface."); @@ -1069,20 +1067,19 @@ bool KivaManager::setupKivaInstances(EnergyPlusData &state) for (int surfNum2 : state.dataSurface->AllHTKivaSurfaceList) { if (surfaceMap[surfNum2].size() == 0) { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("Surface=\"{}\" has a 'Foundation' Outside Boundary Condition", Surfaces(surfNum).Name)); - ShowContinueError(state, EnergyPlus::format(" referencing Foundation:Kiva=\"{}\".", foundationInputs[Surfaces(surfNum).OSCPtr].name)); + ShowSevereError(state, std::format("Surface=\"{}\" has a 'Foundation' Outside Boundary Condition", Surfaces(surfNum).Name)); + ShowContinueError(state, std::format(" referencing Foundation:Kiva=\"{}\".", foundationInputs[Surfaces(surfNum).OSCPtr].name)); if (Surfaces(surfNum2).Class == DataSurfaces::SurfaceClass::Wall) { + ShowContinueError(state, + std::format(" You must also reference Foundation:Kiva=\"{}\"", foundationInputs[Surfaces(surfNum).OSCPtr].name)); ShowContinueError( - state, EnergyPlus::format(" You must also reference Foundation:Kiva=\"{}\"", foundationInputs[Surfaces(surfNum).OSCPtr].name)); - ShowContinueError( - state, - EnergyPlus::format(" in a floor surface within the same Zone=\"{}\".", state.dataHeatBal->Zone(Surfaces(surfNum).Zone).Name)); + state, std::format(" in a floor surface within the same Zone=\"{}\".", state.dataHeatBal->Zone(Surfaces(surfNum).Zone).Name)); } else if (Surfaces(surfNum2).Class == DataSurfaces::SurfaceClass::Floor) { ShowContinueError(state, " However, this floor was never assigned to a Kiva instance."); ShowContinueError(state, " This should not occur for floor surfaces. Please report to EnergyPlus Development Team."); } else { ShowContinueError(state, " Only floor and wall surfaces are allowed to reference 'Foundation' Outside Boundary Conditions."); - ShowContinueError(state, EnergyPlus::format(" Surface=\"{}\", is not a floor or wall.", Surfaces(surfNum).Name)); + ShowContinueError(state, std::format(" Surface=\"{}\", is not a floor or wall.", Surfaces(surfNum).Name)); } } } @@ -1177,10 +1174,9 @@ void KivaManager::calcKivaInstances(EnergyPlusData &state) #ifdef GROUND_PLOT void KivaInstanceMap::plotDomain(EnergyPlusData &state) { - gp.createFrame(*instance.ground, - EnergyPlus::format("{}/{} {}:00", state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay)); + gp.createFrame(*instance.ground, std::format("{}/{} {}:00", state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->HourOfDay)); - instance.ground->writeCSV(format("{}/{}.csv", debugDir, plotNum)); + instance.ground->writeCSV(EnergyPlus::format("{}/{}.csv", debugDir, plotNum)); plotNum++; } @@ -1189,7 +1185,7 @@ void KivaInstanceMap::plotDomain(EnergyPlusData &state) void KivaManager::calcKivaSurfaceResults(EnergyPlusData &state) { for (int surfNum : state.dataSurface->AllHTKivaSurfaceList) { - std::pair contextPair{&state, EnergyPlus::format("Surface=\"{}\"", state.dataSurface->Surface(surfNum).Name)}; + std::pair contextPair{&state, std::format("Surface=\"{}\"", state.dataSurface->Surface(surfNum).Name)}; Kiva::setMessageCallback(kivaErrorCallback, &contextPair); surfaceMap[surfNum].calc_weighted_results(); state.dataHeatBalSurf->SurfHConvInt(surfNum) = state.dataSurfaceGeometry->kivaManager.surfaceMap[surfNum].results.hconv; diff --git a/src/EnergyPlus/HeatBalanceManager.cc b/src/EnergyPlus/HeatBalanceManager.cc index 863b5ecd577..4f88568858c 100644 --- a/src/EnergyPlus/HeatBalanceManager.cc +++ b/src/EnergyPlus/HeatBalanceManager.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include #include // ObjexxFCL Headers @@ -63,7 +64,6 @@ #include #include #include -#include #include #include #include @@ -387,16 +387,16 @@ namespace HeatBalanceManager { [](Construction::ConstructionProps const &e) { return e.IsUsed; }); if (Unused > 0) { if (!state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, EnergyPlus::format("CheckUsedConstructions: There are {} nominally unused constructions in input.", Unused)); + ShowWarningError(state, std::format("CheckUsedConstructions: There are {} nominally unused constructions in input.", Unused)); ShowContinueError(state, "For explicit details on each unused construction, use Output:Diagnostics,DisplayExtraWarnings;"); } else { - ShowWarningError(state, EnergyPlus::format("CheckUsedConstructions: There are {} nominally unused constructions in input.", Unused)); + ShowWarningError(state, std::format("CheckUsedConstructions: There are {} nominally unused constructions in input.", Unused)); ShowContinueError(state, "Each Unused construction is shown."); for (int Loop = 1; Loop <= state.dataHeatBal->TotConstructs; ++Loop) { if (state.dataConstruction->Construct(Loop).IsUsed) { continue; } - ShowMessage(state, EnergyPlus::format("Construction={}", state.dataConstruction->Construct(Loop).Name)); + ShowMessage(state, std::format("Construction={}", state.dataConstruction->Construct(Loop).Name)); } } } @@ -585,11 +585,11 @@ namespace HeatBalanceManager { AlphaName(2) = "Urban"; } else { ShowSevereError(state, - EnergyPlus::format("{}{}: {} invalid={}", - RoutineName, - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2), - AlphaName(2))); + std::format("{}{}: {} invalid={}", + RoutineName, + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(2), + AlphaName(2))); state.dataEnvrn->SiteWindExp = 0.14; state.dataEnvrn->SiteWindBLHeight = 270.0; AlphaName(2) = AlphaName(2) + "-invalid"; @@ -640,11 +640,11 @@ namespace HeatBalanceManager { state.dataSurface->CalcSolRefl = true; } else { ShowSevereError(state, - EnergyPlus::format("{}{}: {} invalid={}", - RoutineName, - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3), - AlphaName(3))); + std::format("{}{}: {} invalid={}", + RoutineName, + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(3), + AlphaName(3))); ErrorsFound = true; AlphaName(3) = AlphaName(3) + "-invalid"; } @@ -653,12 +653,12 @@ namespace HeatBalanceManager { state.dataHeatBal->MaxNumberOfWarmupDays = BuildingNumbers(4); if (state.dataHeatBal->MaxNumberOfWarmupDays <= 0) { ShowSevereError(state, - EnergyPlus::format("{}{}: {} invalid, [{}], {} will be used", - RoutineName, - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(4), - state.dataHeatBal->MaxNumberOfWarmupDays, - DataHeatBalance::DefaultMaxNumberOfWarmupDays)); + std::format("{}{}: {} invalid, [{}], {} will be used", + RoutineName, + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(4), + state.dataHeatBal->MaxNumberOfWarmupDays, + DataHeatBalance::DefaultMaxNumberOfWarmupDays)); state.dataHeatBal->MaxNumberOfWarmupDays = DataHeatBalance::DefaultMaxNumberOfWarmupDays; } } else { @@ -669,12 +669,12 @@ namespace HeatBalanceManager { state.dataHeatBal->MinNumberOfWarmupDays = BuildingNumbers(5); if (state.dataHeatBal->MinNumberOfWarmupDays <= 0) { ShowWarningError(state, - EnergyPlus::format("{}{}: {} invalid, [{}], {} will be used", - RoutineName, - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(5), - state.dataHeatBal->MinNumberOfWarmupDays, - DataHeatBalance::DefaultMinNumberOfWarmupDays)); + std::format("{}{}: {} invalid, [{}], {} will be used", + RoutineName, + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(5), + state.dataHeatBal->MinNumberOfWarmupDays, + DataHeatBalance::DefaultMinNumberOfWarmupDays)); state.dataHeatBal->MinNumberOfWarmupDays = DataHeatBalance::DefaultMinNumberOfWarmupDays; } } else { @@ -682,19 +682,19 @@ namespace HeatBalanceManager { } if (state.dataHeatBal->MinNumberOfWarmupDays > state.dataHeatBal->MaxNumberOfWarmupDays) { ShowWarningError(state, - EnergyPlus::format("{}{}: {} [{}] is greater than {} [{}], {} will be used.", - RoutineName, - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(5), - state.dataHeatBal->MinNumberOfWarmupDays, - state.dataIPShortCut->cNumericFieldNames(4), - state.dataHeatBal->MaxNumberOfWarmupDays, - state.dataHeatBal->MinNumberOfWarmupDays)); + std::format("{}{}: {} [{}] is greater than {} [{}], {} will be used.", + RoutineName, + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(5), + state.dataHeatBal->MinNumberOfWarmupDays, + state.dataIPShortCut->cNumericFieldNames(4), + state.dataHeatBal->MaxNumberOfWarmupDays, + state.dataHeatBal->MinNumberOfWarmupDays)); state.dataHeatBal->MaxNumberOfWarmupDays = state.dataHeatBal->MinNumberOfWarmupDays; } } else { - ShowSevereError(state, EnergyPlus::format("{} A {} Object must be entered.", RoutineName, state.dataHeatBalMgr->CurrentModuleObject)); + ShowSevereError(state, std::format("{} A {} Object must be entered.", RoutineName, state.dataHeatBalMgr->CurrentModuleObject)); ErrorsFound = true; state.dataHeatBal->BuildingName = "NOT ENTERED"; AlphaName(2) = "NOT ENTERED"; @@ -746,9 +746,9 @@ namespace HeatBalanceManager { } else if (hcIn != Convect::HcInt::ASHRAESimple && hcIn != Convect::HcInt::ASHRAETARP && hcIn != Convect::HcInt::CeilingDiffuser && hcIn != Convect::HcInt::AdaptiveConvectionAlgorithm && hcIn != Convect::HcInt::ASTMC1340) { ShowWarningError(state, - EnergyPlus::format("GetInsideConvectionAlgorithm: Invalid value for {}, defaulting to TARP, invalid value={}", - state.dataHeatBalMgr->CurrentModuleObject, - AlphaName(1))); + std::format("GetInsideConvectionAlgorithm: Invalid value for {}, defaulting to TARP, invalid value={}", + state.dataHeatBalMgr->CurrentModuleObject, + AlphaName(1))); hcIn = Convect::HcInt::ASHRAETARP; } state.dataHeatBal->DefaultIntConvAlgo = hcIn; @@ -782,9 +782,9 @@ namespace HeatBalanceManager { if (hcOut != Convect::HcExt::ASHRAESimple && hcOut != Convect::HcExt::ASHRAETARP && hcOut != Convect::HcExt::MoWiTTHcOutside && hcOut != Convect::HcExt::DOE2HcOutside && hcOut != Convect::HcExt::AdaptiveConvectionAlgorithm) { ShowWarningError(state, - EnergyPlus::format("GetOutsideConvectionAlgorithm: Invalid value for {}, defaulting to DOE-2, invalid value={}", - state.dataHeatBalMgr->CurrentModuleObject, - AlphaName(1))); + std::format("GetOutsideConvectionAlgorithm: Invalid value for {}, defaulting to DOE-2, invalid value={}", + state.dataHeatBalMgr->CurrentModuleObject, + AlphaName(1))); hcOut = Convect::HcExt::DOE2HcOutside; } state.dataHeatBal->DefaultExtConvAlgo = hcOut; @@ -831,7 +831,7 @@ namespace HeatBalanceManager { if (state.dataGlobal->TimeStepsInHour < 20) { ShowSevereError( state, - EnergyPlus::format( + std::format( "GetSolutionAlgorithm: {} {} is Conduction Finite Difference but Number of TimeSteps in Hour < 20, Value is {}.", state.dataHeatBalMgr->CurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(1), @@ -848,11 +848,11 @@ namespace HeatBalanceManager { if (state.dataGlobal->TimeStepsInHour < 20) { ShowSevereError( state, - EnergyPlus::format("GetSolutionAlgorithm: {} {} is Combined Heat and Moisture Finite Element but Number of TimeSteps in " - "Hour < 20, Value is {}.", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataGlobal->TimeStepsInHour)); + std::format("GetSolutionAlgorithm: {} {} is Combined Heat and Moisture Finite Element but Number of TimeSteps in " + "Hour < 20, Value is {}.", + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(1), + state.dataGlobal->TimeStepsInHour)); ShowContinueError(state, "...Suggested minimum number of time steps in hour for Combined Heat and Moisture Finite Element solutions " "is 20. Errors or inaccurate calculations may occur."); @@ -949,10 +949,10 @@ namespace HeatBalanceManager { state.dataHeatBal->ZoneAirSolutionAlgo = DataHeatBalance::SolutionAlgo::ThirdOrder; AlphaName(1) = "ThirdOrderBackwardDifference"; ShowWarningError(state, - EnergyPlus::format("{}: Invalid input of {}. The default choice is assigned = {}", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1), - AlphaName(1))); + std::format("{}: Invalid input of {}. The default choice is assigned = {}", + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(1), + AlphaName(1))); ShowContinueError(state, "Valid choices are: ThirdOrderBackwardDifference, AnalyticalSolution, or EulerMethod."); } } @@ -1014,9 +1014,9 @@ namespace HeatBalanceManager { state.dataContaminantBalance->Contaminant.CO2Simulation = false; AlphaName(1) = "NO"; ShowWarningError(state, - EnergyPlus::format("{}: Invalid input of {}. The default choice is assigned = NO", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1))); + std::format("{}: Invalid input of {}. The default choice is assigned = NO", + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(1))); } } } @@ -1045,25 +1045,25 @@ namespace HeatBalanceManager { state.dataContaminantBalance->Contaminant.GenericContamSimulation = false; AlphaName(3) = "NO"; ShowWarningError(state, - EnergyPlus::format("{}: Invalid input of {}. The default choice is assigned = NO", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3))); + std::format("{}: Invalid input of {}. The default choice is assigned = NO", + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(3))); } } if (NumAlpha == 3 && state.dataContaminantBalance->Contaminant.GenericContamSimulation) { ShowSevereError(state, - EnergyPlus::format("{}, {} is required and not given.", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(4))); + std::format("{}, {} is required and not given.", + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(4))); ErrorsFound = true; } else if (NumAlpha > 3 && state.dataContaminantBalance->Contaminant.GenericContamSimulation) { if ((state.dataContaminantBalance->Contaminant.genericOutdoorSched = Sched::GetSchedule(state, AlphaName(4))) == nullptr) { ShowSevereError(state, - EnergyPlus::format("{}, {} not found: {}", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(4), - AlphaName(4))); + std::format("{}, {} not found: {}", + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(4), + AlphaName(4))); ErrorsFound = true; } } @@ -1131,9 +1131,9 @@ namespace HeatBalanceManager { state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment = DataHeatBalance::AdjustmentType::NoAdjustReturnAndMixing; AlphaName(1) = "None"; ShowWarningError(state, - EnergyPlus::format("{}: Invalid input of {}. The default choice is assigned = None", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1))); + std::format("{}: Invalid input of {}. The default choice is assigned = None", + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(1))); } } if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment != DataHeatBalance::AdjustmentType::NoAdjustReturnAndMixing) { @@ -1153,9 +1153,9 @@ namespace HeatBalanceManager { state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance = true; AlphaName(2) = "AddInfiltrationFlow"; ShowWarningError(state, - EnergyPlus::format("{}: Invalid input of {}. The default choice is assigned = AddInfiltrationFlow", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2))); + std::format("{}: Invalid input of {}. The default choice is assigned = AddInfiltrationFlow", + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(2))); } } } else { @@ -1175,9 +1175,9 @@ namespace HeatBalanceManager { state.dataHeatBal->ZoneAirMassFlow.InfiltrationForZones = DataHeatBalance::InfiltrationZoneType::MixingSourceZonesOnly; AlphaName(3) = "MixingSourceZonesOnly"; ShowWarningError(state, - EnergyPlus::format("{}: Invalid input of {}. The default choice is assigned = MixingSourceZonesOnly", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(3))); + std::format("{}: Invalid input of {}. The default choice is assigned = MixingSourceZonesOnly", + state.dataHeatBalMgr->CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(3))); } } } else { @@ -1297,7 +1297,7 @@ namespace HeatBalanceManager { } } else if (NumObjects > 1) { - ShowSevereError(state, EnergyPlus::format("Too many {} objects, only 1 allowed.", state.dataHeatBalMgr->CurrentModuleObject)); + ShowSevereError(state, std::format("Too many {} objects, only 1 allowed.", state.dataHeatBalMgr->CurrentModuleObject)); ErrorsFound = true; } else { // None entered // IDD defaults would have this: @@ -1477,12 +1477,12 @@ namespace HeatBalanceManager { } else if (mat->group == Material::Group::GlassEQL || mat->group == Material::Group::ShadeEQL || mat->group == Material::Group::DrapeEQL || mat->group == Material::Group::BlindEQL || mat->group == Material::Group::ScreenEQL || mat->group == Material::Group::WindowGapEQL) { - ShowSevereError( - state, EnergyPlus::format("Invalid material layer type in window {} = {}", s_ipsc->cCurrentModuleObject, thisConstruct.Name)); + ShowSevereError(state, + std::format("Invalid material layer type in window {} = {}", s_ipsc->cCurrentModuleObject, thisConstruct.Name)); ShowContinueError( state, - EnergyPlus::format("Equivalent Layer material type = {} is allowed only in Construction:WindowEquivalentLayer window object.", - ConstructAlphas(Layer))); + std::format("Equivalent Layer material type = {} is allowed only in Construction:WindowEquivalentLayer window object.", + ConstructAlphas(Layer))); ErrorsFound = true; continue; } else if (mat->group == Material::Group::GlassTCParent) { @@ -1554,7 +1554,7 @@ namespace HeatBalanceManager { int ctf_dimensions = fields.at("dimensions_for_the_ctf_calculation").get(); if ((ctf_dimensions < 1) || (ctf_dimensions > 2)) { ShowWarningError(state, "ConstructionProperty:InternalHeatSource must be either 1- or 2-D. Reset to 1-D solution."); - ShowContinueError(state, EnergyPlus::format("Construction={} is affected.", construction_name)); + ShowContinueError(state, std::format("Construction={} is affected.", construction_name)); ctf_dimensions = 1; } Real64 tube_spacing = fields.at("tube_spacing").get(); @@ -1569,10 +1569,10 @@ namespace HeatBalanceManager { if (construction_index == 0) { ShowSevereError(state, - EnergyPlus::format("Did not find matching construction for {} {}, missing construction = {}", - state.dataHeatBalMgr->CurrentModuleObject, - thisObjectName, - construction_name)); + std::format("Did not find matching construction for {} {}, missing construction = {}", + state.dataHeatBalMgr->CurrentModuleObject, + thisObjectName, + construction_name)); ErrorsFound = true; continue; } @@ -1585,8 +1585,8 @@ namespace HeatBalanceManager { if (thisConstruct.SourceSinkPresent) { // Emulate old behavior by disallowing two sources in a single material ShowSevereError(state, - EnergyPlus::format("Construction {} has more than one internal heat source referencing it, which is not allowed", - construction_name)); + std::format("Construction {} has more than one internal heat source referencing it, which is not allowed", + construction_name)); ErrorsFound = true; continue; } @@ -1601,14 +1601,13 @@ namespace HeatBalanceManager { // Set the total number of layers for the construction if ((thisConstruct.SourceAfterLayer >= thisConstruct.TotLayers) || (thisConstruct.SourceAfterLayer <= 0)) { - ShowWarningError(state, EnergyPlus::format("Construction {} must have a source that is between two layers", thisConstruct.Name)); + ShowWarningError(state, std::format("Construction {} must have a source that is between two layers", thisConstruct.Name)); ShowContinueError(state, "The source after layer parameter has been set to one less than the number of layers."); thisConstruct.SourceAfterLayer = thisConstruct.TotLayers - 1; } if ((thisConstruct.TempAfterLayer >= thisConstruct.TotLayers) || (thisConstruct.TempAfterLayer <= 0)) { ShowWarningError( - state, - EnergyPlus::format("Construction {} must have a temperature calculation that is between two layers", thisConstruct.Name)); + state, std::format("Construction {} must have a temperature calculation that is between two layers", thisConstruct.Name)); ShowContinueError(state, "The temperature calculation after layer parameter has been set to one less than the number of layers."); thisConstruct.TempAfterLayer = thisConstruct.TotLayers - 1; } @@ -1659,8 +1658,8 @@ namespace HeatBalanceManager { state.dataConstruction->Construct(TotRegConstructs + ConstrNum).TotLayers = ConstructNumAlpha - 1; if (state.dataConstruction->Construct(TotRegConstructs + ConstrNum).TotLayers < 1) { ShowSevereError(state, - EnergyPlus::format("Construction {} must have at least a single layer", - state.dataConstruction->Construct(TotRegConstructs + ConstrNum).Name)); + std::format("Construction {} must have at least a single layer", + state.dataConstruction->Construct(TotRegConstructs + ConstrNum).Name)); ErrorsFound = true; } @@ -1674,10 +1673,10 @@ namespace HeatBalanceManager { if (state.dataConstruction->Construct(TotRegConstructs + ConstrNum).LayerPoint(Layer) == 0) { ShowSevereError(state, - EnergyPlus::format("Did not find matching material for {} {}, missing material = {}", - state.dataHeatBalMgr->CurrentModuleObject, - thisConstruct.Name, - ConstructAlphas(Layer))); + std::format("Did not find matching material for {} {}, missing material = {}", + state.dataHeatBalMgr->CurrentModuleObject, + thisConstruct.Name, + ConstructAlphas(Layer))); ErrorsFound = true; } else { auto const *mat = s_mat->materials(state.dataConstruction->Construct(TotRegConstructs + ConstrNum).LayerPoint(Layer)); @@ -1685,13 +1684,12 @@ namespace HeatBalanceManager { (mat->group == Material::Group::DrapeEQL) || (mat->group == Material::Group::BlindEQL) || (mat->group == Material::Group::ScreenEQL) || (mat->group == Material::Group::WindowGapEQL))) { ShowSevereError(state, - EnergyPlus::format("Invalid material layer type in window {} = {}", - state.dataHeatBalMgr->CurrentModuleObject, - state.dataConstruction->Construct(TotRegConstructs + ConstrNum).Name)); - ShowContinueError( - state, - EnergyPlus::format("...Window layer = {} is not allowed in Construction:WindowEquivalentLayer window object.", - ConstructAlphas(Layer))); + std::format("Invalid material layer type in window {} = {}", + state.dataHeatBalMgr->CurrentModuleObject, + state.dataConstruction->Construct(TotRegConstructs + ConstrNum).Name)); + ShowContinueError(state, + std::format("...Window layer = {} is not allowed in Construction:WindowEquivalentLayer window object.", + ConstructAlphas(Layer))); ShowContinueError(state, "Only materials of type Material:*:EquivalentLayer are allowed"); ErrorsFound = true; } @@ -1737,8 +1735,8 @@ namespace HeatBalanceManager { // Obtain the data if (DummyNumProp != 0) { - ShowSevereError( - state, EnergyPlus::format("Construction From Window5 Data File: there should be no numerical inputs for {}", ConstructAlphas(0))); + ShowSevereError(state, + std::format("Construction From Window5 Data File: there should be no numerical inputs for {}", ConstructAlphas(0))); ErrorsFound = true; continue; } @@ -1765,9 +1763,8 @@ namespace HeatBalanceManager { if (EOFonW5File || !ConstructionFound) { DisplayString(state, "--Construction not found"); ErrorsFound = true; - ShowSevereError(state, - EnergyPlus::format("No match on WINDOW5 data file for Construction={}, or error in data file.", ConstructAlphas(0))); - ShowContinueError(state, EnergyPlus::format("...Looking on file={}", window5DataFilePath)); // TODO: call getAbsolutePath maybe? + ShowSevereError(state, std::format("No match on WINDOW5 data file for Construction={}, or error in data file.", ConstructAlphas(0))); + ShowContinueError(state, std::format("...Looking on file={}", window5DataFilePath.string())); // TODO: call getAbsolutePath maybe? continue; } @@ -1787,7 +1784,7 @@ namespace HeatBalanceManager { state.dataHeatBal->NominalU(ConstrIndex) = 1.0 / state.dataHeatBal->NominalRforNominalUCalculation(ConstrIndex); } else { if (!thisConstruct.WindowTypeEQL) { - ShowSevereError(state, EnergyPlus::format("Nominal U is zero, for construction={}", thisConstruct.Name)); + ShowSevereError(state, std::format("Nominal U is zero, for construction={}", thisConstruct.Name)); ErrorsFound = true; } } @@ -1941,7 +1938,7 @@ namespace HeatBalanceManager { if (Util::FindItemInList(state.dataHeatBal->ZoneList(ListNum).Name, state.dataHeatBal->Zone) > 0) { ShowWarningError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\": is a duplicate of a zone name.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "This could be a problem in places where either a Zone Name or a Zone List can be used."); } @@ -1950,9 +1947,9 @@ namespace HeatBalanceManager { state.dataHeatBal->ZoneList(ListNum).NumOfZones = NumAlphas - 1; if (state.dataHeatBal->ZoneList(ListNum).NumOfZones < 1) { - ShowSevereError(state, - EnergyPlus::format( - "{}{}=\"{}\": No zones specified.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, + std::format("{}{}=\"{}\": No zones specified.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else { state.dataHeatBal->ZoneList(ListNum).Zone.allocate(state.dataHeatBal->ZoneList(ListNum).NumOfZones); @@ -1965,12 +1962,12 @@ namespace HeatBalanceManager { state.dataHeatBal->ZoneList(ListNum).Zone(ZoneNum) = Util::FindItemInList(ZoneName, state.dataHeatBal->Zone); if (state.dataHeatBal->ZoneList(ListNum).Zone(ZoneNum) == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\": {} {} not found.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(ZoneNum + 1), - ZoneName)); + std::format("{}{}=\"{}\": {} {} not found.", + RoutineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(ZoneNum + 1), + ZoneName)); ErrorsFound = true; } @@ -1978,12 +1975,12 @@ namespace HeatBalanceManager { for (int Loop = 1; Loop <= ZoneNum - 1; ++Loop) { if (state.dataHeatBal->ZoneList(ListNum).Zone(ZoneNum) == state.dataHeatBal->ZoneList(ListNum).Zone(Loop)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\": {} {} appears more than once in list.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(ZoneNum + 1), - ZoneName)); + std::format("{}{}=\"{}\": {} {} appears more than once in list.", + RoutineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(ZoneNum + 1), + ZoneName)); ErrorsFound = true; } } // Loop @@ -2025,25 +2022,25 @@ namespace HeatBalanceManager { if (ListNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\": {} named {} not found.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2))); + std::format("{}{}=\"{}\": {} named {} not found.", + RoutineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(2), + state.dataIPShortCut->cAlphaArgs(2))); ErrorsFound = true; } else { // Check to make sure list is not in use by another ZONE GROUP for (int Loop = 1; Loop <= GroupNum - 1; ++Loop) { if (state.dataHeatBal->ZoneGroup(GroupNum).ZoneList == state.dataHeatBal->ZoneGroup(Loop).ZoneList) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\": {} already used by {} named {}.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(2), - cCurrentModuleObject, - state.dataHeatBal->ZoneGroup(Loop).Name)); + std::format("{}{}=\"{}\": {} already used by {} named {}.", + RoutineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(2), + cCurrentModuleObject, + state.dataHeatBal->ZoneGroup(Loop).Name)); ErrorsFound = true; } } // Loop @@ -2058,16 +2055,15 @@ namespace HeatBalanceManager { state.dataHeatBal->Zone(ZoneNum).ListMultiplier = state.dataHeatBal->ZoneGroup(GroupNum).Multiplier; state.dataHeatBal->Zone(ZoneNum).ListGroup = ListNum; } else { - ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\": Zone {} in ZoneList already exists in ZoneList of another ZoneGroup.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataHeatBal->Zone(ZoneNum).Name)); + ShowSevereError(state, + std::format("{}{}=\"{}\": Zone {} in ZoneList already exists in ZoneList of another ZoneGroup.", + RoutineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataHeatBal->Zone(ZoneNum).Name)); ShowContinueError(state, - EnergyPlus::format("Previous ZoneList={}", - state.dataHeatBal->ZoneList(state.dataHeatBal->Zone(ZoneNum).ListGroup).Name)); + std::format("Previous ZoneList={}", + state.dataHeatBal->ZoneList(state.dataHeatBal->Zone(ZoneNum).ListGroup).Name)); ErrorsFound = true; } } @@ -2129,17 +2125,16 @@ namespace HeatBalanceManager { int SurfNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(1), state.dataSurface->Surface); if (SurfNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}, object. Illegal value for {} has been found.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(1))); + std::format("{}{}=\"{}, object. Illegal value for {} has been found.", + RoutineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(1))); ShowContinueError( state, - EnergyPlus::format( - "{} entered value = \"{}\" no corresponding surface (ref BuildingSurface:Detailed) has been found in the input file.", - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} entered value = \"{}\" no corresponding surface (ref BuildingSurface:Detailed) has been found in the input file.", + state.dataIPShortCut->cAlphaFieldNames(1), + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; continue; } @@ -2234,15 +2229,15 @@ namespace HeatBalanceManager { int ZoneNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataHeatBal->Zone); if (ZoneNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}, object. Illegal value for {} has been found.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(2))); + std::format("{}{}=\"{}, object. Illegal value for {} has been found.", + RoutineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(2))); ShowContinueError(state, - EnergyPlus::format("{} entered value = \"{}\" no corresponding zone has been found in the input file.", - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2))); + std::format("{} entered value = \"{}\" no corresponding zone has been found in the input file.", + state.dataIPShortCut->cAlphaFieldNames(2), + state.dataIPShortCut->cAlphaArgs(2))); ErrorsFound = true; } else { state.dataHeatBal->ZoneLocalEnvironment(Loop).ZonePtr = ZoneNum; @@ -2260,15 +2255,15 @@ namespace HeatBalanceManager { ObjectIsParent); if (NodeNum == 0 && CheckOutAirNodeNumber(state, NodeNum)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}, object. Illegal value for {} has been found.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(3))); + std::format("{}{}=\"{}, object. Illegal value for {} has been found.", + RoutineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(3))); ShowContinueError(state, - EnergyPlus::format("{} entered value = \"{}\" no corresponding schedule has been found in the input file.", - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaArgs(3))); + std::format("{} entered value = \"{}\" no corresponding schedule has been found in the input file.", + state.dataIPShortCut->cAlphaFieldNames(3), + state.dataIPShortCut->cAlphaArgs(3))); ErrorsFound = true; } else { state.dataHeatBal->ZoneLocalEnvironment(Loop).OutdoorAirNodePtr = NodeNum; @@ -2351,8 +2346,8 @@ namespace HeatBalanceManager { if (hcIn != Convect::HcInt::ASHRAESimple && hcIn != Convect::HcInt::ASHRAETARP && hcIn != Convect::HcInt::CeilingDiffuser && hcIn != Convect::HcInt::TrombeWall && hcIn != Convect::HcInt::AdaptiveConvectionAlgorithm && hcIn != Convect::HcInt::ASTMC1340) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, cCurrentModuleObject, state.dataHeatBal->Zone(ZoneLoop).Name)); - ShowContinueError(state, EnergyPlus::format("Invalid value for {}=\"{}\".", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowSevereError(state, std::format("{}{}=\"{}\".", RoutineName, cCurrentModuleObject, state.dataHeatBal->Zone(ZoneLoop).Name)); + ShowContinueError(state, std::format("Invalid value for {}=\"{}\".", cAlphaFieldNames(2), cAlphaArgs(2))); ErrorsFound = true; } state.dataHeatBal->Zone(ZoneLoop).IntConvAlgo = hcIn; @@ -2368,8 +2363,8 @@ namespace HeatBalanceManager { if (hcOut != Convect::HcExt::ASHRAESimple && hcOut != Convect::HcExt::ASHRAETARP && hcOut != Convect::HcExt::MoWiTTHcOutside && hcOut != Convect::HcExt::DOE2HcOutside && hcOut != Convect::HcExt::AdaptiveConvectionAlgorithm) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, cCurrentModuleObject, state.dataHeatBal->Zone(ZoneLoop).Name)); - ShowContinueError(state, EnergyPlus::format("Invalid value for {}=\"{}\".", cAlphaFieldNames(3), cAlphaArgs(3))); + ShowSevereError(state, std::format("{}{}=\"{}\".", RoutineName, cCurrentModuleObject, state.dataHeatBal->Zone(ZoneLoop).Name)); + ShowContinueError(state, std::format("Invalid value for {}=\"{}\".", cAlphaFieldNames(3), cAlphaArgs(3))); ErrorsFound = true; } state.dataHeatBal->Zone(ZoneLoop).ExtConvAlgo = hcOut; @@ -2387,8 +2382,8 @@ namespace HeatBalanceManager { } else if (Util::SameString("Yes", cAlphaArgs(4)) || lAlphaFieldBlanks(4)) { state.dataHeatBal->Zone(ZoneLoop).isPartOfTotalArea = true; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, cCurrentModuleObject, state.dataHeatBal->Zone(ZoneLoop).Name)); - ShowContinueError(state, EnergyPlus::format("Invalid value for {}=\"{}\".", cAlphaFieldNames(4), cAlphaArgs(4))); + ShowSevereError(state, std::format("{}{}=\"{}\".", RoutineName, cCurrentModuleObject, state.dataHeatBal->Zone(ZoneLoop).Name)); + ShowContinueError(state, std::format("Invalid value for {}=\"{}\".", cAlphaFieldNames(4), cAlphaArgs(4))); ErrorsFound = true; } } @@ -2456,8 +2451,8 @@ namespace HeatBalanceManager { state.dataHeatBal->Zone(zoneNum).spaceIndexes.emplace_back(spaceNum); ++state.dataHeatBal->Zone(zoneNum).numSpaces; } else { - ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, cCurrentModuleObject, thisSpace.Name)); - ShowContinueError(state, EnergyPlus::format("Zone Name ={}not found.", zoneName)); + ShowSevereError(state, std::format("{}{}={}", RoutineName, cCurrentModuleObject, thisSpace.Name)); + ShowContinueError(state, std::format("Zone Name ={}not found.", zoneName)); ErrorsFound = true; } thisSpace.spaceType = ip->getAlphaFieldValue(objectFields, objectSchemaProps, "space_type"); @@ -2508,14 +2503,12 @@ namespace HeatBalanceManager { if (Util::FindItemInList(thisSpaceList.Name, state.dataHeatBal->Zone) > 0) { ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\": is a duplicate of a zone name.", RoutineName, cCurrentModuleObject, thisSpaceList.Name)); + state, std::format("{}{}=\"{}\": is a duplicate of a zone name.", RoutineName, cCurrentModuleObject, thisSpaceList.Name)); ErrorsFound = true; } if (Util::FindItemInList(thisSpaceList.Name, state.dataHeatBal->space) > 0) { ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\": is a duplicate of a space name.", RoutineName, cCurrentModuleObject, thisSpaceList.Name)); + state, std::format("{}{}=\"{}\": is a duplicate of a space name.", RoutineName, cCurrentModuleObject, thisSpaceList.Name)); ErrorsFound = true; } @@ -2532,8 +2525,8 @@ namespace HeatBalanceManager { thisSpaceList.spaces.emplace_back(thisSpaceNum); ++thisSpaceList.numListSpaces; } else { - ShowSevereError(state, EnergyPlus::format("{}{}={}", RoutineName, cCurrentModuleObject, thisSpaceList.Name)); - ShowContinueError(state, EnergyPlus::format("Space Name={} not found.", thisSpaceName)); + ShowSevereError(state, std::format("{}{}={}", RoutineName, cCurrentModuleObject, thisSpaceList.Name)); + ShowContinueError(state, std::format("Space Name={} not found.", thisSpaceName)); ErrorsFound = true; } thisSpaceList.maxSpaceNameLength = max(thisSpaceList.maxSpaceNameLength, len(thisSpaceName)); @@ -2541,11 +2534,11 @@ namespace HeatBalanceManager { for (int loop = 1; loop <= int(thisSpaceList.spaces.size()) - 1; ++loop) { if (thisSpaceNum == thisSpaceList.spaces(loop)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\": Space Name {} appears more than once in list.", - RoutineName, - cCurrentModuleObject, - thisSpaceList.Name, - thisSpaceName)); + std::format("{}{}=\"{}\": Space Name {} appears more than once in list.", + RoutineName, + cCurrentModuleObject, + thisSpaceList.Name, + thisSpaceName)); ErrorsFound = true; } } @@ -3142,9 +3135,9 @@ namespace HeatBalanceManager { if (sum(state.dataHeatBalMgr->WarmupConvergenceValues(ZoneNum).PassFlag) != 8) { // pass=2 * 4 values for convergence ShowSevereError( state, - EnergyPlus::format("CheckWarmupConvergence: Loads Initialization, Zone=\"{}\" did not converge after {} warmup days.", - state.dataHeatBal->Zone(ZoneNum).Name, - state.dataHeatBal->MaxNumberOfWarmupDays)); + std::format("CheckWarmupConvergence: Loads Initialization, Zone=\"{}\" did not converge after {} warmup days.", + state.dataHeatBal->Zone(ZoneNum).Name, + state.dataHeatBal->MaxNumberOfWarmupDays)); if (!state.dataHeatBalMgr->WarmupConvergenceWarning && !state.dataGlobal->DoingSizing) { ShowContinueError(state, "See Warmup Convergence Information in .eio file for details."); state.dataHeatBalMgr->WarmupConvergenceWarning = true; @@ -3153,9 +3146,9 @@ namespace HeatBalanceManager { state.dataHeatBalMgr->SizingWarmupConvergenceWarning = true; } if (state.dataEnvrn->RunPeriodEnvironment) { - ShowContinueError(state, EnergyPlus::format("...Environment(RunPeriod)=\"{}\"", state.dataEnvrn->EnvironmentName)); + ShowContinueError(state, std::format("...Environment(RunPeriod)=\"{}\"", state.dataEnvrn->EnvironmentName)); } else { - ShowContinueError(state, EnergyPlus::format("...Environment(SizingPeriod)=\"{}\"", state.dataEnvrn->EnvironmentName)); + ShowContinueError(state, std::format("...Environment(SizingPeriod)=\"{}\"", state.dataEnvrn->EnvironmentName)); } ShowContinueError( @@ -3206,11 +3199,11 @@ namespace HeatBalanceManager { if ((state.dataGlobal->DayOfSim >= state.dataHeatBal->MaxNumberOfWarmupDays) && state.dataGlobal->WarmupFlag && ConvergenceChecksFailed) { if (state.dataHeatBal->MaxNumberOfWarmupDays < DataHeatBalance::DefaultMaxNumberOfWarmupDays) { ShowSevereError(state, - EnergyPlus::format("CheckWarmupConvergence: User supplied maximum warmup days={} is insufficient.", - state.dataHeatBal->MaxNumberOfWarmupDays)); - ShowContinueError(state, - EnergyPlus::format("Suggest setting maximum number of warmup days to at least {}.", - DataHeatBalance::DefaultMaxNumberOfWarmupDays)); + std::format("CheckWarmupConvergence: User supplied maximum warmup days={} is insufficient.", + state.dataHeatBal->MaxNumberOfWarmupDays)); + ShowContinueError( + state, + std::format("Suggest setting maximum number of warmup days to at least {}.", DataHeatBalance::DefaultMaxNumberOfWarmupDays)); } } @@ -3522,13 +3515,13 @@ namespace HeatBalanceManager { DataSurfaces::FrameDividerType(getEnumValue(FrameDividerTypeNamesUC, FrameDividerAlphas(2))); if (currentDividerType == DataSurfaces::FrameDividerType::Invalid) { ShowWarningError(state, - fmt::format("{}={}, Invalid {}", - state.dataHeatBalMgr->CurrentModuleObject, - std::quoted(FrameDividerAlphas(1)), - state.dataIPShortCut->cAlphaFieldNames(2))); - ShowContinueError( - state, - fmt::format("Entered={}, must be DividedLite or Suspended. Will be set to DividedLite.", std::quoted(FrameDividerAlphas(2)))); + EnergyPlus::format("{}={}, Invalid {}", + state.dataHeatBalMgr->CurrentModuleObject, + std::quoted(FrameDividerAlphas(1)), + state.dataIPShortCut->cAlphaFieldNames(2))); + ShowContinueError(state, + EnergyPlus::format("Entered={}, must be DividedLite or Suspended. Will be set to DividedLite.", + std::quoted(FrameDividerAlphas(2)))); frameDivider.DividerType = DataSurfaces::FrameDividerType::DividedLite; } else { frameDivider.DividerType = currentDividerType; @@ -3563,26 +3556,26 @@ namespace HeatBalanceManager { if (frameDivider.DividerWidth > 0.0 && (frameDivider.HorDividers == 0 && frameDivider.VertDividers == 0)) { ShowWarningError(state, - EnergyPlus::format("{}: In FrameAndDivider {} {} > 0 ", - state.dataHeatBalMgr->CurrentModuleObject, - frameDivider.Name, - state.dataIPShortCut->cNumericFieldNames(9))); + std::format("{}: In FrameAndDivider {} {} > 0 ", + state.dataHeatBalMgr->CurrentModuleObject, + frameDivider.Name, + state.dataIPShortCut->cNumericFieldNames(9))); ShowContinueError(state, - EnergyPlus::format("...but {} = 0 and {} = 0.", - state.dataIPShortCut->cNumericFieldNames(10), - state.dataIPShortCut->cNumericFieldNames(11))); - ShowContinueError(state, EnergyPlus::format("...{} set to 0.", state.dataIPShortCut->cNumericFieldNames(9))); + std::format("...but {} = 0 and {} = 0.", + state.dataIPShortCut->cNumericFieldNames(10), + state.dataIPShortCut->cNumericFieldNames(11))); + ShowContinueError(state, std::format("...{} set to 0.", state.dataIPShortCut->cNumericFieldNames(9))); frameDivider.DividerWidth = 0.0; } // Prevent InsideSillDepth < InsideReveal if (frameDivider.InsideSillDepth < state.dataSurface->FrameDivider(FrameDividerNum).InsideReveal) { ShowWarningError(state, - EnergyPlus::format("{}: In FrameAndDivider {} {} is less than {}; it will be set to {}.", - state.dataHeatBalMgr->CurrentModuleObject, - frameDivider.Name, - state.dataIPShortCut->cNumericFieldNames(20), - state.dataIPShortCut->cNumericFieldNames(22), - state.dataIPShortCut->cNumericFieldNames(22))); + std::format("{}: In FrameAndDivider {} {} is less than {}; it will be set to {}.", + state.dataHeatBalMgr->CurrentModuleObject, + frameDivider.Name, + state.dataIPShortCut->cNumericFieldNames(20), + state.dataIPShortCut->cNumericFieldNames(22), + state.dataIPShortCut->cNumericFieldNames(22))); frameDivider.InsideSillDepth = state.dataSurface->FrameDivider(FrameDividerNum).InsideReveal; } @@ -3746,9 +3739,9 @@ namespace HeatBalanceManager { if (endcol > 0) { if (int(NextLine.data[endcol - 1]) == DataSystemVariables::iUnicode_end) { ShowSevereError(state, - EnergyPlus::format("SearchWindow5DataFile: For \"{}\" in {} file, appears to be a Unicode or binary file.", - DesiredConstructionName, - DesiredFilePath)); + std::format("SearchWindow5DataFile: For \"{}\" in {} file, appears to be a Unicode or binary file.", + DesiredConstructionName, + DesiredFilePath.string())); ShowContinueError(state, "...This file cannot be read by this program. Please save as PC or Unix file and try again"); ShowFatalError(state, "Program terminates due to previous condition."); } @@ -3762,10 +3755,10 @@ namespace HeatBalanceManager { } ++FileLineCount; if (!has_prefixi(NextLine.data, "WINDOW5")) { - ShowSevereError(state, EnergyPlus::format("HeatBalanceManager: SearchWindow5DataFile: Error in Data File={}", DesiredFilePath)); - ShowFatalError(state, - EnergyPlus::format("Error reading Window5 Data File: first word of window entry is \"{}\", should be Window5.", - NextLine.data.substr(0, 7))); + ShowSevereError(state, std::format("HeatBalanceManager: SearchWindow5DataFile: Error in Data File={}", DesiredFilePath.string())); + ShowFatalError( + state, + std::format("Error reading Window5 Data File: first word of window entry is \"{}\", should be Window5.", NextLine.data.substr(0, 7))); } Label10:; @@ -3819,11 +3812,11 @@ namespace HeatBalanceManager { bool error = false; NGlSys = static_cast(Util::ProcessNumber(NextLine.data.substr(19), error)); if (NGlSys <= 0 || NGlSys > 2 || error) { - ShowFatalError(state, - EnergyPlus::format( - "Construction={} from the Window5 data file cannot be used: it has {} glazing systems; only 1 or 2 are allowed.", - DesiredConstructionName, - NGlSys)); + ShowFatalError( + state, + std::format("Construction={} from the Window5 data file cannot be used: it has {} glazing systems; only 1 or 2 are allowed.", + DesiredConstructionName, + NGlSys)); } NextLine = W5DataFile.readLine(); if (NextLine.eof) { @@ -3848,54 +3841,54 @@ namespace HeatBalanceManager { if (!succeeded) { ShowSevereError( state, - EnergyPlus::format("HeatBalanceManager: SearchWindow5DataFile: Error in Read of glazing system values. For glazing system={}", - IGlSys)); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); + std::format("HeatBalanceManager: SearchWindow5DataFile: Error in Read of glazing system values. For glazing system={}", + IGlSys)); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); ErrorsFound = true; } if (WinHeight(IGlSys) == 0.0 || WinWidth(IGlSys) == 0.0) { ShowSevereError( state, - EnergyPlus::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it " - "has window height or width = 0 for glazing system {}", - DesiredConstructionName, - IGlSys)); + std::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it " + "has window height or width = 0 for glazing system {}", + DesiredConstructionName, + IGlSys)); ErrorsFound = true; } if (NGlass(IGlSys) <= 0 || NGlass(IGlSys) > 4) { ShowSevereError( state, - EnergyPlus::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it " - "has 0 or more than 4 glass layers in glazing system {}", - DesiredConstructionName, - IGlSys)); + std::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it " + "has 0 or more than 4 glass layers in glazing system {}", + DesiredConstructionName, + IGlSys)); ErrorsFound = true; } if (UValCenter(IGlSys) <= 0.0) { ShowSevereError( state, - EnergyPlus::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it " - "has Center-of-Glass U-value <= 0 in glazing system {}", - DesiredConstructionName, - IGlSys)); + std::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it " + "has Center-of-Glass U-value <= 0 in glazing system {}", + DesiredConstructionName, + IGlSys)); ErrorsFound = true; } if (SCCenter(IGlSys) <= 0.0) { - ShowWarningError(state, - EnergyPlus::format( - "HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file has flawed data: it " - "has a Shading Coefficient <= 0 in glazing system {}", - DesiredConstructionName, - IGlSys)); + ShowWarningError( + state, + std::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file has flawed data: it " + "has a Shading Coefficient <= 0 in glazing system {}", + DesiredConstructionName, + IGlSys)); } if (SHGCCenter(IGlSys) <= 0.0) { - ShowWarningError(state, - EnergyPlus::format( - "HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file has flawed data: it " - "has a SHGC <= 0 in glazing system {}", - DesiredConstructionName, - IGlSys)); + ShowWarningError( + state, + std::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file has flawed data: it " + "has a SHGC <= 0 in glazing system {}", + DesiredConstructionName, + IGlSys)); } WinHeight(IGlSys) *= 0.001; WinWidth(IGlSys) *= 0.001; @@ -3916,16 +3909,16 @@ namespace HeatBalanceManager { MullionWidth = Util::ProcessNumber(DataLine(10).substr(19), error); if (error) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of Mullion Width."); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 10, DataLine(10).substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 10, DataLine(10).substr(0, 100))); ErrorsFound = true; } MullionWidth *= 0.001; MullionOrientation = Util::ProcessNumber(DataLine(10).substr(88), error); if (error) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of Mullion Orientation."); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 10, DataLine(10).substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 10, DataLine(10).substr(0, 100))); ErrorsFound = true; } } @@ -3951,17 +3944,17 @@ namespace HeatBalanceManager { FrameEmis); if (!succeeded) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of frame data values."); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 11, DataLine(11).substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 11, DataLine(11).substr(0, 100))); ErrorsFound = true; } if (FrameWidth > 0.0) { if (FrameConductance <= 0.0) { ShowSevereError( state, - EnergyPlus::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it " - "has Frame Conductance <= 0.0", - DesiredConstructionName)); + std::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it " + "has Frame Conductance <= 0.0", + DesiredConstructionName)); ErrorsFound = true; } // Relax this check for Window5 data: 1/28/2008. @@ -3979,10 +3972,9 @@ namespace HeatBalanceManager { if (FrameEmis <= 0.0 || FrameEmis >= 1.0) { ShowSevereError( state, - EnergyPlus::format( - "HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it has " - "Frame Emissivity <= 0.0 or >= 1.0", - DesiredConstructionName)); + std::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used: it has " + "Frame Emissivity <= 0.0 or >= 1.0", + DesiredConstructionName)); ErrorsFound = true; } } @@ -4020,65 +4012,64 @@ namespace HeatBalanceManager { if (!dividerReadSucceeded) { ShowSevereError( state, - EnergyPlus::format("HeatBalanceManager: SearchWindow5DataFile: Error in Read of divider data values. For Glazing System={}", - IGlSys)); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 11, NextLine.data.substr(0, 100))); + std::format("HeatBalanceManager: SearchWindow5DataFile: Error in Read of divider data values. For Glazing System={}", + IGlSys)); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 11, NextLine.data.substr(0, 100))); ErrorsFound = true; } uppercase(DividerType(IGlSys)); if (DividerWidth(IGlSys) > 0.0) { if (HorDividers(IGlSys) == 0 && VertDividers(IGlSys) == 0) { - ShowSevereError(state, - EnergyPlus::format( - "HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", - DesiredConstructionName)); - ShowContinueError( + ShowSevereError( state, - EnergyPlus::format("glazing system {} has a divider but number of horizontal and vertical divider elements = 0", IGlSys)); + std::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", + DesiredConstructionName)); + ShowContinueError( + state, std::format("glazing system {} has a divider but number of horizontal and vertical divider elements = 0", IGlSys)); ErrorsFound = true; } if (DividerConductance(IGlSys) <= 0.0) { - ShowSevereError(state, - EnergyPlus::format( - "HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", - DesiredConstructionName)); - ShowContinueError(state, EnergyPlus::format("glazing system {} has Divider Conductance <= 0.0", IGlSys)); + ShowSevereError( + state, + std::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", + DesiredConstructionName)); + ShowContinueError(state, std::format("glazing system {} has Divider Conductance <= 0.0", IGlSys)); ErrorsFound = true; } if (DivEdgeToCenterGlCondRatio(IGlSys) < 1.0) { - ShowSevereError(state, - EnergyPlus::format( - "HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", - DesiredConstructionName)); - ShowContinueError(state, EnergyPlus::format("glazing system {} has Divider Edge-Of-Glass Conduction Ratio < 1.0", IGlSys)); + ShowSevereError( + state, + std::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", + DesiredConstructionName)); + ShowContinueError(state, std::format("glazing system {} has Divider Edge-Of-Glass Conduction Ratio < 1.0", IGlSys)); ErrorsFound = true; } if (DividerSolAbsorp(IGlSys) < 0.0 || DividerSolAbsorp(IGlSys) > 1.0) { - ShowSevereError(state, - EnergyPlus::format( - "HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", - DesiredConstructionName)); - ShowContinueError(state, EnergyPlus::format("glazing system {} has Divider Solar Absorptance < 0.0 or > 1.0", IGlSys)); + ShowSevereError( + state, + std::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", + DesiredConstructionName)); + ShowContinueError(state, std::format("glazing system {} has Divider Solar Absorptance < 0.0 or > 1.0", IGlSys)); ErrorsFound = true; } if (DividerEmis(IGlSys) <= 0.0 || DividerEmis(IGlSys) >= 1.0) { - ShowSevereError(state, - EnergyPlus::format( - "HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", - DesiredConstructionName)); - ShowContinueError(state, EnergyPlus::format("glazing system {} has Divider Emissivity <= 0.0 or >= 1.0", IGlSys)); + ShowSevereError( + state, + std::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", + DesiredConstructionName)); + ShowContinueError(state, std::format("glazing system {} has Divider Emissivity <= 0.0 or >= 1.0", IGlSys)); ErrorsFound = true; } if (DividerType(IGlSys) != "DIVIDEDLITE" && DividerType(IGlSys) != "SUSPENDED") { - ShowSevereError(state, - EnergyPlus::format( - "HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", - DesiredConstructionName)); + ShowSevereError( + state, + std::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used:", + DesiredConstructionName)); ShowContinueError(state, - EnergyPlus::format("glazing system {} has Divider Type = {}; it should be DIVIDEDLITE or SUSPENDED.", - IGlSys, - DividerType(IGlSys))); + std::format("glazing system {} has Divider Type = {}; it should be DIVIDEDLITE or SUSPENDED.", + IGlSys, + DividerType(IGlSys))); ErrorsFound = true; } } @@ -4095,9 +4086,9 @@ namespace HeatBalanceManager { if (ErrorsFound) { ShowFatalError( state, - EnergyPlus::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used because " - "of above errors", - DesiredConstructionName)); + std::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used because " + "of above errors", + DesiredConstructionName)); } for (IGlSys = 1; IGlSys <= NGlSys; ++IGlSys) { @@ -4114,8 +4105,8 @@ namespace HeatBalanceManager { for (IGlass = 1; IGlass <= NGlass(IGlSys); ++IGlass) { auto *mat = new Material::MaterialGlass; mat->group = Material::Group::Glass; - mat->Name = (NGlSys == 1) ? EnergyPlus::format("W5:{}:GLASS{}", DesiredConstructionName, NumName(IGlass)) - : EnergyPlus::format("W5:{}:{}:GLASS{}", DesiredConstructionName, NumName(IGlSys), NumName(IGlass)); + mat->Name = (NGlSys == 1) ? std::format("W5:{}:GLASS{}", DesiredConstructionName, NumName(IGlass)) + : std::format("W5:{}:{}:GLASS{}", DesiredConstructionName, NumName(IGlSys), NumName(IGlass)); s_mat->materials.push_back(mat); mat->Num = s_mat->materials.isize(); @@ -4148,11 +4139,11 @@ namespace HeatBalanceManager { if (mat->Thickness <= 0.0) { ShowSevereError( state, - EnergyPlus::format("SearchWindow5DataFile: Material=\"{}\" has thickness of 0.0. Will be set to thickness = .001 but " - "inaccuracies may result.", - mat->Name)); - ShowContinueError(state, EnergyPlus::format("Line being read={}", NextLine.data)); - ShowContinueError(state, EnergyPlus::format("Thickness field starts at column 26={}", NextLine.data.substr(25))); + std::format("SearchWindow5DataFile: Material=\"{}\" has thickness of 0.0. Will be set to thickness = .001 but " + "inaccuracies may result.", + mat->Name)); + ShowContinueError(state, std::format("Line being read={}", NextLine.data)); + ShowContinueError(state, std::format("Thickness field starts at column 26={}", NextLine.data.substr(25))); mat->Thickness = 0.001; } } @@ -4167,8 +4158,8 @@ namespace HeatBalanceManager { for (IGlSys = 1; IGlSys <= NGlSys; ++IGlSys) { for (IGap = 1; IGap <= NGaps(IGlSys); ++IGap) { auto *matGas = new Material::MaterialGasMix; - matGas->Name = (NGlSys == 1) ? EnergyPlus::format("W5:{}:GAP{}", DesiredConstructionName, NumName(IGap)) - : EnergyPlus::format("W5:{}:{}:GAP{}", DesiredConstructionName, NumName(IGlSys), NumName(IGap)); + matGas->Name = (NGlSys == 1) ? std::format("W5:{}:GAP{}", DesiredConstructionName, NumName(IGap)) + : std::format("W5:{}:{}:GAP{}", DesiredConstructionName, NumName(IGlSys), NumName(IGap)); s_mat->materials.push_back(matGas); matGas->Num = s_mat->materials.isize(); s_mat->materialMap.insert_or_assign(matGas->Name, matGas->Num); @@ -4358,13 +4349,13 @@ namespace HeatBalanceManager { ++FileLineCount; if (!readItem(NextLine.data.substr(5), TsolTemp)) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of TSol values."); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); ErrorsFound = true; } else if (any_lt(TsolTemp, 0.0) || any_gt(TsolTemp, 1.0)) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of TSol values. (out of range [0,1])"); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); ErrorsFound = true; } @@ -4373,19 +4364,18 @@ namespace HeatBalanceManager { ++FileLineCount; if (!readItem(NextLine.data.substr(5), AbsSolTemp(IGlass, _))) { ShowSevereError( - state, - EnergyPlus::format("HeatBalanceManager: SearchWindow5DataFile: Error in Read of AbsSol values. For Glass={}", IGlass)); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); + state, std::format("HeatBalanceManager: SearchWindow5DataFile: Error in Read of AbsSol values. For Glass={}", IGlass)); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); ErrorsFound = true; } else if (any_lt(AbsSolTemp(IGlass, _), 0.0) || any_gt(AbsSolTemp(IGlass, _), 1.0)) { ShowSevereError( state, - EnergyPlus::format( + std::format( "HeatBalanceManager: SearchWindow5DataFile: Error in Read of AbsSol values. (out of range [0,1]) For Glass={}", IGlass)); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount, NextLine.data.substr(0, 100))); ErrorsFound = true; } } @@ -4396,68 +4386,68 @@ namespace HeatBalanceManager { if (!readItem(DataLine(1).substr(5), RfsolTemp)) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of RfSol values."); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 1, DataLine(1).substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 1, DataLine(1).substr(0, 100))); ErrorsFound = true; } else if (any_lt(RfsolTemp, 0.0) || any_gt(RfsolTemp, 1.0)) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of RfSol values. (out of range [0,1])"); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 1, DataLine(1).substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 1, DataLine(1).substr(0, 100))); ErrorsFound = true; } if (!readItem(DataLine(2).substr(5), RbsolTemp)) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of RbSol values."); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 2, DataLine(2).substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 2, DataLine(2).substr(0, 100))); ErrorsFound = true; } else if (any_lt(RbsolTemp, 0.0) || any_gt(RbsolTemp, 1.0)) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of RbSol values. (out of range [0,1])"); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 2, DataLine(2).substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 2, DataLine(2).substr(0, 100))); ErrorsFound = true; } if (!readItem(DataLine(3).substr(5), TvisTemp)) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of Tvis values."); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 3, DataLine(3).substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 3, DataLine(3).substr(0, 100))); ErrorsFound = true; } else if (any_lt(TvisTemp, 0.0) || any_gt(TvisTemp, 1.0)) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of Tvis values. (out of range [0,1])"); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 3, DataLine(3).substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 3, DataLine(3).substr(0, 100))); ErrorsFound = true; } if (!readItem(DataLine(4).substr(5), RfvisTemp)) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of Rfvis values."); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 4, DataLine(4).substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 4, DataLine(4).substr(0, 100))); ErrorsFound = true; } else if (any_lt(RfvisTemp, 0.0) || any_gt(RfvisTemp, 1.0)) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of Rfvis values. (out of range [0,1])"); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 4, DataLine(4).substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 4, DataLine(4).substr(0, 100))); ErrorsFound = true; } if (!readItem(DataLine(5).substr(5), RbvisTemp)) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of Rbvis values."); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 5, DataLine(5).substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 5, DataLine(5).substr(0, 100))); ErrorsFound = true; } else if (any_lt(RbvisTemp, 0.0) || any_gt(RbvisTemp, 1.0)) { ShowSevereError(state, "HeatBalanceManager: SearchWindow5DataFile: Error in Read of Rbvis values. (out of range [0,1])"); - ShowContinueError( - state, EnergyPlus::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 5, DataLine(5).substr(0, 100))); + ShowContinueError(state, + std::format("Line (~{}) in error (first 100 characters)={}", FileLineCount + 5, DataLine(5).substr(0, 100))); ErrorsFound = true; } FileLineCount += 5; if (ErrorsFound) { - ShowFatalError(state, - EnergyPlus::format( - "HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used because " - "of above errors", - DesiredConstructionName)); + ShowFatalError( + state, + std::format("HeatBalanceManager: SearchWindow5DataFile: Construction={} from the Window5 data file cannot be used because " + "of above errors", + DesiredConstructionName)); } for (int iPhi = 0; iPhi < Window::numPhis; ++iPhi) { @@ -4750,30 +4740,30 @@ namespace HeatBalanceManager { if (Ffactor <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" has {} <= 0.0, must be > 0.0.", - state.dataHeatBalMgr->CurrentModuleObject, - ConstructAlphas(1), - state.dataIPShortCut->cNumericFieldNames(1))); + std::format("{}=\"{}\" has {} <= 0.0, must be > 0.0.", + state.dataHeatBalMgr->CurrentModuleObject, + ConstructAlphas(1), + state.dataIPShortCut->cNumericFieldNames(1))); ShowContinueError(state, EnergyPlus::format("Entered value=[{:.2R}]", Ffactor)); ErrorsFound = true; } if (Area <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" has {} <= 0.0, must be > 0.0.", - state.dataHeatBalMgr->CurrentModuleObject, - ConstructAlphas(1), - state.dataIPShortCut->cNumericFieldNames(2))); + std::format("{}=\"{}\" has {} <= 0.0, must be > 0.0.", + state.dataHeatBalMgr->CurrentModuleObject, + ConstructAlphas(1), + state.dataIPShortCut->cNumericFieldNames(2))); ShowContinueError(state, EnergyPlus::format("Entered value=[{:.2R}]", Area)); ErrorsFound = true; } if (PerimeterExposed < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" has {} <= 0.0, must be > 0.0.", - state.dataHeatBalMgr->CurrentModuleObject, - ConstructAlphas(1), - state.dataIPShortCut->cNumericFieldNames(3))); + std::format("{}=\"{}\" has {} <= 0.0, must be > 0.0.", + state.dataHeatBalMgr->CurrentModuleObject, + ConstructAlphas(1), + state.dataIPShortCut->cNumericFieldNames(3))); ShowContinueError(state, EnergyPlus::format("Entered value=[{:.2R}]", PerimeterExposed)); ErrorsFound = true; } @@ -4785,7 +4775,7 @@ namespace HeatBalanceManager { thisConstruct.LayerPoint(2) = iFCConcreteLayer; // The fictitious insulation is the outside layer - thisConstruct.LayerPoint(1) = Material::GetMaterialNum(state, EnergyPlus::format("~FC_INSULATION_{}", Loop)); + thisConstruct.LayerPoint(1) = Material::GetMaterialNum(state, std::format("~FC_INSULATION_{}", Loop)); // Calculate the thermal resistance of the fictitious insulation layer // effective thermal resistance excludes inside and outside air films @@ -4798,9 +4788,9 @@ namespace HeatBalanceManager { Rfic = Reff - Rcon; if (Rfic <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" has calculated R value <= 0.0, must be > 0.0.", - state.dataHeatBalMgr->CurrentModuleObject, - ConstructAlphas(1))); + std::format("{}=\"{}\" has calculated R value <= 0.0, must be > 0.0.", + state.dataHeatBalMgr->CurrentModuleObject, + ConstructAlphas(1))); ShowContinueError(state, EnergyPlus::format("Calculated value=[{:.2R}] Check definition.", Rfic)); ErrorsFound = true; } @@ -4854,20 +4844,20 @@ namespace HeatBalanceManager { if (Cfactor <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{} {} has {} <= 0.0, must be > 0.0.", - state.dataHeatBalMgr->CurrentModuleObject, - ConstructAlphas(1), - state.dataIPShortCut->cNumericFieldNames(1))); + std::format("{} {} has {} <= 0.0, must be > 0.0.", + state.dataHeatBalMgr->CurrentModuleObject, + ConstructAlphas(1), + state.dataIPShortCut->cNumericFieldNames(1))); ShowContinueError(state, EnergyPlus::format("Entered value=[{:.2R}]", Cfactor)); ErrorsFound = true; } if (Height <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{} {} has {} <= 0.0, must be > 0.0.", - state.dataHeatBalMgr->CurrentModuleObject, - ConstructAlphas(1), - state.dataIPShortCut->cNumericFieldNames(2))); + std::format("{} {} has {} <= 0.0, must be > 0.0.", + state.dataHeatBalMgr->CurrentModuleObject, + ConstructAlphas(1), + state.dataIPShortCut->cNumericFieldNames(2))); ShowContinueError(state, EnergyPlus::format("Entered value=[{:.2R}]", Height)); ErrorsFound = true; } @@ -4879,7 +4869,7 @@ namespace HeatBalanceManager { thisConstruct.LayerPoint(2) = iFCConcreteLayer; // The fictitious insulation is the outside layer - thisConstruct.LayerPoint(1) = Material::GetMaterialNum(state, EnergyPlus::format("~FC_INSULATION_{}", Loop + TotFfactorConstructs)); + thisConstruct.LayerPoint(1) = Material::GetMaterialNum(state, std::format("~FC_INSULATION_{}", Loop + TotFfactorConstructs)); // CR 8886 Rsoil should be in SI unit. From ASHRAE 90.1-2010 SI if (Height <= 0.25) { @@ -4896,9 +4886,9 @@ namespace HeatBalanceManager { Rfic = Reff - Rcon; if (Rfic <= 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" has calculated R value <= 0.0, must be > 0.0.", - state.dataHeatBalMgr->CurrentModuleObject, - ConstructAlphas(1))); + std::format("{}=\"{}\" has calculated R value <= 0.0, must be > 0.0.", + state.dataHeatBalMgr->CurrentModuleObject, + ConstructAlphas(1))); ShowContinueError(state, EnergyPlus::format("Calculated value=[{:.2R}] Check definition.", Rfic)); ErrorsFound = true; } @@ -4929,8 +4919,7 @@ namespace HeatBalanceManager { // this would indicate a major problem in the input processor, not a problem here // I'll still catch this with errorsFound but I cannot make a unit test for it so excluding the line from coverage ShowSevereError( - state, - EnergyPlus::format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", cCurrentModuleObject)); // LCOV_EXCL_LINE + state, std::format("{}: Somehow getNumObjectsFound was > 0 but epJSON.find found 0", cCurrentModuleObject)); // LCOV_EXCL_LINE errorsFound = true; // LCOV_EXCL_LINE } auto &instancesValue = instances.value(); @@ -5019,7 +5008,7 @@ namespace HeatBalanceManager { if (NumAlpha != 4) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}: Object Definition indicates not = 4 Alpha Objects, Number Indicated={}", RoutineName, cCurrentModuleObject, NumAlpha)); ErrorsFound = true; } @@ -5140,19 +5129,19 @@ namespace HeatBalanceManager { } if (!NumOfLayersMatch) { - ShowSevereError(state, - EnergyPlus::format( - "{}{}=\"{}, object. Number of scheduled surface gains for each layer does not match number of layers in " - "referenced construction.", - RoutineName, - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError( + state, + std::format("{}{}=\"{}, object. Number of scheduled surface gains for each layer does not match number of layers in " + "referenced construction.", + RoutineName, + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - EnergyPlus::format("{} have {} schedule layers and {} have {} layers.", - state.dataIPShortCut->cAlphaArgs(1), - NumOfScheduledLayers, - state.dataIPShortCut->cAlphaArgs(3), - thisConstruct.TotSolidLayers)); + std::format("{} have {} schedule layers and {} have {} layers.", + state.dataIPShortCut->cAlphaArgs(1), + NumOfScheduledLayers, + state.dataIPShortCut->cAlphaArgs(3), + thisConstruct.TotSolidLayers)); ErrorsFound = true; } @@ -5232,8 +5221,8 @@ namespace HeatBalanceManager { } if ((!ZoneScheduled) && (!ZoneUnscheduled)) { // zone is not scheduled nor unscheduled - ShowWarningError( - state, EnergyPlus::format("Zone {} does not have all surfaces scheduled with surface gains.", state.dataHeatBal->Zone(ZoneNum).Name)); + ShowWarningError(state, + std::format("Zone {} does not have all surfaces scheduled with surface gains.", state.dataHeatBal->Zone(ZoneNum).Name)); ShowContinueError(state, "If at least one surface in the zone is scheduled with surface gains, then all other surfaces within the same zone " "should be scheduled as well."); @@ -5248,8 +5237,8 @@ namespace HeatBalanceManager { } if (SchedPtr == 0) { - ShowContinueError( - state, EnergyPlus::format("Surface {} does not have scheduled surface gains.", state.dataSurface->Surface(iSurf).Name)); + ShowContinueError(state, + std::format("Surface {} does not have scheduled surface gains.", state.dataSurface->Surface(iSurf).Name)); } } } @@ -5538,9 +5527,9 @@ namespace HeatBalanceManager { ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("{} entered value=\"{}\" invalid matrix dimensions. Basis matrix dimension can only be 2 x 1.", - locAlphaFieldNames(5), - locAlphaArgs(5))); + std::format("{} entered value=\"{}\" invalid matrix dimensions. Basis matrix dimension can only be 2 x 1.", + locAlphaFieldNames(5), + locAlphaArgs(5))); } thisConstruct.BSDFInput.BasisMat.allocate(NumCols, NumRows); MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.BasisMatIndex, thisConstruct.BSDFInput.BasisMat); @@ -5561,7 +5550,7 @@ namespace HeatBalanceManager { if (mod((NumAlphas - 9), 3) != 0) { // throw warning if incomplete field set ErrorsFound = true; - ShowSevereCustom(state, eoh, EnergyPlus::format("{} is missing some of the layers or/and gaps.", locAlphaArgs(1))); + ShowSevereCustom(state, eoh, std::format("{} is missing some of the layers or/and gaps.", locAlphaArgs(1))); } if (thisConstruct.BSDFInput.BasisSymmetryType == DataBSDFWindow::BasisSymmetry::None) { @@ -5582,18 +5571,18 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Solar front transmittance matrix \"{}\" is not the same size as it is defined by basis definition. Basis " - "size is defined by Matrix:TwoDimension = \"{}\".", - locAlphaArgs(6), - locAlphaArgs(5))); + std::format("Solar front transmittance matrix \"{}\" is not the same size as it is defined by basis definition. Basis " + "size is defined by Matrix:TwoDimension = \"{}\".", + locAlphaArgs(6), + locAlphaArgs(5))); } if (NumRows != NumCols) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - EnergyPlus::format("Solar front transmittance matrix \"{}\" must have the same number of rows and columns.", - locAlphaArgs(6))); + ShowSevereCustom( + state, + eoh, + std::format("Solar front transmittance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(6))); } if (thisConstruct.BSDFInput.BasisType == DataBSDFWindow::Basis::Custom) { @@ -5604,10 +5593,10 @@ namespace HeatBalanceManager { thisConstruct.BSDFInput.SolFrtTrans.allocate(NumCols, NumRows); if (thisConstruct.BSDFInput.SolFrtTransIndex == 0) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - EnergyPlus::format("Solar front transmittance Matrix:TwoDimension = \"{}\" is missing from the input file.", - locAlphaArgs(6))); + ShowSevereCustom( + state, + eoh, + std::format("Solar front transmittance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(6))); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.SolFrtTransIndex, thisConstruct.BSDFInput.SolFrtTrans); } @@ -5622,13 +5611,13 @@ namespace HeatBalanceManager { if (NumRows != NBasis) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - EnergyPlus::format( - "Solar back reflectance matrix \"{}\" is not the same size as it is defined by basis definition. Basis size " - "is defined by Matrix:TwoDimension = \"{}\".", - locAlphaArgs(7), - locAlphaArgs(5))); + ShowSevereCustom( + state, + eoh, + std::format("Solar back reflectance matrix \"{}\" is not the same size as it is defined by basis definition. Basis size " + "is defined by Matrix:TwoDimension = \"{}\".", + locAlphaArgs(7), + locAlphaArgs(5))); } if (NumRows != NumCols) { @@ -5636,7 +5625,7 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Solar back reflectance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(7))); + std::format("Solar back reflectance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(7))); } thisConstruct.BSDFInput.SolBkRefl.allocate(NumCols, NumRows); @@ -5645,7 +5634,7 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Solar back reflectance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(7))); + std::format("Solar back reflectance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(7))); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.SolBkReflIndex, thisConstruct.BSDFInput.SolBkRefl); } @@ -5660,30 +5649,30 @@ namespace HeatBalanceManager { if (NumRows != NBasis) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - EnergyPlus::format( - "Visible front transmittance matrix \"{}\" is not the same size as it is defined by basis definition. Basis " - "size is defined by Matrix:TwoDimension = \"{}\".", - locAlphaArgs(8), - locAlphaArgs(5))); + ShowSevereCustom( + state, + eoh, + std::format("Visible front transmittance matrix \"{}\" is not the same size as it is defined by basis definition. Basis " + "size is defined by Matrix:TwoDimension = \"{}\".", + locAlphaArgs(8), + locAlphaArgs(5))); } if (NumRows != NumCols) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - EnergyPlus::format("Visible front transmittance matrix \"{}\" must have the same number of rows and columns.", - locAlphaArgs(8))); + ShowSevereCustom( + state, + eoh, + std::format("Visible front transmittance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(8))); } thisConstruct.BSDFInput.VisFrtTrans.allocate(NumCols, NumRows); if (thisConstruct.BSDFInput.VisFrtTransIndex == 0) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - EnergyPlus::format("Visible front transmittance Matrix:TwoDimension = \"{}\" is missing from the input file.", - locAlphaArgs(8))); + ShowSevereCustom( + state, + eoh, + std::format("Visible front transmittance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(8))); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.VisFrtTransIndex, thisConstruct.BSDFInput.VisFrtTrans); } @@ -5701,18 +5690,16 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Visible back reflectance matrix \"{}\" is not the same size as it is defined by basis definition. Basis " - "size is defined by Matrix:TwoDimension = \"{}\".", - locAlphaArgs(9), - locAlphaArgs(5))); + std::format("Visible back reflectance matrix \"{}\" is not the same size as it is defined by basis definition. Basis " + "size is defined by Matrix:TwoDimension = \"{}\".", + locAlphaArgs(9), + locAlphaArgs(5))); } if (NumRows != NumCols) { ErrorsFound = true; ShowSevereCustom( - state, - eoh, - EnergyPlus::format("Visible back reflectance \"{}\" must have the same number of rows and columns.", locAlphaArgs(9))); + state, eoh, std::format("Visible back reflectance \"{}\" must have the same number of rows and columns.", locAlphaArgs(9))); } thisConstruct.BSDFInput.VisBkRefl.allocate(NumCols, NumRows); @@ -5721,7 +5708,7 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Visible back reflectance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(9))); + std::format("Visible back reflectance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(9))); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.VisBkReflIndex, thisConstruct.BSDFInput.VisBkRefl); } @@ -5750,9 +5737,9 @@ namespace HeatBalanceManager { ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + std::format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer)); } if (NumCols != NBasis) { @@ -5760,13 +5747,13 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have same number of columns " - "as it is defined by basis matrix." - "Matrix has {} number of columns, while basis definition specifies {} number of columns.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer, - NumCols, - NBasis)); + std::format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have same number of columns " + "as it is defined by basis matrix." + "Matrix has {} number of columns, while basis definition specifies {} number of columns.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer, + NumCols, + NBasis)); } thisConstruct.BSDFInput.Layer(currentOpticalLayer).AbsNcols = NumCols; @@ -5776,9 +5763,9 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} is missing from the input file.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + std::format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} is missing from the input file.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer)); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.Layer(currentOpticalLayer).FrtAbsIndex, @@ -5798,9 +5785,9 @@ namespace HeatBalanceManager { ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + std::format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer)); } if (NumCols != NBasis) { @@ -5808,24 +5795,23 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have same number of columns as " - "it is defined by basis matrix." - "Matrix has {} number of columns, while basis definition specifies {} number of columns.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer, - NumCols, - NBasis)); + std::format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have same number of columns as " + "it is defined by basis matrix." + "Matrix has {} number of columns, while basis definition specifies {} number of columns.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer, + NumCols, + NBasis)); } thisConstruct.BSDFInput.Layer(currentOpticalLayer).BkAbs.allocate(NumCols, NumRows); if (thisConstruct.BSDFInput.Layer(currentOpticalLayer).BkAbsIndex == 0) { ErrorsFound = true; - ShowSevereCustom( - state, - eoh, - EnergyPlus::format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} is missing from the input file.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + ShowSevereCustom(state, + eoh, + std::format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} is missing from the input file.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer)); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.Layer(currentOpticalLayer).BkAbsIndex, @@ -5851,27 +5837,27 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Solar front transmittance matrix \"{}\" is not the same size as it is defined by basis definition. Basis " - "size is defined by Matrix:TwoDimension = \"{}\".", - locAlphaArgs(6), - locAlphaArgs(5))); + std::format("Solar front transmittance matrix \"{}\" is not the same size as it is defined by basis definition. Basis " + "size is defined by Matrix:TwoDimension = \"{}\".", + locAlphaArgs(6), + locAlphaArgs(5))); } if (NumRows != NumCols) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - EnergyPlus::format("Solar front transmittance matrix \"{}\" must have the same number of rows and columns.", - locAlphaArgs(6))); + ShowSevereCustom( + state, + eoh, + std::format("Solar front transmittance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(6))); } thisConstruct.BSDFInput.SolFrtTrans.allocate(NBasis, NBasis); if (thisConstruct.BSDFInput.SolFrtTransIndex == 0) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - EnergyPlus::format("Solar front transmittance Matrix:TwoDimension = \"{}\" is missing from the input file.", - locAlphaArgs(6))); + ShowSevereCustom( + state, + eoh, + std::format("Solar front transmittance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(6))); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.SolFrtTransIndex, state.dataBSDFWindow->BSDFTempMtrx); @@ -5891,13 +5877,13 @@ namespace HeatBalanceManager { if (NumRows != NBasis) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - EnergyPlus::format( - "Solar back reflectance matrix \"{}\" is not the same size as it is defined by basis definition. Basis size " - "is defined by Matrix:TwoDimension = \"{}\".", - locAlphaArgs(7), - locAlphaArgs(5))); + ShowSevereCustom( + state, + eoh, + std::format("Solar back reflectance matrix \"{}\" is not the same size as it is defined by basis definition. Basis size " + "is defined by Matrix:TwoDimension = \"{}\".", + locAlphaArgs(7), + locAlphaArgs(5))); } if (NumRows != NumCols) { @@ -5905,7 +5891,7 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Solar back reflectance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(7))); + std::format("Solar back reflectance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(7))); } thisConstruct.BSDFInput.SolBkRefl.allocate(NBasis, NBasis); @@ -5914,7 +5900,7 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Solar back reflectance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(7))); + std::format("Solar back reflectance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(7))); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.SolBkReflIndex, state.dataBSDFWindow->BSDFTempMtrx); thisConstruct.BSDFInput.SolBkRefl = 0.0; @@ -5933,30 +5919,30 @@ namespace HeatBalanceManager { if (NumRows != NBasis) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - EnergyPlus::format( - "Visible front transmittance matrix \"{}\" is not the same size as it is defined by basis definition. Basis " - "size is defined by Matrix:TwoDimension = \"{}\".", - locAlphaArgs(8), - locAlphaArgs(5))); + ShowSevereCustom( + state, + eoh, + std::format("Visible front transmittance matrix \"{}\" is not the same size as it is defined by basis definition. Basis " + "size is defined by Matrix:TwoDimension = \"{}\".", + locAlphaArgs(8), + locAlphaArgs(5))); } if (NumRows != NumCols) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - EnergyPlus::format("Visible front transmittance matrix \"{}\" must have the same number of rows and columns.", - locAlphaArgs(8))); + ShowSevereCustom( + state, + eoh, + std::format("Visible front transmittance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(8))); } thisConstruct.BSDFInput.VisFrtTrans.allocate(NBasis, NBasis); if (thisConstruct.BSDFInput.VisFrtTransIndex == 0) { ErrorsFound = true; - ShowSevereCustom(state, - eoh, - EnergyPlus::format("Visible front transmittance Matrix:TwoDimension = \"{}\" is missing from the input file.", - locAlphaArgs(8))); + ShowSevereCustom( + state, + eoh, + std::format("Visible front transmittance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(8))); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.VisFrtTransIndex, state.dataBSDFWindow->BSDFTempMtrx); thisConstruct.BSDFInput.VisFrtTrans = 0.0; @@ -5978,10 +5964,10 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Visible back reflectance matrix \"{}\" is not the same size as it is defined by basis definition. Basis " - "size is defined by Matrix:TwoDimension = \"{}\".", - locAlphaArgs(9), - locAlphaArgs(5))); + std::format("Visible back reflectance matrix \"{}\" is not the same size as it is defined by basis definition. Basis " + "size is defined by Matrix:TwoDimension = \"{}\".", + locAlphaArgs(9), + locAlphaArgs(5))); } if (NumRows != NumCols) { @@ -5989,7 +5975,7 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Visible back reflectance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(9))); + std::format("Visible back reflectance matrix \"{}\" must have the same number of rows and columns.", locAlphaArgs(9))); } thisConstruct.BSDFInput.VisBkRefl.allocate(NBasis, NBasis); @@ -5998,7 +5984,7 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Visible back reflectance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(9))); + std::format("Visible back reflectance Matrix:TwoDimension = \"{}\" is missing from the input file.", locAlphaArgs(9))); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.VisBkReflIndex, state.dataBSDFWindow->BSDFTempMtrx); thisConstruct.BSDFInput.VisBkRefl = 0.0; @@ -6036,9 +6022,9 @@ namespace HeatBalanceManager { ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + std::format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer)); } if (NumCols != NBasis) { @@ -6046,13 +6032,13 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have same number of columns " - "as it is defined by basis matrix." - "Matrix has {} number of columns, while basis definition specifies {} number of columns.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer, - NumCols, - NBasis)); + std::format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have same number of columns " + "as it is defined by basis matrix." + "Matrix has {} number of columns, while basis definition specifies {} number of columns.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer, + NumCols, + NBasis)); } thisConstruct.BSDFInput.Layer(currentOpticalLayer).AbsNcols = NumCols; @@ -6063,9 +6049,9 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} is missing from the input file.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + std::format("Front absorbtance Matrix:TwoDimension = \"{}\" for layer {} is missing from the input file.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer)); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.Layer(currentOpticalLayer).FrtAbsIndex, @@ -6085,9 +6071,9 @@ namespace HeatBalanceManager { ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + std::format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have only one row.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer)); } if (NumCols != NBasis) { @@ -6095,25 +6081,24 @@ namespace HeatBalanceManager { ShowSevereCustom( state, eoh, - EnergyPlus::format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have same number of columns as " - "it is defined by basis matrix." - "Matrix has {} number of columns, while basis definition specifies {} number of columns.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer, - NumCols, - NBasis)); + std::format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} must have same number of columns as " + "it is defined by basis matrix." + "Matrix has {} number of columns, while basis definition specifies {} number of columns.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer, + NumCols, + NBasis)); } thisConstruct.BSDFInput.Layer(currentOpticalLayer).BkAbs.allocate(NumCols, NumRows); if (thisConstruct.BSDFInput.Layer(currentOpticalLayer).BkAbsIndex == 0) { ErrorsFound = true; - ShowSevereCustom( - state, - eoh, - EnergyPlus::format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} is missing from the input file.", - locAlphaArgs(AlphaIndex), - currentOpticalLayer)); + ShowSevereCustom(state, + eoh, + std::format("Back absorbtance Matrix:TwoDimension = \"{}\" for layer {} is missing from the input file.", + locAlphaArgs(AlphaIndex), + currentOpticalLayer)); } else { MatrixDataManager::Get2DMatrix(state, thisConstruct.BSDFInput.Layer(currentOpticalLayer).BkAbsIndex, diff --git a/src/EnergyPlus/HeatBalanceSurfaceManager.cc b/src/EnergyPlus/HeatBalanceSurfaceManager.cc index 1db07ee96b0..359e326da53 100644 --- a/src/EnergyPlus/HeatBalanceSurfaceManager.cc +++ b/src/EnergyPlus/HeatBalanceSurfaceManager.cc @@ -49,6 +49,8 @@ #include #include #include +#include + // ObjexxFCL Headers #include #include @@ -56,8 +58,14 @@ #include #include -// EnergyPlus Headers +// Third Party Headers #include +#include +#include +#include +#include + +// EnergyPlus Headers #include #include #include @@ -119,10 +127,6 @@ #include #include #include -#include -#include -#include -#include namespace EnergyPlus::HeatBalanceSurfaceManager { @@ -4459,10 +4463,10 @@ void ComputeIntSWAbsorpFactors(EnergyPlusData &state) // That's probably not correct, but how correct is it to assume that no solar is absorbed anywhere // in the zone? if (thisSolEnclosure.solAbsFirstCalc) { - ShowWarningError(state, - EnergyPlus::format( - "ComputeIntSWAbsorbFactors: Sum of area times inside solar absorption for all surfaces is zero in Enclosure: {}", - thisSolEnclosure.Name)); + ShowWarningError( + state, + std::format("ComputeIntSWAbsorbFactors: Sum of area times inside solar absorption for all surfaces is zero in Enclosure: {}", + thisSolEnclosure.Name)); thisSolEnclosure.solAbsFirstCalc = false; } thisSolEnclosure.solVMULT = 0.0; @@ -4777,20 +4781,19 @@ void InitEMSControlledConstructions(EnergyPlusData &state) "InitEMSControlledConstructions: EMS Construction State Actuator may be unrealistic, incompatible " "CTF timescales are being used."); ShowContinueError(state, - EnergyPlus::format("Construction named = {} has CTF timesteps = {}", - state.dataConstruction->Construct(surface.Construction).Name, - state.dataConstruction->Construct(surface.Construction).NumHistories)); + std::format("Construction named = {} has CTF timesteps = {}", + state.dataConstruction->Construct(surface.Construction).Name, + state.dataConstruction->Construct(surface.Construction).NumHistories)); ShowContinueError( state, - EnergyPlus::format( + std::format( "While construction named = {} has CTF timesteps = {}", state.dataConstruction->Construct(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)).Name, state.dataConstruction->Construct(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)).NumHistories)); ShowContinueError( state, - EnergyPlus::format( - "Transient heat transfer modeling may not be valid for surface name = {}, and the simulation continues", - surface.Name)); + std::format("Transient heat transfer modeling may not be valid for surface name = {}, and the simulation continues", + surface.Name)); } if (state.dataConstruction->Construct(surface.Construction).NumCTFTerms != state.dataConstruction->Construct(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)).NumCTFTerms) { @@ -4799,20 +4802,20 @@ void InitEMSControlledConstructions(EnergyPlusData &state) "InitEMSControlledConstructions: EMS Construction State Actuator may be unrealistic, incompatible " "CTF terms are being used."); ShowContinueError(state, - EnergyPlus::format("Construction named = {} has number of CTF terms = {}", - state.dataConstruction->Construct(surface.Construction).Name, - state.dataConstruction->Construct(surface.Construction).NumCTFTerms)); + std::format("Construction named = {} has number of CTF terms = {}", + state.dataConstruction->Construct(surface.Construction).Name, + state.dataConstruction->Construct(surface.Construction).NumCTFTerms)); ShowContinueError( state, - EnergyPlus::format( + std::format( "While construction named = {} has number of CTF terms = {}", state.dataConstruction->Construct(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)).Name, state.dataConstruction->Construct(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)).NumCTFTerms)); ShowContinueError( state, - EnergyPlus::format("The actuator is allowed but the transient heat transfer modeling may not be valid for surface " - "name = {}, and the simulation continues", - surface.Name)); + std::format("The actuator is allowed but the transient heat transfer modeling may not be valid for surface " + "name = {}, and the simulation continues", + surface.Name)); } if (state.dataConstruction->Construct(surface.Construction).SourceSinkPresent) { @@ -4820,16 +4823,16 @@ void InitEMSControlledConstructions(EnergyPlusData &state) // throw warning, and do not allow ShowSevereError(state, "InitEMSControlledConstructions: EMS Construction State Actuator not valid."); ShowContinueError(state, - EnergyPlus::format("Construction named = {} has internal source/sink", - state.dataConstruction->Construct(surface.Construction).Name)); + std::format("Construction named = {} has internal source/sink", + state.dataConstruction->Construct(surface.Construction).Name)); ShowContinueError( state, - EnergyPlus::format( + std::format( "While construction named = {} is not an internal source/sink construction", state.dataConstruction->Construct(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)).Name)); ShowContinueError( state, - EnergyPlus::format( + std::format( "This actuator is not allowed for surface name = {}, and the simulation continues without the override", surface.Name)); @@ -4853,21 +4856,19 @@ void InitEMSControlledConstructions(EnergyPlusData &state) // throw warning, and do not allow ShowSevereError(state, "InitEMSControlledConstructions: EMS Construction State Actuator not valid."); ShowContinueError(state, - EnergyPlus::format("Construction named = {} has number of finite difference nodes ={}", - state.dataConstruction->Construct(surface.Construction).Name, - state.dataHeatBalFiniteDiffMgr->ConstructFD(surface.Construction).TotNodes)); + std::format("Construction named = {} has number of finite difference nodes ={}", + state.dataConstruction->Construct(surface.Construction).Name, + state.dataHeatBalFiniteDiffMgr->ConstructFD(surface.Construction).TotNodes)); ShowContinueError( state, - EnergyPlus::format( - "While construction named = {} has number of finite difference nodes ={}", - state.dataConstruction->Construct(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)).Name, - state.dataHeatBalFiniteDiffMgr->ConstructFD(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)) - .TotNodes)); + std::format("While construction named = {} has number of finite difference nodes ={}", + state.dataConstruction->Construct(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)).Name, + state.dataHeatBalFiniteDiffMgr->ConstructFD(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)) + .TotNodes)); ShowContinueError( state, - EnergyPlus::format( - "This actuator is not allowed for surface name = {}, and the simulation continues without the override", - surface.Name)); + std::format("This actuator is not allowed for surface name = {}, and the simulation continues without the override", + surface.Name)); state.dataRuntimeLang->EMSConstructActuatorIsOkay(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum), SurfNum) = false; @@ -4878,16 +4879,16 @@ void InitEMSControlledConstructions(EnergyPlusData &state) // throw warning, and do not allow ShowSevereError(state, "InitEMSControlledConstructions: EMS Construction State Actuator not valid."); ShowContinueError(state, - EnergyPlus::format("Construction named = {} has internal source/sink", - state.dataConstruction->Construct(surface.Construction).Name)); + std::format("Construction named = {} has internal source/sink", + state.dataConstruction->Construct(surface.Construction).Name)); ShowContinueError( state, - EnergyPlus::format( + std::format( "While construction named = {} is not an internal source/sink construction", state.dataConstruction->Construct(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum)).Name)); ShowContinueError( state, - EnergyPlus::format( + std::format( "This actuator is not allowed for surface name = {}, and the simulation continues without the override", surface.Name)); @@ -4905,10 +4906,10 @@ void InitEMSControlledConstructions(EnergyPlusData &state) ShowSevereError(state, "InitEMSControlledConstructions: EMS Construction State Actuator not available with Heat transfer " "algorithm CombinedHeatAndMoistureFiniteElement."); - ShowContinueError(state, - EnergyPlus::format( - "This actuator is not allowed for surface name = {}, and the simulation continues without the override", - surface.Name)); + ShowContinueError( + state, + std::format("This actuator is not allowed for surface name = {}, and the simulation continues without the override", + surface.Name)); state.dataRuntimeLang->EMSConstructActuatorChecked(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum), SurfNum) = true; state.dataRuntimeLang->EMSConstructActuatorIsOkay(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum), SurfNum) = @@ -4918,10 +4919,10 @@ void InitEMSControlledConstructions(EnergyPlusData &state) ShowSevereError(state, "InitEMSControlledConstructions: EMS Construction State Actuator not available for Surfaces with " "Foundation Outside Boundary Condition."); - ShowContinueError(state, - EnergyPlus::format( - "This actuator is not allowed for surface name = {}, and the simulation continues without the override", - surface.Name)); + ShowContinueError( + state, + std::format("This actuator is not allowed for surface name = {}, and the simulation continues without the override", + surface.Name)); state.dataRuntimeLang->EMSConstructActuatorChecked(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum), SurfNum) = true; state.dataRuntimeLang->EMSConstructActuatorIsOkay(state.dataSurface->SurfEMSConstructionOverrideValue(SurfNum), SurfNum) = @@ -5050,7 +5051,7 @@ void UpdateNonRepresentativeSurfaceResults(EnergyPlusData &state, ObjexxFCL::Opt if (std::abs(diff) > 3.0 && state.dataSurface->Surface(repSurfNum).ConstituentSurfaceNums.size() == 2) { ShowWarningError(state, EnergyPlus::format("Difference in representative surface convection {:.3R} W/m2", diff)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, EnergyPlus::format(" Original Surface: {}", surface.Name)); + ShowContinueError(state, std::format(" Original Surface: {}", surface.Name)); ShowContinueError(state, EnergyPlus::format(" Inside surface temperature: {:.3R} C", state.dataHeatBalSurf->SurfTempIn(surfNum))); ShowContinueError(state, EnergyPlus::format(" Inside convection coefficient: {:.3R} W/m2-K", state.dataHeatBalSurf->SurfHConvInt(surfNum))); @@ -5060,7 +5061,7 @@ void UpdateNonRepresentativeSurfaceResults(EnergyPlusData &state, ObjexxFCL::Opt ShowContinueError(state, EnergyPlus::format(" Outside absorbed solar: {:.3R} W/m2", state.dataHeatBalSurf->SurfOpaqQRadSWOutAbs(surfNum))); ShowContinueError(state, EnergyPlus::format(" Outside long wave radiation: {:.3R} W/m2", state.dataHeatBalSurf->QdotRadOutRepPerArea(surfNum))); - ShowContinueError(state, EnergyPlus::format(" Representative Surface: {}", state.dataSurface->Surface(repSurfNum).Name)); + ShowContinueError(state, std::format(" Representative Surface: {}", state.dataSurface->Surface(repSurfNum).Name)); ShowContinueError(state, EnergyPlus::format(" Inside surface temperature: {:.3R} C", state.dataHeatBalSurf->SurfTempIn(repSurfNum))); ShowContinueError(state, EnergyPlus::format(" Inside convection coefficient: {:.3R} W/m2-K", state.dataHeatBalSurf->SurfHConvInt(repSurfNum))); @@ -5647,8 +5648,8 @@ void CalculateZoneMRT(EnergyPlusData &state, } else { if (state.dataHeatBalSurfMgr->CalculateZoneMRTfirstTime) { ShowWarningError(state, - EnergyPlus::format("Zone areas*inside surface emissivities are summing to zero, for Zone=\"{}\"", - state.dataHeatBal->Zone(ZoneNum).Name)); + std::format("Zone areas*inside surface emissivities are summing to zero, for Zone=\"{}\"", + state.dataHeatBal->Zone(ZoneNum).Name)); ShowContinueError(state, "As a result, MRT will be set to MAT for that zone"); } thisZoneHB.MRT = state.dataZoneTempPredictorCorrector->zoneHeatBalance(ZoneNum).MAT; @@ -5669,8 +5670,7 @@ void CalculateZoneMRT(EnergyPlusData &state, } else { if (state.dataHeatBalSurfMgr->CalculateZoneMRTfirstTime) { ShowWarningError( - state, - EnergyPlus::format("Enclosure areas*inside surface emissivities are summing to zero, for Enclosure=\"{}\"", thisEnclosure.Name)); + state, std::format("Enclosure areas*inside surface emissivities are summing to zero, for Enclosure=\"{}\"", thisEnclosure.Name)); ShowContinueError(state, "As a result, MRT will be set to the volume weighted average MAT for that enclosure"); } Real64 sumMATVol = 0.0; @@ -5981,7 +5981,7 @@ void ReportThermalResilience(EnergyPlusData &state) } else { if (state.dataHeatBal->Resilience(ZoneNum).PierceSET != state.dataHeatBal->Resilience(ZoneNum).ZonePierceSET) { ShowRecurringWarningErrorAtEnd(state, - fmt::format("Zone {} has multiple people objects with different PierceSet.", ZoneNum), + std::format("Zone {} has multiple people objects with different PierceSet.", ZoneNum), state.dataHeatBalFanSys->PierceSETerrorIndex); } } @@ -5992,7 +5992,7 @@ void ReportThermalResilience(EnergyPlusData &state) } else { if (state.dataHeatBal->Resilience(ZoneNum).PMV != PMV) { ShowRecurringWarningErrorAtEnd(state, - fmt::format("Zone {} has multiple people objects with different PMV.", ZoneNum), + std::format("Zone {} has multiple people objects with different PMV.", ZoneNum), state.dataHeatBalFanSys->PMVerrorIndex); } } @@ -8267,11 +8267,10 @@ void CalcHeatBalanceInsideSurf2(EnergyPlusData &state, if (construct.SourceSinkPresent) { ShowSevereError(state, "Interior movable insulation is not valid with embedded sources/sinks"); + ShowContinueError(state, std::format("Construction {} contains an internal source or sink but also uses", construct.Name)); ShowContinueError(state, - EnergyPlus::format("Construction {} contains an internal source or sink but also uses", construct.Name)); - ShowContinueError(state, - EnergyPlus::format("interior movable insulation {} for a surface with that construction.", - s_mat->materials(state.dataSurface->intMovInsuls(SurfNum).matNum)->Name)); + std::format("interior movable insulation {} for a surface with that construction.", + s_mat->materials(state.dataSurface->intMovInsuls(SurfNum).matNum)->Name)); ShowContinueError(state, "This is not currently allowed because the heat balance equations do not currently accommodate " "this combination."); @@ -9300,7 +9299,7 @@ void TestSurfTempCalcHeatBalanceInsideSurf(EnergyPlusData &state, Real64 TH12, i EnergyPlus::format(R"(Temperature (low) out of bounds [{:.2R}] for zone="{}", for surface="{}")", TH12, zone.Name, surfName)); ShowContinueErrorTimeStamp(state, ""); if (!zone.TempOutOfBoundsReported) { - ShowContinueError(state, EnergyPlus::format("Zone=\"{}\", Diagnostic Details:", zone.Name)); + ShowContinueError(state, std::format("Zone=\"{}\", Diagnostic Details:", zone.Name)); if (zone.FloorArea > 0.0) { ShowContinueError(state, EnergyPlus::format("...Internal Heat Gain [{:.3R}] W/m2", zone.InternalHeatGains / zone.FloorArea)); @@ -9345,7 +9344,7 @@ void TestSurfTempCalcHeatBalanceInsideSurf(EnergyPlusData &state, Real64 TH12, i R"(Temperature (high) out of bounds ({:.2R}] for zone="{}", for surface="{}")", TH12, zone.Name, surfName)); ShowContinueErrorTimeStamp(state, ""); if (!zone.TempOutOfBoundsReported) { - ShowContinueError(state, EnergyPlus::format("Zone=\"{}\", Diagnostic Details:", zone.Name)); + ShowContinueError(state, std::format("Zone=\"{}\", Diagnostic Details:", zone.Name)); if (zone.FloorArea > 0.0) { ShowContinueError(state, EnergyPlus::format("...Internal Heat Gain [{:.3R}] W/m2", zone.InternalHeatGains / zone.FloorArea)); @@ -9386,8 +9385,7 @@ void TestSurfTempCalcHeatBalanceInsideSurf(EnergyPlusData &state, Real64 TH12, i } if (zone.EnforcedReciprocity) { if (WarmupSurfTemp > 3) { - ShowSevereError(state, - EnergyPlus::format("CalcHeatBalanceInsideSurf: Zone=\"{}\" has view factor enforced reciprocity", zone.Name)); + ShowSevereError(state, std::format("CalcHeatBalanceInsideSurf: Zone=\"{}\" has view factor enforced reciprocity", zone.Name)); ShowContinueError(state, " and is having temperature out of bounds errors. Please correct zone geometry and rerun."); ShowFatalError(state, "CalcHeatBalanceInsideSurf: Program terminates due to preceding conditions."); } @@ -9404,7 +9402,7 @@ void TestSurfTempCalcHeatBalanceInsideSurf(EnergyPlusData &state, Real64 TH12, i EnergyPlus::format(R"(Temperature (low) out of bounds [{:.2R}] for zone="{}", for surface="{}")", TH12, zone.Name, surfName)); ShowContinueErrorTimeStamp(state, ""); if (!zone.TempOutOfBoundsReported) { - ShowContinueError(state, EnergyPlus::format("Zone=\"{}\", Diagnostic Details:", zone.Name)); + ShowContinueError(state, std::format("Zone=\"{}\", Diagnostic Details:", zone.Name)); if (zone.FloorArea > 0.0) { ShowContinueError(state, EnergyPlus::format("...Internal Heat Gain [{:.3R}] W/m2", zone.InternalHeatGains / zone.FloorArea)); } else { @@ -9431,7 +9429,7 @@ void TestSurfTempCalcHeatBalanceInsideSurf(EnergyPlusData &state, Real64 TH12, i EnergyPlus::format(R"(Temperature (high) out of bounds [{:.2R}] for zone="{}", for surface="{}")", TH12, zone.Name, surfName)); ShowContinueErrorTimeStamp(state, ""); if (!zone.TempOutOfBoundsReported) { - ShowContinueError(state, EnergyPlus::format("Zone=\"{}\", Diagnostic Details:", zone.Name)); + ShowContinueError(state, std::format("Zone=\"{}\", Diagnostic Details:", zone.Name)); if (zone.FloorArea > 0.0) { ShowContinueError(state, EnergyPlus::format("...Internal Heat Gain [{:.3R}] W/m2", zone.InternalHeatGains / zone.FloorArea)); } else { @@ -9735,10 +9733,10 @@ void CalcOutsideSurfTemp(EnergyPlusData &state, auto &s_mat = state.dataMaterial; // Note: if movable insulation is ever added back in correctly, the heat balance equations above must be fixed ShowSevereError(state, "Exterior movable insulation is not valid with embedded sources/sinks"); - ShowContinueError(state, EnergyPlus::format("Construction {} contains an internal source or sink but also uses", construct.Name)); + ShowContinueError(state, std::format("Construction {} contains an internal source or sink but also uses", construct.Name)); ShowContinueError(state, - EnergyPlus::format("exterior movable insulation {} for a surface with that construction.", - s_mat->materials(state.dataSurface->extMovInsuls(SurfNum).matNum)->Name)); + std::format("exterior movable insulation {} for a surface with that construction.", + s_mat->materials(state.dataSurface->extMovInsuls(SurfNum).matNum)->Name)); ShowContinueError(state, "This is not currently allowed because the heat balance equations do not currently accommodate this combination."); ErrorFlag = true; @@ -9946,7 +9944,7 @@ void InitSurfacePropertyViewFactors(EnergyPlusData &state) // Check if the sum of all defined view factors > 1.0 if (SrdSurfsViewFactor > 1.0) { - ShowSevereError(state, EnergyPlus::format("Illegal surrounding surfaces view factors for {}.", Surface.Name)); + ShowSevereError(state, std::format("Illegal surrounding surfaces view factors for {}.", Surface.Name)); ShowContinueError(state, " The sum of sky, ground, and all surrounding surfaces view factors should be less than or equal to 1.0."); } if (IsSkyViewFactorSet && IsGroundViewFactorSet) { diff --git a/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc b/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc index 9cd314619af..1dce5b5455d 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc +++ b/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -685,7 +686,7 @@ void GshpPeCoolingSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad) ShowSevereError(state, EnergyPlus::format("{}=\"{}\" Cooling Source Side Pressure Less than the Design Minimum", ModuleCompName, this->Name)); ShowContinueError(state, - EnergyPlus::format("Cooling Source Side Pressure={:.2T} and user specified Design Minimum Pressure={:.2T}", + EnergyPlus::format("Cooling Source Side Pressure={:.2f} and user specified Design Minimum Pressure={:.2f}", SourceSidePressure, this->LowPressCutoff)); ShowContinueErrorTimeStamp(state, ""); @@ -696,7 +697,7 @@ void GshpPeCoolingSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad) ShowSevereError(state, EnergyPlus::format("{}=\"{}\" Cooling Load Side Pressure greater than the Design Maximum", ModuleCompName, this->Name)); ShowContinueError(state, - EnergyPlus::format("Cooling Load Side Pressure={:.2T} and user specified Design Maximum Pressure={:.2T}", + EnergyPlus::format("Cooling Load Side Pressure={:.2f} and user specified Design Maximum Pressure={:.2f}", LoadSidePressure, this->HighPressCutoff)); ShowContinueErrorTimeStamp(state, ""); @@ -709,21 +710,19 @@ void GshpPeCoolingSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad) if (SuctionPr < this->LowPressCutoff) { ShowSevereError(state, EnergyPlus::format("{}=\"{}\" Cooling Suction Pressure Less than the Design Minimum", ModuleCompName, this->Name)); - ShowContinueError(state, - EnergyPlus::format("Cooling Suction Pressure={:.2T} and user specified Design Minimum Pressure={:.2T}", - SuctionPr, - this->LowPressCutoff)); + ShowContinueError( + state, + std::format("Cooling Suction Pressure={:.2f} and user specified Design Minimum Pressure={:.2f}", SuctionPr, this->LowPressCutoff)); ShowContinueErrorTimeStamp(state, ""); ShowFatalError(state, "Preceding Conditions cause termination."); } if (DischargePr > this->HighPressCutoff) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" Cooling Discharge Pressure greater than the Design Maximum", ModuleCompName, this->Name)); + ShowSevereError(state, std::format("{}=\"{}\" Cooling Discharge Pressure greater than the Design Maximum", ModuleCompName, this->Name)); ShowContinueError(state, - EnergyPlus::format("Cooling Discharge Pressure={:.2T} and user specified Design Maximum Pressure={:.2T}", - DischargePr, - this->HighPressCutoff)); + std::format("Cooling Discharge Pressure={:.2f} and user specified Design Maximum Pressure={:.2f}", + DischargePr, + this->HighPressCutoff)); ShowContinueErrorTimeStamp(state, ""); ShowFatalError(state, "Preceding Conditions cause termination."); } @@ -792,16 +791,16 @@ void GshpPeCoolingSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad) if (IterationCount > IterationLimit) { ShowWarningError(state, "HeatPump:WaterToWater:ParameterEstimation, Cooling did not converge"); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, EnergyPlus::format("Heatpump Name = {}", this->Name)); + ShowContinueError(state, std::format("Heatpump Name = {}", this->Name)); ShowContinueError(state, - EnergyPlus::format("Heat Imbalance (%) = {}", - std::abs(100.0 * (this->QSource - initialQSource) / (initialQSource + SmallNum)))); - ShowContinueError(state, EnergyPlus::format("Load-side heat transfer rate = {}", this->QLoad)); - ShowContinueError(state, EnergyPlus::format("Source-side heat transfer rate = {}", this->QSource)); - ShowContinueError(state, EnergyPlus::format("Source-side mass flow rate = {}", this->SourceSideWaterMassFlowRate)); - ShowContinueError(state, EnergyPlus::format("Load-side mass flow rate = {}", this->LoadSideWaterMassFlowRate)); - ShowContinueError(state, EnergyPlus::format("Source-side inlet temperature = {}", this->SourceSideWaterInletTemp)); - ShowContinueError(state, EnergyPlus::format("Load-side inlet temperature = {}", this->LoadSideWaterInletTemp)); + std::format("Heat Imbalance (%) = {}", + std::abs(100.0 * (this->QSource - initialQSource) / (initialQSource + SmallNum)))); + ShowContinueError(state, std::format("Load-side heat transfer rate = {}", this->QLoad)); + ShowContinueError(state, std::format("Source-side heat transfer rate = {}", this->QSource)); + ShowContinueError(state, std::format("Source-side mass flow rate = {}", this->SourceSideWaterMassFlowRate)); + ShowContinueError(state, std::format("Load-side mass flow rate = {}", this->LoadSideWaterMassFlowRate)); + ShowContinueError(state, std::format("Source-side inlet temperature = {}", this->SourceSideWaterInletTemp)); + ShowContinueError(state, std::format("Load-side inlet temperature = {}", this->LoadSideWaterInletTemp)); } goto LOOPSourceEnth_exit; diff --git a/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc b/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc index 3c790de8979..f25f61ea561 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc +++ b/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -640,7 +641,7 @@ void GshpPeHeatingSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad) ShowSevereError(state, EnergyPlus::format("{}=\"{}\" Heating Source Side Pressure Less than the Design Minimum", ModuleCompName, this->Name)); ShowContinueError(state, - EnergyPlus::format("Source Side Pressure={:.2T} and user specified Design Minimum Pressure={:.2T}", + EnergyPlus::format("Source Side Pressure={:.2f} and user specified Design Minimum Pressure={:.2f}", SourceSidePressure, this->LowPressCutoff)); ShowFatalError(state, "Preceding Conditions cause termination."); @@ -648,10 +649,9 @@ void GshpPeHeatingSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad) if (LoadSidePressure > this->HighPressCutoff) { ShowSevereError(state, EnergyPlus::format("{}=\"{}\" Heating Load Side Pressure greater than the Design Maximum", ModuleCompName, this->Name)); - ShowContinueError(state, - EnergyPlus::format("Load Side Pressure={:.2T} and user specified Design Maximum Pressure={:.2T}", - LoadSidePressure, - this->HighPressCutoff)); + ShowContinueError( + state, + std::format("Load Side Pressure={:.2f} and user specified Design Maximum Pressure={:.2f}", LoadSidePressure, this->HighPressCutoff)); ShowFatalError(state, "Preceding Conditions cause termination."); } @@ -661,20 +661,18 @@ void GshpPeHeatingSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad) Real64 DischargePr = LoadSidePressure + this->CompSucPressDrop; // check cutoff pressures if (SuctionPr < this->LowPressCutoff) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" Heating Suction Pressure Less than the Design Minimum", ModuleCompName, this->Name)); - ShowContinueError(state, - EnergyPlus::format("Heating Suction Pressure={:.2T} and user specified Design Minimum Pressure={:.2T}", - SuctionPr, - this->LowPressCutoff)); + ShowSevereError(state, std::format("{}=\"{}\" Heating Suction Pressure Less than the Design Minimum", ModuleCompName, this->Name)); + ShowContinueError( + state, + std::format("Heating Suction Pressure={:.2f} and user specified Design Minimum Pressure={:.2f}", SuctionPr, this->LowPressCutoff)); ShowFatalError(state, "Preceding Conditions cause termination."); } if (DischargePr > this->HighPressCutoff) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" Heating Discharge Pressure greater than the Design Maximum", ModuleCompName, this->Name)); + ShowSevereError(state, std::format("{}=\"{}\" Heating Discharge Pressure greater than the Design Maximum", ModuleCompName, this->Name)); ShowContinueError(state, - EnergyPlus::format("Heating Discharge Pressure={:.2T} and user specified Design Maximum Pressure={:.2T}", - DischargePr, - this->HighPressCutoff)); + std::format("Heating Discharge Pressure={:.2f} and user specified Design Maximum Pressure={:.2f}", + DischargePr, + this->HighPressCutoff)); ShowFatalError(state, "Preceding Conditions cause termination."); } @@ -736,18 +734,18 @@ void GshpPeHeatingSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad) // convergence and iteration limit check if (std::abs((this->QLoad - initialQLoad) / (initialQLoad + SmallNum)) < HeatBalTol || IterationCount > IterationLimit) { if (IterationCount > IterationLimit) { - ShowWarningError(state, EnergyPlus::format("{} did not converge", ModuleCompName)); + ShowWarningError(state, std::format("{} did not converge", ModuleCompName)); ShowContinueErrorTimeStamp(state, ""); - ShowContinueError(state, EnergyPlus::format("Heatpump Name = {}", this->Name)); - ShowContinueError(state, - EnergyPlus::format("Heat Imbalance (%) = {:G}", - std::abs(100.0 * (this->QLoad - initialQLoad) / (initialQLoad + SmallNum)))); - ShowContinueError(state, EnergyPlus::format("Load-side heat transfer rate = {:G}", this->QLoad)); - ShowContinueError(state, EnergyPlus::format("Source-side heat transfer rate = {:G}", this->QSource)); - ShowContinueError(state, EnergyPlus::format("Source-side mass flow rate = {:G}", this->SourceSideWaterMassFlowRate)); - ShowContinueError(state, EnergyPlus::format("Load-side mass flow rate = {:G}", this->LoadSideWaterMassFlowRate)); - ShowContinueError(state, EnergyPlus::format("Source-side inlet temperature = {:G}", this->SourceSideWaterInletTemp)); - ShowContinueError(state, EnergyPlus::format("Load-side inlet temperature = {:G}", this->LoadSideWaterInletTemp)); + ShowContinueError(state, std::format("Heatpump Name = {}", this->Name)); + ShowContinueError( + state, + std::format("Heat Imbalance (%) = {:G}", std::abs(100.0 * (this->QLoad - initialQLoad) / (initialQLoad + SmallNum)))); + ShowContinueError(state, std::format("Load-side heat transfer rate = {:G}", this->QLoad)); + ShowContinueError(state, std::format("Source-side heat transfer rate = {:G}", this->QSource)); + ShowContinueError(state, std::format("Source-side mass flow rate = {:G}", this->SourceSideWaterMassFlowRate)); + ShowContinueError(state, std::format("Load-side mass flow rate = {:G}", this->LoadSideWaterMassFlowRate)); + ShowContinueError(state, std::format("Source-side inlet temperature = {:G}", this->SourceSideWaterInletTemp)); + ShowContinueError(state, std::format("Load-side inlet temperature = {:G}", this->LoadSideWaterInletTemp)); } goto LOOPLoadEnth_exit; diff --git a/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc b/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc index ab91cb3e474..5adea5fb233 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc +++ b/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc @@ -47,13 +47,13 @@ // C++ Headers #include +#include // EnergyPlus Headers #include #include #include #include -#include #include #include #include @@ -68,7 +68,6 @@ #include #include #include -#include #include #include @@ -1619,12 +1618,12 @@ void GshpSpecs::CalcWatertoWaterHPCooling(EnergyPlusData &state, Real64 const My if (this->CoolCapNegativeCounter < 1) { ++this->CoolCapNegativeCounter; ShowWarningError(state, EnergyPlus::format("{} \"{}\":", HPEqFitCooling, this->Name)); - ShowContinueError(state, EnergyPlus::format(" Cooling capacity curve output is <= 0.0 ({:.4T}).", QLoad)); + ShowContinueError(state, EnergyPlus::format(" Cooling capacity curve output is <= 0.0 ({:.4f}).", QLoad)); ShowContinueError( - state, EnergyPlus::format(" Zero or negative value occurs with a load-side inlet temperature of {:.2T} C,", LoadSideInletTemp)); - ShowContinueError(state, EnergyPlus::format(" a source-side inlet temperature of {:.2T} C,", SourceSideInletTemp)); - ShowContinueError(state, EnergyPlus::format(" a load-side mass flow rate of {:.3T} kg/s,", LoadSideMassFlowRate)); - ShowContinueError(state, EnergyPlus::format(" and a source-side mass flow rate of {:.3T} kg/s.", SourceSideMassFlowRate)); + state, EnergyPlus::format(" Zero or negative value occurs with a load-side inlet temperature of {:.2f} C,", LoadSideInletTemp)); + ShowContinueError(state, EnergyPlus::format(" a source-side inlet temperature of {:.2f} C,", SourceSideInletTemp)); + ShowContinueError(state, std::format(" a load-side mass flow rate of {:.3f} kg/s,", LoadSideMassFlowRate)); + ShowContinueError(state, std::format(" and a source-side mass flow rate of {:.3f} kg/s.", SourceSideMassFlowRate)); ShowContinueErrorTimeStamp(state, " The heat pump is turned off for this time step but simulation continues."); } else { ShowRecurringWarningErrorAtEnd(state, @@ -1638,13 +1637,13 @@ void GshpSpecs::CalcWatertoWaterHPCooling(EnergyPlusData &state, Real64 const My if (Power <= 0.0) { if (this->CoolPowerNegativeCounter < 1) { ++this->CoolPowerNegativeCounter; - ShowWarningError(state, EnergyPlus::format("{} \"{}\":", HPEqFitCooling, this->Name)); - ShowContinueError(state, EnergyPlus::format(" Cooling compressor power curve output is <= 0.0 ({:.4T}).", Power)); - ShowContinueError( - state, EnergyPlus::format(" Zero or negative value occurs with a load-side inlet temperature of {:.2T} C,", LoadSideInletTemp)); - ShowContinueError(state, EnergyPlus::format(" a source-side inlet temperature of {:.2T} C,", SourceSideInletTemp)); - ShowContinueError(state, EnergyPlus::format(" a load-side mass flow rate of {:.3T} kg/s,", LoadSideMassFlowRate)); - ShowContinueError(state, EnergyPlus::format(" and a source-side mass flow rate of {:.3T} kg/s.", SourceSideMassFlowRate)); + ShowWarningError(state, std::format("{} \"{}\":", HPEqFitCooling, this->Name)); + ShowContinueError(state, std::format(" Cooling compressor power curve output is <= 0.0 ({:.4f}).", Power)); + ShowContinueError(state, + std::format(" Zero or negative value occurs with a load-side inlet temperature of {:.2f} C,", LoadSideInletTemp)); + ShowContinueError(state, std::format(" a source-side inlet temperature of {:.2f} C,", SourceSideInletTemp)); + ShowContinueError(state, std::format(" a load-side mass flow rate of {:.3f} kg/s,", LoadSideMassFlowRate)); + ShowContinueError(state, std::format(" and a source-side mass flow rate of {:.3f} kg/s.", SourceSideMassFlowRate)); ShowContinueErrorTimeStamp(state, " The heat pump is turned off for this time step but simulation continues."); } else { ShowRecurringWarningErrorAtEnd(state, @@ -1767,13 +1766,13 @@ void GshpSpecs::CalcWatertoWaterHPHeating(EnergyPlusData &state, Real64 const My if (QLoad <= 0.0) { if (this->HeatCapNegativeCounter < 1) { ++this->HeatCapNegativeCounter; - ShowWarningError(state, EnergyPlus::format("{} \"{}\":", HPEqFitHeating, this->Name)); - ShowContinueError(state, EnergyPlus::format(" Heating capacity curve output is <= 0.0 ({:.4T}).", QLoad)); - ShowContinueError( - state, EnergyPlus::format(" Zero or negative value occurs with a load-side inlet temperature of {:.2T} C,", LoadSideInletTemp)); - ShowContinueError(state, EnergyPlus::format(" a source-side inlet temperature of {:.2T} C,", SourceSideInletTemp)); - ShowContinueError(state, EnergyPlus::format(" a load-side mass flow rate of {:.3T} kg/s,", LoadSideMassFlowRate)); - ShowContinueError(state, EnergyPlus::format(" and a source-side mass flow rate of {:.3T} kg/s.", SourceSideMassFlowRate)); + ShowWarningError(state, std::format("{} \"{}\":", HPEqFitHeating, this->Name)); + ShowContinueError(state, std::format(" Heating capacity curve output is <= 0.0 ({:.4f}).", QLoad)); + ShowContinueError(state, + std::format(" Zero or negative value occurs with a load-side inlet temperature of {:.2f} C,", LoadSideInletTemp)); + ShowContinueError(state, std::format(" a source-side inlet temperature of {:.2f} C,", SourceSideInletTemp)); + ShowContinueError(state, std::format(" a load-side mass flow rate of {:.3f} kg/s,", LoadSideMassFlowRate)); + ShowContinueError(state, std::format(" and a source-side mass flow rate of {:.3f} kg/s.", SourceSideMassFlowRate)); ShowContinueErrorTimeStamp(state, " The heat pump is turned off for this time step but simulation continues."); } else { ShowRecurringWarningErrorAtEnd(state, @@ -1787,13 +1786,13 @@ void GshpSpecs::CalcWatertoWaterHPHeating(EnergyPlusData &state, Real64 const My if (Power <= 0.0) { if (this->HeatPowerNegativeCounter < 1) { ++this->HeatPowerNegativeCounter; - ShowWarningError(state, EnergyPlus::format("{} \"{}\":", HPEqFitHeating, this->Name)); - ShowContinueError(state, EnergyPlus::format(" Heating compressor power curve output is <= 0.0 ({:.4T}).", Power)); - ShowContinueError( - state, EnergyPlus::format(" Zero or negative value occurs with a load-side inlet temperature of {:.2T} C,", LoadSideInletTemp)); - ShowContinueError(state, EnergyPlus::format(" a source-side inlet temperature of {:.2T} C,", SourceSideInletTemp)); - ShowContinueError(state, EnergyPlus::format(" a load-side mass flow rate of {:.3T} kg/s,", LoadSideMassFlowRate)); - ShowContinueError(state, EnergyPlus::format(" and a source-side mass flow rate of {:.3T} kg/s.", SourceSideMassFlowRate)); + ShowWarningError(state, std::format("{} \"{}\":", HPEqFitHeating, this->Name)); + ShowContinueError(state, std::format(" Heating compressor power curve output is <= 0.0 ({:.4f}).", Power)); + ShowContinueError(state, + std::format(" Zero or negative value occurs with a load-side inlet temperature of {:.2f} C,", LoadSideInletTemp)); + ShowContinueError(state, std::format(" a source-side inlet temperature of {:.2f} C,", SourceSideInletTemp)); + ShowContinueError(state, std::format(" a load-side mass flow rate of {:.3f} kg/s,", LoadSideMassFlowRate)); + ShowContinueError(state, std::format(" and a source-side mass flow rate of {:.3f} kg/s.", SourceSideMassFlowRate)); ShowContinueErrorTimeStamp(state, " The heat pump is turned off for this time step but simulation continues."); } else { ShowRecurringWarningErrorAtEnd(state, diff --git a/src/EnergyPlus/HeatRecovery.cc b/src/EnergyPlus/HeatRecovery.cc index 3e8e34d740f..b4a586faf9f 100644 --- a/src/EnergyPlus/HeatRecovery.cc +++ b/src/EnergyPlus/HeatRecovery.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -760,7 +761,7 @@ namespace HeatRecovery { thisPerfData.T_MinProcAirInTemp = state.dataIPShortCut->rNumericArgs(18); thisPerfData.T_MaxProcAirInTemp = state.dataIPShortCut->rNumericArgs(19); if (thisPerfData.T_MinProcAirInTemp >= thisPerfData.T_MaxProcAirInTemp) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min/max boundary for the regen outlet air temperature equation."); ShowContinueError(state, "... the minimum value of process inlet air temperature must be less than the maximum."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.T_MinProcAirInTemp)); @@ -771,7 +772,7 @@ namespace HeatRecovery { thisPerfData.T_MinFaceVel = state.dataIPShortCut->rNumericArgs(20); thisPerfData.T_MaxFaceVel = state.dataIPShortCut->rNumericArgs(21); if (thisPerfData.T_MinFaceVel >= thisPerfData.T_MaxFaceVel) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min/max boundary for the regen outlet air temperature equation."); ShowContinueError(state, "... the minimum value of regen air velocity must be less than the maximum."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.T_MinFaceVel)); @@ -782,7 +783,7 @@ namespace HeatRecovery { thisPerfData.MinRegenAirOutTemp = state.dataIPShortCut->rNumericArgs(22); thisPerfData.MaxRegenAirOutTemp = state.dataIPShortCut->rNumericArgs(23); if (thisPerfData.MinRegenAirOutTemp >= thisPerfData.MaxRegenAirOutTemp) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min/max boundary for the regen outlet air temperature equation."); ShowContinueError(state, "... the minimum value of regen outlet air temperature must be less than the maximum."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.MinRegenAirOutTemp)); @@ -793,7 +794,7 @@ namespace HeatRecovery { thisPerfData.T_MinRegenAirInRelHum = state.dataIPShortCut->rNumericArgs(24) / 100.0; thisPerfData.T_MaxRegenAirInRelHum = state.dataIPShortCut->rNumericArgs(25) / 100.0; if (thisPerfData.T_MinRegenAirInRelHum >= thisPerfData.T_MaxRegenAirInRelHum) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min/max boundary for the regen outlet air temperature equation."); ShowContinueError(state, "... the minimum value of regen inlet air relative humidity must be less than the maximum."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.T_MinRegenAirInRelHum * 100.0)); @@ -801,14 +802,14 @@ namespace HeatRecovery { ErrorsFound = true; } if (thisPerfData.T_MinRegenAirInRelHum < 0.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min boundary for the regen outlet air temperature equation."); ShowContinueError(state, "... the minimum value of regen inlet air relative humidity must be greater than or equal to 0."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.T_MinRegenAirInRelHum * 100.0)); ErrorsFound = true; } if (thisPerfData.T_MaxRegenAirInRelHum > 1.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in max boundary for the regen outlet air temperature equation."); ShowContinueError(state, "... the maximum value of regen inlet air relative humidity must be less than or equal to 100."); ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.T_MaxRegenAirInRelHum * 100.0)); @@ -818,7 +819,7 @@ namespace HeatRecovery { thisPerfData.T_MinProcAirInRelHum = state.dataIPShortCut->rNumericArgs(26) / 100.0; thisPerfData.T_MaxProcAirInRelHum = state.dataIPShortCut->rNumericArgs(27) / 100.0; if (thisPerfData.T_MinProcAirInRelHum >= thisPerfData.T_MaxProcAirInRelHum) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min/max boundary for the regen outlet air temperature equation."); ShowContinueError(state, "... the minimum value of process inlet air relative humidity must be less than the maximum."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.T_MinProcAirInRelHum * 100.0)); @@ -826,14 +827,14 @@ namespace HeatRecovery { ErrorsFound = true; } if (thisPerfData.T_MinProcAirInRelHum < 0.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min boundary for the regen outlet air temperature equation."); ShowContinueError(state, "... the minimum value of process inlet air relative humidity must be greater than or equal to 0."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.T_MinProcAirInRelHum * 100.0)); ErrorsFound = true; } if (thisPerfData.T_MaxProcAirInRelHum > 1.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in max boundary for the regen outlet air temperature equation."); ShowContinueError(state, "... the maximum value of process inlet air relative humidity must be less than or equal to 100."); ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.T_MaxProcAirInRelHum * 100.0)); @@ -849,7 +850,7 @@ namespace HeatRecovery { thisPerfData.H_MinRegenAirInHumRat = state.dataIPShortCut->rNumericArgs(36); thisPerfData.H_MaxRegenAirInHumRat = state.dataIPShortCut->rNumericArgs(37); if (thisPerfData.H_MinRegenAirInHumRat >= thisPerfData.H_MaxRegenAirInHumRat) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min/max boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the minimum value of regeneration inlet air humidity ratio must be less than the maximum."); ShowContinueError(state, EnergyPlus::format("... minimum value entered by user = {:.6R}", thisPerfData.H_MinRegenAirInHumRat)); @@ -857,14 +858,14 @@ namespace HeatRecovery { ErrorsFound = true; } if (thisPerfData.H_MinRegenAirInHumRat < 0.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the minimum value of regeneration inlet air humidity ratio must be greater than or equal to 0."); ShowContinueError(state, EnergyPlus::format("... minimum value entered by user = {:.6R}", thisPerfData.H_MinRegenAirInHumRat)); ErrorsFound = true; } if (thisPerfData.H_MaxRegenAirInHumRat > 1.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in max boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the maximum value of regeneration inlet air humidity ratio must be less than or equal to 1."); ShowContinueError(state, EnergyPlus::format("... maximum value entered by user = {:.6R}", thisPerfData.H_MaxRegenAirInHumRat)); @@ -874,7 +875,7 @@ namespace HeatRecovery { thisPerfData.H_MinRegenAirInTemp = state.dataIPShortCut->rNumericArgs(38); thisPerfData.H_MaxRegenAirInTemp = state.dataIPShortCut->rNumericArgs(39); if (thisPerfData.H_MinRegenAirInTemp >= thisPerfData.H_MaxRegenAirInTemp) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min/max boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the minimum value of regeneration inlet air temperature must be less than the maximum."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.H_MinRegenAirInTemp)); @@ -885,7 +886,7 @@ namespace HeatRecovery { thisPerfData.H_MinProcAirInHumRat = state.dataIPShortCut->rNumericArgs(40); thisPerfData.H_MaxProcAirInHumRat = state.dataIPShortCut->rNumericArgs(41); if (thisPerfData.H_MinProcAirInHumRat >= thisPerfData.H_MaxProcAirInHumRat) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min/max boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the minimum value of process inlet air humidity ratio must be less than the maximum."); ShowContinueError(state, EnergyPlus::format("... minimum value entered by user = {:.6R}", thisPerfData.H_MinProcAirInHumRat)); @@ -893,14 +894,14 @@ namespace HeatRecovery { ErrorsFound = true; } if (thisPerfData.H_MinProcAirInHumRat < 0.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the minimum value of process inlet air humidity ratio must be greater than or equal to 0."); ShowContinueError(state, EnergyPlus::format("... minimum value entered by user = {:.6R}", thisPerfData.H_MinProcAirInHumRat)); ErrorsFound = true; } if (thisPerfData.H_MaxProcAirInHumRat > 1.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in max boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the maximum value of process inlet air humidity ratio must be less than or equal to 1."); ShowContinueError(state, EnergyPlus::format("... maximum value entered by user = {:.6R}", thisPerfData.H_MaxProcAirInHumRat)); @@ -910,7 +911,7 @@ namespace HeatRecovery { thisPerfData.H_MinProcAirInTemp = state.dataIPShortCut->rNumericArgs(42); thisPerfData.H_MaxProcAirInTemp = state.dataIPShortCut->rNumericArgs(43); if (thisPerfData.H_MinProcAirInTemp >= thisPerfData.H_MaxProcAirInTemp) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min/max boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the minimum value of process inlet air temperature must be less than the maximum."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.H_MinProcAirInTemp)); @@ -921,7 +922,7 @@ namespace HeatRecovery { thisPerfData.H_MinFaceVel = state.dataIPShortCut->rNumericArgs(44); thisPerfData.H_MaxFaceVel = state.dataIPShortCut->rNumericArgs(45); if (thisPerfData.H_MinFaceVel >= thisPerfData.H_MaxFaceVel) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min/max boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the minimum value of regen air velocity must be less than the maximum."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.H_MinFaceVel)); @@ -932,7 +933,7 @@ namespace HeatRecovery { thisPerfData.MinRegenAirOutHumRat = state.dataIPShortCut->rNumericArgs(46); thisPerfData.MaxRegenAirOutHumRat = state.dataIPShortCut->rNumericArgs(47); if (thisPerfData.MinRegenAirOutHumRat >= thisPerfData.MaxRegenAirOutHumRat) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min/max boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the minimum value of regen outlet air humidity ratio must be less than the maximum."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.MinRegenAirOutHumRat)); @@ -940,14 +941,14 @@ namespace HeatRecovery { ErrorsFound = true; } if (thisPerfData.MinRegenAirOutHumRat < 0.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the minimum value of regen outlet air humidity ratio must be greater than or equal to 0."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.MinRegenAirOutHumRat)); ErrorsFound = true; } if (thisPerfData.MaxRegenAirOutHumRat > 1.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in max boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the maximum value of regen outlet air humidity ratio must be less or equal to 1."); ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.MaxRegenAirOutHumRat)); @@ -957,7 +958,7 @@ namespace HeatRecovery { thisPerfData.H_MinRegenAirInRelHum = state.dataIPShortCut->rNumericArgs(48) / 100.0; thisPerfData.H_MaxRegenAirInRelHum = state.dataIPShortCut->rNumericArgs(49) / 100.0; if (thisPerfData.H_MinRegenAirInRelHum >= thisPerfData.H_MaxRegenAirInRelHum) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min/max boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the minimum value of regen inlet air relative humidity must be less than the maximum."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.H_MinRegenAirInRelHum * 100.0)); @@ -965,14 +966,14 @@ namespace HeatRecovery { ErrorsFound = true; } if (thisPerfData.H_MinRegenAirInRelHum < 0.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the minimum value of regen inlet air relative humidity must be greater than or equal to 0."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.H_MinRegenAirInRelHum * 100.0)); ErrorsFound = true; } if (thisPerfData.H_MaxRegenAirInRelHum > 1.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in max boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the maximum value of regen inlet air relative humidity must be less or equal to 100."); ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.H_MaxRegenAirInRelHum * 100.0)); @@ -982,7 +983,7 @@ namespace HeatRecovery { thisPerfData.H_MinProcAirInRelHum = state.dataIPShortCut->rNumericArgs(50) / 100.0; thisPerfData.H_MaxProcAirInRelHum = state.dataIPShortCut->rNumericArgs(51) / 100.0; if (thisPerfData.H_MinProcAirInRelHum >= thisPerfData.H_MaxProcAirInRelHum) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min/max boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the minimum value of process inlet air relative humidity must be less than the maximum."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.H_MinProcAirInRelHum * 100.0)); @@ -990,14 +991,14 @@ namespace HeatRecovery { ErrorsFound = true; } if (thisPerfData.H_MinProcAirInRelHum < 0.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in min boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the minimum value of process inlet air relative humidity must be greater than or equal to 0."); ShowContinueError(state, EnergyPlus::format("... minimum value entered = {:.6R}", thisPerfData.H_MinProcAirInRelHum * 100.0)); ErrorsFound = true; } if (thisPerfData.H_MaxProcAirInRelHum > 1.0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); + ShowSevereError(state, std::format("{} \"{}\"", cCurrentModuleObject, thisPerfData.Name)); ShowContinueError(state, "Error found in max boundary for the regen outlet air humidity ratio equation."); ShowContinueError(state, "... the maximum value of process inlet air relative humidity must be less than or equal to 100."); ShowContinueError(state, EnergyPlus::format("... maximum value entered = {:.6R}", thisPerfData.H_MaxProcAirInRelHum * 100.0)); @@ -1017,8 +1018,8 @@ namespace HeatRecovery { } } if (thisExchanger.PerfDataIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", HVAC::hxTypeNames[(int)thisExchanger.type], thisExchanger.Name)); - ShowContinueError(state, EnergyPlus::format("... Performance data set not found = {}", thisExchanger.HeatExchPerfName)); + ShowSevereError(state, std::format("{} \"{}\"", HVAC::hxTypeNames[(int)thisExchanger.type], thisExchanger.Name)); + ShowContinueError(state, std::format("... Performance data set not found = {}", thisExchanger.HeatExchPerfName)); ErrorsFound = true; } else { if (!ErrorsFound) { @@ -1188,7 +1189,7 @@ namespace HeatRecovery { } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Program terminates.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in input. Program terminates.", RoutineName)); } } @@ -1258,7 +1259,7 @@ namespace HeatRecovery { break; // great! case CalculateNTUBoundsErrors::MassFlowRatio: FatalError = true; - ShowSevereError(state, EnergyPlus::format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); + ShowSevereError(state, std::format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); ShowContinueError(state, " the mass flow ratio is out of bounds"); ShowContinueError(state, EnergyPlus::format("The mass flow ratio is (Min_Mass_Flow_Rate / Max_Mass_Flow_Rate) = {:.2R}", Z)); ShowContinueError(state, "The mass flow ratio should be >= 0.0 and <= 1.0"); @@ -1273,7 +1274,7 @@ namespace HeatRecovery { break; case CalculateNTUBoundsErrors::NominalEffectiveness1: FatalError = true; - ShowSevereError(state, EnergyPlus::format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); + ShowSevereError(state, std::format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); ShowContinueError(state, " the calculated nominal effectiveness is out of bounds"); ShowContinueError(state, EnergyPlus::format("The effectiveness is {:.3R}", Eps0)); ShowContinueError(state, EnergyPlus::format("The effectiveness should be >= 0.0 and <= {:.3R}", 1.0 / (1.0 + Z))); @@ -1285,7 +1286,7 @@ namespace HeatRecovery { break; case CalculateNTUBoundsErrors::NominalEffectiveness2: FatalError = true; - ShowSevereError(state, EnergyPlus::format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); + ShowSevereError(state, std::format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); ShowContinueError(state, " the calculated nominal effectiveness is out of bounds"); ShowContinueError(state, EnergyPlus::format("The effectiveness is {:.3R}", Eps0)); ShowContinueError(state, EnergyPlus::format("The effectiveness should be >= 0.0 and <= {:.3R}", (1.0 - std::exp(-Z)) / Z)); @@ -1297,7 +1298,7 @@ namespace HeatRecovery { break; case CalculateNTUBoundsErrors::Quantity: FatalError = true; - ShowSevereError(state, EnergyPlus::format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); + ShowSevereError(state, std::format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); ShowContinueError(state, " the quantity Eff_nom*(Min_Mass_Flow_Rate / Max_Mass_Flow_Rate) is out of bounds"); ShowContinueError(state, EnergyPlus::format("The value is {:.3R}", Eps0 * Z)); ShowContinueError(state, EnergyPlus::format("The value should be >= 0.0 and <= {:.3R}", 1.0 - std::exp(Z * (SMALL - 1.0)))); @@ -1312,7 +1313,7 @@ namespace HeatRecovery { break; case CalculateNTUBoundsErrors::NominalEffectiveness3: FatalError = true; - ShowSevereError(state, EnergyPlus::format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); + ShowSevereError(state, std::format("In the HeatExchanger:AirToAir:FlatPlate component {}", this->Name)); ShowContinueError(state, " the calculated nominal effectiveness is out of bounds"); ShowContinueError(state, EnergyPlus::format("The effectiveness is {:.3R}", Eps0)); ShowContinueError(state, "The effectiveness should be >= 0.0 and <= 1.0"); @@ -1358,8 +1359,7 @@ namespace HeatRecovery { if (state.dataLoopNodes->Node(this->SupOutletNode).TempSetPoint == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError( - state, - EnergyPlus::format("Missing temperature setpoint for {} \"{}\" :", HVAC::hxTypeNames[(int)this->type], this->Name)); + state, std::format("Missing temperature setpoint for {} \"{}\" :", HVAC::hxTypeNames[(int)this->type], this->Name)); ShowContinueError( state, " use a Setpoint Manager to establish a setpoint at the supply air outlet node of the Heat Exchanger."); ShowFatalError(state, " Previous condition causes program termination."); @@ -1367,9 +1367,9 @@ namespace HeatRecovery { // need call to EMS to check node EMSManager::CheckIfNodeSetPointManagedByEMS(state, this->SupOutletNode, HVAC::CtrlVarType::Temp, FatalError); if (FatalError) { - ShowSevereError(state, - EnergyPlus::format( - "Missing temperature setpoint for {} \"{}\" :", HVAC::hxTypeNames[(int)this->type], this->Name)); + ShowSevereError( + state, + std::format("Missing temperature setpoint for {} \"{}\" :", HVAC::hxTypeNames[(int)this->type], this->Name)); ShowContinueError( state, " use a Setpoint Manager to establish a setpoint at the supply air outlet node of the Heat Exchanger."); ShowContinueError( @@ -1441,10 +1441,9 @@ namespace HeatRecovery { if (!state.dataHeatRecovery->CalledFromParentObject) { if (state.dataLoopNodes->Node(this->SecOutletNode).HumRatMax == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowWarningError(state, - EnergyPlus::format("Missing optional HumRatMax setpoint for {} \"{}\"", - HVAC::hxTypeNames[(int)this->type], - this->Name)); + ShowWarningError( + state, + std::format("Missing optional HumRatMax setpoint for {} \"{}\"", HVAC::hxTypeNames[(int)this->type], this->Name)); ShowContinueError(state, "...the simulation will continue without control of the desiccant heat exchanger to a maximum " "humidity ratio setpoint."); @@ -1459,9 +1458,9 @@ namespace HeatRecovery { state.dataLoopNodes->NodeSetpointCheck(this->SecOutletNode).needsSetpointChecking = false; if (LocalWarningError) { ShowWarningError(state, - EnergyPlus::format("Missing optional HumRatMax setpoint for {} \"{}\"", - HVAC::hxTypeNames[(int)this->type], - this->Name)); + std::format("Missing optional HumRatMax setpoint for {} \"{}\"", + HVAC::hxTypeNames[(int)this->type], + this->Name)); ShowContinueError(state, "...the simulation will continue without control of the desiccant heat exchanger to a " "maximum humidity ratio setpoint."); @@ -2090,18 +2089,17 @@ namespace HeatRecovery { if (((HXSupAirVolFlowRate / HXSecAirVolFlowRate) > 2.0) || ((HXSecAirVolFlowRate / HXSupAirVolFlowRate) > 2.0)) { ++this->UnBalancedErrCount; if (this->UnBalancedErrCount <= 2) { - ShowSevereError( - state, - EnergyPlus::format("{}: \"{}\" unbalanced air volume flow ratio through the heat exchanger is greater than 2:1.", - HVAC::hxTypeNames[(int)this->type], - this->Name)); + ShowSevereError(state, + std::format("{}: \"{}\" unbalanced air volume flow ratio through the heat exchanger is greater than 2:1.", + HVAC::hxTypeNames[(int)this->type], + this->Name)); ShowContinueErrorTimeStamp(state, EnergyPlus::format("...HX Supply air to Exhaust air flow ratio = {:.5R}.", HXSupAirVolFlowRate / HXSecAirVolFlowRate)); } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\": Unbalanced air volume flow ratio exceeds 2:1 warning continues. HX flow ratio statistics follow.", HVAC::hxTypeNames[(int)this->type], this->Name), @@ -2120,13 +2118,13 @@ namespace HeatRecovery { if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { ++this->LowFlowErrCount; if (this->LowFlowErrCount == 1) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", HVAC::hxTypeNames[(int)this->type], this->Name)); + ShowWarningError(state, std::format("{} \"{}\"", HVAC::hxTypeNames[(int)this->type], this->Name)); ShowContinueError(state, "Average air volume flow rate is <50% or >130% of the nominal HX supply air volume flow rate."); ShowContinueErrorTimeStamp(state, EnergyPlus::format("Air volume flow rate ratio = {:.3R}.", HXAirVolFlowRatio)); } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\": Average air volume flow rate is <50% or >130% warning continues. Air flow rate ratio statistics follow.", HVAC::hxTypeNames[(int)this->type], this->Name), @@ -2177,7 +2175,7 @@ namespace HeatRecovery { if (!this->SensEffectivenessFlag) { ShowWarningError( state, - EnergyPlus::format( + std::format( "HeatExchanger:AirToAir:SensibleAndLatent =\"{}\" sensible effectiveness is less than zero. Check the following inputs.", this->Name)); if (this->SupInTemp < this->SecInTemp) { @@ -2199,7 +2197,7 @@ namespace HeatRecovery { if (!this->LatEffectivenessFlag) { ShowWarningError( state, - EnergyPlus::format( + std::format( "HeatExchanger:AirToAir:SensibleAndLatent =\"{}\" latent effectiveness is less than zero. Check the following inputs.", this->Name)); if (this->SupInTemp < this->SecInTemp) { @@ -2305,9 +2303,9 @@ namespace HeatRecovery { if (!this->SensEffectivenessFlag) { ShowWarningError( state, - EnergyPlus::format("HeatExchanger:AirToAir:SensibleAndLatent =\"{}\" sensible effectiveness is less than zero. " - "Check the following inputs.", - this->Name)); + std::format("HeatExchanger:AirToAir:SensibleAndLatent =\"{}\" sensible effectiveness is less than zero. " + "Check the following inputs.", + this->Name)); if (this->SupInTemp < this->SecInTemp) { ShowContinueError(state, EnergyPlus::format("...Sensible Effectiveness at 100% Heating Air Flow = {:.2R}", @@ -2329,9 +2327,9 @@ namespace HeatRecovery { if (!this->LatEffectivenessFlag) { ShowWarningError( state, - EnergyPlus::format("HeatExchanger:AirToAir:SensibleAndLatent =\"{}\" latent effectiveness is less than zero. " - "Check the following inputs.", - this->Name)); + std::format("HeatExchanger:AirToAir:SensibleAndLatent =\"{}\" latent effectiveness is less than zero. " + "Check the following inputs.", + this->Name)); if (this->SupInTemp < this->SecInTemp) { ShowContinueError( state, @@ -3445,10 +3443,10 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Regeneration inlet air temp used in regen outlet air temperature equation is " - "out of range error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + std::format("{} \"{}\" - Regeneration inlet air temp used in regen outlet air temperature equation is " + "out of range error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInTempError.index, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInTempError.last, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInTempError.last); @@ -3465,15 +3463,14 @@ namespace HeatRecovery { "...Using regeneration inlet air humidity ratios that are outside the regeneration outlet air temperature " "equation model boundaries may adversely affect desiccant model performance."); } else { - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} \"{}\" - Regeneration inlet air humidity ratio used in regen outlet temperature " - "equation is out of range error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.index, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.last, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.last); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} \"{}\" - Regeneration inlet air humidity ratio used in regen outlet temperature " + "equation is out of range error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.last); } } // Process inlet temp for temp eqn @@ -3489,7 +3486,7 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\" - Process inlet air temperature used in regen outlet temperature equation is out of range error continues...", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), @@ -3511,10 +3508,10 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Process inlet air humidity ratio used in regen outlet temperature equation is " - "out of range error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + std::format("{} \"{}\" - Process inlet air humidity ratio used in regen outlet temperature equation is " + "out of range error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.index, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.last, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.last); @@ -3533,10 +3530,10 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Process and regen inlet air face velocity used in regen outlet temperature " - "equation is out of range error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + std::format("{} \"{}\" - Process and regen inlet air face velocity used in regen outlet temperature " + "equation is out of range error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_FaceVelError.index, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_FaceVelError.last, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_FaceVelError.last); @@ -3577,22 +3574,22 @@ namespace HeatRecovery { } if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInTempError.print = true; - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInTempError.buffer1 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInTempError.buffer1 = std::format( "{} \"{}\" - Regeneration inlet air temperature used in regen outlet air temperature equation is outside model boundaries at {}.", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, thisError.OutputChar); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInTempError.buffer2 = - EnergyPlus::format("...Valid range = {} to {}. Occurrence info = {}, {} {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); + std::format("...Valid range = {} to {}. Occurrence info = {}, {} {}", + thisError.OutputCharLo, + thisError.OutputCharHi, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state)); thisError.CharValue = EnergyPlus::format("{:.6R}", T_RegenInTemp); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInTempError.buffer3 = - EnergyPlus::format("...Regeneration outlet air temperature equation: regeneration inlet air temperature passed to the model = {}", - thisError.CharValue); + std::format("...Regeneration outlet air temperature equation: regeneration inlet air temperature passed to the model = {}", + thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInTempError.print = false; } @@ -3616,23 +3613,23 @@ namespace HeatRecovery { } if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.print = true; - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.buffer1 = EnergyPlus::format( - "{} \"{}\" - Regeneration inlet air humidity ratio used in regen outlet air temperature equation is outside model " - "boundaries at {}.", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, - thisError.OutputChar); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.buffer1 = + std::format("{} \"{}\" - Regeneration inlet air humidity ratio used in regen outlet air temperature equation is outside model " + "boundaries at {}.", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, + thisError.OutputChar); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.buffer2 = - EnergyPlus::format("...Valid range = {} to {}. Occurrence info = {}, {} {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); + std::format("...Valid range = {} to {}. Occurrence info = {}, {} {}", + thisError.OutputCharLo, + thisError.OutputCharHi, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state)); thisError.CharValue = EnergyPlus::format("{:.6R}", T_RegenInHumRat); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.buffer3 = EnergyPlus::format( - "...Regeneration outlet air temperature equation: regeneration inlet air humidity ratio passed to the model = {}", - thisError.CharValue); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.buffer3 = + std::format("...Regeneration outlet air temperature equation: regeneration inlet air humidity ratio passed to the model = {}", + thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_RegenInHumRatError.print = false; } @@ -3660,20 +3657,20 @@ namespace HeatRecovery { if (state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInTempError.last == 0.0) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInTempError.print = false; } - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInTempError.buffer1 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInTempError.buffer1 = std::format( "{} \"{}\" - Process inlet air temperature used in regen outlet air temperature equation is outside model boundaries at {}.", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, thisError.OutputChar); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInTempError.buffer2 = - EnergyPlus::format("...Valid range = {} to {}. Occurrence info = {},{} {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); + std::format("...Valid range = {} to {}. Occurrence info = {},{} {}", + thisError.OutputCharLo, + thisError.OutputCharHi, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state)); thisError.CharValue = EnergyPlus::format("{:.6R}", T_ProcInTemp); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInTempError.buffer3 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInTempError.buffer3 = std::format( "...Regeneration outlet air temperature equation: process inlet air temperature passed to the model = {}", thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInTempError.print = false; @@ -3702,22 +3699,22 @@ namespace HeatRecovery { if (state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.last == 0.0) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.print = false; } - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.buffer1 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.buffer1 = std::format( "{} \"{}\" - Process inlet air humidity ratio used in regen outlet air temperature equation is outside model boundaries at {}.", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, thisError.OutputChar); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.buffer2 = - EnergyPlus::format("...Valid range = {} to {}. Occurrence info = {}, {} {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); + std::format("...Valid range = {} to {}. Occurrence info = {}, {} {}", + thisError.OutputCharLo, + thisError.OutputCharHi, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state)); thisError.CharValue = EnergyPlus::format("{:.6R}", T_ProcInHumRat); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.buffer3 = - EnergyPlus::format("...Regeneration outlet air temperature equation: process inlet air humidity ratio passed to the model = {}", - thisError.CharValue); + std::format("...Regeneration outlet air temperature equation: process inlet air humidity ratio passed to the model = {}", + thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.print = false; } @@ -3739,21 +3736,21 @@ namespace HeatRecovery { } if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_FaceVelError.print = true; - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_FaceVelError.buffer1 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_FaceVelError.buffer1 = std::format( "{} \"{}\" - Process and regen inlet air face velocity used in regen outlet air temperature equation is outside model " "boundaries at {}.", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, thisError.OutputChar); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_FaceVelError.buffer2 = - EnergyPlus::format("...Valid range = {} to {}. Occurrence info = {}, {} {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); + std::format("...Valid range = {} to {}. Occurrence info = {}, {} {}", + thisError.OutputCharLo, + thisError.OutputCharHi, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state)); thisError.CharValue = EnergyPlus::format("{:.6R}", T_FaceVel); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_FaceVelError.buffer3 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_FaceVelError.buffer3 = std::format( "...Regeneration outlet air temperature equation: process and regen face velocity passed to the model = {}", thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_FaceVelError.print = false; @@ -3823,10 +3820,10 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Regeneration inlet air temperature used in regen outlet air humidity ratio " - "equation is out of range error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + std::format("{} \"{}\" - Regeneration inlet air temperature used in regen outlet air humidity ratio " + "equation is out of range error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.index, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.last, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.last); @@ -3845,10 +3842,10 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Regeneration inlet air humidity ratio used in regen outlet air humidity ratio " - "equation is out of range error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + std::format("{} \"{}\" - Regeneration inlet air humidity ratio used in regen outlet air humidity ratio " + "equation is out of range error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.index, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.last, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.last); @@ -3865,15 +3862,14 @@ namespace HeatRecovery { "...Using process inlet air temperatures that are outside the regeneration outlet air humidity ratio equation " "model may adversely affect desiccant model performance."); } else { - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} \"{}\" - Process inlet air temperature used in regen outlet air humidity ratio " - "equation is out of range error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInTempError.index, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInTempError.last, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInTempError.last); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} \"{}\" - Process inlet air temperature used in regen outlet air humidity ratio " + "equation is out of range error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInTempError.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInTempError.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInTempError.last); } } // Process inlet humidity ratio for humidity ratio eqn @@ -3887,15 +3883,14 @@ namespace HeatRecovery { "...Using process inlet air humidity ratios that are outside the regeneration outlet humidity ratio equation " "model boundaries may adversely affect desiccant model performance."); } else { - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} \"{}\" - Process inlet air humidity ratio used in regen outlet air humidity ratio " - "equation is out of range error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.index, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInHumRatError.last, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInHumRatError.last); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} \"{}\" - Process inlet air humidity ratio used in regen outlet air humidity ratio " + "equation is out of range error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_ProcInHumRatError.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInHumRatError.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInHumRatError.last); } } // Process and regeneration face velocity for humidity ratio eqn @@ -3909,15 +3904,14 @@ namespace HeatRecovery { "...Using process and regeneration face velocities that are outside the regeneration outlet air humidity ratio " "equation model boundaries may adversely affect desiccant model performance."); } else { - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} \"{}\" - Process and regen face velocity used in regen outlet air humidity ratio " - "equation is out of range error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.index, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.last, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.last); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} \"{}\" - Process and regen face velocity used in regen outlet air humidity ratio " + "equation is out of range error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.last); } } } // IF(CurrentEndTime .GT. CurrentEndTimeLast .AND. TimeStepSys .GE. TimeStepSysLast)THEN @@ -3955,23 +3949,23 @@ namespace HeatRecovery { } if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.print = true; - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.buffer1 = EnergyPlus::format( - "{} \"{}\" - Regeneration inlet air temperature used in regen outlet air humidity ratio equation is outside model " - "boundaries at {}.", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, - thisError.OutputChar); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.buffer1 = + std::format("{} \"{}\" - Regeneration inlet air temperature used in regen outlet air humidity ratio equation is outside model " + "boundaries at {}.", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, + thisError.OutputChar); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.buffer2 = - EnergyPlus::format("...Valid range = {} to {}. Occurrence info = {}, {} , {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); + std::format("...Valid range = {} to {}. Occurrence info = {}, {} , {}", + thisError.OutputCharLo, + thisError.OutputCharHi, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state)); thisError.CharValue = EnergyPlus::format("{:.2R}", H_RegenInTemp); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.buffer3 = EnergyPlus::format( - "...Regeneration outlet air humidity ratio equation: regeneration inlet air temperature passed to the model = {}", - thisError.CharValue); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.buffer3 = + std::format("...Regeneration outlet air humidity ratio equation: regeneration inlet air temperature passed to the model = {}", + thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInTempError.print = false; } @@ -3995,23 +3989,23 @@ namespace HeatRecovery { } if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.print = true; - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.buffer1 = EnergyPlus::format( - "{} \"{}\" - Regeneration inlet air humidity ratio used in regen outlet air humidity ratio equation is outside model " - "boundaries at {}.", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, - thisError.OutputChar); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.buffer1 = + std::format("{} \"{}\" - Regeneration inlet air humidity ratio used in regen outlet air humidity ratio equation is outside model " + "boundaries at {}.", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, + thisError.OutputChar); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.buffer2 = - EnergyPlus::format("...Valid range = {} to {}. Occurrence info = {}, {} {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); + std::format("...Valid range = {} to {}. Occurrence info = {}, {} {}", + thisError.OutputCharLo, + thisError.OutputCharHi, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state)); thisError.CharValue = EnergyPlus::format("{:.6R}", H_RegenInHumRat); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.buffer3 = EnergyPlus::format( - "...Regeneration outlet air humidity ratio equation: regeneration inlet air humidity ratio passed to the model = {}", - thisError.CharValue); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.buffer3 = + std::format("...Regeneration outlet air humidity ratio equation: regeneration inlet air humidity ratio passed to the model = {}", + thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_RegenInHumRatError.print = false; } @@ -4039,22 +4033,22 @@ namespace HeatRecovery { if (state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInTempError.last == 0.0) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInTempError.print = false; } - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInTempError.buffer1 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInTempError.buffer1 = std::format( "{} \"{}\" - Process inlet air temperature used in regen outlet air humidity ratio equation is outside model boundaries at {}.", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, thisError.OutputChar); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInTempError.buffer2 = - EnergyPlus::format("...Valid range = {} to {}. Occurrence info = {}, {} {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); + std::format("...Valid range = {} to {}. Occurrence info = {}, {} {}", + thisError.OutputCharLo, + thisError.OutputCharHi, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state)); thisError.CharValue = EnergyPlus::format("{:.6R}", H_ProcInTemp); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInTempError.buffer3 = - EnergyPlus::format("...Regeneration outlet air humidity ratio equation: process inlet air temperature passed to the model = {}", - thisError.CharValue); + std::format("...Regeneration outlet air humidity ratio equation: process inlet air temperature passed to the model = {}", + thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInTempError.print = false; } @@ -4082,23 +4076,23 @@ namespace HeatRecovery { if (state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInHumRatError.last == 0.0) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInHumRatError.print = false; } - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInHumRatError.buffer1 = EnergyPlus::format( - "{} \"{}\" - Process inlet air humidity ratio used in regen outlet air humidity ratio equation is outside model " - "boundaries at {}.", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, - thisError.OutputChar); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInHumRatError.buffer1 = + std::format("{} \"{}\" - Process inlet air humidity ratio used in regen outlet air humidity ratio equation is outside model " + "boundaries at {}.", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, + thisError.OutputChar); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInHumRatError.buffer2 = - EnergyPlus::format("...Valid range = {} to {}. Occurrence info = {}, {}, {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); + std::format("...Valid range = {} to {}. Occurrence info = {}, {}, {}", + thisError.OutputCharLo, + thisError.OutputCharHi, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state)); thisError.CharValue = EnergyPlus::format("{:.6R}", H_ProcInHumRat); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInHumRatError.buffer3 = EnergyPlus::format( - "...Regeneration outlet air humidity ratio equation: process inlet air humidity ratio passed to the model = {}", - thisError.CharValue); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInHumRatError.buffer3 = + std::format("...Regeneration outlet air humidity ratio equation: process inlet air humidity ratio passed to the model = {}", + thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_ProcInHumRatError.print = false; } @@ -4120,23 +4114,23 @@ namespace HeatRecovery { } if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.print = true; - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.buffer1 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.buffer1 = std::format( "{} \"{}\" - Process and regen inlet air face velocity used in regen outlet air humidity ratio equation is outside model " "boundaries at {}.", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, thisError.OutputChar); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.buffer2 = - EnergyPlus::format("...Valid range = {} to {}. Occurrence info = {}, {}, {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); + std::format("...Valid range = {} to {}. Occurrence info = {}, {}, {}", + thisError.OutputCharLo, + thisError.OutputCharHi, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state)); thisError.CharValue = EnergyPlus::format("{:.6R}", H_FaceVel); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.buffer3 = EnergyPlus::format( - "...Regeneration outlet air humidity ratio equation: process and regeneration face velocity passed to the model = {}", - thisError.CharValue); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.buffer3 = + std::format("...Regeneration outlet air humidity ratio equation: process and regeneration face velocity passed to the model = {}", + thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_FaceVelError.print = false; } @@ -4200,9 +4194,9 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Regeneration outlet air temperature above regen inlet air temperature error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + std::format("{} \"{}\" - Regeneration outlet air temperature above regen inlet air temperature error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.index, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.last, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.last); @@ -4222,7 +4216,7 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\" - Regeneration outlet air temperature should be less than regen inlet air temperature error continues...", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), @@ -4248,18 +4242,18 @@ namespace HeatRecovery { if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.print = true; state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.buffer1 = - EnergyPlus::format("{} \"{}\" - Regeneration outlet air temperature is greater than inlet temperature at {}.", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, - thisError.OutputChar); + std::format("{} \"{}\" - Regeneration outlet air temperature is greater than inlet temperature at {}.", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, + thisError.OutputChar); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.buffer2 = - EnergyPlus::format("...Regen inlet air temperature = {}. Occurrence info = {}, {}, {}", - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); + std::format("...Regen inlet air temperature = {}. Occurrence info = {}, {}, {}", + thisError.OutputCharHi, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state)); thisError.CharValue = EnergyPlus::format("{:.6R}", RegenOutTemp); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.buffer3 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempFailedError.buffer3 = std::format( "...Regen outlet air temperature equation: regeneration outlet air temperature allowed from the model = {}", thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.print = false; @@ -4287,19 +4281,19 @@ namespace HeatRecovery { if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.print = true; state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.buffer1 = - EnergyPlus::format("{} \"{}\" - Regeneration outlet air temperature equation is outside model boundaries at {}.", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, - thisError.OutputChar); + std::format("{} \"{}\" - Regeneration outlet air temperature equation is outside model boundaries at {}.", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, + thisError.OutputChar); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.buffer2 = - EnergyPlus::format("...Valid range = {} to {}. Occurrence info = {}, {}, {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); + std::format("...Valid range = {} to {}. Occurrence info = {}, {}, {}", + thisError.OutputCharLo, + thisError.OutputCharHi, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state)); thisError.CharValue = EnergyPlus::format("{:.6R}", RegenOutTemp); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.buffer3 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.buffer3 = std::format( "...Regen outlet air temperature equation: regeneration outlet air temperature allowed from the model = {}", thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutTempError.print = false; @@ -4367,10 +4361,10 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Regeneration outlet air humidity ratio should be greater than regen inlet air " - "humidity ratio error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + std::format("{} \"{}\" - Regeneration outlet air humidity ratio should be greater than regen inlet air " + "humidity ratio error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.index, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.last, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.last); @@ -4390,9 +4384,9 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Regeneration outlet air humidity ratio is out of range error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + std::format("{} \"{}\" - Regeneration outlet air humidity ratio is out of range error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.index, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.last, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.last); @@ -4415,20 +4409,20 @@ namespace HeatRecovery { if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.print = true; state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.buffer1 = - EnergyPlus::format("{} \"{}\" - Regeneration outlet air humidity ratio is less than the inlet air humidity ratio at {}.", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, - thisError.OutputChar); + std::format("{} \"{}\" - Regeneration outlet air humidity ratio is less than the inlet air humidity ratio at {}.", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, + thisError.OutputChar); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.buffer2 = - EnergyPlus::format("...Regen inlet air humidity ratio = {}. Occurrence info = {}, {}, {}", - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); + std::format("...Regen inlet air humidity ratio = {}. Occurrence info = {}, {}, {}", + thisError.OutputCharHi, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state)); thisError.CharValue = EnergyPlus::format("{:.6R}", RegenOutHumRat); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.buffer3 = EnergyPlus::format( - "...Regen outlet air humidity ratio equation: regeneration outlet air humidity ratio allowed from the model = {}", - thisError.CharValue); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.buffer3 = + std::format("...Regen outlet air humidity ratio equation: regeneration outlet air humidity ratio allowed from the model = {}", + thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatFailedErr.print = false; } @@ -4455,21 +4449,21 @@ namespace HeatRecovery { if (!state.dataGlobal->WarmupFlag && !FirstHVACIteration) { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.print = true; state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.buffer1 = - EnergyPlus::format("{} \"{}\" - Regeneration outlet air humidity ratio is outside model boundaries at {}.", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, - thisError.OutputChar); + std::format("{} \"{}\" - Regeneration outlet air humidity ratio is outside model boundaries at {}.", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, + thisError.OutputChar); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.buffer2 = - EnergyPlus::format("...Valid range = {} to {}. Occurrence info = {}, {}, {}", - thisError.OutputCharLo, - thisError.OutputCharHi, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state)); + std::format("...Valid range = {} to {}. Occurrence info = {}, {}, {}", + thisError.OutputCharLo, + thisError.OutputCharHi, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state)); thisError.CharValue = EnergyPlus::format("{:.6R}", RegenOutHumRat); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.buffer3 = EnergyPlus::format( - "...Regen outlet air humidity ratio equation: regeneration outlet air humidity ratio allowed from the model = {}", - thisError.CharValue); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.buffer3 = + std::format("...Regen outlet air humidity ratio equation: regeneration outlet air humidity ratio allowed from the model = {}", + thisError.CharValue); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenOutHumRatError.print = false; } @@ -4543,15 +4537,14 @@ namespace HeatRecovery { "equation model boundaries may adversely affect desiccant model performance. Verify correct model " "coefficients."); } else { - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} \"{}\" - Regeneration inlet air relative humidity related to regen outlet air " - "temperature equation is outside model boundaries error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.index, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.last, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.last); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} \"{}\" - Regeneration inlet air relative humidity related to regen outlet air " + "temperature equation is outside model boundaries error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.last); } } @@ -4568,10 +4561,10 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Process inlet air relative humidity related to regen outlet air temperature " - "equation is outside model boundaries error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + std::format("{} \"{}\" - Process inlet air relative humidity related to regen outlet air temperature " + "equation is outside model boundaries error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.index, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.last, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.last); @@ -4623,15 +4616,15 @@ namespace HeatRecovery { EnergyPlus::format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxRegenAirInRelHum * 100.0); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.print = true; - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.buffer1 = EnergyPlus::format( - "{} \"{}\" - Regeneration inlet air relative humidity related to regen outlet air temperature equation is outside model " - "boundaries at {}.", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, - thisError.OutputChar); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.buffer2 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.buffer1 = + std::format("{} \"{}\" - Regeneration inlet air relative humidity related to regen outlet air temperature equation is outside model " + "boundaries at {}.", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, + thisError.OutputChar); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.buffer2 = std::format( "...Model limit on regeneration inlet air relative humidity is {} to {}.", thisError.OutputCharLo, thisError.OutputCharHi); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.buffer3 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.buffer3 = std::format( "...Occurrence info = {}, {}, {}", state.dataEnvrn->EnvironmentName, state.dataEnvrn->CurMnDy, CreateSysTimeIntervalString(state)); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumTempErr.print = false; @@ -4648,14 +4641,14 @@ namespace HeatRecovery { EnergyPlus::format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).T_MaxProcAirInRelHum * 100.0); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.print = true; - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.buffer1 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.buffer1 = std::format( "{} \"{}\" - Process inlet air relative humidity related to regen outlet air temperature equation is outside model boundaries at {}.", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, thisError.OutputChar); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.buffer2 = EnergyPlus::format( - "...Model limit on process inlet air relative humidity is {} to {}.", thisError.OutputCharLo, thisError.OutputCharHi); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.buffer3 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.buffer2 = + std::format("...Model limit on process inlet air relative humidity is {} to {}.", thisError.OutputCharLo, thisError.OutputCharHi); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.buffer3 = std::format( "...Occurrence info = {}, {}, {}", state.dataEnvrn->EnvironmentName, state.dataEnvrn->CurMnDy, CreateSysTimeIntervalString(state)); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumTempErr.print = false; @@ -4728,10 +4721,10 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Regeneration inlet air relative humidity related to regen outlet air humidity " - "ratio equation is outside model boundaries error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + std::format("{} \"{}\" - Regeneration inlet air relative humidity related to regen outlet air humidity " + "ratio equation is outside model boundaries error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.index, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.last, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.last); @@ -4750,15 +4743,14 @@ namespace HeatRecovery { "equation model boundaries may adversely affect desiccant model performance. Verify correct model " "coefficients."); } else { - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} \"{}\" - Process inlet air relative humidity related to regen outlet air humidity " - "ratio equation is outside model boundaries error continues...", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.index, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.last, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.last); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} \"{}\" - Process inlet air relative humidity related to regen outlet air humidity " + "ratio equation is outside model boundaries error continues...", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name), + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.index, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.last, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.last); } } @@ -4807,15 +4799,15 @@ namespace HeatRecovery { EnergyPlus::format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxRegenAirInRelHum * 100.0); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.print = true; - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.buffer1 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.buffer1 = std::format( "{} \"{}\" - Regeneration inlet air relative humidity related to regen outlet air humidity ratio equation is outside model " "boundaries at {}.", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, thisError.OutputChar); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.buffer2 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.buffer2 = std::format( "...Model limit on regeneration inlet air relative humidity is {} to {}.", thisError.OutputCharLo, thisError.OutputCharHi); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.buffer3 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.buffer3 = std::format( "...Occurrence info = {}, {}, {}", state.dataEnvrn->EnvironmentName, state.dataEnvrn->CurMnDy, CreateSysTimeIntervalString(state)); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).regenInRelHumHumRatErr.print = false; @@ -4832,15 +4824,15 @@ namespace HeatRecovery { EnergyPlus::format("{:.1R}", state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).H_MaxProcAirInRelHum * 100.0); state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.print = true; - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.buffer1 = EnergyPlus::format( - "{} \"{}\" - Process inlet air relative humidity related to regen outlet air humidity ratio equation is outside model " - "boundaries at {}.", - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, - thisError.OutputChar); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.buffer2 = EnergyPlus::format( - "...Model limit on process inlet air relative humidity is {} to {}.", thisError.OutputCharLo, thisError.OutputCharHi); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.buffer3 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.buffer1 = + std::format("{} \"{}\" - Process inlet air relative humidity related to regen outlet air humidity ratio equation is outside model " + "boundaries at {}.", + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).PerfType, + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).Name, + thisError.OutputChar); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.buffer2 = + std::format("...Model limit on process inlet air relative humidity is {} to {}.", thisError.OutputCharLo, thisError.OutputCharHi); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.buffer3 = std::format( "...Occurrence info = {}, {}, {}", state.dataEnvrn->EnvironmentName, state.dataEnvrn->CurMnDy, CreateSysTimeIntervalString(state)); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).procInRelHumHumRatErr.print = false; @@ -4906,10 +4898,10 @@ namespace HeatRecovery { } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - unbalanced air flow rate is limited to 2% error continues with the imbalanced " - "fraction statistics reported...", - HVAC::hxTypeNames[(int)this->type], - this->Name), + std::format("{} \"{}\" - unbalanced air flow rate is limited to 2% error continues with the imbalanced " + "fraction statistics reported...", + HVAC::hxTypeNames[(int)this->type], + this->Name), state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.index, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.last, state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.last); @@ -4931,10 +4923,10 @@ namespace HeatRecovery { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.print = true; state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.buffer1 = - EnergyPlus::format("{} \"{}\" - unbalanced air flow rate is limited to 2%.", HVAC::hxTypeNames[(int)this->type], this->Name); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.buffer2 = EnergyPlus::format( + std::format("{} \"{}\" - unbalanced air flow rate is limited to 2%.", HVAC::hxTypeNames[(int)this->type], this->Name); + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.buffer2 = std::format( "...Regeneration air mass flow rate is {} and process air mass flow rate is {}.", thisError.OutputCharLo, thisError.OutputCharHi); - state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.buffer3 = EnergyPlus::format( + state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.buffer3 = std::format( "...Occurrence info = {}, {}, {}", state.dataEnvrn->EnvironmentName, state.dataEnvrn->CurMnDy, CreateSysTimeIntervalString(state)); } else { state.dataHeatRecovery->BalDesDehumPerfData(this->PerfDataIndex).imbalancedFlowErr.print = false; @@ -4967,7 +4959,7 @@ namespace HeatRecovery { if (WhichHX != 0) { return state.dataHeatRecovery->ExchCond(WhichHX).SupInletNode; } - ShowSevereError(state, EnergyPlus::format("GetSupplyInletNode: Could not find heat exchanger = \"{}\"", HXName)); + ShowSevereError(state, std::format("GetSupplyInletNode: Could not find heat exchanger = \"{}\"", HXName)); ErrorsFound = true; return 0; } @@ -4998,7 +4990,7 @@ namespace HeatRecovery { if (WhichHX != 0) { return state.dataHeatRecovery->ExchCond(WhichHX).SupOutletNode; } - ShowSevereError(state, EnergyPlus::format("GetSupplyOutletNode: Could not find heat exchanger = \"{}\"", HXName)); + ShowSevereError(state, std::format("GetSupplyOutletNode: Could not find heat exchanger = \"{}\"", HXName)); ErrorsFound = true; return 0; } @@ -5029,7 +5021,7 @@ namespace HeatRecovery { if (WhichHX != 0) { return state.dataHeatRecovery->ExchCond(WhichHX).SecInletNode; } - ShowSevereError(state, EnergyPlus::format("GetSecondaryInletNode: Could not find heat exchanger = \"{}\"", HXName)); + ShowSevereError(state, std::format("GetSecondaryInletNode: Could not find heat exchanger = \"{}\"", HXName)); ErrorsFound = true; return 0; } @@ -5060,7 +5052,7 @@ namespace HeatRecovery { if (WhichHX != 0) { return state.dataHeatRecovery->ExchCond(WhichHX).SecOutletNode; } - ShowSevereError(state, EnergyPlus::format("GetSecondaryOutletNode: Could not find heat exchanger = \"{}\"", HXName)); + ShowSevereError(state, std::format("GetSecondaryOutletNode: Could not find heat exchanger = \"{}\"", HXName)); ErrorsFound = true; return 0; } @@ -5091,7 +5083,7 @@ namespace HeatRecovery { if (WhichHX != 0) { return state.dataHeatRecovery->ExchCond(WhichHX).NomSupAirVolFlow; } - ShowSevereError(state, EnergyPlus::format("GetSupplyAirFlowRate: Could not find heat exchanger = \"{}\"", HXName)); + ShowSevereError(state, std::format("GetSupplyAirFlowRate: Could not find heat exchanger = \"{}\"", HXName)); ShowContinueError(state, "... Supply Air Flow Rate returned as 0."); ErrorsFound = true; return 0.0; @@ -5124,7 +5116,7 @@ namespace HeatRecovery { if (WhichHX != 0) { return state.dataHeatRecovery->ExchCond(WhichHX).type; } - ShowSevereError(state, EnergyPlus::format("GetHeatExchangerObjectTypeNum: Could not find heat exchanger = \"{}\"", HXName)); + ShowSevereError(state, std::format("GetHeatExchangerObjectTypeNum: Could not find heat exchanger = \"{}\"", HXName)); ErrorsFound = true; return HVAC::HXType::Invalid; } diff --git a/src/EnergyPlus/HeatingCoils.cc b/src/EnergyPlus/HeatingCoils.cc index c5d56e9893a..ec424a72a9c 100644 --- a/src/EnergyPlus/HeatingCoils.cc +++ b/src/EnergyPlus/HeatingCoils.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -1351,7 +1352,7 @@ namespace HeatingCoils { // 3) TempSetPointNodeNum .GT. 0 and TempSetPoint == SensedNodeFlagValue, this is not correct, missing temperature setpoint // test 2) here (fatal message) if (ControlNodeNum == 0) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", HVAC::coilTypeNames[(int)heatingCoil.coilType], heatingCoil.Name)); + ShowSevereError(state, std::format("{} \"{}\"", HVAC::coilTypeNames[(int)heatingCoil.coilType], heatingCoil.Name)); ShowContinueError(state, "... Missing control node for heating coil."); ShowContinueError(state, "... enter a control node name in the coil temperature setpoint node field for this heating coil."); ShowContinueError(state, "... use a Setpoint Manager to establish a setpoint at the coil temperature setpoint node."); @@ -1361,7 +1362,7 @@ namespace HeatingCoils { auto const &controlNode = state.dataLoopNodes->Node(ControlNodeNum); if (controlNode.TempSetPoint == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError(state, EnergyPlus::format("{} \"{}\"", HVAC::coilTypeNames[(int)heatingCoil.coilType], heatingCoil.Name)); + ShowSevereError(state, std::format("{} \"{}\"", HVAC::coilTypeNames[(int)heatingCoil.coilType], heatingCoil.Name)); ShowContinueError(state, "... Missing temperature setpoint for heating coil."); ShowContinueError(state, "... use a Setpoint Manager to establish a setpoint at the coil temperature setpoint node."); state.dataHeatingCoils->HeatingCoilFatalError = true; @@ -1369,8 +1370,7 @@ namespace HeatingCoils { EMSManager::CheckIfNodeSetPointManagedByEMS( state, ControlNodeNum, HVAC::CtrlVarType::Temp, state.dataHeatingCoils->HeatingCoilFatalError); if (state.dataHeatingCoils->HeatingCoilFatalError) { - ShowSevereError(state, - EnergyPlus::format("{} \"{}\"", HVAC::coilTypeNames[(int)heatingCoil.coilType], heatingCoil.Name)); + ShowSevereError(state, std::format("{} \"{}\"", HVAC::coilTypeNames[(int)heatingCoil.coilType], heatingCoil.Name)); ShowContinueError(state, "... Missing temperature setpoint for heating coil."); ShowContinueError(state, "... use a Setpoint Manager to establish a setpoint at the coil temperature setpoint node."); ShowContinueError(state, "... or use an EMS Actuator to establish a setpoint at the coil temperature setpoint node."); @@ -1390,7 +1390,7 @@ namespace HeatingCoils { // 4) TempSetPointNodeNum .GT. 0 and TempSetPoint /= SensedNodeFlagValue, control node not required if load based control // test 3) and 4) here (warning only) if (ControlNodeNum > 0) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", HVAC::coilTypeNames[(int)heatingCoil.coilType], heatingCoil.Name)); + ShowWarningError(state, std::format("{} \"{}\"", HVAC::coilTypeNames[(int)heatingCoil.coilType], heatingCoil.Name)); ShowContinueError(state, " The \"Temperature Setpoint Node Name\" input is not required for this heating coil."); ShowContinueError(state, " Leaving the input field \"Temperature Setpoint Node Name\" blank will eliminate this warning."); } @@ -1425,7 +1425,7 @@ namespace HeatingCoils { if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - EnergyPlus::format( + std::format( R"({}, "{}" sum of heat reclaim recovery efficiencies from the same source coil: "{}" cannot be over 0.3)", HVAC::coilTypeNames[(int)heatingCoil.coilType], heatingCoil.Name, @@ -1453,7 +1453,7 @@ namespace HeatingCoils { if (HeatReclaim.ReclaimEfficiencyTotal > 0.9) { ShowSevereError( state, - EnergyPlus::format( + std::format( R"({}, "{}" sum of heat reclaim recovery efficiencies from the same source coil: "{}" cannot be over 0.9)", HVAC::coilTypeNames[(int)heatingCoil.coilType], heatingCoil.Name, @@ -1483,7 +1483,7 @@ namespace HeatingCoils { if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - EnergyPlus::format( + std::format( R"({}, "{}" sum of heat reclaim recovery efficiencies from the same source coil: "{}" cannot be over 0.3)", HVAC::coilTypeNames[(int)heatingCoil.coilType], heatingCoil.Name, @@ -1511,7 +1511,7 @@ namespace HeatingCoils { if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - EnergyPlus::format( + std::format( R"({}, "{}" sum of heat reclaim recovery efficiencies from the same source coil: "{}" cannot be over 0.3)", HVAC::coilTypeNames[(int)heatingCoil.coilType], heatingCoil.Name, @@ -1532,11 +1532,10 @@ namespace HeatingCoils { if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - EnergyPlus::format( - "{}, \"{}\" sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", - HVAC::coilTypeNames[(int)heatingCoil.coilType], - heatingCoil.Name, - heatingCoil.ReclaimHeatingCoilName)); + std::format("{}, \"{}\" sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", + HVAC::coilTypeNames[(int)heatingCoil.coilType], + heatingCoil.Name, + heatingCoil.ReclaimHeatingCoilName)); } } state.dataHeatingCoils->ValidSourceType(CoilNum) = true; @@ -1548,9 +1547,9 @@ namespace HeatingCoils { if ((state.dataHeatingCoils->ValidSourceTypeCounter > state.dataHeatingCoils->NumDesuperheaterCoil * 2) && state.dataHeatingCoils->ShowSingleWarning(CoilNum) && !state.dataHeatingCoils->ValidSourceType(CoilNum)) { ShowWarningError(state, - EnergyPlus::format("Coil:Heating:Desuperheater, \"{}\" desuperheater heat source object name not found: {}", - heatingCoil.Name, - heatingCoil.ReclaimHeatingCoilName)); + std::format("Coil:Heating:Desuperheater, \"{}\" desuperheater heat source object name not found: {}", + heatingCoil.Name, + heatingCoil.ReclaimHeatingCoilName)); ShowContinueError(state, " Desuperheater heating coil is not modeled and simulation continues."); state.dataHeatingCoils->ShowSingleWarning(CoilNum) = false; } @@ -1679,9 +1678,8 @@ namespace HeatingCoils { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(NominalCapacityDes - NominalCapacityUser) / NominalCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizeHeatingCoil: Potential issue with equipment sizing for {}, {}", CompType, CompName)); + ShowMessage(state, + std::format("SizeHeatingCoil: Potential issue with equipment sizing for {}, {}", CompType, CompName)); ShowContinueError(state, EnergyPlus::format("User-Specified Nominal Capacity of {:.2R} [W]", NominalCapacityUser)); ShowContinueError( @@ -2217,10 +2215,10 @@ namespace HeatingCoils { if (heatingCoil.PLFErrorCount < 1) { ++heatingCoil.PLFErrorCount; ShowWarningError(state, - EnergyPlus::format("CalcFuelHeatingCoil: {}=\"{}\", PLF curve values", - HVAC::coilTypeNames[(int)heatingCoil.coilType], - heatingCoil.Name)); - ShowContinueError(state, EnergyPlus::format("The PLF curve value = {:.5T} for part-load ratio = {:.5T}", PLF, PartLoadRat)); + std::format("CalcFuelHeatingCoil: {}=\"{}\", PLF curve values", + HVAC::coilTypeNames[(int)heatingCoil.coilType], + heatingCoil.Name)); + ShowContinueError(state, std::format("The PLF curve value = {:.5f} for part-load ratio = {:.5f}", PLF, PartLoadRat)); ShowContinueError(state, "PLF curve values must be >= 0.7. PLF has been reset to 0.7 and the simulation continues..."); ShowContinueError(state, "Check the IO reference manual for PLF curve guidance [Coil:Heating:Fuel]."); } else { @@ -2235,19 +2233,18 @@ namespace HeatingCoils { if (heatingCoil.RTFErrorCount < 1) { ++heatingCoil.RTFErrorCount; ShowWarningError(state, - EnergyPlus::format("CalcFuelHeatingCoil: {}=\"{}\", runtime fraction", - HVAC::coilTypeNames[(int)heatingCoil.coilType], - heatingCoil.Name)); - ShowContinueError(state, EnergyPlus::format("The runtime fraction exceeded 1.0. [{:.4T}].", heatingCoil.RTF)); + std::format("CalcFuelHeatingCoil: {}=\"{}\", runtime fraction", + HVAC::coilTypeNames[(int)heatingCoil.coilType], + heatingCoil.Name)); + ShowContinueError(state, std::format("The runtime fraction exceeded 1.0. [{:.4f}].", heatingCoil.RTF)); ShowContinueError(state, "Runtime fraction is set to 1.0 and the simulation continues..."); ShowContinueError(state, "Check the IO reference manual for PLF curve guidance [Coil:Heating:Fuel]."); } else { - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{}, Heating coil runtime fraction > 1.0 warning continues... ", heatingCoil.Name), - heatingCoil.RTFErrorIndex, - heatingCoil.RTF, - heatingCoil.RTF); + ShowRecurringWarningErrorAtEnd(state, + std::format("{}, Heating coil runtime fraction > 1.0 warning continues... ", heatingCoil.Name), + heatingCoil.RTFErrorIndex, + heatingCoil.RTF, + heatingCoil.RTF); } heatingCoil.RTF = 1.0; // Reset coil runtime fraction to 1.0 } else if (heatingCoil.RTF > 1.0) { @@ -2491,15 +2488,15 @@ namespace HeatingCoils { if (heatingCoil.PLFErrorCount < 1) { ++heatingCoil.PLFErrorCount; ShowWarningError(state, - EnergyPlus::format("CalcFuelHeatingCoil: {}=\"{}\", PLF curve values", - HVAC::coilTypeNames[(int)heatingCoil.coilType], - heatingCoil.Name)); - ShowContinueError(state, EnergyPlus::format("The PLF curve value = {:.5T} for part-load ratio = {:.5T}", PLF, PartLoadRat)); + std::format("CalcFuelHeatingCoil: {}=\"{}\", PLF curve values", + HVAC::coilTypeNames[(int)heatingCoil.coilType], + heatingCoil.Name)); + ShowContinueError(state, std::format("The PLF curve value = {:.5f} for part-load ratio = {:.5f}", PLF, PartLoadRat)); ShowContinueError(state, "PLF curve values must be >= 0.7. PLF has been reset to 0.7 and the simulation continues..."); ShowContinueError(state, "Check the IO reference manual for PLF curve guidance [Coil:Heating:Fuel]."); } else { ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{}, Heating coil PLF curve < 0.7 warning continues... ", heatingCoil.Name), + std::format("{}, Heating coil PLF curve < 0.7 warning continues... ", heatingCoil.Name), heatingCoil.PLFErrorIndex, PLF, PLF); @@ -2512,19 +2509,18 @@ namespace HeatingCoils { if (heatingCoil.RTFErrorCount < 1) { ++heatingCoil.RTFErrorCount; ShowWarningError(state, - EnergyPlus::format("CalcFuelHeatingCoil: {}=\"{}\", runtime fraction", - HVAC::coilTypeNames[(int)heatingCoil.coilType], - heatingCoil.Name)); - ShowContinueError(state, EnergyPlus::format("The runtime fraction exceeded 1.0. [{:.4T}].", heatingCoil.RTF)); + std::format("CalcFuelHeatingCoil: {}=\"{}\", runtime fraction", + HVAC::coilTypeNames[(int)heatingCoil.coilType], + heatingCoil.Name)); + ShowContinueError(state, std::format("The runtime fraction exceeded 1.0. [{:.4f}].", heatingCoil.RTF)); ShowContinueError(state, "Runtime fraction is set to 1.0 and the simulation continues..."); ShowContinueError(state, "Check the IO reference manual for PLF curve guidance [Coil:Heating:Fuel]."); } else { - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{}, Heating coil runtime fraction > 1.0 warning continues... ", heatingCoil.Name), - heatingCoil.RTFErrorIndex, - heatingCoil.RTF, - heatingCoil.RTF); + ShowRecurringWarningErrorAtEnd(state, + std::format("{}, Heating coil runtime fraction > 1.0 warning continues... ", heatingCoil.Name), + heatingCoil.RTFErrorIndex, + heatingCoil.RTF, + heatingCoil.RTF); } heatingCoil.RTF = 1.0; // Reset coil runtime fraction to 1.0 } else if (heatingCoil.RTF > 1.0) { @@ -2615,8 +2611,7 @@ namespace HeatingCoils { heatingCoil.NominalCapacity = 0.0; ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("Coil:Heating:Desuperheater {} - Waste heat source temperature was too low to be useful.", - heatingCoil.Name), + std::format("Coil:Heating:Desuperheater {} - Waste heat source temperature was too low to be useful.", heatingCoil.Name), heatingCoil.InsuffTemperatureWarn); } else { heatingCoil.NominalCapacity = state.dataHeatBal->HeatReclaimRefrigCondenser(SourceID).AvailCapacity * Effic - @@ -2860,7 +2855,7 @@ namespace HeatingCoils { HeatingCoilIndex = Util::FindItem(HeatingCoilName, state.dataHeatingCoils->HeatingCoil); if (HeatingCoilIndex == 0) { - ShowSevereError(state, EnergyPlus::format("GetCoilIndex: Heating coil not found={}", HeatingCoilName)); + ShowSevereError(state, std::format("GetCoilIndex: Heating coil not found={}", HeatingCoilName)); ErrorsFound = true; } } @@ -2890,14 +2885,14 @@ namespace HeatingCoils { if (CompIndex == 0) { int CoilNum = Util::FindItem(CompName, state.dataHeatingCoils->HeatingCoil); if (CoilNum == 0) { - ShowFatalError(state, EnergyPlus::format("CheckHeatingCoilSchedule: Coil not found=\"{}\".", CompName)); + ShowFatalError(state, std::format("CheckHeatingCoilSchedule: Coil not found=\"{}\".", CompName)); } if (!Util::SameString(CompType, HVAC::coilTypeNames[(int)state.dataHeatingCoils->HeatingCoil(CoilNum).coilType])) { - ShowSevereError(state, EnergyPlus::format("CheckHeatingCoilSchedule: Coil=\"{}\"", CompName)); + ShowSevereError(state, std::format("CheckHeatingCoilSchedule: Coil=\"{}\"", CompName)); ShowContinueError(state, - EnergyPlus::format("...expected type=\"{}\", actual type=\"{}\".", - CompType, - HVAC::coilTypeNames[(int)state.dataHeatingCoils->HeatingCoil(CoilNum).coilType])); + std::format("...expected type=\"{}\", actual type=\"{}\".", + CompType, + HVAC::coilTypeNames[(int)state.dataHeatingCoils->HeatingCoil(CoilNum).coilType])); ShowFatalError(state, "Program terminates due to preceding conditions."); } CompIndex = CoilNum; @@ -2906,22 +2901,21 @@ namespace HeatingCoils { int CoilNum = CompIndex; if (CoilNum > state.dataHeatingCoils->NumHeatingCoils || CoilNum < 1) { ShowFatalError(state, - EnergyPlus::format("CheckHeatingCoilSchedule: Invalid CompIndex passed={}, Number of Heating Coils={}, Coil name={}", - CoilNum, - state.dataHeatingCoils->NumHeatingCoils, - CompName)); + std::format("CheckHeatingCoilSchedule: Invalid CompIndex passed={}, Number of Heating Coils={}, Coil name={}", + CoilNum, + state.dataHeatingCoils->NumHeatingCoils, + CompName)); } if (CompName != state.dataHeatingCoils->HeatingCoil(CoilNum).Name) { - ShowSevereError( - state, - EnergyPlus::format("CheckHeatingCoilSchedule: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - CoilNum, - CompName, - state.dataHeatingCoils->HeatingCoil(CoilNum).Name)); + ShowSevereError(state, + std::format("CheckHeatingCoilSchedule: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + CoilNum, + CompName, + state.dataHeatingCoils->HeatingCoil(CoilNum).Name)); ShowContinueError(state, - EnergyPlus::format("...expected type=\"{}\", actual type=\"{}\".", - CompType, - HVAC::coilTypeNames[(int)state.dataHeatingCoils->HeatingCoil(CoilNum).coilType])); + std::format("...expected type=\"{}\", actual type=\"{}\".", + CompType, + HVAC::coilTypeNames[(int)state.dataHeatingCoils->HeatingCoil(CoilNum).coilType])); ShowFatalError(state, "Program terminates due to preceding conditions."); } Value = state.dataHeatingCoils->HeatingCoil(CoilNum).availSched->getCurrentVal(); // not scheduled? @@ -2975,15 +2969,14 @@ namespace HeatingCoils { if (WhichCoil == 0) { // Autodesk:Return Reworked block to assure CoilCapacity is set before return if (FoundType == HVAC::CoilType::Invalid) { - ShowSevereError(state, EnergyPlus::format("GetCoilCapacity: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilCapacity: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); } else { - ShowSevereError(state, - EnergyPlus::format("GetCoilCapacity: Invalid coil type for capacity, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilCapacity: Invalid coil type for capacity, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ShowContinueError(state, - EnergyPlus::format("...only {}, {} or {} are valid in this context.", - HVAC::coilTypeNames[(int)HVAC::CoilType::HeatingElectric], - HVAC::coilTypeNames[(int)HVAC::CoilType::HeatingGasOrOtherFuel], - HVAC::coilTypeNames[(int)HVAC::CoilType::HeatingDesuperheater])); + std::format("...only {}, {} or {} are valid in this context.", + HVAC::coilTypeNames[(int)HVAC::CoilType::HeatingElectric], + HVAC::coilTypeNames[(int)HVAC::CoilType::HeatingGasOrOtherFuel], + HVAC::coilTypeNames[(int)HVAC::CoilType::HeatingDesuperheater])); } ShowContinueError(state, "... returning Coil Capacity as -1000."); ErrorsFound = true; @@ -3030,7 +3023,7 @@ namespace HeatingCoils { } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format("GetCoilAvailScheduleIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilAvailScheduleIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } @@ -3074,7 +3067,7 @@ namespace HeatingCoils { } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -3119,7 +3112,7 @@ namespace HeatingCoils { } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -3222,7 +3215,7 @@ namespace HeatingCoils { } } - ShowSevereError(state, EnergyPlus::format("GetCoilControlNodeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilControlNodeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return 0; } @@ -3259,7 +3252,7 @@ namespace HeatingCoils { } } - ShowSevereError(state, EnergyPlus::format("GetHeatingCoilTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetHeatingCoilTypeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return HVAC::CoilType::Invalid; } @@ -3295,7 +3288,7 @@ namespace HeatingCoils { } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format("GetHeatingCoilIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetHeatingCoilIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } @@ -3333,8 +3326,7 @@ namespace HeatingCoils { if (WhichCoil != 0) { return state.dataHeatingCoils->HeatingCoil(WhichCoil).PLFCurveIndex; } - ShowSevereError(state, - EnergyPlus::format("GetHeatingCoilPLFCurveIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetHeatingCoilPLFCurveIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return 0; } @@ -3366,7 +3358,7 @@ namespace HeatingCoils { if (WhichCoil != 0) { return state.dataHeatingCoils->HeatingCoil(WhichCoil).NumOfStages; } - ShowSevereError(state, EnergyPlus::format("GetHeatingCoilNumberOfSpeeds: Invalid Heating Coil Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetHeatingCoilNumberOfSpeeds: Invalid Heating Coil Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return 0; } @@ -3394,9 +3386,9 @@ namespace HeatingCoils { if (CoilNum <= 0 || CoilNum > state.dataHeatingCoils->NumHeatingCoils) { ShowSevereError(state, - EnergyPlus::format("SetHeatingCoilData: called with heating coil Number out of range={} should be >0 and <{}", - CoilNum, - state.dataHeatingCoils->NumHeatingCoils)); + std::format("SetHeatingCoilData: called with heating coil Number out of range={} should be >0 and <{}", + CoilNum, + state.dataHeatingCoils->NumHeatingCoils)); ErrorsFound = true; return; } @@ -3428,7 +3420,7 @@ namespace HeatingCoils { HeatingCoilIndex = Util::FindItem(HeatingCoilName, state.dataHeatingCoils->HeatingCoil); if (HeatingCoilIndex == 0) { - ShowSevereError(state, EnergyPlus::format("GetCoilIndex: Heating coil not found={}", HeatingCoilName)); + ShowSevereError(state, std::format("GetCoilIndex: Heating coil not found={}", HeatingCoilName)); ErrorsFound = true; } else { state.dataHeatingCoils->HeatingCoil(HeatingCoilIndex).AirLoopNum = AirLoopNum; diff --git a/src/EnergyPlus/HighTempRadiantSystem.cc b/src/EnergyPlus/HighTempRadiantSystem.cc index 169cdde308a..8090dc10570 100644 --- a/src/EnergyPlus/HighTempRadiantSystem.cc +++ b/src/EnergyPlus/HighTempRadiantSystem.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -290,7 +291,7 @@ namespace HighTempRadiantSystem { if (highTempRadSys.ScaledHeatingCapacity < 0.0 && highTempRadSys.ScaledHeatingCapacity != DataSizing::AutoSize) { ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", + EnergyPlus::format("Illegal {} = {:.7f}", state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum), state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum))); ErrorsFound = true; @@ -316,7 +317,7 @@ namespace HighTempRadiantSystem { state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", + EnergyPlus::format("Illegal {} = {:.7f}", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; @@ -337,31 +338,31 @@ namespace HighTempRadiantSystem { EnergyPlus::format("Input for {} = {}", state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", - state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); + ShowContinueError( + state, + std::format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else if (highTempRadSys.HeatingCapMethod == DataSizing::DesignSizingType::FractionOfAutosizedHeatingCapacity) { if (!state.dataIPShortCut->lNumericFieldBlanks(iHeatFracOfAutosizedCapacityNumericNum)) { highTempRadSys.ScaledHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum); if (highTempRadSys.ScaledHeatingCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); + std::format("Illegal {} = {:.7f}", + state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, highTempRadSys.Name)); ShowContinueError(state, - EnergyPlus::format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + std::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", - state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); + std::format("Blank field not allowed for {}", + state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } @@ -374,17 +375,17 @@ namespace HighTempRadiantSystem { // Limit the combustion efficiency to between zero and one... if (highTempRadSys.CombustionEffic < MinCombustionEffic) { highTempRadSys.CombustionEffic = MinCombustionEffic; - ShowWarningError(state, - EnergyPlus::format("{} was less than the allowable minimum, reset to minimum value.", - state.dataIPShortCut->cNumericFieldNames(4))); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError( + state, + std::format("{} was less than the allowable minimum, reset to minimum value.", state.dataIPShortCut->cNumericFieldNames(4))); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); } if (highTempRadSys.CombustionEffic > MaxCombustionEffic) { highTempRadSys.CombustionEffic = MaxCombustionEffic; ShowWarningError(state, - EnergyPlus::format("{} was greater than the allowable maximum, reset to maximum value.", - state.dataIPShortCut->cNumericFieldNames(4))); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} was greater than the allowable maximum, reset to maximum value.", + state.dataIPShortCut->cNumericFieldNames(4))); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); } } else { highTempRadSys.CombustionEffic = MaxCombustionEffic; // No inefficiency in the heater @@ -393,58 +394,57 @@ namespace HighTempRadiantSystem { highTempRadSys.FracRadiant = state.dataIPShortCut->rNumericArgs(5); if (highTempRadSys.FracRadiant < MinFraction) { highTempRadSys.FracRadiant = MinFraction; - ShowWarningError(state, - EnergyPlus::format("{} was less than the allowable minimum, reset to minimum value.", - state.dataIPShortCut->cNumericFieldNames(5))); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError( + state, + std::format("{} was less than the allowable minimum, reset to minimum value.", state.dataIPShortCut->cNumericFieldNames(5))); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); } if (highTempRadSys.FracRadiant > MaxFraction) { highTempRadSys.FracRadiant = MaxFraction; - ShowWarningError(state, - EnergyPlus::format("{} was greater than the allowable maximum, reset to maximum value.", - state.dataIPShortCut->cNumericFieldNames(5))); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError( + state, + std::format("{} was greater than the allowable maximum, reset to maximum value.", state.dataIPShortCut->cNumericFieldNames(5))); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); } highTempRadSys.FracLatent = state.dataIPShortCut->rNumericArgs(6); if (highTempRadSys.FracLatent < MinFraction) { highTempRadSys.FracLatent = MinFraction; - ShowWarningError(state, - EnergyPlus::format("{} was less than the allowable minimum, reset to minimum value.", - state.dataIPShortCut->cNumericFieldNames(6))); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError( + state, + std::format("{} was less than the allowable minimum, reset to minimum value.", state.dataIPShortCut->cNumericFieldNames(6))); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); } if (highTempRadSys.FracLatent > MaxFraction) { highTempRadSys.FracLatent = MaxFraction; - ShowWarningError(state, - EnergyPlus::format("{} was greater than the allowable maximum, reset to maximum value.", - state.dataIPShortCut->cNumericFieldNames(6))); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError( + state, + std::format("{} was greater than the allowable maximum, reset to maximum value.", state.dataIPShortCut->cNumericFieldNames(6))); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); } highTempRadSys.FracLost = state.dataIPShortCut->rNumericArgs(7); if (highTempRadSys.FracLost < MinFraction) { highTempRadSys.FracLost = MinFraction; - ShowWarningError(state, - EnergyPlus::format("{} was less than the allowable minimum, reset to minimum value.", - state.dataIPShortCut->cNumericFieldNames(7))); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError( + state, + std::format("{} was less than the allowable minimum, reset to minimum value.", state.dataIPShortCut->cNumericFieldNames(7))); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); } if (highTempRadSys.FracLost > MaxFraction) { highTempRadSys.FracLost = MaxFraction; - ShowWarningError(state, - EnergyPlus::format("{} was greater than the allowable maximum, reset to maximum value.", - state.dataIPShortCut->cNumericFieldNames(7))); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError( + state, + std::format("{} was greater than the allowable maximum, reset to maximum value.", state.dataIPShortCut->cNumericFieldNames(7))); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); } // Based on the input for fractions radiant, latent, and lost, determine the fraction convective (remaining fraction) Real64 AllFracsSummed = highTempRadSys.FracRadiant + highTempRadSys.FracLatent + highTempRadSys.FracLost; if (AllFracsSummed > MaxFraction) { ShowSevereError( - state, - EnergyPlus::format("Fractions radiant, latent, and lost sum up to greater than 1 for{}", state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Fractions radiant, latent, and lost sum up to greater than 1 for{}", state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; highTempRadSys.FracConvect = 0.0; } else { @@ -464,8 +464,8 @@ namespace HighTempRadiantSystem { highTempRadSys.ThrottlRange = state.dataIPShortCut->rNumericArgs(8); if (highTempRadSys.ThrottlRange < MinThrottlingRange) { highTempRadSys.ThrottlRange = 1.0; - ShowWarningError(state, EnergyPlus::format("{} is below the minimum allowed.", state.dataIPShortCut->cNumericFieldNames(8))); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError(state, std::format("{} is below the minimum allowed.", state.dataIPShortCut->cNumericFieldNames(8))); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Thus, the throttling range value has been reset to 1.0"); } @@ -484,17 +484,17 @@ namespace HighTempRadiantSystem { highTempRadSys.FracDistribPerson = state.dataIPShortCut->rNumericArgs(9); if (highTempRadSys.FracDistribPerson < MinFraction) { highTempRadSys.FracDistribPerson = MinFraction; - ShowWarningError(state, - EnergyPlus::format("{} was less than the allowable minimum, reset to minimum value.", - state.dataIPShortCut->cNumericFieldNames(9))); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError( + state, + std::format("{} was less than the allowable minimum, reset to minimum value.", state.dataIPShortCut->cNumericFieldNames(9))); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); } if (highTempRadSys.FracDistribPerson > MaxFraction) { highTempRadSys.FracDistribPerson = MaxFraction; - ShowWarningError(state, - EnergyPlus::format("{} was greater than the allowable maximum, reset to maximum value.", - state.dataIPShortCut->cNumericFieldNames(9))); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError( + state, + std::format("{} was greater than the allowable maximum, reset to maximum value.", state.dataIPShortCut->cNumericFieldNames(9))); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); } highTempRadSys.TotSurfToDistrib = NumNumbers - 9; @@ -517,16 +517,16 @@ namespace HighTempRadiantSystem { if (highTempRadSys.FracDistribToSurf(SurfNum) < MinFraction) { highTempRadSys.FracDistribToSurf(SurfNum) = MinFraction; ShowWarningError(state, - EnergyPlus::format("{} was less than the allowable minimum, reset to minimum value.", - state.dataIPShortCut->cNumericFieldNames(SurfNum + 9))); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} was less than the allowable minimum, reset to minimum value.", + state.dataIPShortCut->cNumericFieldNames(SurfNum + 9))); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); } if (highTempRadSys.FracDistribToSurf(SurfNum) > MaxFraction) { highTempRadSys.FracDistribToSurf(SurfNum) = MaxFraction; ShowWarningError(state, - EnergyPlus::format("{} was greater than the allowable maximum, reset to maximum value.", - state.dataIPShortCut->cNumericFieldNames(SurfNum + 9))); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} was greater than the allowable maximum, reset to maximum value.", + state.dataIPShortCut->cNumericFieldNames(SurfNum + 9))); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); } if (highTempRadSys.SurfacePtr(SurfNum) != 0) { @@ -541,30 +541,30 @@ namespace HighTempRadiantSystem { // Error trap if the fractions add up to greater than 1.0 if (AllFracsSummed > (MaxFraction + 0.01)) { ShowSevereError(state, - EnergyPlus::format("Fraction of radiation distributed to surfaces sums up to greater than 1 for {}", - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + std::format("Fraction of radiation distributed to surfaces sums up to greater than 1 for {}", + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("Occurs for {} = {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } if (AllFracsSummed < (MaxFraction - 0.01)) { // User didn't distribute all of the radiation warn that some will be lost Real64 TotalFracToSurfs = AllFracsSummed - highTempRadSys.FracDistribPerson; FracOfRadPotentiallyLost = 1.0 - AllFracsSummed; ShowSevereError(state, - EnergyPlus::format("Fraction of radiation distributed to surfaces and people sums up to less than 1 for {}", - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Fraction of radiation distributed to surfaces and people sums up to less than 1 for {}", + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "This would result in some of the radiant energy delivered by the high temp radiant heater being lost."); - ShowContinueError(state, EnergyPlus::format("The sum of all radiation fractions to surfaces = {:.5T}", TotalFracToSurfs)); - ShowContinueError(state, EnergyPlus::format("The radiant fraction to people = {:.5T}", highTempRadSys.FracDistribPerson)); - ShowContinueError(state, EnergyPlus::format("So, all radiant fractions including surfaces and people = {:.5T}", AllFracsSummed)); + ShowContinueError(state, std::format("The sum of all radiation fractions to surfaces = {:.5f}", TotalFracToSurfs)); + ShowContinueError(state, std::format("The radiant fraction to people = {:.5f}", highTempRadSys.FracDistribPerson)); + ShowContinueError(state, std::format("So, all radiant fractions including surfaces and people = {:.5f}", AllFracsSummed)); ShowContinueError( state, - EnergyPlus::format("This means that the fraction of radiant energy that would be lost from the high temperature radiant heater " - "would be = {:.5T}", - FracOfRadPotentiallyLost)); + std::format("This means that the fraction of radiant energy that would be lost from the high temperature radiant heater " + "would be = {:.5f}", + FracOfRadPotentiallyLost)); ShowContinueError(state, - EnergyPlus::format("Please check and correct this so that all radiant energy is accounted for in {} = {}", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Please check and correct this so that all radiant energy is accounted for in {} = {}", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -665,9 +665,9 @@ namespace HighTempRadiantSystem { } ShowSevereError( state, - EnergyPlus::format("InitHighTempRadiantSystem: Unit=[ZoneHVAC:HighTemperatureRadiant,{}] is not on any ZoneHVAC:EquipmentList. " - "It will not be simulated.", - thisHTRSys.Name)); + std::format("InitHighTempRadiantSystem: Unit=[ZoneHVAC:HighTemperatureRadiant,{}] is not on any ZoneHVAC:EquipmentList. " + "It will not be simulated.", + thisHTRSys.Name)); } } @@ -738,7 +738,7 @@ namespace HighTempRadiantSystem { int SizingMethod = HVAC::HeatingCapacitySizing; int FieldNum = 1; std::string const SizingString = - EnergyPlus::format("{} [W]", state.dataHighTempRadSys->HighTempRadSysNumericFields(RadSysNum).FieldNames(FieldNum)); + std::format("{} [W]", state.dataHighTempRadSys->HighTempRadSysNumericFields(RadSysNum).FieldNames(FieldNum)); // capacity sizing methods (HeatingDesignCapacity, CapacityPerFloorArea, FractionOfAutosizedCoolingCapacity, and // FractionOfAutosizedHeatingCapacity ) int CapSizingMethod = static_cast(thisHTR.HeatingCapMethod); @@ -1191,18 +1191,18 @@ namespace HighTempRadiantSystem { if (ThisSurfIntensity > DataHeatBalFanSys::MaxRadHeatFlux) { // CR 8074, trap excessive intensity (throws off surface balance ) ShowSevereError(state, "DistributeHTRadGains: excessive thermal radiation heat flux intensity detected"); - ShowContinueError(state, EnergyPlus::format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); + ShowContinueError(state, std::format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); ShowContinueError(state, EnergyPlus::format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); - ShowContinueError(state, EnergyPlus::format("Occurs in ZoneHVAC:HighTemperatureRadiant = {}", thisHTR.Name)); + ShowContinueError(state, std::format("Occurs in ZoneHVAC:HighTemperatureRadiant = {}", thisHTR.Name)); ShowContinueError(state, EnergyPlus::format("Radiation intensity = {:.2R} [W/m2]", ThisSurfIntensity)); ShowContinueError(state, "Assign a larger surface area or more surfaces in ZoneHVAC:HighTemperatureRadiant"); ShowFatalError(state, "DistributeHTRadGains: excessive thermal radiation heat flux intensity detected"); } } else { // small surface ShowSevereError(state, "DistributeHTRadGains: surface not large enough to receive thermal radiation heat flux"); - ShowContinueError(state, EnergyPlus::format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); + ShowContinueError(state, std::format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); ShowContinueError(state, EnergyPlus::format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); - ShowContinueError(state, EnergyPlus::format("Occurs in ZoneHVAC:HighTemperatureRadiant = {}", thisHTR.Name)); + ShowContinueError(state, std::format("Occurs in ZoneHVAC:HighTemperatureRadiant = {}", thisHTR.Name)); ShowContinueError(state, "Assign a larger surface area or more surfaces in ZoneHVAC:HighTemperatureRadiant"); ShowFatalError(state, "DistributeHTRadGains: surface not large enough to receive thermal radiation heat flux"); } diff --git a/src/EnergyPlus/Humidifiers.cc b/src/EnergyPlus/Humidifiers.cc index 82c91ae525a..785ab80bfd2 100644 --- a/src/EnergyPlus/Humidifiers.cc +++ b/src/EnergyPlus/Humidifiers.cc @@ -45,6 +45,9 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + // ObjexxFCL Headers #include @@ -1408,7 +1411,7 @@ namespace Humidifiers { if (WhichHumidifier != 0) { return state.dataHumidifiers->Humidifier(WhichHumidifier).AirOutNode; } - ShowSevereError(state, EnergyPlus::format("GetAirInletNodeNum: Could not find Humidifier = \"{}\"", HumidifierName)); + ShowSevereError(state, std::format("GetAirInletNodeNum: Could not find Humidifier = \"{}\"", HumidifierName)); ErrorsFound = true; return 0; } diff --git a/src/EnergyPlus/HybridEvapCoolingModel.cc b/src/EnergyPlus/HybridEvapCoolingModel.cc index dd07fc62726..4031afa1a2d 100644 --- a/src/EnergyPlus/HybridEvapCoolingModel.cc +++ b/src/EnergyPlus/HybridEvapCoolingModel.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include #include // ObjexxFCL Headers @@ -604,8 +605,8 @@ namespace HybridEvapCoolingModel { // N11, \field Mode1 Maximum Outdoor Air Humidity Ratio ok = InitializeOutdoorAirHumidityRatioConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, EnergyPlus::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); - ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, std::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); + ShowContinueError(state, std::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -613,8 +614,8 @@ namespace HybridEvapCoolingModel { // N13, \field Mode1 Maximum Outdoor Air Relative Humidity ok = InitializeOutdoorAirRelativeHumidityConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, EnergyPlus::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); - ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, std::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); + ShowContinueError(state, std::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -622,8 +623,8 @@ namespace HybridEvapCoolingModel { // N15, \field Mode1 Maximum Return Air Temperature ok = InitializeReturnAirTemperatureConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, EnergyPlus::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); - ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, std::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); + ShowContinueError(state, std::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -631,8 +632,8 @@ namespace HybridEvapCoolingModel { // N17, \field Mode1 Maximum Return Air Humidity Ratio ok = InitializeReturnAirHumidityRatioConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, EnergyPlus::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); - ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, std::format("Invalid {}Or Invalid{}", cNumericFields(inter_Number), cNumericFields(inter_Number + 1))); + ShowContinueError(state, std::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -641,12 +642,12 @@ namespace HybridEvapCoolingModel { ok = InitializeReturnAirRelativeHumidityConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { ShowSevereError(state, - 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)); + std::format("Invalid {}={}Or Invalid{}={}", + cAlphaFields(inter_Number), + Alphas(inter_Number), + cAlphaFields(inter_Number + 1), + Alphas(inter_Number + 1))); + ShowContinueError(state, std::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } inter_Number = inter_Number + 2; @@ -655,9 +656,8 @@ namespace HybridEvapCoolingModel { ok = InitializeOSAFConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, - EnergyPlus::format("Error in OSAFConstraints{}through{}", cAlphaFields(inter_Number), cAlphaFields(inter_Number + 1))); - ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, std::format("Error in OSAFConstraints{}through{}", cAlphaFields(inter_Number), cAlphaFields(inter_Number + 1))); + ShowContinueError(state, std::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } // N22, \field Mode1 Minimum Supply Air Mass Flow Rate Ratio @@ -665,9 +665,8 @@ namespace HybridEvapCoolingModel { inter_Number = inter_Number + 2; ok = InitializeMsaRatioConstraints(Numbers(inter_Number), Numbers(inter_Number + 1)); if (!ok) { - ShowSevereError(state, - EnergyPlus::format("Error in OSAFConstraints{}through{}", cAlphaFields(inter_Number), cAlphaFields(inter_Number + 1))); - ShowContinueError(state, EnergyPlus::format("Entered in {}", cCurrentModuleObject)); + ShowSevereError(state, std::format("Error in OSAFConstraints{}through{}", cAlphaFields(inter_Number), cAlphaFields(inter_Number + 1))); + ShowContinueError(state, std::format("Entered in {}", cCurrentModuleObject)); ErrorsFound = true; } (*OperatingModes).push_back(*this); @@ -932,8 +931,7 @@ namespace HybridEvapCoolingModel { Real64 Model::CheckVal_T(EnergyPlusData &state, Real64 T) { if ((T > 100) || (T < 0)) { - ShowWarningError(state, - EnergyPlus::format("Supply air temperature exceeded realistic range error called in {}, check performance curve", Name)); + ShowWarningError(state, std::format("Supply air temperature exceeded realistic range error called in {}, check performance curve", Name)); } return T; } @@ -1262,16 +1260,14 @@ namespace HybridEvapCoolingModel { std::string ObjectID = Name.c_str(); if (StepIns.RHosa > 1) { ShowSevereError( - state, - EnergyPlus::format("Unitary hybrid system error, required relative humidity value 0-1, called in object{}.Check inputs", ObjectID)); + state, std::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, - EnergyPlus::format("Unitary hybrid system error, required relative humidity value 0-1, called in object{}.Check inputs", ObjectID)); + state, std::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 @@ -1851,9 +1847,9 @@ namespace HybridEvapCoolingModel { std::string ObjectID = Name.c_str(); 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)); + std::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)); } // Test system availability status UnitOn = 1; @@ -1924,7 +1920,7 @@ namespace HybridEvapCoolingModel { if (CoolingRequested || HeatingRequested) { ShowSevereError( state, - EnergyPlus::format( + std::format( "Outlet air mass flow rate of zero during period with conditioning need, check mode definition. Called in object {}", Name)); } diff --git a/src/EnergyPlus/HybridModel.cc b/src/EnergyPlus/HybridModel.cc index d06bc6154d1..56da6967e6b 100644 --- a/src/EnergyPlus/HybridModel.cc +++ b/src/EnergyPlus/HybridModel.cc @@ -45,6 +45,9 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + // ObjexxFCL Headers #include @@ -348,27 +351,26 @@ namespace HybridModel { } else { ShowWarningError( state, - EnergyPlus::format( - "Field \"{}\": default people sensible heat rate is not provided, default value of 0.6 will be used.", - cAlphaFieldNames(10))); + std::format("Field \"{}\": default people sensible heat rate is not provided, default value of 0.6 will be used.", + cAlphaFieldNames(10))); } if (peopleRadiantFractionSched != nullptr) { hmZone.peopleRadiantFracSched = peopleRadiantFractionSched; } else { ShowWarningError( state, - EnergyPlus::format("Field \"{}\": default people radiant heat portion (of sensible heat) is not provided, default " - "value of 0.7 will be used.", - cAlphaFieldNames(11))); + std::format("Field \"{}\": default people radiant heat portion (of sensible heat) is not provided, default " + "value of 0.7 will be used.", + cAlphaFieldNames(11))); } if (peopleCO2GenRateSched != nullptr) { hmZone.peopleCO2GenRateSched = peopleCO2GenRateSched; } else { ShowWarningError( state, - EnergyPlus::format("Field \"{}\": default people CO2 generation rate is not provided, default value of 0.0000000382 " - "kg/W will be used.", - cAlphaFieldNames(12))); + std::format("Field \"{}\": default people CO2 generation rate is not provided, default value of 0.0000000382 " + "kg/W will be used.", + cAlphaFieldNames(12))); } } @@ -445,7 +447,7 @@ namespace HybridModel { } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}=\"{}\" invalid {}=\"{}\" not found.", CurrentModuleObject, cAlphaArgs(1), cAlphaFieldNames(2), cAlphaArgs(2))); ErrorsFound = true; } diff --git a/src/EnergyPlus/IOFiles.cc b/src/EnergyPlus/IOFiles.cc index 5f06d014ee5..530cb0c6e30 100644 --- a/src/EnergyPlus/IOFiles.cc +++ b/src/EnergyPlus/IOFiles.cc @@ -45,20 +45,24 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include +#include +#include + +// Third Party Headers +#include + +// EnergyPlus Headers #include +// Local Headers #include "Data/EnergyPlusData.hh" #include "DataStringGlobals.hh" #include "FileSystem.hh" #include "InputProcessing/InputProcessor.hh" #include "ResultsFramework.hh" #include "UtilityRoutines.hh" -#include - -#include -#include -#include -#include namespace EnergyPlus { @@ -68,7 +72,7 @@ InputFile &InputFile::ensure_open(EnergyPlusData &state, const std::string &call open(false, output_to_file); } if (!good()) { - ShowFatalError(state, fmt::format("{}: Could not open file {} for input (read).", caller, filePath)); + ShowFatalError(state, EnergyPlus::format("{}: Could not open file {} for input (read).", caller, filePath.string())); } return *this; } @@ -215,7 +219,7 @@ InputOutputFile &InputOutputFile::ensure_open(EnergyPlusData &state, const std:: open(false, output_to_file); } if (!good()) { - ShowFatalError(state, fmt::format("{}: Could not open file {} for output (write).", caller, filePath)); + ShowFatalError(state, EnergyPlus::format("{}: Could not open file {} for output (write).", caller, filePath.string())); } return *this; } diff --git a/src/EnergyPlus/IOFiles.hh b/src/EnergyPlus/IOFiles.hh index cd1b1dd4522..3ce425bb815 100644 --- a/src/EnergyPlus/IOFiles.hh +++ b/src/EnergyPlus/IOFiles.hh @@ -49,7 +49,6 @@ #define IOFiles_hh_INCLUDED // C++ Headers -#include #include #include #include @@ -57,10 +56,6 @@ #include #include -// EnergyPlus Headers -#include -#include - // Third Party Headers #include #include @@ -70,6 +65,10 @@ #include #include +// EnergyPlus Headers +#include +#include + namespace { struct DoubleWrapper { @@ -304,31 +303,6 @@ public: auto str = fmt::format(fmt::runtime(spec_builder()), next_float(val)); return fmt::format_to(ctx.out(), "{}", zero_pad_exponent(str)); } - if (specs_.type == 'T') { // matches TrimSigDigits behavior - const auto fixed_output = should_be_fixed_output(val); - - if (fixed_output) { - const auto magnitude = std::pow(10, specs_.precision); - const auto adjusted = (val * magnitude) + 0.0001; - const auto truncated = std::trunc(adjusted) / magnitude; - specs_.type = 'F'; - return fmt::format_to(ctx.out(), fmt::runtime(spec_builder()), truncated); - } - specs_.type = 'E'; - specs_.precision += 2; - - // write the `E` formatted float to a std::string - auto str = fmt::format(fmt::runtime(spec_builder()), val); - str = zero_pad_exponent(str); - - // Erase last 2 numbers to truncate the value - const auto E_itr = std::find(begin(str), end(str), 'E'); - if (E_itr != str.end()) { - str.erase(std::prev(E_itr, 2), E_itr); - } - - return fmt::format_to(ctx.out(), "{}", str); - } return fmt::format_to(ctx.out(), fmt::runtime(spec_builder()), val); } }; @@ -360,7 +334,6 @@ inline constexpr bool is_fortran_syntax(const std::string_view format_str) within_fmt_str = false; break; case 'R': - case 'T': if (within_fmt_str) { return true; } else { @@ -726,10 +699,6 @@ template std::string vprint(std::string_view format_str, cons // Defines a custom formatting type 'R' (round_ which chooses between `E` and `G` depending // on the value being printed. // This is necessary for parity with the old "RoundSigDigits" utility function -// -// Defines a custom formatting type 'T' that that truncates the value -// to match the behavior of TrimSigDigits utility function -// namespace { template void print_fortran_syntax(std::ostream &os, std::string_view format_str, const Args &...args) diff --git a/src/EnergyPlus/IceThermalStorage.cc b/src/EnergyPlus/IceThermalStorage.cc index 2d650cd9346..cdd6182ce00 100644 --- a/src/EnergyPlus/IceThermalStorage.cc +++ b/src/EnergyPlus/IceThermalStorage.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -981,8 +982,8 @@ namespace IceThermalStorage { ShowContinueError( state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - EnergyPlus::format("{} does not have 2 independent variables and thus cannot be used for detailed ice storage", - state.dataIPShortCut->cAlphaArgs(6))); + std::format("{} does not have 2 independent variables and thus cannot be used for detailed ice storage", + state.dataIPShortCut->cAlphaArgs(6))); ErrorsFound = true; } else { if (state.dataIPShortCut->cAlphaArgs(5) == "FRACTIONCHARGEDLMTD") { @@ -995,12 +996,11 @@ namespace IceThermalStorage { state.dataIceThermalStorage->DetailedIceStorage(iceNum).DischargeCurveTypeNum = CurveVars::LMTDFracCharged; } else { ShowSevereError(state, - EnergyPlus::format("{}: Discharge curve independent variable options not valid, option={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(5))); + std::format("{}: Discharge curve independent variable options not valid, option={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(5))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "The valid options are: FractionChargedLMTD, FractionDischargedLMTD, LMTDMassFlow or LMTDFractionCharged"); ErrorsFound = true; @@ -1018,22 +1018,20 @@ namespace IceThermalStorage { state.dataIceThermalStorage->DetailedIceStorage(iceNum).ChargeCurveName = state.dataIPShortCut->cAlphaArgs(8); state.dataIceThermalStorage->DetailedIceStorage(iceNum).ChargeCurveNum = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(8)); if (state.dataIceThermalStorage->DetailedIceStorage(iceNum).ChargeCurveNum <= 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } int chargeCurveDim = state.dataCurveManager->curves(state.dataIceThermalStorage->DetailedIceStorage(iceNum).ChargeCurveNum)->numDims; if (chargeCurveDim != 2) { - ShowSevereError(state, - EnergyPlus::format("{}: Charge curve must have 2 independent variables", state.dataIPShortCut->cCurrentModuleObject)); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}: Charge curve must have 2 independent variables", state.dataIPShortCut->cCurrentModuleObject)); ShowContinueError(state, - EnergyPlus::format("{} does not have 2 independent variables and thus cannot be used for detailed ice storage", - state.dataIPShortCut->cAlphaArgs(8))); + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("{} does not have 2 independent variables and thus cannot be used for detailed ice storage", + state.dataIPShortCut->cAlphaArgs(8))); ErrorsFound = true; } else { if (state.dataIPShortCut->cAlphaArgs(7) == "FRACTIONCHARGEDLMTD") { @@ -1046,12 +1044,11 @@ namespace IceThermalStorage { state.dataIceThermalStorage->DetailedIceStorage(iceNum).ChargeCurveTypeNum = CurveVars::LMTDFracCharged; } else { ShowSevereError(state, - EnergyPlus::format("{}: Charge curve independent variable options not valid, option={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(7))); + std::format("{}: Charge curve independent variable options not valid, option={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(7))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "The valid options are: FractionChargedLMTD, FractionDischargedLMTD, LMTDMassFlow or LMTDFractionCharged"); ErrorsFound = true; @@ -1072,11 +1069,10 @@ namespace IceThermalStorage { ShowSevereError( state, EnergyPlus::format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError( - state, - EnergyPlus::format("Curve fit time step invalid, less than zero or greater than 1 for {}", state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Curve fit time step invalid, less than zero or greater than 1 for {}", state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -1087,9 +1083,9 @@ namespace IceThermalStorage { (state.dataIceThermalStorage->DetailedIceStorage(iceNum).ThawProcessIndicator.empty())) { state.dataIceThermalStorage->DetailedIceStorage(iceNum).ThawProcessIndex = DetIce::OutsideMelt; } else { - ShowSevereError(state, EnergyPlus::format("Invalid thaw process indicator of {} was entered", state.dataIPShortCut->cAlphaArgs(9))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid thaw process indicator of {} was entered", state.dataIPShortCut->cAlphaArgs(9))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, R"(Value should either be "InsideMelt" or "OutsideMelt")"); state.dataIceThermalStorage->DetailedIceStorage(iceNum).ThawProcessIndex = DetIce::InsideMelt; // Severe error will end simulation, but just in case... @@ -1099,14 +1095,14 @@ namespace IceThermalStorage { state.dataIPShortCut->cAlphaArgs(10), state.dataIceThermalStorage->ThermalStorageSizing, &ThermalStorageSizingData::name); if (state.dataIceThermalStorage->DetailedIceStorage(iceNum).TESSizingIndex == 0 && state.dataIceThermalStorage->DetailedIceStorage(iceNum).NomCapacityWasAutoSized) { - ShowSevereError( - state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(10), state.dataIPShortCut->cAlphaArgs(10))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(10), state.dataIPShortCut->cAlphaArgs(10))); ShowContinueError(state, - EnergyPlus::format("Input field {} must be entered when input field {} is autosized", - state.dataIPShortCut->cAlphaFieldNames(10), - state.dataIPShortCut->cNumericFieldNames(1))); + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Input field {} must be entered when input field {} is autosized", + state.dataIPShortCut->cAlphaFieldNames(10), + state.dataIPShortCut->cNumericFieldNames(1))); ErrorsFound = true; } @@ -1121,8 +1117,8 @@ namespace IceThermalStorage { ShowSevereError( state, EnergyPlus::format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(3), state.dataIPShortCut->rNumericArgs(3))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Value is either less than/equal to zero or greater than 1"); ErrorsFound = true; } @@ -1132,8 +1128,8 @@ namespace IceThermalStorage { ShowSevereError( state, EnergyPlus::format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(4), state.dataIPShortCut->rNumericArgs(4))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Value is either less than/equal to zero or greater than 1"); ErrorsFound = true; } @@ -1143,8 +1139,8 @@ namespace IceThermalStorage { ShowSevereError( state, EnergyPlus::format("Invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(5), state.dataIPShortCut->rNumericArgs(5))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Value is either less than/equal to zero or greater than 0.1 (10%)"); ErrorsFound = true; } @@ -1155,8 +1151,8 @@ namespace IceThermalStorage { EnergyPlus::format("Potentially invalid {}={:.3R}", state.dataIPShortCut->cNumericFieldNames(6), state.dataIPShortCut->rNumericArgs(6))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Value is either less than -10.0C or greater than 10.0C"); ShowContinueError(state, "This value will be allowed but the user should verify that this temperature is correct"); } @@ -1187,7 +1183,7 @@ namespace IceThermalStorage { } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, std::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } diff --git a/src/EnergyPlus/IndoorGreen.cc b/src/EnergyPlus/IndoorGreen.cc index e0d92246826..7a07f0eec66 100644 --- a/src/EnergyPlus/IndoorGreen.cc +++ b/src/EnergyPlus/IndoorGreen.cc @@ -45,8 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -// C++ Headers - +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/InputProcessing/CsvParser.cc b/src/EnergyPlus/InputProcessing/CsvParser.cc index 7bf466e12f3..747558ecb85 100644 --- a/src/EnergyPlus/InputProcessing/CsvParser.cc +++ b/src/EnergyPlus/InputProcessing/CsvParser.cc @@ -45,12 +45,15 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#include -#include +// C++ Headers +#include + +// Third Party Headers #include #include -#include -#include + +// EnergyPlus Headers +#include using json = nlohmann::json; @@ -243,7 +246,7 @@ void CsvParser::parse_line(std::string_view csv, size_t &index, json &columns) if (token == Token::LINE_END || token == Token::FILE_END) { if (has_extra_columns) { warnings_.emplace_back( - fmt::format("CsvParser - Line {} - Expected {} columns, got {}. Ignored extra columns. Error in following line.", + std::format("CsvParser - Line {} - Expected {} columns, got {}. Ignored extra columns. Error in following line.", this_cur_line_num, num_columns, parsed_values), @@ -269,7 +272,7 @@ void CsvParser::parse_line(std::string_view csv, size_t &index, json &columns) // some external programs append an extra blank line in their exports. if (!line.empty() || !last_line) { success = false; - errors_.emplace_back(fmt::format("CsvParser - Line {} - Expected {} columns, got {}. Error in following line.", + errors_.emplace_back(std::format("CsvParser - Line {} - Expected {} columns, got {}. Error in following line.", this_cur_line_num, num_columns, parsed_values), @@ -290,7 +293,7 @@ void CsvParser::parse_line(std::string_view csv, size_t &index, json &columns) if (next_col < num_columns) { // Push a nan for blank value columns.at(next_col).push_back(json::value_t::null); - warnings_.emplace_back(fmt::format("CsvParser - Line {} Column {} - Blank value found, setting to null. Error in following line.", + warnings_.emplace_back(std::format("CsvParser - Line {} Column {} - Blank value found, setting to null. Error in following line.", this_cur_line_num, next_col + 1), false); diff --git a/src/EnergyPlus/InputProcessing/IdfParser.cc b/src/EnergyPlus/InputProcessing/IdfParser.cc index 5aa1b22e743..e000730e55f 100644 --- a/src/EnergyPlus/InputProcessing/IdfParser.cc +++ b/src/EnergyPlus/InputProcessing/IdfParser.cc @@ -45,14 +45,20 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#include -#include +// C++ Headers #include +#include + +// Third Party Headers #include #include #include #include +// EnergyPlus Headers +#include +#include + using json = nlohmann::json; auto const icompare = [](std::string_view a, std::string_view b) { // (AUTO_OK) diff --git a/src/EnergyPlus/InputProcessing/InputProcessor.cc b/src/EnergyPlus/InputProcessing/InputProcessor.cc index 3ddd517b2cf..2d35e2a0ecc 100644 --- a/src/EnergyPlus/InputProcessing/InputProcessor.cc +++ b/src/EnergyPlus/InputProcessing/InputProcessor.cc @@ -47,14 +47,22 @@ // C++ Headers #include +#include #include #include #include #include #include +// ObjexxFCL Headers #include +// Third Party Headers +#include +#include +#include +#include + // EnergyPlus Headers #include #include @@ -70,11 +78,6 @@ #include #include #include -#include - -#include -#include -#include namespace EnergyPlus { // Module containing the input processor routines @@ -259,7 +262,7 @@ void cleanEPJSON(json &epjson) void InputProcessor::processInput(EnergyPlusData &state) { if (!FileSystem::fileExists(state.dataStrGlobals->inputFilePath)) { - ShowFatalError(state, fmt::format("Input file path {} not found", state.dataStrGlobals->inputFilePath)); + ShowFatalError(state, EnergyPlus::format("Input file path {} not found", state.dataStrGlobals->inputFilePath.string())); return; } @@ -534,7 +537,7 @@ int InputProcessor::getNumObjectsFound(EnergyPlusData &state, std::string_view c if (schema()["properties"].find(std::string(ObjectWord)) == schema()["properties"].end()) { auto tmp_umit = caseInsensitiveObjectMap.find(convertToUpper(ObjectWord)); if (tmp_umit == caseInsensitiveObjectMap.end()) { - ShowWarningError(state, fmt::format("Requested Object not found in Definitions: {}", ObjectWord)); + ShowWarningError(state, EnergyPlus::format("Requested Object not found in Definitions: {}", ObjectWord)); } } return 0; @@ -1042,7 +1045,7 @@ void InputProcessor::getObjectItem(EnergyPlusData &state, auto const field_info = legacy_idd_field_info.find(field); auto const &field_info_val = field_info.value(); if (field_info == legacy_idd_field_info.end()) { - ShowFatalError(state, fmt::format(R"(Could not find field = "{}" in "{}" in epJSON Schema.)", field, Object)); + ShowFatalError(state, EnergyPlus::format(R"(Could not find field = "{}" in "{}" in epJSON Schema.)", field, Object)); } bool within_idf_fields = (i < maxFields.max_fields); @@ -1099,7 +1102,7 @@ void InputProcessor::getObjectItem(EnergyPlusData &state, auto const &field_info_val = field_info.value(); if (field_info == legacy_idd_field_info.end()) { - ShowFatalError(state, fmt::format(R"(Could not find field = "{}" in "{}" in epJSON Schema.)", field_name, Object)); + ShowFatalError(state, EnergyPlus::format(R"(Could not find field = "{}" in "{}" in epJSON Schema.)", field_name, Object)); } bool within_idf_extensible_fields = (extensible_count < maxFields.max_extensible_fields); @@ -1426,7 +1429,7 @@ void InputProcessor::getObjectDefMaxArgs(EnergyPlusData &state, if (auto found = props.find(std::string(ObjectWord)); found == props.end()) { auto tmp_umit = caseInsensitiveObjectMap.find(convertToUpper(ObjectWord)); if (tmp_umit == caseInsensitiveObjectMap.end()) { - ShowSevereError(state, fmt::format(R"(getObjectDefMaxArgs: Did not find object="{}" in list of objects.)", ObjectWord)); + ShowSevereError(state, EnergyPlus::format(R"(getObjectDefMaxArgs: Did not find object="{}" in list of objects.)", ObjectWord)); return; } object = &props[tmp_umit->second]; @@ -1439,7 +1442,7 @@ void InputProcessor::getObjectDefMaxArgs(EnergyPlusData &state, if (auto found = epJSON.find(std::string(ObjectWord)); found == epJSON.end()) { auto tmp_umit = caseInsensitiveObjectMap.find(convertToUpper(ObjectWord)); if (tmp_umit == caseInsensitiveObjectMap.end()) { - ShowSevereError(state, fmt::format(R"(getObjectDefMaxArgs: Did not find object="{}" in list of objects.)", ObjectWord)); + ShowSevereError(state, EnergyPlus::format(R"(getObjectDefMaxArgs: Did not find object="{}" in list of objects.)", ObjectWord)); return; } objects = &epJSON[tmp_umit->second]; diff --git a/src/EnergyPlus/InputProcessing/InputValidation.cc b/src/EnergyPlus/InputProcessing/InputValidation.cc index d41e85346b1..a59a3e751e9 100644 --- a/src/EnergyPlus/InputProcessing/InputValidation.cc +++ b/src/EnergyPlus/InputProcessing/InputValidation.cc @@ -45,18 +45,16 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -// C++ Headers - -// ObjexxFCL Headers - -// EnergyPlus Headers -#include +// Third Party Headers #include #include #include #include #include +// EnergyPlus Headers +#include + using json = nlohmann::json; Validation::Validation(json const *parsed_schema) diff --git a/src/EnergyPlus/IntegratedHeatPump.cc b/src/EnergyPlus/IntegratedHeatPump.cc index 7b92132fc14..b6ad7621f5a 100644 --- a/src/EnergyPlus/IntegratedHeatPump.cc +++ b/src/EnergyPlus/IntegratedHeatPump.cc @@ -45,6 +45,9 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + // ObjexxFCL Headers #include #include @@ -610,7 +613,7 @@ void GetIHPInput(EnergyPlusData &state) errFlag = false; ihp.SHDWHWHCoilIndex = GetCoilIndexVariableSpeed(state, ihp.SHDWHWHCoilType, ihp.SHDWHWHCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); + ShowContinueError(state, std::format("...specified in {}=\"{}\".", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } else { state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SHDWHWHCoilIndex).bIsDesuperheater = true; @@ -692,8 +695,7 @@ void GetIHPInput(EnergyPlusData &state) if ((state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SCWHCoilIndex).AirInletNodeNum != InNode) || (state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SCWHCoilIndex).AirOutletNodeNum != OutNode)) { - ShowContinueError(state, - EnergyPlus::format("Mistaken air node connection: {}{}-wrong coil node names.", CurrentModuleObject, ihp.SCWHCoilName)); + ShowContinueError(state, std::format("Mistaken air node connection: {}{}-wrong coil node names.", CurrentModuleObject, ihp.SCWHCoilName)); ErrorsFound = true; } SetUpCompSets(state, CurrentModuleObject, ihp.Name + " Cooling Coil", ihp.SCWHCoilType, ihp.SCWHCoilName, InNodeName, OutNodeName); @@ -718,8 +720,8 @@ void GetIHPInput(EnergyPlusData &state) if ((state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SCDWHCoolCoilIndex).AirInletNodeNum != InNode) || (state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SCDWHCoolCoilIndex).AirOutletNodeNum != OutNode)) { - ShowContinueError( - state, EnergyPlus::format("Mistaken air node connection: {}{}-wrong coil node names.", CurrentModuleObject, ihp.SCDWHCoolCoilName)); + ShowContinueError(state, + std::format("Mistaken air node connection: {}{}-wrong coil node names.", CurrentModuleObject, ihp.SCDWHCoolCoilName)); ErrorsFound = true; } SetUpCompSets(state, CurrentModuleObject, ihp.Name + " Cooling Coil", ihp.SCDWHCoolCoilType, ihp.SCDWHCoolCoilName, InNodeName, OutNodeName); @@ -752,8 +754,7 @@ void GetIHPInput(EnergyPlusData &state) OutNodeName = state.dataLoopNodes->NodeID(OutNode); if (state.dataVariableSpeedCoils->VarSpeedCoil(ChildCoilIndex).AirInletNodeNum != InNode) { ShowContinueError( - state, - EnergyPlus::format("Mistaken air node connection: {}- cooling coil outlet mismatches heating coil inlet.", CurrentModuleObject)); + state, std::format("Mistaken air node connection: {}- cooling coil outlet mismatches heating coil inlet.", CurrentModuleObject)); ErrorsFound = true; } TestCompSet(state, CurrentModuleObject, ihp.Name + " Heating Coil", InNodeName, OutNodeName, "Heating Air Nodes"); @@ -798,8 +799,8 @@ void GetIHPInput(EnergyPlusData &state) if ((state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SHDWHHeatCoilIndex).AirInletNodeNum != InNode) || (state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SHDWHHeatCoilIndex).AirOutletNodeNum != OutNode)) { - ShowContinueError( - state, EnergyPlus::format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SHDWHHeatCoilName)); + ShowContinueError(state, + std::format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SHDWHHeatCoilName)); ErrorsFound = true; } SetUpCompSets(state, CurrentModuleObject, ihp.Name + " Heating Coil", ihp.SHDWHHeatCoilType, ihp.SHDWHHeatCoilName, InNodeName, OutNodeName); @@ -833,8 +834,8 @@ void GetIHPInput(EnergyPlusData &state) ihp.WaterOutletNodeNum = OutNode; if ((state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SCDWHWHCoilIndex).WaterInletNodeNum != InNode) || (state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SCDWHWHCoilIndex).WaterOutletNodeNum != OutNode)) { - ShowContinueError( - state, EnergyPlus::format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SCDWHWHCoilName)); + ShowContinueError(state, + std::format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SCDWHWHCoilName)); ErrorsFound = true; } @@ -900,8 +901,8 @@ void GetIHPInput(EnergyPlusData &state) if ((state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SHDWHWHCoilIndex).WaterInletNodeNum != InNode) || (state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SHDWHWHCoilIndex).WaterOutletNodeNum != OutNode)) { - ShowContinueError( - state, EnergyPlus::format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SHDWHWHCoilName)); + ShowContinueError(state, + std::format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SHDWHWHCoilName)); ErrorsFound = true; } SetUpCompSets(state, CurrentModuleObject, ihp.Name + " Water Coil", ihp.SHDWHWHCoilType, ihp.SHDWHWHCoilName, InNodeName, OutNodeName); @@ -926,8 +927,7 @@ void GetIHPInput(EnergyPlusData &state) if ((state.dataVariableSpeedCoils->VarSpeedCoil(ihp.DWHCoilIndex).WaterInletNodeNum != InNode) || (state.dataVariableSpeedCoils->VarSpeedCoil(ihp.DWHCoilIndex).WaterOutletNodeNum != OutNode)) { - ShowContinueError(state, - EnergyPlus::format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.DWHCoilName)); + ShowContinueError(state, std::format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.DWHCoilName)); ErrorsFound = true; } SetUpCompSets(state, CurrentModuleObject, ihp.Name + " Water Coil", ihp.DWHCoilType, ihp.DWHCoilName, InNodeName, OutNodeName); @@ -971,8 +971,8 @@ void GetIHPInput(EnergyPlusData &state) ihp.ODAirOutletNodeNum = OutNode; if ((state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SCDWHWHCoilIndex).AirInletNodeNum != InNode) || (state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SCDWHWHCoilIndex).AirOutletNodeNum != OutNode)) { - ShowContinueError( - state, EnergyPlus::format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SCDWHWHCoilName)); + ShowContinueError(state, + std::format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SCDWHWHCoilName)); ErrorsFound = true; } @@ -1042,8 +1042,8 @@ void GetIHPInput(EnergyPlusData &state) if ((state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SHDWHWHCoilIndex).AirInletNodeNum != InNode) || (state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SHDWHWHCoilIndex).AirOutletNodeNum != OutNode)) { - ShowContinueError( - state, EnergyPlus::format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SHDWHWHCoilName)); + ShowContinueError(state, + std::format("Mistaken air node connection: {}:{}-wrong coil node names.", CurrentModuleObject, ihp.SHDWHWHCoilName)); ErrorsFound = true; } SetUpCompSets(state, CurrentModuleObject, ihp.Name + " Outdoor Coil", ihp.SHDWHWHCoilType, ihp.SHDWHWHCoilName, InNodeName, OutNodeName); @@ -1081,8 +1081,7 @@ void GetIHPInput(EnergyPlusData &state) if (ErrorsFound) { ShowFatalError( - state, - EnergyPlus::format("{} Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + state, std::format("{} Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } for (int CoilCounter = 1; CoilCounter <= NumASIHPs; ++CoilCounter) { @@ -1216,9 +1215,9 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - EnergyPlus::format("SizeIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + std::format("SizeIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } if (state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum).IHPCoilsSized) { @@ -1231,15 +1230,14 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) bool errFlag = false; SetVarSpeedCoilData(state, ihp.SCCoilIndex, errFlag, _, ihp.SHCoilIndex); if (errFlag) { - ShowSevereError(state, - EnergyPlus::format(R"(SizeIHP: Could not match cooling coil"{}" with heating coil="{}")", ihp.SCCoilName, ihp.SHCoilName)); + ShowSevereError(state, std::format(R"(SizeIHP: Could not match cooling coil"{}" with heating coil="{}")", ihp.SCCoilName, ihp.SHCoilName)); ErrorsFound = true; }; errFlag = false; SizeVarSpeedCoil(state, ihp.SCCoilIndex, errFlag); // size cooling coil if (errFlag) { - ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size SC coil\"{}\"", ihp.SCCoilName)); + ShowSevereError(state, std::format("SizeIHP: failed to size SC coil\"{}\"", ihp.SCCoilName)); ErrorsFound = true; } else { RatedCapacity = state.dataVariableSpeedCoils->VarSpeedCoil(ihp.SCCoilIndex).RatedCapCoolTotal; @@ -1248,7 +1246,7 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) errFlag = false; SizeVarSpeedCoil(state, ihp.SHCoilIndex, errFlag); // size heating coil if (errFlag) { - ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size SH coil\"{}\"", ihp.SHCoilName)); + ShowSevereError(state, std::format("SizeIHP: failed to size SH coil\"{}\"", ihp.SHCoilName)); ErrorsFound = true; }; @@ -1263,7 +1261,7 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) // size SCDWH air coil SizeVarSpeedCoil(state, ihp.SCDWHCoolCoilIndex, errFlag); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size SCDWH cooling coil\"{}\"", ihp.SCDWHCoolCoilName)); + ShowSevereError(state, std::format("SizeIHP: failed to size SCDWH cooling coil\"{}\"", ihp.SCDWHCoolCoilName)); ErrorsFound = true; }; @@ -1271,7 +1269,7 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) errFlag = false; SizeVarSpeedCoil(state, ihp.SHDWHHeatCoilIndex, errFlag); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size SHDWH heating coil\"{}\"", ihp.SHDWHHeatCoilName)); + ShowSevereError(state, std::format("SizeIHP: failed to size SHDWH heating coil\"{}\"", ihp.SHDWHHeatCoilName)); ErrorsFound = true; }; @@ -1285,7 +1283,7 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) errFlag = false; SizeVarSpeedCoil(state, ihp.SCWHCoilIndex, errFlag); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size SCWH coil\"{}\"", ihp.SCWHCoilName)); + ShowSevereError(state, std::format("SizeIHP: failed to size SCWH coil\"{}\"", ihp.SCWHCoilName)); ErrorsFound = true; }; @@ -1297,7 +1295,7 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) errFlag = false; SizeVarSpeedCoil(state, ihp.DWHCoilIndex, errFlag); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size DWH coil\"{}\"", ihp.DWHCoilName)); + ShowSevereError(state, std::format("SizeIHP: failed to size DWH coil\"{}\"", ihp.DWHCoilName)); ErrorsFound = true; }; @@ -1309,7 +1307,7 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) errFlag = false; SizeVarSpeedCoil(state, ihp.SCDWHWHCoilIndex, errFlag); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size SCDWH water heating coil\"{}\"", ihp.SCDWHWHCoilName)); + ShowSevereError(state, std::format("SizeIHP: failed to size SCDWH water heating coil\"{}\"", ihp.SCDWHWHCoilName)); ErrorsFound = true; }; @@ -1321,7 +1319,7 @@ void SizeIHP(EnergyPlusData &state, int const DXCoilNum) errFlag = false; SizeVarSpeedCoil(state, ihp.SHDWHWHCoilIndex, errFlag); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("SizeIHP: failed to size SHDWH water heating coil\"{}\"", ihp.SHDWHWHCoilName)); + ShowSevereError(state, std::format("SizeIHP: failed to size SHDWH water heating coil\"{}\"", ihp.SHDWHWHCoilName)); ErrorsFound = true; }; @@ -1342,9 +1340,9 @@ void InitializeIHP(EnergyPlusData &state, int const DXCoilNum) if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - EnergyPlus::format("InitializeIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + std::format("InitializeIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } auto &ihp = state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum); @@ -1378,9 +1376,9 @@ void UpdateIHP(EnergyPlusData &state, int const DXCoilNum) if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - EnergyPlus::format("UpdateIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + std::format("UpdateIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } auto &ihp = state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum); @@ -1490,9 +1488,9 @@ void DecideWorkMode(EnergyPlusData &state, if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - EnergyPlus::format("DecideWorkMode: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + std::format("DecideWorkMode: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } auto &ihp = state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum); @@ -1631,9 +1629,9 @@ void ClearCoils(EnergyPlusData &state, int const DXCoilNum) if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - EnergyPlus::format("ClearCoils: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + std::format("ClearCoils: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } auto &ihp = state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum); @@ -1659,9 +1657,9 @@ IHPOperationMode GetCurWorkMode(EnergyPlusData &state, int const DXCoilNum) if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - EnergyPlus::format("GetCurWorkMode: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + std::format("GetCurWorkMode: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } if (state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum).IHPCoilsSized == false) { @@ -1710,7 +1708,7 @@ int GetCoilIndexIHP(EnergyPlusData &state, IndexNum = Util::FindItemInList(CoilName, state.dataIntegratedHP->IntegratedHeatPumps); if (IndexNum == 0) { - ShowSevereError(state, EnergyPlus::format(R"(GetCoilIndexIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, std::format(R"(GetCoilIndexIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; } @@ -1752,7 +1750,7 @@ int GetCoilInletNodeIHP(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format(R"(GetCoilInletNodeIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, std::format(R"(GetCoilInletNodeIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -1795,7 +1793,7 @@ int GetDWHCoilInletNodeIHP(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format(R"(GetCoilInletNodeIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, std::format(R"(GetCoilInletNodeIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -1838,7 +1836,7 @@ int GetDWHCoilOutletNodeIHP(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format(R"(GetCoilInletNodeIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, std::format(R"(GetCoilInletNodeIHP: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -1892,7 +1890,7 @@ int GetIHPDWHCoilPLFFPLR(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format(R"(GetIHPDWHCoilPLFFPLR: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, std::format(R"(GetIHPDWHCoilPLFFPLR: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; PLRNumber = 0; } @@ -1950,8 +1948,7 @@ Real64 GetDWHCoilCapacityIHP(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, - EnergyPlus::format(R"(GetCoilCapacityVariableSpeed: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, std::format(R"(GetCoilCapacityVariableSpeed: Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; CoilCapacity = -1000.0; } @@ -1971,9 +1968,9 @@ int GetLowSpeedNumIHP(EnergyPlusData &state, int const DXCoilNum) if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - EnergyPlus::format("GetLowSpeedNumIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + std::format("GetLowSpeedNumIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } auto const &ihp = state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum); @@ -2014,9 +2011,9 @@ int GetMaxSpeedNumIHP(EnergyPlusData &state, int const DXCoilNum) if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - EnergyPlus::format("GetMaxSpeedNumIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + std::format("GetMaxSpeedNumIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } int SpeedNum(0); @@ -2072,9 +2069,9 @@ Real64 GetAirVolFlowRateIHP(EnergyPlusData &state, if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - EnergyPlus::format("GetAirVolFlowRateIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + std::format("GetAirVolFlowRateIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } auto &ihp = state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum); @@ -2181,9 +2178,9 @@ Real64 GetWaterVolFlowRateIHP(EnergyPlusData &state, int const DXCoilNum, int co if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - EnergyPlus::format("GetWaterVolFlowRateIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + std::format("GetWaterVolFlowRateIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } auto const &ihp = state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum); @@ -2264,9 +2261,9 @@ Real64 GetAirMassFlowRateIHP(EnergyPlusData &state, if (DXCoilNum > static_cast(state.dataIntegratedHP->IntegratedHeatPumps.size()) || DXCoilNum < 1) { ShowFatalError(state, - EnergyPlus::format("GetAirMassFlowRateIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", - DXCoilNum, - state.dataIntegratedHP->IntegratedHeatPumps.size())); + std::format("GetAirMassFlowRateIHP: Invalid CompIndex passed={}, Number of Integrated HPs={}, IHP name=AS-IHP", + DXCoilNum, + state.dataIntegratedHP->IntegratedHeatPumps.size())); } auto &ihp = state.dataIntegratedHP->IntegratedHeatPumps(DXCoilNum); diff --git a/src/EnergyPlus/InternalHeatGains.cc b/src/EnergyPlus/InternalHeatGains.cc index 3e21961f022..1cd6c14fa5e 100644 --- a/src/EnergyPlus/InternalHeatGains.cc +++ b/src/EnergyPlus/InternalHeatGains.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include #include #include @@ -1497,9 +1498,8 @@ namespace InternalHeatGains { } if (thisZoneGas.FractionConvected < 0.0) { if (Item1 == 1) { - ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, gasEqModuleObject, thisGasEqInput.Name)); + ShowSevereError(state, + std::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, gasEqModuleObject, thisGasEqInput.Name)); ErrorsFound = true; } } @@ -1625,8 +1625,7 @@ namespace InternalHeatGains { thisZoneHWEq.FractionConvected = 0.0; } if (thisZoneHWEq.FractionConvected < 0.0) { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, hwEqModuleObject, thisHWEqInput.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, hwEqModuleObject, thisHWEqInput.Name)); ErrorsFound = true; } @@ -1749,8 +1748,7 @@ namespace InternalHeatGains { thisZoneStmEq.FractionConvected = 0.0; } if (thisZoneStmEq.FractionConvected < 0.0) { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, stmEqModuleObject, IHGAlphas(1))); + ShowSevereError(state, std::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, stmEqModuleObject, IHGAlphas(1))); ErrorsFound = true; } @@ -1869,13 +1867,13 @@ namespace InternalHeatGains { if (thisZoneOthEq.OtherEquipFuelType == Constant::eFuel::Invalid || thisZoneOthEq.OtherEquipFuelType == Constant::eFuel::Water) { ShowSevereError(state, - EnergyPlus::format("{}{}: invalid {} entered={} for {}={}", - RoutineName, - othEqModuleObject, - IHGAlphaFieldNames(2), - IHGAlphas(2), - IHGAlphaFieldNames(1), - thisOthEqInput.Name)); + std::format("{}{}: invalid {} entered={} for {}={}", + RoutineName, + othEqModuleObject, + IHGAlphaFieldNames(2), + IHGAlphas(2), + IHGAlphaFieldNames(1), + thisOthEqInput.Name)); ErrorsFound = true; } @@ -1913,14 +1911,14 @@ namespace InternalHeatGains { if (thisZoneOthEq.DesignLevel < 0.0 && thisZoneOthEq.OtherEquipFuelType != Constant::eFuel::Invalid && thisZoneOthEq.OtherEquipFuelType != Constant::eFuel::None) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} is not allowed to be negative", - RoutineName, - othEqModuleObject, - thisOthEqInput.Name, - IHGNumericFieldNames(levelFieldNum))); - ShowContinueError(state, - EnergyPlus::format("... when a fuel type of {} is specified.", - Constant::eFuelNames[(int)thisZoneOthEq.OtherEquipFuelType])); + std::format("{}{}=\"{}\", {} is not allowed to be negative", + RoutineName, + othEqModuleObject, + thisOthEqInput.Name, + IHGNumericFieldNames(levelFieldNum))); + ShowContinueError( + state, + std::format("... when a fuel type of {} is specified.", Constant::eFuelNames[(int)thisZoneOthEq.OtherEquipFuelType])); ErrorsFound = true; } @@ -1963,8 +1961,8 @@ namespace InternalHeatGains { thisZoneOthEq.FractionConvected = 0.0; } if (thisZoneOthEq.FractionConvected < 0.0) { - ShowSevereError( - state, EnergyPlus::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, othEqModuleObject, thisOthEqInput.Name)); + ShowSevereError(state, + std::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, othEqModuleObject, thisOthEqInput.Name)); ErrorsFound = true; } @@ -2075,7 +2073,7 @@ namespace InternalHeatGains { } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\": invalid calculation method: {}", RoutineName, itEqModuleObject, IHGAlphas(1), IHGAlphas(3))); ErrorsFound = true; } @@ -2090,35 +2088,33 @@ namespace InternalHeatGains { if (zoneArea > 0.0) { spaceFrac = state.dataHeatBal->space(spaceNum).FloorArea / zoneArea; } else { - ShowSevereError(state, - EnergyPlus::format( - "{}Zone floor area is zero when allocating ElectricEquipment:ITE:AirCooled loads to Spaces.", - RoutineName)); + ShowSevereError( + state, + std::format("{}Zone floor area is zero when allocating ElectricEquipment:ITE:AirCooled loads to Spaces.", + RoutineName)); ShowContinueError(state, - EnergyPlus::format("Occurs for ElectricEquipment:ITE:AirCooled object ={} in Zone={}", - thisITEqInput.Name, - state.dataHeatBal->Zone(zoneNum).Name)); + std::format("Occurs for ElectricEquipment:ITE:AirCooled object ={} in Zone={}", + thisITEqInput.Name, + state.dataHeatBal->Zone(zoneNum).Name)); ErrorsFound = true; } } thisZoneITEq.DesignTotalPower = IHGNumbers(1) * IHGNumbers(2) * spaceFrac; if (IHGNumericFieldBlanks(1)) { - ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\", specifies {}, but that field is blank. 0 IT Equipment will result.", - RoutineName, - itEqModuleObject, - IHGAlphas(1), - IHGNumericFieldNames(1))); + ShowWarningError(state, + std::format("{}{}=\"{}\", specifies {}, but that field is blank. 0 IT Equipment will result.", + RoutineName, + itEqModuleObject, + IHGAlphas(1), + IHGNumericFieldNames(1))); } if (IHGNumericFieldBlanks(2)) { - ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\", specifies {}, but that field is blank. 0 IT Equipment will result.", - RoutineName, - itEqModuleObject, - IHGAlphas(1), - IHGNumericFieldNames(2))); + ShowWarningError(state, + std::format("{}{}=\"{}\", specifies {}, but that field is blank. 0 IT Equipment will result.", + RoutineName, + itEqModuleObject, + IHGAlphas(1), + IHGNumericFieldNames(2))); } } else if (equipmentLevel == "WATTS/AREA") { @@ -2128,13 +2124,13 @@ namespace InternalHeatGains { thisZoneITEq.DesignTotalPower = IHGNumbers(3) * state.dataHeatBal->space(spaceNum).FloorArea; if ((state.dataHeatBal->space(spaceNum).FloorArea <= 0.0) && !state.dataHeatBal->space(spaceNum).isRemainderSpace) { - ShowWarningError(state, - EnergyPlus::format( - "{}{}=\"{}\", specifies {}, but Space Floor Area = 0. 0 IT Equipment will result.", - RoutineName, - itEqModuleObject, - IHGAlphas(1), - IHGNumericFieldNames(3))); + ShowWarningError( + state, + std::format("{}{}=\"{}\", specifies {}, but Space Floor Area = 0. 0 IT Equipment will result.", + RoutineName, + itEqModuleObject, + IHGAlphas(1), + IHGNumericFieldNames(3))); } } else { ShowSevereError(state, @@ -2148,23 +2144,22 @@ namespace InternalHeatGains { } } if (IHGNumericFieldBlanks(3)) { - ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\", specifies {}, but that field is blank. 0 IT Equipment will result.", - RoutineName, - itEqModuleObject, - IHGAlphas(1), - IHGNumericFieldNames(3))); + ShowWarningError(state, + std::format("{}{}=\"{}\", specifies {}, but that field is blank. 0 IT Equipment will result.", + RoutineName, + itEqModuleObject, + IHGAlphas(1), + IHGNumericFieldNames(3))); } } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid {}, value ={}", - RoutineName, - itEqModuleObject, - IHGAlphas(1), - IHGAlphaFieldNames(4), - IHGAlphas(4))); + std::format("{}{}=\"{}\", invalid {}, value ={}", + RoutineName, + itEqModuleObject, + IHGAlphas(1), + IHGAlphaFieldNames(4), + IHGAlphas(4))); ShowContinueError(state, "...Valid values are \"Watts/Unit\" or \"Watts/Area\"."); ErrorsFound = true; } @@ -2191,22 +2186,22 @@ namespace InternalHeatGains { // Performance curves thisZoneITEq.CPUPowerFLTCurve = GetCurveIndex(state, IHGAlphas(7)); if (thisZoneITEq.CPUPowerFLTCurve == 0) { - ShowSevereError(state, EnergyPlus::format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", IHGAlphaFieldNames(7), IHGAlphas(7))); + ShowSevereError(state, std::format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); + ShowContinueError(state, std::format("Invalid {}={}", IHGAlphaFieldNames(7), IHGAlphas(7))); ErrorsFound = true; } thisZoneITEq.AirFlowFLTCurve = GetCurveIndex(state, IHGAlphas(8)); if (thisZoneITEq.AirFlowFLTCurve == 0) { - ShowSevereError(state, EnergyPlus::format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", IHGAlphaFieldNames(8), IHGAlphas(8))); + ShowSevereError(state, std::format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); + ShowContinueError(state, std::format("Invalid {}={}", IHGAlphaFieldNames(8), IHGAlphas(8))); ErrorsFound = true; } thisZoneITEq.FanPowerFFCurve = GetCurveIndex(state, IHGAlphas(9)); if (thisZoneITEq.FanPowerFFCurve == 0) { - ShowSevereError(state, EnergyPlus::format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", IHGAlphaFieldNames(9), IHGAlphas(9))); + ShowSevereError(state, std::format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); + ShowContinueError(state, std::format("Invalid {}={}", IHGAlphaFieldNames(9), IHGAlphas(9))); ErrorsFound = true; } @@ -2214,8 +2209,8 @@ namespace InternalHeatGains { // If this field isn't blank, it must point to a valid curve thisZoneITEq.RecircFLTCurve = GetCurveIndex(state, IHGAlphas(15)); if (thisZoneITEq.RecircFLTCurve == 0) { - ShowSevereError(state, EnergyPlus::format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", IHGAlphaFieldNames(15), IHGAlphas(15))); + ShowSevereError(state, std::format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); + ShowContinueError(state, std::format("Invalid {}={}", IHGAlphaFieldNames(15), IHGAlphas(15))); ErrorsFound = true; } } else { @@ -2227,8 +2222,8 @@ namespace InternalHeatGains { // If this field isn't blank, it must point to a valid curve thisZoneITEq.UPSEfficFPLRCurve = GetCurveIndex(state, IHGAlphas(16)); if (thisZoneITEq.UPSEfficFPLRCurve == 0) { - ShowSevereError(state, EnergyPlus::format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", IHGAlphaFieldNames(16), IHGAlphas(16))); + ShowSevereError(state, std::format("{}{} \"{}\"", RoutineName, itEqModuleObject, IHGAlphas(1))); + ShowContinueError(state, std::format("Invalid {}={}", IHGAlphaFieldNames(16), IHGAlphas(16))); ErrorsFound = true; } } else { @@ -2247,29 +2242,28 @@ namespace InternalHeatGains { // ZoneITEq(Loop).AirConnectionType = ITEInletConnection::RoomAirModel; ShowWarningError( state, - EnergyPlus::format("{}{}=\"{}Air Inlet Connection Type = RoomAirModel is not implemented yet, using ZoneAirNode", - RoutineName, - itEqModuleObject, - IHGAlphas(1))); + std::format("{}{}=\"{}Air Inlet Connection Type = RoomAirModel is not implemented yet, using ZoneAirNode", + RoutineName, + itEqModuleObject, + IHGAlphas(1))); thisZoneITEq.AirConnectionType = ITEInletConnection::ZoneAirNode; } ErrorsFound = ErrorsFound || (thisZoneITEq.AirConnectionType == ITEInletConnection::Invalid); if (IHGAlphaFieldBlanks(14)) { if (thisZoneITEq.AirConnectionType == ITEInletConnection::AdjustedSupply) { - ShowSevereError(state, EnergyPlus::format("{}{}: {}", RoutineName, itEqModuleObject, IHGAlphas(1))); + ShowSevereError(state, std::format("{}{}: {}", RoutineName, itEqModuleObject, IHGAlphas(1))); ShowContinueError(state, - EnergyPlus::format("For {}= AdjustedSupply, {} is required, but this field is blank.", - IHGAlphaFieldNames(11), - IHGAlphaFieldNames(14))); + std::format("For {}= AdjustedSupply, {} is required, but this field is blank.", + IHGAlphaFieldNames(11), + IHGAlphaFieldNames(14))); ErrorsFound = true; } else if (thisZoneITEq.FlowControlWithApproachTemps) { - ShowSevereError(state, EnergyPlus::format("{}{}: {}", RoutineName, itEqModuleObject, IHGAlphas(1))); - ShowContinueError( - state, - EnergyPlus::format("For {}= FlowControlWithApproachTemperatures, {} is required, but this field is blank.", - IHGAlphaFieldNames(3), - IHGAlphaFieldNames(14))); + ShowSevereError(state, std::format("{}{}: {}", RoutineName, itEqModuleObject, IHGAlphas(1))); + ShowContinueError(state, + std::format("For {}= FlowControlWithApproachTemperatures, {} is required, but this field is blank.", + IHGAlphaFieldNames(3), + IHGAlphaFieldNames(14))); ErrorsFound = true; } } else { @@ -2298,23 +2292,22 @@ namespace InternalHeatGains { if (thisZoneITEq.AirConnectionType == ITEInletConnection::AdjustedSupply && !supplyNodeFound) { // supply air node must match zone equipment supply air node for these conditions - ShowSevereError(state, EnergyPlus::format("{}: ElectricEquipment:ITE:AirCooled {}", RoutineName, thisZoneITEq.Name)); + ShowSevereError(state, std::format("{}: ElectricEquipment:ITE:AirCooled {}", RoutineName, thisZoneITEq.Name)); ShowContinueError(state, "Air Inlet Connection Type = AdjustedSupply but no Supply Air Node is specified."); ErrorsFound = true; } else if (thisZoneITEq.FlowControlWithApproachTemps && !supplyNodeFound) { // supply air node must match zone equipment supply air node for these conditions - ShowSevereError(state, EnergyPlus::format("{}: ElectricEquipment:ITE:AirCooled {}", RoutineName, thisZoneITEq.Name)); + ShowSevereError(state, std::format("{}: ElectricEquipment:ITE:AirCooled {}", RoutineName, thisZoneITEq.Name)); ShowContinueError(state, "Air Inlet Connection Type = AdjustedSupply but no Supply Air Node is specified."); ErrorsFound = true; } else if (thisZoneITEq.SupplyAirNodeNum != 0 && !supplyNodeFound) { // the given supply air node does not match any zone equipment supply air nodes ShowWarningError( state, - EnergyPlus::format( - "{}name: '{}. Supply Air Node Name '{}' does not match any ZoneHVAC:EquipmentConnections objects.", - itEqModuleObject, - IHGAlphas(1), - IHGAlphas(14))); + std::format("{}name: '{}. Supply Air Node Name '{}' does not match any ZoneHVAC:EquipmentConnections objects.", + itEqModuleObject, + IHGAlphas(1), + IHGAlphas(14))); } } // end of if block for zoneEqIndex > 0 @@ -2345,7 +2338,7 @@ namespace InternalHeatGains { ShowSevereCustom( state, eoh, - EnergyPlus::format( + std::format( "For {}= FlowControlWithApproachTemperatures, either {} or {} is required, but both are left blank.", IHGAlphaFieldNames(3), IHGNumericFieldNames(10), @@ -2362,7 +2355,7 @@ namespace InternalHeatGains { ShowSevereCustom( state, eoh, - EnergyPlus::format( + std::format( "For {}= FlowControlWithApproachTemperatures, either {} or {} is required, but both are left blank.", IHGAlphaFieldNames(3), IHGNumericFieldNames(11), @@ -2415,12 +2408,12 @@ namespace InternalHeatGains { if (state.dataHeatBal->Zone(state.dataHeatBal->ZoneITEq(Loop).ZonePtr).HasAdjustedReturnTempByITE && (!state.dataHeatBal->ZoneITEq(Loop).FlowControlWithApproachTemps)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\": invalid calculation method {} for Zone: {}", - RoutineName, - itEqModuleObject, - IHGAlphas(1), - IHGAlphas(3), - IHGAlphas(2))); + std::format("{}{}=\"{}\": invalid calculation method {} for Zone: {}", + RoutineName, + itEqModuleObject, + IHGAlphas(1), + IHGAlphas(3), + IHGAlphas(2))); ShowContinueError(state, "...Multiple flow control methods apply to one zone. "); ErrorsFound = true; } @@ -2486,13 +2479,12 @@ namespace InternalHeatGains { } else { ShowSevereError( state, - EnergyPlus::format( - "{}Zone floor area is zero when allocating ZoneBaseboard:OutdoorTemperatureControlled loads to Spaces.", - RoutineName)); + std::format("{}Zone floor area is zero when allocating ZoneBaseboard:OutdoorTemperatureControlled loads to Spaces.", + RoutineName)); ShowContinueError(state, - EnergyPlus::format("Occurs for ZoneBaseboard:OutdoorTemperatureControlled object ={} in Zone={}", - thisBBHeatInput.Name, - state.dataHeatBal->Zone(zoneNum).Name)); + std::format("Occurs for ZoneBaseboard:OutdoorTemperatureControlled object ={} in Zone={}", + thisBBHeatInput.Name, + state.dataHeatBal->Zone(zoneNum).Name)); ErrorsFound = true; } } @@ -2503,8 +2495,7 @@ namespace InternalHeatGains { thisZoneBBHeat.FractionRadiant = IHGNumbers(5); thisZoneBBHeat.FractionConvected = 1.0 - thisZoneBBHeat.FractionRadiant; if (thisZoneBBHeat.FractionConvected < 0.0) { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, bbModuleObject, thisBBHeatInput.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", Sum of Fractions > 1.0", RoutineName, bbModuleObject, thisBBHeatInput.Name)); ErrorsFound = true; } @@ -2571,7 +2562,7 @@ namespace InternalHeatGains { if (state.dataHeatBal->ZoneCO2Gen(Loop).ZonePtr == 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", invalid {} entered={}", RoutineName, contamSSModuleObject, IHGAlphas(1), IHGAlphaFieldNames(2), IHGAlphas(2))); ErrorsFound = true; } @@ -2630,7 +2621,7 @@ namespace InternalHeatGains { RepVarSet.deallocate(); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in Getting Internal Gains Input, Program Stopped", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in Getting Internal Gains Input, Program Stopped", RoutineName)); } setupIHGOutputs(state); @@ -3371,9 +3362,9 @@ namespace InternalHeatGains { int zoneListNum = Util::FindItemInList(areaName, state.dataHeatBal->ZoneList); if (zoneListNum > 0) { if (zoneListNotAllowed) { - ShowSevereError(state, - EnergyPlus::format( - "{}=\"{}\" ZoneList Name=\"{}\" not allowed for {}.", objectType, thisObjectName, areaName, objectType)); + ShowSevereError( + state, + std::format("{}=\"{}\" ZoneList Name=\"{}\" not allowed for {}.", objectType, thisObjectName, areaName, objectType)); errors = true; localErrFlag = true; } else { @@ -3396,9 +3387,9 @@ namespace InternalHeatGains { int spaceListNum = Util::FindItemInList(areaName, state.dataHeatBal->spaceList); if (spaceListNum > 0) { if (zoneListNotAllowed) { - ShowSevereError(state, - EnergyPlus::format( - "{}=\"{}\" SpaceList Name=\"{}\" not allowed for {}.", objectType, thisObjectName, areaName, objectType)); + ShowSevereError( + state, + std::format("{}=\"{}\" SpaceList Name=\"{}\" not allowed for {}.", objectType, thisObjectName, areaName, objectType)); errors = true; localErrFlag = true; } else { @@ -3415,13 +3406,12 @@ namespace InternalHeatGains { } continue; } - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", objectType, thisObjectName, areaFieldName, areaName)); + ShowSevereError(state, std::format("{}=\"{}\" invalid {}=\"{}\" not found.", objectType, thisObjectName, areaFieldName, areaName)); errors = true; localErrFlag = true; } if (localErrFlag) { - ShowSevereError(state, EnergyPlus::format("{}Errors with invalid names in {} objects.", routineName, objectType)); + ShowSevereError(state, std::format("{}Errors with invalid names in {} objects.", routineName, objectType)); ShowContinueError(state, "...These will not be read in. Other errors may occur."); numGainInstances = 0; } @@ -3446,12 +3436,12 @@ namespace InternalHeatGains { // Check input value if (inputBlank) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", specifies {}, but that field is blank. 0 {} will result.", - RoutineName, - objectType, - inputObject.Name, - fieldName, - objectType)); + std::format("{}{}=\"{}\", specifies {}, but that field is blank. 0 {} will result.", + RoutineName, + objectType, + inputObject.Name, + fieldName, + objectType)); return designLevel; } @@ -3507,9 +3497,8 @@ namespace InternalHeatGains { if (zone.FloorArea > 0.0) { spaceFrac = state.dataHeatBal->space(spaceNum).FloorArea / zone.FloorArea; } else { - ShowSevereError(state, - EnergyPlus::format("{}Zone floor area is zero when allocating {} loads to Spaces.", RoutineName, objectType)); - ShowContinueError(state, EnergyPlus::format("Occurs for {} object ={} in Zone={}", objectType, inputObject.Name, zone.Name)); + ShowSevereError(state, std::format("{}Zone floor area is zero when allocating {} loads to Spaces.", RoutineName, objectType)); + ShowContinueError(state, std::format("Occurs for {} object ={} in Zone={}", objectType, inputObject.Name, zone.Name)); ErrorsFound = true; } } @@ -3524,12 +3513,12 @@ namespace InternalHeatGains { designLevel = inputValue * space.FloorArea; if ((space.FloorArea <= 0.0) && !space.isRemainderSpace) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", specifies {}, but Space Floor Area = 0. 0 {} will result.", - RoutineName, - objectType, - inputObject.Name, - fieldName, - objectType)); + std::format("{}{}=\"{}\", specifies {}, but Space Floor Area = 0. 0 {} will result.", + RoutineName, + objectType, + inputObject.Name, + fieldName, + objectType)); } } } break; @@ -3539,12 +3528,12 @@ namespace InternalHeatGains { designLevel = space.FloorArea / inputValue; if ((space.FloorArea <= 0.0) && !space.isRemainderSpace) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", specifies {}, but Space Floor Area = 0. 0 {} will result.", - RoutineName, - objectType, - inputObject.Name, - fieldName, - objectType)); + std::format("{}{}=\"{}\", specifies {}, but Space Floor Area = 0. 0 {} will result.", + RoutineName, + objectType, + inputObject.Name, + fieldName, + objectType)); } } } break; @@ -3555,12 +3544,12 @@ namespace InternalHeatGains { designLevel = inputValue * space.TotOccupants; if (space.TotOccupants <= 0.0) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", specifies {}, but Total Occupants = 0. 0 {} will result.", - RoutineName, - objectType, - inputObject.Name, - fieldName, - objectType)); + std::format("{}{}=\"{}\", specifies {}, but Total Occupants = 0. 0 {} will result.", + RoutineName, + objectType, + inputObject.Name, + fieldName, + objectType)); } } } break; @@ -5434,14 +5423,14 @@ namespace InternalHeatGains { addSpaceOutputs(zoneOtherEq.spaceIndex) = true; if (zoneOtherEq.OtherEquipFuelType != Constant::eFuel::Invalid && zoneOtherEq.OtherEquipFuelType != Constant::eFuel::None) { SetupOutputVariable(state, - EnergyPlus::format("Other Equipment {} Rate", Constant::eFuelNames[(int)zoneOtherEq.OtherEquipFuelType]), + std::format("Other Equipment {} Rate", Constant::eFuelNames[(int)zoneOtherEq.OtherEquipFuelType]), Constant::Units::W, zoneOtherEq.Power, OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, zoneOtherEq.Name); SetupOutputVariable(state, - EnergyPlus::format("Other Equipment {} Energy", Constant::eFuelNames[(int)zoneOtherEq.OtherEquipFuelType]), + std::format("Other Equipment {} Energy", Constant::eFuelNames[(int)zoneOtherEq.OtherEquipFuelType]), Constant::Units::J, zoneOtherEq.Consumption, OutputProcessor::TimeStepType::Zone, @@ -5541,14 +5530,14 @@ namespace InternalHeatGains { std::string_view fuelName = Constant::eFuelNames[(int)state.dataHeatBal->Zone(zoneNum).otherEquipFuelTypeNums[i]]; SetupOutputVariable(state, - EnergyPlus::format("Zone Other Equipment {} Rate", fuelName), + std::format("Zone Other Equipment {} Rate", fuelName), Constant::Units::W, state.dataHeatBal->ZoneRpt(zoneNum).OtherPower[(int)fuelType], OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, state.dataHeatBal->Zone(zoneNum).Name); SetupOutputVariable(state, - EnergyPlus::format("Zone Other Equipment {} Energy", fuelName), + std::format("Zone Other Equipment {} Energy", fuelName), Constant::Units::J, state.dataHeatBal->ZoneRpt(zoneNum).OtherConsump[(int)fuelType], OutputProcessor::TimeStepType::Zone, @@ -5641,14 +5630,14 @@ namespace InternalHeatGains { } SetupOutputVariable(state, - EnergyPlus::format("Space Other Equipment {} Rate", Constant::eFuelNames[(int)fuelType]), + std::format("Space Other Equipment {} Rate", Constant::eFuelNames[(int)fuelType]), Constant::Units::W, state.dataHeatBal->spaceRpt(spaceNum).OtherPower[(int)fuelType], OutputProcessor::TimeStepType::Zone, OutputProcessor::StoreType::Average, state.dataHeatBal->space(spaceNum).Name); SetupOutputVariable(state, - EnergyPlus::format("Space Other Equipment {} Energy", Constant::eFuelNames[(int)fuelType]), + std::format("Space Other Equipment {} Energy", Constant::eFuelNames[(int)fuelType]), Constant::Units::J, state.dataHeatBal->spaceRpt(spaceNum).OtherConsump[(int)fuelType], OutputProcessor::TimeStepType::Zone, @@ -8041,9 +8030,9 @@ namespace InternalHeatGains { (state.dataHeatBal->Lights(Loop).FractionReplaceable > 0.0 && state.dataHeatBal->Lights(Loop).FractionReplaceable < 1.0)) { ShowWarningError(state, "CheckLightsReplaceableMinMaxForZone: Fraction Replaceable must be 0.0 or 1.0 if used with daylighting."); ShowContinueError(state, - EnergyPlus::format("..Lights=\"{}\", Fraction Replaceable will be reset to 1.0 to allow dimming controls", - state.dataHeatBal->Lights(Loop).Name)); - ShowContinueError(state, EnergyPlus::format("..in Zone={}", state.dataHeatBal->Zone(WhichZone).Name)); + std::format("..Lights=\"{}\", Fraction Replaceable will be reset to 1.0 to allow dimming controls", + state.dataHeatBal->Lights(Loop).Name)); + ShowContinueError(state, std::format("..in Zone={}", state.dataHeatBal->Zone(WhichZone).Name)); state.dataHeatBal->Lights(Loop).FractionReplaceable = 1.0; } } @@ -8051,15 +8040,13 @@ namespace InternalHeatGains { if (state.dataDayltg->ZoneDaylight(WhichZone).totRefPts > 0) { if (LightsRepMax == 0.0) { ShowWarningError( - state, - EnergyPlus::format("CheckLightsReplaceable: Zone \"{}\" has Daylighting:Controls.", state.dataHeatBal->Zone(WhichZone).Name)); + state, std::format("CheckLightsReplaceable: Zone \"{}\" has Daylighting:Controls.", state.dataHeatBal->Zone(WhichZone).Name)); ShowContinueError(state, "but all of the LIGHTS object in that zone have zero Fraction Replaceable."); ShowContinueError(state, "The daylighting controls will have no effect."); } if (NumLights == 0) { ShowWarningError( - state, - EnergyPlus::format("CheckLightsReplaceable: Zone \"{}\" has Daylighting:Controls.", state.dataHeatBal->Zone(WhichZone).Name)); + state, std::format("CheckLightsReplaceable: Zone \"{}\" has Daylighting:Controls.", state.dataHeatBal->Zone(WhichZone).Name)); ShowContinueError(state, "but there are no LIGHTS objects in that zone."); ShowContinueError(state, "The daylighting controls will have no effect."); } diff --git a/src/EnergyPlus/LowTempRadiantSystem.cc b/src/EnergyPlus/LowTempRadiantSystem.cc index 454112d2592..8f2caace197 100644 --- a/src/EnergyPlus/LowTempRadiantSystem.cc +++ b/src/EnergyPlus/LowTempRadiantSystem.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -507,7 +508,7 @@ namespace LowTempRadiantSystem { ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(5), thisRadSysDesign.DesignHeatingCapMethodInput)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(4), Numbers(4))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7f}", cNumericFields(4), Numbers(4))); ErrorsFound = true; } else if (thisRadSysDesign.DesignScaledHeatingCapacity == AutoSize) { ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); @@ -528,7 +529,7 @@ namespace LowTempRadiantSystem { thisRadSysDesign.DesignScaledHeatingCapacity = Numbers(5); if (thisRadSysDesign.DesignScaledHeatingCapacity < 0.0) { ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(5), Numbers(5))); + ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7f}", cNumericFields(5), Numbers(5))); ErrorsFound = true; } } else { @@ -538,8 +539,8 @@ namespace LowTempRadiantSystem { ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(5), thisRadSysDesign.DesignHeatingCapMethodInput)); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(5), thisRadSysDesign.DesignHeatingCapMethodInput)); ErrorsFound = true; } @@ -560,23 +561,20 @@ namespace LowTempRadiantSystem { if (!lNumericBlanks(7)) { thisRadSysDesign.DesignScaledCoolingCapacity = Numbers(7); if (thisRadSysDesign.DesignScaledCoolingCapacity <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, - EnergyPlus::format("Input for {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); - ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(7), thisRadSysDesign.DesignScaledCoolingCapacity)); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); + ShowContinueError(state, std::format("Illegal {} = {:.7f}", cNumericFields(7), thisRadSysDesign.DesignScaledCoolingCapacity)); ErrorsFound = true; } else if (thisRadSysDesign.DesignScaledCoolingCapacity == AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, - EnergyPlus::format("Input for {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = Autosize", cNumericFields(7))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); + ShowContinueError(state, std::format("Illegal {} = Autosize", cNumericFields(7))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(7))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(7))); ErrorsFound = true; } } else if (Util::SameString(thisRadSysDesign.DesignCoolingCapMethodInput, "FractionOfAutosizedCoolingCapacity")) { @@ -584,19 +582,19 @@ namespace LowTempRadiantSystem { if (!lNumericBlanks(8)) { thisRadSysDesign.DesignScaledCoolingCapacity = Numbers(8); if (thisRadSysDesign.DesignScaledCoolingCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(8), Numbers(8))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); + ShowContinueError(state, std::format("Illegal {} = {:.7f}", cNumericFields(8), Numbers(8))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(8))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(8))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisRadSysDesign.designName)); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(7), thisRadSysDesign.DesignCoolingCapMethodInput)); ErrorsFound = true; } @@ -685,8 +683,8 @@ namespace LowTempRadiantSystem { thisRadSys.ZoneName = Alphas(4); thisRadSys.ZonePtr = Util::FindItemInList(Alphas(4), state.dataHeatBal->Zone); if (thisRadSys.ZonePtr == 0) { - ShowSevereError(state, EnergyPlus::format("{}Invalid {} = {}", RoutineName, cAlphaFields(3), Alphas(4))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}Invalid {} = {}", RoutineName, cAlphaFields(3), Alphas(4))); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -721,14 +719,13 @@ namespace LowTempRadiantSystem { thisRadSys.NumCircuits(1) = 0.0; // Error checking for single surfaces if (thisRadSys.SurfacePtr(1) == 0) { - ShowSevereError(state, EnergyPlus::format("{}Invalid {} = {}", RoutineName, cAlphaFields(5), Alphas(5))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}Invalid {} = {}", RoutineName, cAlphaFields(5), Alphas(5))); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else if (state.dataSurface->SurfIsRadSurfOrVentSlabOrPool(thisRadSys.SurfacePtr(1))) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", Invalid Surface", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}{}=\"{}\", Invalid Surface", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError( - state, - EnergyPlus::format("{}=\"{}\" has been used in another radiant system or ventilated slab.", cAlphaFields(5), Alphas(5))); + state, std::format("{}=\"{}\" has been used in another radiant system or ventilated slab.", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } if (thisRadSys.SurfacePtr(1) != 0) { @@ -748,15 +745,15 @@ namespace LowTempRadiantSystem { if (!lNumericBlanks(2)) { thisRadSys.ScaledHeatingCapacity = Numbers(2); if (thisRadSys.ScaledHeatingCapacity < 0.0 && thisRadSys.ScaledHeatingCapacity != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSys.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(2), Numbers(2))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisRadSys.Name)); + ShowContinueError(state, std::format("Illegal {} = {:.7f}", cNumericFields(2), Numbers(2))); ErrorsFound = true; } } else { if ((!lAlphaBlanks(6)) || (!lAlphaBlanks(7))) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSys.Name)); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisRadSys.Name)); ShowContinueError(state, "Input for Heating Design Capacity Method = HeatingDesignCapacity"); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(2))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(2))); ErrorsFound = true; } } @@ -798,7 +795,7 @@ namespace LowTempRadiantSystem { (lAlphaBlanks(6) || lAlphaBlanks(7) || (thisRadSys.HotWaterInNode <= 0) || (thisRadSys.HotWaterOutNode <= 0) || (variableFlowDesignDataObject.heatSetptSched == nullptr))) { ShowSevereError(state, "Hydronic radiant systems may not be autosized without specification of nodes or schedules."); - ShowContinueError(state, EnergyPlus::format("Occurs in {} (heating input) = {}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Occurs in {} (heating input) = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -808,15 +805,15 @@ namespace LowTempRadiantSystem { if (!lNumericBlanks(4)) { thisRadSys.ScaledCoolingCapacity = Numbers(4); if (thisRadSys.ScaledCoolingCapacity < 0.0 && thisRadSys.ScaledCoolingCapacity != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSys.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {:.7T}", cNumericFields(4), Numbers(4))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisRadSys.Name)); + ShowContinueError(state, std::format("Illegal {} = {:.7f}", cNumericFields(4), Numbers(4))); ErrorsFound = true; } } else { if ((!lAlphaBlanks(8)) || (!lAlphaBlanks(9))) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisRadSys.Name)); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisRadSys.Name)); ShowContinueError(state, "Input for Cooling Design Capacity Method = CoolingDesignCapacity"); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(4))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(4))); ErrorsFound = true; } } @@ -872,7 +869,7 @@ namespace LowTempRadiantSystem { (thisRadSys.ColdWaterInNode <= 0) || (thisRadSys.ColdWaterOutNode <= 0) || (variableFlowDesignDataObject.coolSetptSched == nullptr))) { ShowSevereError(state, "Hydronic radiant systems may not be autosized without specification of nodes or schedules"); - ShowContinueError(state, EnergyPlus::format("Occurs in {} (cooling input) ={}", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("Occurs in {} (cooling input) ={}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } } @@ -1004,8 +1001,8 @@ namespace LowTempRadiantSystem { thisCFloSys.ZoneName = Alphas(4); thisCFloSys.ZonePtr = Util::FindItemInList(Alphas(4), state.dataHeatBal->Zone); if (thisCFloSys.ZonePtr == 0) { - ShowSevereError(state, EnergyPlus::format("{}Invalid {} = {}", RoutineName, cAlphaFields(4), Alphas(4))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}Invalid {} = {}", RoutineName, cAlphaFields(4), Alphas(4))); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1043,14 +1040,13 @@ namespace LowTempRadiantSystem { thisCFloSys.NumCircuits(1) = 0.0; // Error checking for single surfaces if (thisCFloSys.SurfacePtr(1) == 0) { - ShowSevereError(state, EnergyPlus::format("{}Invalid {} = {}", RoutineName, cAlphaFields(4), Alphas(4))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}Invalid {} = {}", RoutineName, cAlphaFields(4), Alphas(4))); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else if (state.dataSurface->SurfIsRadSurfOrVentSlabOrPool(thisCFloSys.SurfacePtr(1))) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", Invalid Surface", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}{}=\"{}\", Invalid Surface", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError( - state, - EnergyPlus::format("{}=\"{}\" has been used in another radiant system or ventilated slab.", cAlphaFields(5), Alphas(5))); + state, std::format("{}=\"{}\" has been used in another radiant system or ventilated slab.", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } if (thisCFloSys.SurfacePtr(1) != 0) { @@ -1232,8 +1228,8 @@ namespace LowTempRadiantSystem { thisElecSys.ZoneName = Alphas(3); thisElecSys.ZonePtr = Util::FindItemInList(Alphas(3), state.dataHeatBal->Zone); if (thisElecSys.ZonePtr == 0) { - ShowSevereError(state, EnergyPlus::format("{}Invalid {} = {}", RoutineName, cAlphaFields(3), Alphas(3))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}Invalid {} = {}", RoutineName, cAlphaFields(3), Alphas(3))); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1262,14 +1258,13 @@ namespace LowTempRadiantSystem { thisElecSys.SurfaceFrac(1) = 1.0; // Error checking for single surfaces if (thisElecSys.SurfacePtr(1) == 0) { - ShowSevereError(state, EnergyPlus::format("{}Invalid {} = {}", RoutineName, cAlphaFields(4), Alphas(4))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}Invalid {} = {}", RoutineName, cAlphaFields(4), Alphas(4))); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else if (state.dataSurface->SurfIsRadSurfOrVentSlabOrPool(thisElecSys.SurfacePtr(1))) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", Invalid Surface", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}{}=\"{}\", Invalid Surface", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError( - state, - EnergyPlus::format("{}=\"{}\" has been used in another radiant system or ventilated slab.", cAlphaFields(4), Alphas(4))); + state, std::format("{}=\"{}\" has been used in another radiant system or ventilated slab.", cAlphaFields(4), Alphas(4))); ErrorsFound = true; } if (thisElecSys.SurfacePtr(1) != 0) { @@ -1288,17 +1283,17 @@ namespace LowTempRadiantSystem { thisElecSys.ScaledHeatingCapacity = Numbers(iHeatDesignCapacityNumericNum); thisElecSys.MaxElecPower = thisElecSys.ScaledHeatingCapacity; if (thisElecSys.ScaledHeatingCapacity < 0.0 && thisElecSys.ScaledHeatingCapacity != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - cNumericFields(iHeatDesignCapacityNumericNum), - Numbers(iHeatDesignCapacityNumericNum))); + std::format("Illegal {} = {:.7f}", + cNumericFields(iHeatDesignCapacityNumericNum), + Numbers(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iHeatDesignCapacityNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatCAPMAlphaNum), "CapacityPerFloorArea")) { @@ -1307,24 +1302,23 @@ namespace LowTempRadiantSystem { thisElecSys.ScaledHeatingCapacity = Numbers(iHeatCapacityPerFloorAreaNumericNum); thisElecSys.MaxElecPower = thisElecSys.ScaledHeatingCapacity; if (thisElecSys.ScaledHeatingCapacity <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - cNumericFields(iHeatCapacityPerFloorAreaNumericNum), - Numbers(iHeatCapacityPerFloorAreaNumericNum))); + std::format("Illegal {} = {:.7f}", + cNumericFields(iHeatCapacityPerFloorAreaNumericNum), + Numbers(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } else if (thisElecSys.ScaledHeatingCapacity == AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = Autosize", cNumericFields(iHeatCapacityPerFloorAreaNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); + ShowContinueError(state, std::format("Illegal {} = Autosize", cNumericFields(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); - ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iHeatCapacityPerFloorAreaNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatCAPMAlphaNum), "FractionOfAutosizedHeatingCapacity")) { @@ -1333,23 +1327,22 @@ namespace LowTempRadiantSystem { thisElecSys.ScaledHeatingCapacity = Numbers(iHeatFracOfAutosizedCapacityNumericNum); thisElecSys.MaxElecPower = thisElecSys.ScaledHeatingCapacity; if (thisElecSys.ScaledHeatingCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - cNumericFields(iHeatFracOfAutosizedCapacityNumericNum), - Numbers(iHeatFracOfAutosizedCapacityNumericNum))); + std::format("Illegal {} = {:.7f}", + cNumericFields(iHeatFracOfAutosizedCapacityNumericNum), + Numbers(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); - ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iHeatFracOfAutosizedCapacityNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, thisElecSys.Name)); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); ErrorsFound = true; } @@ -1395,8 +1388,8 @@ namespace LowTempRadiantSystem { continue; } if (AssignedAsRadiantSurface(CheckSurfNum)) { - ShowSevereError( - state, EnergyPlus::format("Surface {} is referenced by more than one radiant system--this is not allowed", checkSurf.Name)); + ShowSevereError(state, + std::format("Surface {} is referenced by more than one radiant system--this is not allowed", checkSurf.Name)); ErrorsFound = true; } else { AssignedAsRadiantSurface(CheckSurfNum) = true; @@ -1405,8 +1398,8 @@ namespace LowTempRadiantSystem { if ((checkSurf.ExtBoundCond > 0) && (checkSurf.ExtBoundCond != CheckSurfNum)) { if (AssignedAsRadiantSurface(checkSurf.ExtBoundCond)) { ShowSevereError(state, - EnergyPlus::format("Interzone surface {} is referenced by more than one radiant system--this is not allowed", - state.dataSurface->Surface(checkSurf.ExtBoundCond).Name)); + std::format("Interzone surface {} is referenced by more than one radiant system--this is not allowed", + state.dataSurface->Surface(checkSurf.ExtBoundCond).Name)); ErrorsFound = true; } else { AssignedAsRadiantSurface(checkSurf.ExtBoundCond) = true; @@ -1423,8 +1416,8 @@ namespace LowTempRadiantSystem { continue; } if (AssignedAsRadiantSurface(CheckSurfNum)) { - ShowSevereError( - state, EnergyPlus::format("Surface {} is referenced by more than one radiant system--this is not allowed", checkSurf.Name)); + ShowSevereError(state, + std::format("Surface {} is referenced by more than one radiant system--this is not allowed", checkSurf.Name)); ErrorsFound = true; } else { AssignedAsRadiantSurface(CheckSurfNum) = true; @@ -1433,8 +1426,8 @@ namespace LowTempRadiantSystem { if ((checkSurf.ExtBoundCond > 0) && (checkSurf.ExtBoundCond != CheckSurfNum)) { if (AssignedAsRadiantSurface(checkSurf.ExtBoundCond)) { ShowSevereError(state, - EnergyPlus::format("Interzone surface {} is referenced by more than one radiant system--this is not allowed", - state.dataSurface->Surface(checkSurf.ExtBoundCond).Name)); + std::format("Interzone surface {} is referenced by more than one radiant system--this is not allowed", + state.dataSurface->Surface(checkSurf.ExtBoundCond).Name)); ErrorsFound = true; } else { AssignedAsRadiantSurface(checkSurf.ExtBoundCond) = true; @@ -1451,8 +1444,8 @@ namespace LowTempRadiantSystem { continue; } if (AssignedAsRadiantSurface(CheckSurfNum)) { - ShowSevereError( - state, EnergyPlus::format("Surface {} is referenced by more than one radiant system--this is not allowed", checkSurf.Name)); + ShowSevereError(state, + std::format("Surface {} is referenced by more than one radiant system--this is not allowed", checkSurf.Name)); ErrorsFound = true; } else { AssignedAsRadiantSurface(CheckSurfNum) = true; @@ -1461,8 +1454,8 @@ namespace LowTempRadiantSystem { if ((checkSurf.ExtBoundCond > 0) && (checkSurf.ExtBoundCond != CheckSurfNum)) { if (AssignedAsRadiantSurface(checkSurf.ExtBoundCond)) { ShowSevereError(state, - EnergyPlus::format("Interzone surface {} is referenced by more than one radiant system--this is not allowed", - state.dataSurface->Surface(checkSurf.ExtBoundCond).Name)); + std::format("Interzone surface {} is referenced by more than one radiant system--this is not allowed", + state.dataSurface->Surface(checkSurf.ExtBoundCond).Name)); ErrorsFound = true; } else { AssignedAsRadiantSurface(checkSurf.ExtBoundCond) = true; @@ -1480,7 +1473,7 @@ namespace LowTempRadiantSystem { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding conditions cause termination.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in input. Preceding conditions cause termination.", RoutineName)); } // Set up the output variables for low temperature radiant systems @@ -1852,12 +1845,11 @@ namespace LowTempRadiantSystem { if (surf.Zone != this->ZonePtr) { ShowWarningError(state, "A surface referenced in a Low Temperature Radiant System is not in same zone as the radiant system itself"); - ShowContinueError(state, EnergyPlus::format("Surface = {}", surf.Name)); - ShowContinueError(state, - EnergyPlus::format("Surface in Zone = {}. Radiant System in Zone = {}", - state.dataHeatBal->Zone(surf.Zone).Name, - this->ZoneName)); - ShowContinueError(state, EnergyPlus::format("Occurs in Low Temperature Radiant System = {}", this->Name)); + ShowContinueError(state, std::format("Surface = {}", surf.Name)); + ShowContinueError( + state, + std::format("Surface in Zone = {}. Radiant System in Zone = {}", state.dataHeatBal->Zone(surf.Zone).Name, this->ZoneName)); + ShowContinueError(state, std::format("Occurs in Low Temperature Radiant System = {}", this->Name)); ShowContinueError(state, "If this is intentionally a radiant system with surfaces in more than one thermal zone,"); ShowContinueError(state, "then ignore this warning message. Otherwise, check the surfaces in this radiant system."); } @@ -1873,17 +1865,16 @@ namespace LowTempRadiantSystem { if (std::abs(zoneMultipliers - zoneMultipliersSurface) > zoneMultiplersTolerance) { ShowSevereError(state, "The zone multipliers are not the same for all surfaces contained in this radiant system"); ShowContinueError(state, "This is not allowed and must be fixed for the simulation to run."); - ShowContinueError(state, EnergyPlus::format("Occurs in Low Temperature Radiant System = {}", this->Name)); + ShowContinueError(state, std::format("Occurs in Low Temperature Radiant System = {}", this->Name)); errorsFound = true; } // make sure that this construction is defined with a source/sink--this must be the case or it can't serve as a radiant system surface if (!state.dataConstruction->Construct(surf.Construction).SourceSinkPresent) { ShowSevereError(state, "Construction referenced in Radiant System Surface does not have a source/sink present"); - ShowContinueError(state, - EnergyPlus::format("Surface name= {} Construction name = {}", - surf.Name, - state.dataConstruction->Construct(surf.Construction).Name)); + ShowContinueError( + state, + std::format("Surface name= {} Construction name = {}", surf.Name, state.dataConstruction->Construct(surf.Construction).Name)); ShowContinueError(state, "Construction needs to be referenced by a \"ConstructionProperty:InternalHeatSource\" object."); errorsFound = true; } @@ -2017,8 +2008,7 @@ namespace LowTempRadiantSystem { // Autosize is not an error but it does not need to check pump efficiency here if (thisCFLRadSys.WaterVolFlowMax != AutoSize) { ShowSevereError( - state, - EnergyPlus::format("Check input. Pump nominal power and motor efficiency cannot be 0, for pump={}", thisCFLRadSys.Name)); + state, std::format("Check input. Pump nominal power and motor efficiency cannot be 0, for pump={}", thisCFLRadSys.Name)); InitErrorsFound = true; } } @@ -2115,30 +2105,28 @@ namespace LowTempRadiantSystem { if (CheckZoneEquipmentList(state, "ZoneHVAC:LowTemperatureRadiant:VariableFlow", thisRadSys.Name)) { continue; } - ShowSevereError( - state, - EnergyPlus::format("InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:VariableFlow,{}] is not on any " - "ZoneHVAC:EquipmentList. It will not be simulated.", - thisRadSys.Name)); + ShowSevereError(state, + std::format("InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:VariableFlow,{}] is not on any " + "ZoneHVAC:EquipmentList. It will not be simulated.", + thisRadSys.Name)); } break; case SystemType::ConstantFlow: { if (CheckZoneEquipmentList(state, "ZoneHVAC:LowTemperatureRadiant:ConstantFlow", thisRadSys.Name)) { continue; } - ShowSevereError( - state, - EnergyPlus::format("InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:ConstantFlow,{}] is not on any " - "ZoneHVAC:EquipmentList. It will not be simulated.", - thisRadSys.Name)); + ShowSevereError(state, + std::format("InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:ConstantFlow,{}] is not on any " + "ZoneHVAC:EquipmentList. It will not be simulated.", + thisRadSys.Name)); } break; case SystemType::Electric: { if (CheckZoneEquipmentList(state, "ZoneHVAC:LowTemperatureRadiant:Electric", thisRadSys.Name)) { continue; } ShowSevereError(state, - EnergyPlus::format("InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:Electric,{}] is not on any " - "ZoneHVAC:EquipmentList. It will not be simulated.", - thisRadSys.Name)); + std::format("InitLowTempRadiantSystem: Unit=[ZoneHVAC:LowTemperatureRadiant:Electric,{}] is not on any " + "ZoneHVAC:EquipmentList. It will not be simulated.", + thisRadSys.Name)); } break; default: { // Illegal system, but checked earlier } break; @@ -2690,8 +2678,7 @@ namespace LowTempRadiantSystem { state.dataSize->DataScalableCapSizingON = false; elecRadSys.MaxElecPower = TempSize; } else if (CapSizingMethod == FractionOfAutosizedHeatingCapacity) { - ShowSevereError(state, - EnergyPlus::format("{}: auto-sizing cannot be done for {} = {}\".", RoutineName, CompType, elecRadSys.Name)); + ShowSevereError(state, std::format("{}: auto-sizing cannot be done for {} = {}\".", RoutineName, CompType, elecRadSys.Name)); ShowContinueError(state, "The \"SimulationControl\" object must have the field \"Do Zone Sizing Calculation\" set to Yes when the " "Heating Design Capacity Method = \"FractionOfAutosizedHeatingCapacity\"."); @@ -2780,8 +2767,8 @@ namespace LowTempRadiantSystem { state.dataSize->DataScalableCapSizingON = false; } else if (CapSizingMethod == FractionOfAutosizedHeatingCapacity) { if (hydrRadSys.WaterVolFlowMaxHeat == AutoSize) { - ShowSevereError( - state, EnergyPlus::format("{}: auto-sizing cannot be done for {} = {}\".", RoutineName, CompType, hydrRadSys.Name)); + ShowSevereError(state, + std::format("{}: auto-sizing cannot be done for {} = {}\".", RoutineName, CompType, hydrRadSys.Name)); ShowContinueError(state, "The \"SimulationControl\" object must have the field \"Do Zone Sizing Calculation\" set to Yes when " "the Heating Design Capacity Method = \"FractionOfAutosizedHeatingCapacity\"."); @@ -2860,8 +2847,7 @@ namespace LowTempRadiantSystem { } } else { ShowSevereError(state, "Autosizing of water flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, - EnergyPlus::format("Occurs in ZoneHVAC:LowTemperatureRadiant:VariableFlow Object={}", hydrRadSys.Name)); + ShowContinueError(state, std::format("Occurs in ZoneHVAC:LowTemperatureRadiant:VariableFlow Object={}", hydrRadSys.Name)); ErrorsFound = true; } } @@ -2884,9 +2870,9 @@ namespace LowTempRadiantSystem { if ((std::abs(WaterVolFlowMaxHeatDes - WaterVolFlowMaxHeatUser) / WaterVolFlowMaxHeatUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " - "ZoneHVAC:LowTemperatureRadiant:VariableFlow = \"{}\".", - hydrRadSys.Name)); + std::format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " + "ZoneHVAC:LowTemperatureRadiant:VariableFlow = \"{}\".", + hydrRadSys.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Hot Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxHeatUser)); ShowContinueError(state, @@ -2933,8 +2919,8 @@ namespace LowTempRadiantSystem { state.dataSize->DataScalableCapSizingON = false; } else if (CapSizingMethod == FractionOfAutosizedCoolingCapacity) { if (hydrRadSys.WaterVolFlowMaxCool == AutoSize) { - ShowSevereError( - state, EnergyPlus::format("{}: auto-sizing cannot be done for {} = {}\".", RoutineName, CompType, hydrRadSys.Name)); + ShowSevereError(state, + std::format("{}: auto-sizing cannot be done for {} = {}\".", RoutineName, CompType, hydrRadSys.Name)); ShowContinueError(state, "The \"SimulationControl\" object must have the field \"Do Zone Sizing Calculation\" set to Yes when " "the Cooling Design Capacity Method = \"FractionOfAutosizedCoolingCapacity\"."); @@ -3013,8 +2999,7 @@ namespace LowTempRadiantSystem { } } else { ShowSevereError(state, "Autosizing of water flow requires a cooling loop Sizing:Plant object"); - ShowContinueError(state, - EnergyPlus::format("Occurs in ZoneHVAC:LowTemperatureRadiant:VariableFlow Object={}", hydrRadSys.Name)); + ShowContinueError(state, std::format("Occurs in ZoneHVAC:LowTemperatureRadiant:VariableFlow Object={}", hydrRadSys.Name)); ErrorsFound = true; } } @@ -3037,9 +3022,9 @@ namespace LowTempRadiantSystem { if ((std::abs(WaterVolFlowMaxCoolDes - WaterVolFlowMaxCoolUser) / WaterVolFlowMaxCoolUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " - "ZoneHVAC:LowTemperatureRadiant:VariableFlow = \"{}\".", - hydrRadSys.Name)); + std::format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " + "ZoneHVAC:LowTemperatureRadiant:VariableFlow = \"{}\".", + hydrRadSys.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Cool Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxCoolUser)); @@ -3084,9 +3069,9 @@ namespace LowTempRadiantSystem { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(TubeLengthDes - TubeLengthUser) / TubeLengthUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " - "ZoneHVAC:LowTemperatureRadiant:VariableFlow = \"{}\".", - hydrRadSys.Name)); + std::format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " + "ZoneHVAC:LowTemperatureRadiant:VariableFlow = \"{}\".", + hydrRadSys.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Hydronic Tubing Length of {:.5R} [m]", TubeLengthUser)); ShowContinueError( @@ -3164,8 +3149,7 @@ namespace LowTempRadiantSystem { } else { if (OpMode == OperatingMode::ClgHtg || OpMode == OperatingMode::HtgOnly) { ShowSevereError(state, "Autosizing of water flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, - EnergyPlus::format("Occurs in ZoneHVAC:LowTemperatureRadiant:ConstantFlow Object={}", cfloRadSys.Name)); + ShowContinueError(state, std::format("Occurs in ZoneHVAC:LowTemperatureRadiant:ConstantFlow Object={}", cfloRadSys.Name)); ErrorsFound = true; } } @@ -3187,8 +3171,7 @@ namespace LowTempRadiantSystem { } else { if (OpMode == OperatingMode::ClgHtg || OpMode == OperatingMode::ClgOnly) { ShowSevereError(state, "Autosizing of water flow requires a cooling loop Sizing:Plant object"); - ShowContinueError(state, - EnergyPlus::format("Occurs in ZoneHVAC:LowTemperatureRadiant:ConstantFlow Object={}", cfloRadSys.Name)); + ShowContinueError(state, std::format("Occurs in ZoneHVAC:LowTemperatureRadiant:ConstantFlow Object={}", cfloRadSys.Name)); ErrorsFound = true; } } @@ -3221,9 +3204,9 @@ namespace LowTempRadiantSystem { if ((std::abs(WaterVolFlowMaxDes - WaterVolFlowMaxUser) / WaterVolFlowMaxUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " - "ZoneHVAC:LowTemperatureRadiant:ConstantFlow = \" {}\".", - cfloRadSys.Name)); + std::format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " + "ZoneHVAC:LowTemperatureRadiant:ConstantFlow = \" {}\".", + cfloRadSys.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Maximum Water Flow of {:.5R} [m3/s]", WaterVolFlowMaxUser)); ShowContinueError( @@ -3275,9 +3258,9 @@ namespace LowTempRadiantSystem { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(TubeLengthDes - TubeLengthUser) / TubeLengthUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " - "ZoneHVAC:LowTemperatureRadiant:ConstantFlow = \" {}\".", - cfloRadSys.Name)); + std::format("SizeLowTempRadiantSystem: Potential issue with equipment sizing for " + "ZoneHVAC:LowTemperatureRadiant:ConstantFlow = \" {}\".", + cfloRadSys.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Hydronic Tubing Length of {:.5R} [m]", TubeLengthUser)); ShowContinueError( @@ -3446,7 +3429,7 @@ namespace LowTempRadiantSystem { // potentially be heating or cooling at a particular control temperature if (OffTempHeat > OffTempCool) { MassFlowFrac = 0.0; - ShowSevereError(state, EnergyPlus::format("Overlapping heating and cooling control temps in radiant system: {}", this->Name)); + ShowSevereError(state, std::format("Overlapping heating and cooling control temps in radiant system: {}", this->Name)); ShowFatalError(state, "Preceding condition causes termination."); } else { // Temperatures for heating and cooling do not overlap--calculate the mass flow fraction @@ -3579,7 +3562,7 @@ namespace LowTempRadiantSystem { default: { WaterNodeIn = 0; // Suppress uninitialized warning ShowSevereError(state, "Illegal low temperature radiant system operating mode"); - ShowContinueError(state, EnergyPlus::format("Occurs in Radiant System={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Radiant System={}", this->Name)); ShowFatalError(state, "Preceding condition causes termination."); } break; } @@ -3777,11 +3760,11 @@ namespace LowTempRadiantSystem { // Produce a warning message so that user knows the system was shut-off due to potential for condensation if (!state.dataGlobal->WarmupFlag) { if (this->CondErrIndex == 0) { // allow errors up to number of radiant systems - ShowWarningMessage(state, EnergyPlus::format("{} [{}]", cHydronicSystem, this->Name)); + ShowWarningMessage(state, std::format("{} [{}]", cHydronicSystem, this->Name)); ShowContinueError( state, - EnergyPlus::format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", - state.dataSurface->Surface(SurfNum2).Name)); + std::format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", + state.dataSurface->Surface(SurfNum2).Name)); ShowContinueError(state, "Flow to the radiant system will be shut-off to avoid condensation"); ShowContinueError(state, EnergyPlus::format("Predicted radiant system surface temperature = {:.2R}", @@ -3797,7 +3780,7 @@ namespace LowTempRadiantSystem { } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} [{}] condensation shut-off occurrence continues.", cHydronicSystem, this->Name), + std::format("{} [{}] condensation shut-off occurrence continues.", cHydronicSystem, this->Name), this->CondErrIndex, DewPointTemp, DewPointTemp, @@ -3957,11 +3940,11 @@ namespace LowTempRadiantSystem { // Produce a warning message so that user knows the system was shut-off due to potential for condensation if (!state.dataGlobal->WarmupFlag) { if (this->CondErrIndex == 0) { // allow errors up to number of radiant systems - ShowWarningMessage(state, EnergyPlus::format("{} [{}]", cHydronicSystem, this->Name)); + ShowWarningMessage(state, std::format("{} [{}]", cHydronicSystem, this->Name)); ShowContinueError( state, - EnergyPlus::format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", - state.dataSurface->Surface(this->SurfacePtr(CondSurfNum)).Name)); + std::format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", + state.dataSurface->Surface(this->SurfacePtr(CondSurfNum)).Name)); ShowContinueError(state, "Flow to the radiant system will be shut-off to avoid condensation"); ShowContinueError(state, EnergyPlus::format("Predicted radiant system surface temperature = {:.2R}", @@ -3977,7 +3960,7 @@ namespace LowTempRadiantSystem { } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} [{}] condensation shut-off occurrence continues.", cHydronicSystem, this->Name), + std::format("{} [{}] condensation shut-off occurrence continues.", cHydronicSystem, this->Name), this->CondErrIndex, DewPointTemp, DewPointTemp, @@ -4110,7 +4093,7 @@ namespace LowTempRadiantSystem { SetPointTempHi = this->hotCtrlHiTempSched->getCurrentVal(); SetPointTempLo = this->hotCtrlLoTempSched->getCurrentVal(); if (SetPointTempHi < SetPointTempLo) { - ShowSevereError(state, EnergyPlus::format("Heating setpoint temperature mismatch in{}", this->Name)); + ShowSevereError(state, std::format("Heating setpoint temperature mismatch in{}", this->Name)); ShowContinueError(state, "High setpoint temperature is less than low setpoint temperature--check your schedule input"); ShowFatalError(state, "Preceding condition causes termination."); } @@ -4118,7 +4101,7 @@ namespace LowTempRadiantSystem { WaterTempHi = this->hotWaterHiTempSched->getCurrentVal(); WaterTempLo = this->hotWaterLoTempSched->getCurrentVal(); if (WaterTempHi < WaterTempLo) { - ShowSevereError(state, EnergyPlus::format("Heating water temperature mismatch in{}", this->Name)); + ShowSevereError(state, std::format("Heating water temperature mismatch in{}", this->Name)); ShowContinueError(state, "High water temperature is less than low water temperature--check your schedule input"); ShowFatalError(state, "Preceding condition causes termination."); } @@ -4149,7 +4132,7 @@ namespace LowTempRadiantSystem { SetPointTempHi = this->coldCtrlHiTempSched->getCurrentVal(); SetPointTempLo = this->coldCtrlLoTempSched->getCurrentVal(); if (SetPointTempHi < SetPointTempLo) { - ShowSevereError(state, EnergyPlus::format("Cooling setpoint temperature mismatch in{}", this->Name)); + ShowSevereError(state, std::format("Cooling setpoint temperature mismatch in{}", this->Name)); ShowContinueError(state, "High setpoint temperature is less than low setpoint temperature--check your schedule input"); ShowFatalError(state, "Preceding condition causes termination."); } @@ -4157,7 +4140,7 @@ namespace LowTempRadiantSystem { WaterTempHi = this->coldWaterHiTempSched->getCurrentVal(); WaterTempLo = this->coldWaterLoTempSched->getCurrentVal(); if (WaterTempHi < WaterTempLo) { - ShowSevereError(state, EnergyPlus::format("Cooling water temperature mismatch in{}", this->Name)); + ShowSevereError(state, std::format("Cooling water temperature mismatch in{}", this->Name)); ShowContinueError(state, "High water temperature is less than low water temperature--check your schedule input"); ShowFatalError(state, "Preceding condition causes termination."); } @@ -4493,8 +4476,7 @@ namespace LowTempRadiantSystem { // Error check, just in case if (this->WaterRecircRate < 0.0) { ShowWarningError(state, "Flow mismatch in radiant system--result will be an energy imbalance--should not get this error"); - ShowContinueErrorTimeStamp(state, - EnergyPlus::format("WaterRecircRate={:.2T}, in Radiant System={},", this->WaterRecircRate, this->Name)); + ShowContinueErrorTimeStamp(state, std::format("WaterRecircRate={:.2f}, in Radiant System={},", this->WaterRecircRate, this->Name)); this->WaterRecircRate = 0.0; this->WaterInjectionRate = this->WaterMassFlowRate; } @@ -4867,11 +4849,11 @@ namespace LowTempRadiantSystem { // Produce a warning message so that user knows the system was shut-off due to potential for condensation if (!state.dataGlobal->WarmupFlag) { if (this->CondErrIndex == 0) { // allow errors up to number of radiant systems - ShowWarningMessage(state, EnergyPlus::format("{} [{}]", cConstantFlowSystem, this->Name)); + ShowWarningMessage(state, std::format("{} [{}]", cConstantFlowSystem, this->Name)); ShowContinueError( state, - EnergyPlus::format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", - state.dataSurface->Surface(this->SurfacePtr(RadSurfNum2)).Name)); + std::format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", + state.dataSurface->Surface(this->SurfacePtr(RadSurfNum2)).Name)); ShowContinueError(state, "Flow to the radiant system will be shut-off to avoid condensation"); ShowContinueError(state, EnergyPlus::format("Predicted radiant system surface temperature = {:.2R}", @@ -4887,7 +4869,7 @@ namespace LowTempRadiantSystem { } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} [{}] condensation shut-off occurrence continues.", cConstantFlowSystem, this->Name), + std::format("{} [{}] condensation shut-off occurrence continues.", cConstantFlowSystem, this->Name), this->CondErrIndex, DewPointTemp, DewPointTemp, @@ -4932,11 +4914,11 @@ namespace LowTempRadiantSystem { // Produce a warning message so that user knows the system was shut-off due to potential for condensation if (!state.dataGlobal->WarmupFlag) { if (this->CondErrIndex == 0) { // allow errors up to number of radiant systems - ShowWarningMessage(state, EnergyPlus::format("{} [{}]", cConstantFlowSystem, this->Name)); + ShowWarningMessage(state, std::format("{} [{}]", cConstantFlowSystem, this->Name)); ShowContinueError( state, - EnergyPlus::format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", - state.dataSurface->Surface(this->SurfacePtr(RadSurfNum2)).Name)); + std::format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", + state.dataSurface->Surface(this->SurfacePtr(RadSurfNum2)).Name)); ShowContinueError(state, "Flow to the radiant system will be shut-off to avoid condensation"); ShowContinueError( state, @@ -4954,7 +4936,7 @@ namespace LowTempRadiantSystem { } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} [{}] condensation shut-off occurrence continues.", cConstantFlowSystem, this->Name), + std::format("{} [{}] condensation shut-off occurrence continues.", cConstantFlowSystem, this->Name), this->CondErrIndex, DewPointTemp, DewPointTemp, @@ -5358,7 +5340,7 @@ namespace LowTempRadiantSystem { if (state.dataLowTempRadSys->warnTooLow) { if (this->OutRangeLoErrorCount == 0) { ShowSevereMessage(state, "UpdateLowTempRadiantSystem: model result for fluid outlet temperature is not physical."); - ShowContinueError(state, EnergyPlus::format("Occurs for radiant system name = {}", this->Name)); + ShowContinueError(state, std::format("Occurs for radiant system name = {}", this->Name)); ShowContinueError(state, EnergyPlus::format("Calculated radiant system outlet temperature = {:.3R} [C]", outletTemp)); ShowContinueError(state, EnergyPlus::format("Radiant system inlet temperature = {:.3R} [C]", inletTemp)); ShowContinueError( @@ -5375,7 +5357,7 @@ namespace LowTempRadiantSystem { if (state.dataLowTempRadSys->warnTooHigh) { if (this->OutRangeHiErrorCount == 0) { ShowSevereMessage(state, "UpdateLowTempRadiantSystem: model result for fluid outlet temperature is not physical."); - ShowContinueError(state, EnergyPlus::format("Occurs for radiant system name = {}", this->Name)); + ShowContinueError(state, std::format("Occurs for radiant system name = {}", this->Name)); ShowContinueError(state, EnergyPlus::format("Calculated radiant system outlet temperature = {:.3R} [C]", outletTemp)); ShowContinueError(state, EnergyPlus::format("Radiant system inlet temperature = {:.3R} [C]", inletTemp)); ShowContinueError( @@ -5413,8 +5395,7 @@ namespace LowTempRadiantSystem { case CtrlType::RunningMeanODB: return this->todayRunningMeanOutdoorDryBulbTemperature; default: - ShowSevereError(state, - EnergyPlus::format("Illegal control type in low temperature radiant system or it's design object: {}", this->Name)); + ShowSevereError(state, std::format("Illegal control type in low temperature radiant system or it's design object: {}", this->Name)); ShowFatalError(state, "Preceding condition causes termination."); return 0.0; // hush the compiler } @@ -5445,7 +5426,7 @@ namespace LowTempRadiantSystem { case SetpointType::ZeroFlowPower: return scheduleValue; default: - ShowSevereError(state, EnergyPlus::format("Illegal setpoint type in low temperature radiant system: {}", this->Name)); + ShowSevereError(state, std::format("Illegal setpoint type in low temperature radiant system: {}", this->Name)); ShowFatalError(state, "Preceding condition causes termination."); return scheduleValue + 0.5 * throttlingRange; // hush the compiler } diff --git a/src/EnergyPlus/Material.cc b/src/EnergyPlus/Material.cc index e290cc51f33..8d5ccf9fa66 100644 --- a/src/EnergyPlus/Material.cc +++ b/src/EnergyPlus/Material.cc @@ -45,6 +45,9 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + // ObjexxFCL Headers #include @@ -567,33 +570,33 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (s_ipsc->rNumericArgs(8) > 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, EnergyPlus::format("{} not <= 1.0", s_ipsc->cNumericFieldNames(8))); + ShowSevereCustom(state, eoh, std::format("{} not <= 1.0", s_ipsc->cNumericFieldNames(8))); } if (s_ipsc->rNumericArgs(9) <= 0.0 || s_ipsc->rNumericArgs(9) >= 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, EnergyPlus::format("{} not > 0.0 and < 1.0", s_ipsc->cNumericFieldNames(9))); + ShowSevereCustom(state, eoh, std::format("{} not > 0.0 and < 1.0", s_ipsc->cNumericFieldNames(9))); } if (s_ipsc->rNumericArgs(10) <= 0.0 || s_ipsc->rNumericArgs(10) >= 1.0) { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} not > 0.0 and < 1.0", s_ipsc->cNumericFieldNames(10))); + ShowSevereError(state, std::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} not > 0.0 and < 1.0", s_ipsc->cNumericFieldNames(10))); } if (s_ipsc->rNumericArgs(11) <= 0.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, EnergyPlus::format("{} not > 0.0", s_ipsc->cNumericFieldNames(11))); + ShowSevereCustom(state, eoh, std::format("{} not > 0.0", s_ipsc->cNumericFieldNames(11))); } if (s_ipsc->rNumericArgs(13) < 0.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, EnergyPlus::format("{} not > 0.0", s_ipsc->cNumericFieldNames(13))); + ShowSevereCustom(state, eoh, std::format("{} not > 0.0", s_ipsc->cNumericFieldNames(13))); } if (s_ipsc->rNumericArgs(14) < 0.0 || s_ipsc->rNumericArgs(14) >= 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, EnergyPlus::format("{} not > 0.0 and < 1.0", s_ipsc->cNumericFieldNames(14))); + ShowSevereCustom(state, eoh, std::format("{} not > 0.0 and < 1.0", s_ipsc->cNumericFieldNames(14))); } if (s_ipsc->cAlphaArgs(4).empty()) { @@ -602,9 +605,8 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if BooleanSwitch answer = getYesNoValue(s_ipsc->cAlphaArgs(4)); if (answer == BooleanSwitch::Invalid) { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("{} must be Yes or No, entered value={}", s_ipsc->cNumericFieldNames(4), s_ipsc->cAlphaArgs(4))); + ShowSevereError(state, std::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} must be Yes or No, entered value={}", s_ipsc->cNumericFieldNames(4), s_ipsc->cAlphaArgs(4))); } else { mat->SolarDiffusing = (answer == BooleanSwitch::Yes); } @@ -631,36 +633,36 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("{} requires the minimum value = 0.0 in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{} requires the minimum value = 0.0 in the entered table name={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } if (std::abs(maxAng - 90.0) > 1.0e-6) { ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("{} requires the maximum value = 90.0 in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{} requires the maximum value = 90.0 in the entered table name={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } if (minLam < 0.1) { ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("{} requires the minimum value = 0.1 micron in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{} requires the minimum value = 0.1 micron in the entered table name={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } if (maxLam > 4.0) { ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("{} requires the maximum value = 4.0 microns in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{} requires the maximum value = 4.0 microns in the entered table name={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } } @@ -682,33 +684,33 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("{} requires the minimum value = 0.0 in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{} requires the minimum value = 0.0 in the entered table name={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } if (std::abs(maxAng - 90.0) > 1.0e-6) { ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("{} requires the maximum value = 90.0 in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{} requires the maximum value = 90.0 in the entered table name={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } if (minLam < 0.1) { ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("{} requires the minimum value = 0.1 micron in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{} requires the minimum value = 0.1 micron in the entered table name={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } if (maxLam > 4.0) { ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("{} requires the maximum value = 4.0 microns in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{} requires the maximum value = 4.0 microns in the entered table name={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } } @@ -730,33 +732,33 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("{} requires the minimum value = 0.0 in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{} requires the minimum value = 0.0 in the entered table name={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } if (std::abs(maxAng - 90.0) > 1.0e-6) { ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("{} requires the maximum value = 90.0 in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{} requires the maximum value = 90.0 in the entered table name={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } if (minLam < 0.1) { ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("{} requires the minimum value = 0.1 micron in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{} requires the minimum value = 0.1 micron in the entered table name={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } if (maxLam > 4.0) { ErrorsFound = true; ShowSevereCustom(state, eoh, - EnergyPlus::format("{} requires the maximum value = 4.0 microns in the entered table name={}", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{} requires the maximum value = 4.0 microns in the entered table name={}", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } } } @@ -837,7 +839,7 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (s_ipsc->rNumericArgs(6) + s_ipsc->rNumericArgs(7) >= 1.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, EnergyPlus::format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(6), s_ipsc->cNumericFieldNames(7))); + ShowSevereCustom(state, eoh, std::format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(6), s_ipsc->cNumericFieldNames(7))); } if (s_ipsc->cAlphaArgs(2).empty()) { @@ -848,9 +850,8 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if mat->SolarDiffusing = false; } else { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("{} must be Yes or No, entered value={}", s_ipsc->cNumericFieldNames(2), s_ipsc->cAlphaArgs(4))); + ShowSevereError(state, std::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} must be Yes or No, entered value={}", s_ipsc->cNumericFieldNames(2), s_ipsc->cAlphaArgs(4))); } } @@ -1023,11 +1024,11 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (matGas->gases[0].vis.c0 <= 0.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, EnergyPlus::format("{} not > 0.0", s_ipsc->cNumericFieldNames(5))); + ShowSevereCustom(state, eoh, std::format("{} not > 0.0", s_ipsc->cNumericFieldNames(5))); } if (matGas->gases[0].cp.c0 <= 0.0) { ErrorsFound = true; - ShowSevereCustom(state, eoh, EnergyPlus::format("{} not > 0.0", s_ipsc->cNumericFieldNames(8))); + ShowSevereCustom(state, eoh, std::format("{} not > 0.0", s_ipsc->cNumericFieldNames(8))); } if (matGas->gases[0].wght <= 0.0) { ErrorsFound = true; @@ -1126,18 +1127,18 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (matGas->gases[0].vis.c0 <= 0.0) { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} not > 0.0", s_ipsc->cNumericFieldNames(5))); + ShowSevereError(state, std::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} not > 0.0", s_ipsc->cNumericFieldNames(5))); } if (matGas->gases[0].cp.c0 <= 0.0) { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} not > 0.0", s_ipsc->cNumericFieldNames(8))); + ShowSevereError(state, std::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} not > 0.0", s_ipsc->cNumericFieldNames(8))); } if (matGas->gases[0].wght <= 0.0) { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} not > 0.0", s_ipsc->cNumericFieldNames(11))); + ShowSevereError(state, std::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} not > 0.0", s_ipsc->cNumericFieldNames(11))); } } @@ -1147,7 +1148,7 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (DenomRGas > 0.0) { matGas->NominalR = matGas->Thickness / DenomRGas; } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError( state, EnergyPlus::format("Nominal resistance of gap at room temperature calculated at a negative Conductivity=[{:.3R}].", DenomRGas)); @@ -1201,7 +1202,7 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if auto &gas = matGas->gases[NumGas]; gas.type = static_cast(getEnumValue(gasTypeNamesUC, Util::makeUPPER(s_ipsc->cAlphaArgs(2 + NumGas)))); if (gas.type == GasType::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1 + NumGas))); + ShowSevereError(state, std::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1 + NumGas))); // Error check? ErrorsFound = true; } @@ -1211,7 +1212,7 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if matGas->Thickness = s_ipsc->rNumericArgs(1); if (matGas->Thickness <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, s_ipsc->cNumericFieldNames(1) + " must be greater than 0."); } matGas->ROnly = true; @@ -1528,11 +1529,11 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if matScreen->bmRefModel = static_cast(getEnumValue(screenBeamReflectanceModelNamesUC, Util::makeUPPER(s_ipsc->cAlphaArgs(2)))); if (matScreen->bmRefModel == ScreenBeamReflectanceModel::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", Illegal value.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - EnergyPlus::format("{}=\"{}\", must be one of DoNotModel, ModelAsDirectBeam or ModelAsDiffuse.", - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", must be one of DoNotModel, ModelAsDirectBeam or ModelAsDiffuse.", + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } matScreen->Roughness = SurfaceRoughness::MediumRough; @@ -2159,7 +2160,7 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if mat->slatAngleType = static_cast(getEnumValue(slatAngleTypeNamesUC, Util::makeUPPER(s_ipsc->cAlphaArgs(3)))); } if (mat->SlatWidth < mat->SlatSeparation) { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\", Slat Separation/Width", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}=\"{}\", Slat Separation/Width", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}] is less than {} [{:.2R}].", s_ipsc->cNumericFieldNames(1), @@ -2169,7 +2170,7 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if ShowContinueError(state, "This will allow direct beam to be transmitted when Slat angle = 0."); } if (mat->SlatSeparation < 0.001) { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\", Slat Separation", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}=\"{}\", Slat Separation", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} [{:.2R}]. Slate spacing must be > 0.0", s_ipsc->cNumericFieldNames(2), mat->SlatSeparation)); ShowContinueError(state, @@ -2178,21 +2179,21 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if mat->SlatSeparation = 0.025; } if (mat->SlatWidth < 0.001 || mat->SlatWidth >= 2.0 * mat->SlatSeparation) { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\", Slat Width", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}=\"{}\", Slat Width", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError( state, EnergyPlus::format("{} [{:.2R}]. Slat width range is 0 < Width <= 2*Spacing", s_ipsc->cNumericFieldNames(1), mat->SlatWidth)); ShowContinueError(state, "...Setting slate width equal to slate spacing and simulation continues."); mat->SlatWidth = mat->SlatSeparation; } if (mat->SlatCrown < 0.0 || mat->SlatCrown >= 0.5 * mat->SlatWidth) { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\", Slat Crown", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}=\"{}\", Slat Crown", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError( state, EnergyPlus::format("{} [{:.2R}]. Slat crwon range is 0 <= crown < 0.5*Width", s_ipsc->cNumericFieldNames(3), mat->SlatCrown)); ShowContinueError(state, "...Setting slate crown to 0.0 and simulation continues."); mat->SlatCrown = 0.0; } if (mat->SlatAngle < -90.0 || mat->SlatAngle > 90.0) { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\", Slat Angle", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}=\"{}\", Slat Angle", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError( state, EnergyPlus::format("{} [{:.2R}]. Slat angle range is -90.0 <= Angle < 90.0", s_ipsc->cNumericFieldNames(4), mat->SlatAngle)); ShowContinueError(state, "...Setting slate angle to 0.0 and simulation continues."); @@ -2201,23 +2202,23 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if ((s_ipsc->rNumericArgs(5) + s_ipsc->rNumericArgs(7) >= 1.0)) { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(5), s_ipsc->cNumericFieldNames(7))); + ShowSevereError(state, std::format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(5), s_ipsc->cNumericFieldNames(7))); } if ((s_ipsc->rNumericArgs(6) + s_ipsc->rNumericArgs(8) >= 1.0)) { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(6), s_ipsc->cNumericFieldNames(8))); + ShowSevereError(state, std::format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(6), s_ipsc->cNumericFieldNames(8))); } if ((s_ipsc->rNumericArgs(9) + s_ipsc->rNumericArgs(11) >= 1.0)) { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(9), s_ipsc->cNumericFieldNames(11))); + ShowSevereError(state, std::format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(9), s_ipsc->cNumericFieldNames(11))); } if ((s_ipsc->rNumericArgs(10) + s_ipsc->rNumericArgs(12) >= 1.0)) { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(10), s_ipsc->cNumericFieldNames(12))); + ShowSevereError(state, std::format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} + {} not < 1.0", s_ipsc->cNumericFieldNames(10), s_ipsc->cNumericFieldNames(12))); } } // TotBlindsEQL loop @@ -2290,21 +2291,20 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (mat->Conductivity > 0.0) { mat->Resistance = mat->NominalR = mat->Thickness / mat->Conductivity; } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" is not defined correctly.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} is <=0.", s_ipsc->cNumericFieldNames(7))); + ShowSevereError(state, std::format("{}=\"{}\" is not defined correctly.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} is <=0.", s_ipsc->cNumericFieldNames(7))); ErrorsFound = true; } if (mat->InitMoisture > mat->Porosity) { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("{} is greater than {}. It must be less or equal.", - s_ipsc->cNumericFieldNames(15), - s_ipsc->cNumericFieldNames(13))); - ShowContinueError(state, EnergyPlus::format("{} = {:.3T}.", s_ipsc->cNumericFieldNames(13), mat->Porosity)); - ShowContinueError(state, EnergyPlus::format("{} = {:.3T}.", s_ipsc->cNumericFieldNames(15), mat->InitMoisture)); + ShowWarningError(state, std::format("{}=\"{}\", Illegal value combination.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError( - state, EnergyPlus::format("{} is reset to the maximum (saturation) value = {:.3T}.", s_ipsc->cNumericFieldNames(15), mat->Porosity)); + state, + std::format("{} is greater than {}. It must be less or equal.", s_ipsc->cNumericFieldNames(15), s_ipsc->cNumericFieldNames(13))); + ShowContinueError(state, std::format("{} = {:.3f}.", s_ipsc->cNumericFieldNames(13), mat->Porosity)); + ShowContinueError(state, std::format("{} = {:.3f}.", s_ipsc->cNumericFieldNames(15), mat->InitMoisture)); + ShowContinueError(state, + std::format("{} is reset to the maximum (saturation) value = {:.3f}.", s_ipsc->cNumericFieldNames(15), mat->Porosity)); ShowContinueError(state, "Simulation continues."); mat->InitMoisture = mat->Porosity; } @@ -2347,9 +2347,7 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (NumNums + 1 != NumAlphas) { ShowSevereCustom( - state, - eoh, - EnergyPlus::format("Check number of {} compared to number of {}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cNumericFieldNames(1))); + state, eoh, std::format("Check number of {} compared to number of {}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cNumericFieldNames(1))); ErrorsFound = true; continue; } @@ -2375,9 +2373,9 @@ void GetMaterialData(EnergyPlusData &state, bool &ErrorsFound) // set to true if if (matGlass->group != Group::Glass) { ShowSevereCustom(state, eoh, - EnergyPlus::format("{} = {}, Material is not a window glazing ", - s_ipsc->cAlphaFieldNames(1 + iMatRef), - s_ipsc->cAlphaArgs(1 + iMatRef))); + std::format("{} = {}, Material is not a window glazing ", + s_ipsc->cAlphaFieldNames(1 + iMatRef), + s_ipsc->cAlphaArgs(1 + iMatRef))); ErrorsFound = true; continue; } @@ -2880,11 +2878,10 @@ void GetVariableAbsorptanceInput(EnergyPlusData &state, bool &errorsFound) if (mat->group != Group::Regular) { ShowSevereError( state, - EnergyPlus::format( - "{}: Reference Material is not appropriate type for Thermal/Solar Absorptance properties, material={}, must have regular " - "properties (Thermal/Solar Absorptance)", - s_ipsc->cCurrentModuleObject, - mat->Name)); + std::format("{}: Reference Material is not appropriate type for Thermal/Solar Absorptance properties, material={}, must have regular " + "properties (Thermal/Solar Absorptance)", + s_ipsc->cCurrentModuleObject, + mat->Name)); errorsFound = true; continue; } @@ -2900,7 +2897,7 @@ void GetVariableAbsorptanceInput(EnergyPlusData &state, bool &errorsFound) if ((mat->absorpThermalVarSched == nullptr) && (mat->absorpSolarVarSched == nullptr)) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}: Control signal \"Scheduled\" is chosen but both thermal and solar absorptance schedules are undefined, for object {}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); @@ -2908,34 +2905,31 @@ void GetVariableAbsorptanceInput(EnergyPlusData &state, bool &errorsFound) return; } if ((mat->absorpThermalVarCurve != nullptr) || (mat->absorpSolarVarCurve != nullptr)) { - ShowWarningError( - state, - EnergyPlus::format("{}: Control signal \"Scheduled\" is chosen. Thermal or solar absorptance function name is going to be " - "ignored, for object {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, + std::format("{}: Control signal \"Scheduled\" is chosen. Thermal or solar absorptance function name is going to be " + "ignored, for object {}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); errorsFound = true; return; } } else { // controlled by performance table or curve if ((mat->absorpThermalVarCurve == nullptr) && (mat->absorpSolarVarCurve == nullptr)) { - ShowSevereError( - state, - EnergyPlus::format("{}: Non-schedule control signal is chosen but both thermal and solar absorptance table or curve are " - "undefined, for object {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + std::format("{}: Non-schedule control signal is chosen but both thermal and solar absorptance table or curve are " + "undefined, for object {}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); errorsFound = true; return; } if ((mat->absorpThermalVarSched != nullptr) || (mat->absorpSolarVarSched != nullptr)) { - ShowWarningError( - state, - EnergyPlus::format("{}: Non-schedule control signal is chosen. Thermal or solar absorptance schedule name is going to be " - "ignored, for object {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, + std::format("{}: Non-schedule control signal is chosen. Thermal or solar absorptance schedule name is going to be " + "ignored, for object {}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); errorsFound = true; return; } @@ -3010,14 +3004,14 @@ void GetWindowGlassSpectralData(EnergyPlusData &state, bool &ErrorsFound) // set ShowWarningCustom( state, eoh, - EnergyPlus::format("{} of items in data set is not a multiple of 4 (Wavelength,Trans,ReflFront,ReflBack), remainder items set to 0.0", - NumNums)); + std::format("{} of items in data set is not a multiple of 4 (Wavelength,Trans,ReflFront,ReflBack), remainder items set to 0.0", + NumNums)); ErrorsFound = true; continue; } if (TotLam > MaxSpectralDataElements) { - ShowSevereCustom(state, eoh, EnergyPlus::format("More than {} entries in set ({})", MaxSpectralDataElements, NumNums)); + ShowSevereCustom(state, eoh, std::format("More than {} entries in set ({})", MaxSpectralDataElements, NumNums)); ErrorsFound = true; continue; } @@ -3048,22 +3042,19 @@ void GetWindowGlassSpectralData(EnergyPlusData &state, bool &ErrorsFound) // set RhoB = specData.ReflBack(LamNum); if (LamNum < TotLam && specData.WaveLength(LamNum + 1) <= Lam) { ErrorsFound = true; - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" invalid set.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid set.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - EnergyPlus::format("... Wavelengths not in increasing order. at wavelength#={}, value=[{:.4T}], next is [{:.4T}].", - LamNum, - Lam, - specData.WaveLength(LamNum + 1))); + std::format("... Wavelengths not in increasing order. at wavelength#={}, value=[{:.4f}], next is [{:.4f}].", + LamNum, + Lam, + specData.WaveLength(LamNum + 1))); } if (Lam < 0.1 || Lam > 4.0) { ErrorsFound = true; - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" invalid value.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid value.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError( - state, - EnergyPlus::format("... A wavelength is not in the range 0.1 to 4.0 microns; at wavelength#={}, value=[{:.4T}].", LamNum, Lam)); + state, std::format("... A wavelength is not in the range 0.1 to 4.0 microns; at wavelength#={}, value=[{:.4f}].", LamNum, Lam)); } // TH 2/15/2011. CR 8343 @@ -3071,30 +3062,24 @@ void GetWindowGlassSpectralData(EnergyPlusData &state, bool &ErrorsFound) // set // Relax rules to allow directly use of spectral data from IGDB if (Tau > 1.01) { ErrorsFound = true; - ShowSevereError(state, - EnergyPlus::format("{}: {}=\"{}\" invalid value.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("... A transmittance is > 1.0; at wavelength#={}, value=[{:.4T}].", LamNum, Tau)); + ShowSevereError(state, std::format("{}: {}=\"{}\" invalid value.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("... A transmittance is > 1.0; at wavelength#={}, value=[{:.4f}].", LamNum, Tau)); } if (RhoF < 0.0 || RhoF > 1.02 || RhoB < 0.0 || RhoB > 1.02) { ErrorsFound = true; - ShowSevereError(state, - EnergyPlus::format("{}: {}=\"{}\" invalid value.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("... A reflectance is < 0.0 or > 1.0; at wavelength#={}, RhoF value=[{:.4T}].", LamNum, RhoF)); - ShowContinueError(state, - EnergyPlus::format("... A reflectance is < 0.0 or > 1.0; at wavelength#={}, RhoB value=[{:.4T}].", LamNum, RhoB)); + ShowSevereError(state, std::format("{}: {}=\"{}\" invalid value.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("... A reflectance is < 0.0 or > 1.0; at wavelength#={}, RhoF value=[{:.4f}].", LamNum, RhoF)); + ShowContinueError(state, std::format("... A reflectance is < 0.0 or > 1.0; at wavelength#={}, RhoB value=[{:.4f}].", LamNum, RhoB)); } if ((Tau + RhoF) > 1.03 || (Tau + RhoB) > 1.03) { ErrorsFound = true; - ShowSevereError(state, - EnergyPlus::format("{}: {}=\"{}\" invalid value.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}: {}=\"{}\" invalid value.", routineName, s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError( state, - EnergyPlus::format( - "... Transmittance + reflectance) > 1.0 for an entry; at wavelength#={}", - EnergyPlus::format("{}, value(Tau+RhoF)=[{:.4T}], value(Tau+RhoB)=[{:.4T}].", LamNum, (Tau + RhoF), (Tau + RhoB)))); + std::format("... Transmittance + reflectance) > 1.0 for an entry; at wavelength#={}", + std::format("{}, value(Tau+RhoF)=[{:.4f}], value(Tau+RhoB)=[{:.4f}].", LamNum, (Tau + RhoF), (Tau + RhoB)))); } } } @@ -3154,11 +3139,10 @@ void MaterialGlass::SetupSimpleWindowGlazingSystem(EnergyPlusData &state) Rlw = (1.0 / this->SimpleWindowUfactor) - Riw - Row; if (Rlw <= 0.0) { // U factor of film coefficients is better than user input. Rlw = max(Rlw, 0.001); - ShowWarningError( - state, - EnergyPlus::format("WindowMaterial:SimpleGlazingSystem: {} has U-factor higher than that provided by surface film resistances, " - "Check value of U-factor", - this->Name)); + ShowWarningError(state, + std::format("WindowMaterial:SimpleGlazingSystem: {} has U-factor higher than that provided by surface film resistances, " + "Check value of U-factor", + this->Name)); } // Step 2. determine layer thickness. @@ -3177,8 +3161,7 @@ void MaterialGlass::SetupSimpleWindowGlazingSystem(EnergyPlusData &state) } else { ErrorsFound = true; ShowSevereError( - state, - EnergyPlus::format("WindowMaterial:SimpleGlazingSystem: {} has Conductivity <= 0.0, must be >0.0, Check value of U-factor", this->Name)); + state, std::format("WindowMaterial:SimpleGlazingSystem: {} has Conductivity <= 0.0, must be >0.0, Check value of U-factor", this->Name)); } // step 4. determine solar transmission (revised to 10-1-2009 version from LBNL.) diff --git a/src/EnergyPlus/MicroturbineElectricGenerator.cc b/src/EnergyPlus/MicroturbineElectricGenerator.cc index 70d82a42b04..e6a868ea24d 100644 --- a/src/EnergyPlus/MicroturbineElectricGenerator.cc +++ b/src/EnergyPlus/MicroturbineElectricGenerator.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -274,18 +275,18 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElevation); if (std::abs(ElectOutFTempElevOutput - 1.0) > 0.1) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(2), AlphArray(2))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(2), AlphArray(2))); ShowContinueError(state, "... Curve output at reference conditions should equal 1 (+-10%)."); ShowContinueError(state, - EnergyPlus::format("...Reference combustion air inlet temperature = {:.4T} C", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); + std::format("...Reference combustion air inlet temperature = {:.4f} C", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); ShowContinueError(state, - EnergyPlus::format("...Reference elevation = {:.4T} m", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElevation)); - ShowContinueError(state, EnergyPlus::format("...Curve output = {:.4T}", ElectOutFTempElevOutput)); + std::format("...Reference elevation = {:.4f} m", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElevation)); + ShowContinueError(state, std::format("...Curve output = {:.4f}", ElectOutFTempElevOutput)); } } } @@ -293,11 +294,10 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).ElecEffFTempCurveNum = Curve::GetCurveIndex(state, AlphArray(3)); // Convert curve name to number if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).ElecEffFTempCurveNum == 0) { - ShowSevereError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} not found = {}", state.dataIPShortCut->cAlphaFieldNames(3), AlphArray(3))); + ShowSevereError( + state, + std::format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} not found = {}", state.dataIPShortCut->cAlphaFieldNames(3), AlphArray(3))); ErrorsFound = true; } else { // Verify curve object, only legal types are Quadratic and Cubic @@ -310,15 +310,15 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp); if (std::abs(ElecEfficFTempOutput - 1.0) > 0.1) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(3), AlphArray(3))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(3), AlphArray(3))); ShowContinueError(state, "... Curve output at reference condition should equal 1 (+-10%)."); ShowContinueError(state, - EnergyPlus::format("... Reference combustion air inlet temperature = {:.4T} C", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); - ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", ElecEfficFTempOutput)); + std::format("... Reference combustion air inlet temperature = {:.4f} C", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); + ShowContinueError(state, std::format("... Curve output = {:.4f}", ElecEfficFTempOutput)); } } } @@ -326,11 +326,10 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).ElecEffFPLRCurveNum = Curve::GetCurveIndex(state, AlphArray(4)); // Convert curve name to number if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).ElecEffFPLRCurveNum == 0) { - ShowSevereError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} not found = {}", state.dataIPShortCut->cAlphaFieldNames(4), AlphArray(4))); + ShowSevereError( + state, + std::format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} not found = {}", state.dataIPShortCut->cAlphaFieldNames(4), AlphArray(4))); ErrorsFound = true; } else { // Verify curve object, only legal types are Quadratic and Cubic @@ -342,12 +341,12 @@ void GetMTGeneratorInput(EnergyPlusData &state) Curve::CurveValue(state, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).ElecEffFPLRCurveNum, 1.0); if (std::abs(ElecEfficFPLROutput - 1.0) > 0.1) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(4), AlphArray(4))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(4), AlphArray(4))); ShowContinueError(state, "... Curve output at a part-load ratio of 1 should equal 1 (+-10%)."); - ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", ElecEfficFPLROutput)); + ShowContinueError(state, std::format("... Curve output = {:.4f}", ElecEfficFPLROutput)); } Real64 Var1Min(0.0); @@ -362,11 +361,10 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).FuelType = static_cast(getEnumValue(Constant::eFuelNamesUC, AlphArray(5))); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).FuelType == Constant::eFuel::Invalid) { - ShowSevereError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), AlphArray(5))); + ShowSevereError( + state, + std::format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), AlphArray(5))); ErrorsFound = true; } @@ -375,28 +373,27 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).FuelLowerHeatingValue <= 0.0) { ShowSevereError(state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(9), NumArray(9))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(9))); + ShowContinueError(state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowContinueError(state, std::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(9))); ErrorsFound = true; } if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).FuelHigherHeatingValue <= 0.0) { ShowSevereError(state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(8), NumArray(8))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(8))); + ShowContinueError(state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowContinueError(state, std::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(8))); ErrorsFound = true; } if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).FuelLowerHeatingValue > state.dataMircoturbElectGen->MTGenerator(GeneratorNum).FuelHigherHeatingValue) { - ShowSevereError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowSevereError( + state, + std::format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); ShowContinueError(state, - EnergyPlus::format("{} must be greater than the {}", - state.dataIPShortCut->cNumericFieldNames(8), - state.dataIPShortCut->cNumericFieldNames(9))); + std::format("{} must be greater than the {}", + state.dataIPShortCut->cNumericFieldNames(8), + state.dataIPShortCut->cNumericFieldNames(9))); ShowContinueError(state, EnergyPlus::format("{}={:.2R}", state.dataIPShortCut->cNumericFieldNames(8), NumArray(8))); ShowContinueError(state, EnergyPlus::format("{}={:.2R}", state.dataIPShortCut->cNumericFieldNames(9), NumArray(9))); ErrorsFound = true; @@ -405,8 +402,8 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).StandbyPower = NumArray(10); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).StandbyPower < 0.0) { ShowWarningError(state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(10), NumArray(10))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(10))); + ShowContinueError(state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowContinueError(state, std::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(10))); ShowContinueError(state, "Resetting to 0 and the simulation continues."); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).StandbyPower = 0.0; } @@ -414,8 +411,8 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).AncillaryPower = NumArray(11); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).AncillaryPower < 0.0) { ShowWarningError(state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(11), NumArray(11))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(11))); + ShowContinueError(state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowContinueError(state, std::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(11))); ShowContinueError(state, "Resetting to 0 and the simulation continues."); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).AncillaryPower = 0.0; } @@ -424,8 +421,8 @@ void GetMTGeneratorInput(EnergyPlusData &state) Curve::GetCurveIndex(state, AlphArray(6)); // Convert curve name to number // If blank, then the calc routine assumes modifier curve value = 1 for entire simulation if (!state.dataIPShortCut->lAlphaFieldBlanks(6) && state.dataMircoturbElectGen->MTGenerator(GeneratorNum).AncillaryPowerFuelCurveNum == 0) { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(6), AlphArray(6))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(6), AlphArray(6))); + ShowContinueError(state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); ErrorsFound = true; } else if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).AncillaryPowerFuelCurveNum > 0) { // Verify curve object, only legal type is Quadratic @@ -440,22 +437,22 @@ void GetMTGeneratorInput(EnergyPlusData &state) Curve::CurveValue(state, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).AncillaryPowerFuelCurveNum, RefFuelUseMdot); if (std::abs(AncillaryPowerOutput - 1.0) > 0.1) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(6), AlphArray(6))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(6), AlphArray(6))); ShowContinueError(state, "... Curve output at reference conditions should equal 1 (+-10%)."); ShowContinueError(state, - EnergyPlus::format("... Reference Electrical Power Output = {:.2T} W", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElecPowerOutput)); + std::format("... Reference Electrical Power Output = {:.2f} W", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElecPowerOutput)); ShowContinueError(state, - EnergyPlus::format("... Reference Electrical Efficiency (LHV basis) = {:.4T}", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElecEfficiencyLHV)); + std::format("... Reference Electrical Efficiency (LHV basis) = {:.4f}", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElecEfficiencyLHV)); ShowContinueError(state, - EnergyPlus::format("... Fuel Lower Heating Value = {:.2T} kJ/kg", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).FuelLowerHeatingValue)); - ShowContinueError(state, EnergyPlus::format("... Calculated fuel flow = {:.4T} kg/s", RefFuelUseMdot)); - ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", AncillaryPowerOutput)); + std::format("... Fuel Lower Heating Value = {:.2f} kJ/kg", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).FuelLowerHeatingValue)); + ShowContinueError(state, std::format("... Calculated fuel flow = {:.4f} kg/s", RefFuelUseMdot)); + ShowContinueError(state, std::format("... Curve output = {:.4f}", AncillaryPowerOutput)); } } } @@ -500,10 +497,9 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecInletNodeNum == 0) || (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecOutletNodeNum == 0 && state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecInletNodeNum > 0)) { - ShowSevereError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowSevereError( + state, + std::format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); ShowContinueError(state, "... If one Heat Recovery Water Node Name is specified, then both the Inlet and Outlet Heat Recovery"); ShowContinueError(state, "... Water Node Names must be specified. Only one water node is being specified for this generator."); ErrorsFound = true; @@ -518,10 +514,10 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefThermalEffLHV = NumArray(12); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefThermalEffLHV < 0.0) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} must be >= 0.", state.dataIPShortCut->cNumericFieldNames(12))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} must be >= 0.", state.dataIPShortCut->cNumericFieldNames(12))); ShowContinueError(state, "Resetting to 0 and the simulation continues."); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefThermalEffLHV = 0.0; } @@ -548,8 +544,8 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).PlantFlowControl = false; } if ((!(Util::SameString(AlphArray(9), "InternalControl"))) && (!(Util::SameString(AlphArray(9), "PlantControl")))) { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(9), AlphArray(9))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(9), AlphArray(9))); + ShowContinueError(state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); ShowContinueError(state, "Operating Mode must be INTERNAL CONTROL or PLANT CONTROL."); ErrorsFound = true; } @@ -558,8 +554,8 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefHeatRecVolFlowRate <= 0.0) { ShowSevereError(state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(14), NumArray(14))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(14))); + ShowContinueError(state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowContinueError(state, std::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(14))); ErrorsFound = true; } @@ -587,17 +583,17 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(ThermalEffTempElevOutput - 1.0) > 0.1) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(11), AlphArray(11))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(11), AlphArray(11))); ShowContinueError(state, "... Curve output at reference conditions should equal 1 (+-10%)."); ShowContinueError(state, - EnergyPlus::format("... Reference combustion air inlet temperature = {:.4T} C", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); + std::format("... Reference combustion air inlet temperature = {:.4f} C", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); ShowContinueError(state, - EnergyPlus::format("... Reference elevation = {:.4T} m", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElevation)); + std::format("... Reference elevation = {:.4f} m", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefElevation)); } } } @@ -614,12 +610,12 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(HeatRecRateFPLROutput - 1.0) > 0.1) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(12), AlphArray(12))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(12), AlphArray(12))); ShowContinueError(state, "... Curve output at a part-load ratio of 1 should equal 1 (+-10%)."); - ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", HeatRecRateFPLROutput)); + ShowContinueError(state, std::format("... Curve output = {:.4f}", HeatRecRateFPLROutput)); } } } @@ -637,15 +633,15 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(HeatRecRateFTempOutput - 1.0) > 0.1) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(13), AlphArray(13))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(13), AlphArray(13))); ShowContinueError(state, "... Curve output at reference condition should equal 1 (+-10%)."); ShowContinueError(state, - EnergyPlus::format("... Reference inlet water temperature temperature = {:.4T} C", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefInletWaterTemp)); - ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", HeatRecRateFTempOutput)); + std::format("... Reference inlet water temperature temperature = {:.4f} C", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefInletWaterTemp)); + ShowContinueError(state, std::format("... Curve output = {:.4f}", HeatRecRateFTempOutput)); } } } @@ -663,15 +659,15 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(HeatRecRateFFlowOutput - 1.0) > 0.1) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(14), AlphArray(14))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(14), AlphArray(14))); ShowContinueError(state, "... Curve output at reference condition should equal 1 (+-10%)."); ShowContinueError(state, - EnergyPlus::format("... Reference Heat Recovery Water Flow Rate = {:.4T} m3/s", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefHeatRecVolFlowRate)); - ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", HeatRecRateFFlowOutput)); + std::format("... Reference Heat Recovery Water Flow Rate = {:.4f} m3/s", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefHeatRecVolFlowRate)); + ShowContinueError(state, std::format("... Curve output = {:.4f}", HeatRecRateFFlowOutput)); } } } @@ -679,10 +675,10 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMinVolFlowRate = NumArray(15); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMinVolFlowRate < 0.0) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} must be >= 0.", state.dataIPShortCut->cNumericFieldNames(15))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} must be >= 0.", state.dataIPShortCut->cNumericFieldNames(15))); ShowContinueError(state, "Resetting to 0 and the simulation continues."); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMinVolFlowRate = 0.0; } @@ -690,10 +686,10 @@ void GetMTGeneratorInput(EnergyPlusData &state) state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMaxVolFlowRate = NumArray(16); if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMaxVolFlowRate < 0.0) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} must be >= 0.", state.dataIPShortCut->cNumericFieldNames(16))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} must be >= 0.", state.dataIPShortCut->cNumericFieldNames(16))); ShowContinueError(state, "Resetting to 0 and the simulation continues."); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMaxVolFlowRate = 0.0; } @@ -701,17 +697,16 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMaxVolFlowRate < state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMinVolFlowRate) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, - EnergyPlus::format("{} must be >= {}", - state.dataIPShortCut->cNumericFieldNames(16), - state.dataIPShortCut->cNumericFieldNames(15))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError( + state, + std::format("{} must be >= {}", state.dataIPShortCut->cNumericFieldNames(16), state.dataIPShortCut->cNumericFieldNames(15))); ShowContinueError(state, - EnergyPlus::format("Resetting {} = {} and the simulation continues.", - state.dataIPShortCut->cNumericFieldNames(16), - state.dataIPShortCut->cNumericFieldNames(15))); + std::format("Resetting {} = {} and the simulation continues.", + state.dataIPShortCut->cNumericFieldNames(16), + state.dataIPShortCut->cNumericFieldNames(15))); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMaxVolFlowRate = state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMinVolFlowRate; } @@ -720,17 +715,16 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefHeatRecVolFlowRate < state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMinVolFlowRate) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, - EnergyPlus::format("{} must be >= {}", - state.dataIPShortCut->cNumericFieldNames(14), - state.dataIPShortCut->cNumericFieldNames(15))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError( + state, + std::format("{} must be >= {}", state.dataIPShortCut->cNumericFieldNames(14), state.dataIPShortCut->cNumericFieldNames(15))); ShowContinueError(state, - EnergyPlus::format("Resetting {} = {} and the simulation continues.", - state.dataIPShortCut->cNumericFieldNames(14), - state.dataIPShortCut->cNumericFieldNames(15))); + std::format("Resetting {} = {} and the simulation continues.", + state.dataIPShortCut->cNumericFieldNames(14), + state.dataIPShortCut->cNumericFieldNames(15))); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefHeatRecVolFlowRate = state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMinVolFlowRate; } @@ -739,17 +733,16 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefHeatRecVolFlowRate > state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMaxVolFlowRate) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, - EnergyPlus::format("{} must be <= {}", - state.dataIPShortCut->cNumericFieldNames(14), - state.dataIPShortCut->cNumericFieldNames(16))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError( + state, + std::format("{} must be <= {}", state.dataIPShortCut->cNumericFieldNames(14), state.dataIPShortCut->cNumericFieldNames(16))); ShowContinueError(state, - EnergyPlus::format("Resetting {} = {} and the simulation continues.", - state.dataIPShortCut->cNumericFieldNames(14), - state.dataIPShortCut->cNumericFieldNames(16))); + std::format("Resetting {} = {} and the simulation continues.", + state.dataIPShortCut->cNumericFieldNames(14), + state.dataIPShortCut->cNumericFieldNames(16))); state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefHeatRecVolFlowRate = state.dataMircoturbElectGen->MTGenerator(GeneratorNum).HeatRecMaxVolFlowRate; } @@ -779,12 +772,11 @@ void GetMTGeneratorInput(EnergyPlusData &state) // Combustion air inlet node must be an outside air node if (!state.dataIPShortCut->lAlphaFieldBlanks(15) && !OutAirNodeManager::CheckOutAirNodeNumber(state, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).CombustionAirInletNodeNum)) { - ShowSevereError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError( - state, EnergyPlus::format("{} is not a valid Outdoor Air Node = {}", state.dataIPShortCut->cAlphaFieldNames(15), AlphArray(15))); + ShowSevereError( + state, + std::format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, + std::format("{} is not a valid Outdoor Air Node = {}", state.dataIPShortCut->cAlphaFieldNames(15), AlphArray(15))); ShowContinueError(state, "it does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); ErrorsFound = true; } @@ -804,14 +796,13 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).CombustionAirOutletNodeNum > 0 && state.dataMircoturbElectGen->MTGenerator(GeneratorNum).CombustionAirInletNodeNum == 0) { - ShowSevereError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowSevereError( + state, + std::format("{} \"{}\"", state.dataIPShortCut->cCurrentModuleObject, state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); ShowContinueError(state, - EnergyPlus::format("A {} must be specified when a {} is specified.", - state.dataIPShortCut->cAlphaFieldNames(15), - state.dataIPShortCut->cAlphaFieldNames(16))); + std::format("A {} must be specified when a {} is specified.", + state.dataIPShortCut->cAlphaFieldNames(15), + state.dataIPShortCut->cAlphaFieldNames(16))); ErrorsFound = true; } @@ -824,8 +815,8 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefExhaustAirMassFlowRate <= 0.0 && !state.dataIPShortCut->lNumericFieldBlanks(18)) { ShowSevereError(state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(18), NumArray(18))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); - ShowContinueError(state, EnergyPlus::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(18))); + ShowContinueError(state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, AlphArray(1))); + ShowContinueError(state, std::format("{} must be greater than 0.", state.dataIPShortCut->cNumericFieldNames(18))); ErrorsFound = true; } @@ -841,15 +832,15 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(ExhFlowFTempOutput - 1.0) > 0.1) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(17), AlphArray(17))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(17), AlphArray(17))); ShowContinueError(state, "... Curve output at reference condition should equal 1 (+-10%)."); ShowContinueError(state, - EnergyPlus::format("... Reference combustion air inlet temperature = {:.4T} C", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); - ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", ExhFlowFTempOutput)); + std::format("... Reference combustion air inlet temperature = {:.4f} C", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); + ShowContinueError(state, std::format("... Curve output = {:.4f}", ExhFlowFTempOutput)); } } } @@ -866,12 +857,12 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(ExhFlowFPLROutput - 1.0) > 0.1) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(18), AlphArray(18))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(18), AlphArray(18))); ShowContinueError(state, "... Curve output at a part-load ratio of 1 should equal 1 (+-10%)."); - ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", ExhFlowFPLROutput)); + ShowContinueError(state, std::format("... Curve output = {:.4f}", ExhFlowFPLROutput)); } } } @@ -890,15 +881,15 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(ExhAirTempFTempOutput - 1.0) > 0.1) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(19), AlphArray(19))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(19), AlphArray(19))); ShowContinueError(state, "... Curve output at reference condition should equal 1 (+-10%)."); ShowContinueError(state, - EnergyPlus::format("... Reference combustion air inlet temperature = {:.4T} C", - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); - ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", ExhAirTempFTempOutput)); + std::format("... Reference combustion air inlet temperature = {:.4f} C", + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).RefCombustAirInletTemp)); + ShowContinueError(state, std::format("... Curve output = {:.4f}", ExhAirTempFTempOutput)); } } } @@ -915,12 +906,12 @@ void GetMTGeneratorInput(EnergyPlusData &state) if (std::abs(ExhOutAirTempFPLROutput - 1.0) > 0.1) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - state.dataIPShortCut->cCurrentModuleObject, - state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); - ShowContinueError(state, EnergyPlus::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(20), AlphArray(20))); + std::format("{} \"{}\"", + state.dataIPShortCut->cCurrentModuleObject, + state.dataMircoturbElectGen->MTGenerator(GeneratorNum).Name)); + ShowContinueError(state, std::format("{} = {}", state.dataIPShortCut->cAlphaFieldNames(20), AlphArray(20))); ShowContinueError(state, "... Curve output at a part-load ratio of 1 should equal 1 (+-10%)."); - ShowContinueError(state, EnergyPlus::format("... Curve output = {:.4T}", ExhOutAirTempFPLROutput)); + ShowContinueError(state, std::format("... Curve output = {:.4f}", ExhOutAirTempFPLROutput)); } } } @@ -930,7 +921,7 @@ void GetMTGeneratorInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, std::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -966,7 +957,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) // Fuel specific report variables SetupOutputVariable(state, - EnergyPlus::format("Generator {} HHV Basis Rate", sFuelType), + std::format("Generator {} HHV Basis Rate", sFuelType), Constant::Units::W, this->FuelEnergyUseRateHHV, OutputProcessor::TimeStepType::System, @@ -974,7 +965,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) this->Name); SetupOutputVariable(state, - EnergyPlus::format("Generator {} HHV Basis Energy", sFuelType), + std::format("Generator {} HHV Basis Energy", sFuelType), Constant::Units::J, this->FuelEnergyHHV, OutputProcessor::TimeStepType::System, @@ -985,7 +976,7 @@ void MTGeneratorSpecs::setupOutputVars(EnergyPlusData &state) OutputProcessor::EndUseCat::Cogeneration); SetupOutputVariable(state, - EnergyPlus::format("Generator {} Mass Flow Rate", sFuelType), + std::format("Generator {} Mass Flow Rate", sFuelType), Constant::Units::kg_s, this->FuelMdot, OutputProcessor::TimeStepType::System, @@ -1340,14 +1331,13 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, if (PowerFTempElev < 0.0) { if (this->PowerFTempElevErrorIndex == 0) { // MTGenerator(GeneratorNum)%PowerFTempElevErrorCount = MTGenerator(GeneratorNum)%PowerFTempElevErrorCount + 1 - ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError( state, - EnergyPlus::format("... Electrical Power Modifier curve (function of temperature and elevation) output is less than zero ({:.4T}).", - PowerFTempElev)); - ShowContinueError(state, - EnergyPlus::format("... Value occurs using a combustion inlet air temperature of {:.2T} C.", CombustionAirInletTemp)); - ShowContinueError(state, EnergyPlus::format("... and an elevation of {:.2T} m.", state.dataEnvrn->Elevation)); + std::format("... Electrical Power Modifier curve (function of temperature and elevation) output is less than zero ({:.4f}).", + PowerFTempElev)); + ShowContinueError(state, std::format("... Value occurs using a combustion inlet air temperature of {:.2f} C.", CombustionAirInletTemp)); + ShowContinueError(state, std::format("... and an elevation of {:.2f} m.", state.dataEnvrn->Elevation)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd(state, @@ -1405,13 +1395,12 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, if (ElecEfficiencyFTemp < 0.0) { if (this->EffFTempErrorIndex == 0) { // MTGenerator(GeneratorNum)%EffFTempErrorCount = MTGenerator(GeneratorNum)%EffFTempErrorCount + 1 - ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); - ShowContinueError( - state, - EnergyPlus::format("... Electrical Efficiency Modifier (function of temperature) output is less than zero ({:.4T}).", - ElecEfficiencyFTemp)); - ShowContinueError( - state, EnergyPlus::format("... Value occurs using a combustion inlet air temperature of {:.2T} C.", CombustionAirInletTemp)); + ShowWarningMessage(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowContinueError(state, + std::format("... Electrical Efficiency Modifier (function of temperature) output is less than zero ({:.4f}).", + ElecEfficiencyFTemp)); + ShowContinueError(state, + std::format("... Value occurs using a combustion inlet air temperature of {:.2f} C.", CombustionAirInletTemp)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1431,12 +1420,11 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, // Warn user if efficiency modifier curve output is less than 0 if (ElecEfficiencyFPLR < 0.0) { if (this->EffFPLRErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); - ShowContinueError( - state, - EnergyPlus::format("... Electrical Efficiency Modifier (function of part-load ratio) output is less than zero ({:.4T}).", - ElecEfficiencyFPLR)); - ShowContinueError(state, EnergyPlus::format("... Value occurs using a part-load ratio of {:.3T}.", PLR)); + ShowWarningMessage(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowContinueError(state, + std::format("... Electrical Efficiency Modifier (function of part-load ratio) output is less than zero ({:.4f}).", + ElecEfficiencyFPLR)); + ShowContinueError(state, std::format("... Value occurs using a part-load ratio of {:.3f}.", PLR)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1474,12 +1462,11 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, // Warn user if ancillary power modifier curve output is less than 0 if (AnciPowerFMdotFuel < 0.0) { if (this->AnciPowerFMdotFuelErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); - ShowContinueError(state, - EnergyPlus::format("... Ancillary Power Modifier (function of fuel input) output is less than zero ({:.4T}).", - AnciPowerFMdotFuel)); - ShowContinueError(state, - EnergyPlus::format("... Value occurs using a fuel input mass flow rate of {:.4T} kg/s.", this->FuelMdot)); + ShowWarningMessage(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowContinueError( + state, + std::format("... Ancillary Power Modifier (function of fuel input) output is less than zero ({:.4f}).", AnciPowerFMdotFuel)); + ShowContinueError(state, std::format("... Value occurs using a fuel input mass flow rate of {:.4f} kg/s.", this->FuelMdot)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1508,11 +1495,11 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, if (AncPowerCalcIterIndex > MaxAncPowerIter) { if (this->AnciPowerIterErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError(state, "... Iteration loop for electric power generation is not converging within tolerance."); ShowContinueError(state, "... Check the Ancillary Power Modifier Curve (function of fuel input)."); - ShowContinueError(state, EnergyPlus::format("... Ancillary Power = {:.1T} W.", ancillaryPowerRate)); - ShowContinueError(state, EnergyPlus::format("... Fuel input rate = {:.4T} kg/s.", AnciPowerFMdotFuel)); + ShowContinueError(state, std::format("... Ancillary Power = {:.1f} W.", ancillaryPowerRate)); + ShowContinueError(state, std::format("... Fuel input rate = {:.4f} kg/s.", AnciPowerFMdotFuel)); ShowContinueErrorTimeStamp(state, "... Simulation will continue."); } ShowRecurringWarningErrorAtEnd(state, @@ -1544,15 +1531,14 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, // Warn user if power modifier curve output is less than 0 if (ThermalEffFTempElev < 0.0) { if (this->ThermEffFTempElevErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError( state, - EnergyPlus::format( - "... Electrical Power Modifier curve (function of temperature and elevation) output is less than zero ({:.4T}).", - PowerFTempElev)); - ShowContinueError( - state, EnergyPlus::format("... Value occurs using a combustion inlet air temperature of {:.2T} C.", CombustionAirInletTemp)); - ShowContinueError(state, EnergyPlus::format("... and an elevation of {:.2T} m.", state.dataEnvrn->Elevation)); + std::format("... Electrical Power Modifier curve (function of temperature and elevation) output is less than zero ({:.4f}).", + PowerFTempElev)); + ShowContinueError(state, + std::format("... Value occurs using a combustion inlet air temperature of {:.2f} C.", CombustionAirInletTemp)); + ShowContinueError(state, std::format("... and an elevation of {:.2f} m.", state.dataEnvrn->Elevation)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd(state, @@ -1576,12 +1562,11 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, // Warn user if heat recovery modifier curve output is less than 0 if (HeatRecRateFPLR < 0.0) { if (this->HeatRecRateFPLRErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); - ShowContinueError( - state, - EnergyPlus::format("... Heat Recovery Rate Modifier (function of part-load ratio) output is less than zero ({:.4T}).", - HeatRecRateFPLR)); - ShowContinueError(state, EnergyPlus::format("... Value occurs using a part-load ratio of {:.3T}.", PLR)); + ShowWarningMessage(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowContinueError(state, + std::format("... Heat Recovery Rate Modifier (function of part-load ratio) output is less than zero ({:.4f}).", + HeatRecRateFPLR)); + ShowContinueError(state, std::format("... Value occurs using a part-load ratio of {:.3f}.", PLR)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1604,13 +1589,12 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, HeatRecRateFTemp = Curve::CurveValue(state, this->HeatRecRateFTempCurveNum, HeatRecInTemp); if (HeatRecRateFTemp < 0.0) { if (this->HeatRecRateFTempErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); - ShowContinueError( - state, - EnergyPlus::format("... Heat Recovery Rate Modifier (function of inlet water temp) output is less than zero ({:.4T}).", - HeatRecRateFTemp)); - ShowContinueError( - state, EnergyPlus::format("... Value occurs using an inlet water temperature temperature of {:.2T} C.", HeatRecInTemp)); + ShowWarningMessage(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowContinueError(state, + std::format("... Heat Recovery Rate Modifier (function of inlet water temp) output is less than zero ({:.4f}).", + HeatRecRateFTemp)); + ShowContinueError(state, + std::format("... Value occurs using an inlet water temperature temperature of {:.2f} C.", HeatRecInTemp)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1637,12 +1621,11 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, HeatRecRateFFlow = Curve::CurveValue(state, this->HeatRecRateFWaterFlowCurveNum, HeatRecVolFlowRate); if (HeatRecRateFFlow < 0.0) { if (this->HeatRecRateFFlowErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); - ShowContinueError( - state, - EnergyPlus::format("... Heat Recovery Rate Modifier (function of water flow rate) output is less than zero ({:.4T}).", - HeatRecRateFFlow)); - ShowContinueError(state, EnergyPlus::format("... Value occurs using a water flow rate of {:.4T} m3/s.", HeatRecVolFlowRate)); + ShowWarningMessage(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowContinueError(state, + std::format("... Heat Recovery Rate Modifier (function of water flow rate) output is less than zero ({:.4f}).", + HeatRecRateFFlow)); + ShowContinueError(state, std::format("... Value occurs using a water flow rate of {:.4f} m3/s.", HeatRecVolFlowRate)); ShowContinueErrorTimeStamp(state, "... Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1700,11 +1683,11 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, // Check water mass flow rate against minimum if (this->HeatRecMinMassFlowRate > heatRecMdot && heatRecMdot > 0.0) { if (this->HRMinFlowErrorIndex == 0) { - ShowWarningError(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningError(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError(state, - EnergyPlus::format("...Heat reclaim water flow rate is below the generators minimum mass flow rate of ({:.4T}).", - this->HeatRecMinMassFlowRate)); - ShowContinueError(state, EnergyPlus::format("...Heat reclaim water mass flow rate = {:.4T}.", heatRecMdot)); + std::format("...Heat reclaim water flow rate is below the generators minimum mass flow rate of ({:.4f}).", + this->HeatRecMinMassFlowRate)); + ShowContinueError(state, std::format("...Heat reclaim water mass flow rate = {:.4f}.", heatRecMdot)); ShowContinueErrorTimeStamp(state, "...Check inputs for heat recovery water flow rate."); } ShowRecurringWarningErrorAtEnd( @@ -1719,11 +1702,11 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, // Check water mass flow rate against maximum if (heatRecMdot > this->HeatRecMaxMassFlowRate && heatRecMdot > 0.0) { if (this->HRMaxFlowErrorIndex == 0) { - ShowWarningError(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningError(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError(state, - EnergyPlus::format("...Heat reclaim water flow rate is above the generators maximum mass flow rate of ({:.4T}).", - this->HeatRecMaxMassFlowRate)); - ShowContinueError(state, EnergyPlus::format("...Heat reclaim water mass flow rate = {:.4T}.", heatRecMdot)); + std::format("...Heat reclaim water flow rate is above the generators maximum mass flow rate of ({:.4f}).", + this->HeatRecMaxMassFlowRate)); + ShowContinueError(state, std::format("...Heat reclaim water mass flow rate = {:.4f}.", heatRecMdot)); ShowContinueErrorTimeStamp(state, "...Check inputs for heat recovery water flow rate."); } ShowRecurringWarningErrorAtEnd( @@ -1753,14 +1736,13 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, // Warn user if exhaust modifier curve output is less than or equal to 0 if (ExhFlowFTemp <= 0.0) { if (this->ExhFlowFTempErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError( state, - EnergyPlus::format( - "...Exhaust Air Flow Rate Modifier (function of temperature) output is less than or equal to zero ({:.4T}).", - ExhFlowFTemp)); - ShowContinueError( - state, EnergyPlus::format("...Value occurs using a combustion inlet air temperature of {:.2T}.", CombustionAirInletTemp)); + std::format("...Exhaust Air Flow Rate Modifier (function of temperature) output is less than or equal to zero ({:.4f}).", + ExhFlowFTemp)); + ShowContinueError(state, + std::format("...Value occurs using a combustion inlet air temperature of {:.2f}.", CombustionAirInletTemp)); ShowContinueErrorTimeStamp(state, "...Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( @@ -1783,13 +1765,12 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, // Warn user if exhaust modifier curve output is less than or equal to 0 if (ExhFlowFPLR <= 0.0) { if (this->ExhFlowFPLRErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError( state, - EnergyPlus::format( - "...Exhaust Air Flow Rate Modifier (function of part-load ratio) output is less than or equal to zero ({:.4T}).", - ExhFlowFPLR)); - ShowContinueError(state, EnergyPlus::format("...Value occurs using a part-load ratio of {:.2T}.", PLR)); + std::format("...Exhaust Air Flow Rate Modifier (function of part-load ratio) output is less than or equal to zero ({:.4f}).", + ExhFlowFPLR)); + ShowContinueError(state, std::format("...Value occurs using a part-load ratio of {:.2f}.", PLR)); ShowContinueErrorTimeStamp(state, "...Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd(state, @@ -1826,14 +1807,13 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, // Warn user if exhaust modifier curve output is less than or equal to 0 if (ExhAirTempFTemp <= 0.0) { if (this->ExhTempFTempErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError( state, - EnergyPlus::format( - "...Exhaust Air Temperature Modifier (function of temperature) output is less than or equal to zero ({:.4T}).", - ExhAirTempFTemp)); - ShowContinueError( - state, EnergyPlus::format("...Value occurs using a combustion inlet air temperature of {:.2T}.", CombustionAirInletTemp)); + std::format("...Exhaust Air Temperature Modifier (function of temperature) output is less than or equal to zero ({:.4f}).", + ExhAirTempFTemp)); + ShowContinueError(state, + std::format("...Value occurs using a combustion inlet air temperature of {:.2f}.", CombustionAirInletTemp)); ShowContinueErrorTimeStamp(state, "...Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd(state, @@ -1856,13 +1836,13 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, // Warn user if exhaust modifier curve output is less than or equal to 0 if (ExhAirTempFPLR <= 0.0) { if (this->ExhTempFPLRErrorIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError( state, - EnergyPlus::format( - "...Exhaust Air Temperature Modifier (function of part-load ratio) output is less than or equal to zero ({:.4T}).", + std::format( + "...Exhaust Air Temperature Modifier (function of part-load ratio) output is less than or equal to zero ({:.4f}).", ExhAirTempFPLR)); - ShowContinueError(state, EnergyPlus::format("...Value occurs using a part-load ratio of {:.2T}.", PLR)); + ShowContinueError(state, std::format("...Value occurs using a part-load ratio of {:.2f}.", PLR)); ShowContinueErrorTimeStamp(state, "...Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd(state, @@ -1909,11 +1889,11 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, if (this->ExhaustAirTemperature < CombustionAirInletTemp) { if (this->ExhTempLTInletTempIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError(state, "...The model has calculated the exhaust air temperature to be less than the combustion air inlet temperature."); - ShowContinueError(state, EnergyPlus::format("...Value of exhaust air temperature ={:.4T} C.", this->ExhaustAirTemperature)); - ShowContinueError(state, EnergyPlus::format("...Value of combustion air inlet temp ={:.4T} C.", CombustionAirInletTemp)); + ShowContinueError(state, std::format("...Value of exhaust air temperature ={:.4f} C.", this->ExhaustAirTemperature)); + ShowContinueError(state, std::format("...Value of combustion air inlet temp ={:.4f} C.", CombustionAirInletTemp)); ShowContinueErrorTimeStamp(state, "... Simulation will continue."); } ShowRecurringWarningErrorAtEnd(state, @@ -1926,13 +1906,13 @@ void MTGeneratorSpecs::CalcMTGeneratorModel(EnergyPlusData &state, if (this->ExhaustAirHumRat < CombustionAirInletW) { if (this->ExhHRLTInletHRIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); + ShowWarningMessage(state, std::format("GENERATOR:MICROTURBINE \"{}\"", this->Name)); ShowContinueError( state, "...The model has calculated the exhaust air humidity ratio to be less than the combustion air inlet humidity ratio."); - ShowContinueError( - state, EnergyPlus::format("...Value of exhaust air humidity ratio ={:.6T} kgWater/kgDryAir.", this->ExhaustAirHumRat)); - ShowContinueError( - state, EnergyPlus::format("...Value of combustion air inlet humidity ratio ={:.6T} kgWater/kgDryAir.", CombustionAirInletW)); + ShowContinueError(state, + std::format("...Value of exhaust air humidity ratio ={:.6f} kgWater/kgDryAir.", this->ExhaustAirHumRat)); + ShowContinueError(state, + std::format("...Value of combustion air inlet humidity ratio ={:.6f} kgWater/kgDryAir.", CombustionAirInletW)); ShowContinueErrorTimeStamp(state, "... Simulation will continue."); } ShowRecurringWarningErrorAtEnd(state, diff --git a/src/EnergyPlus/MixedAir.cc b/src/EnergyPlus/MixedAir.cc index cd8b2f0b8e2..a19ea9513cb 100644 --- a/src/EnergyPlus/MixedAir.cc +++ b/src/EnergyPlus/MixedAir.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include #include // ObjexxFCL Headers @@ -949,9 +950,9 @@ void GetOutsideAirSysInputs(EnergyPlusData &state) for (int PreviousListControllerNum = 1; PreviousListControllerNum <= previousList.NumControllers; ++PreviousListControllerNum) { if ((previousList.ControllerType(PreviousListControllerNum) == thisControllerList.ControllerType(CompNum)) && (previousList.ControllerName(PreviousListControllerNum) == thisControllerList.ControllerName(CompNum))) { - ShowSevereError(state, EnergyPlus::format("Controller instance repeated in multiple {} objects", CurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("Found in {} = {}", CurrentModuleObject, thisControllerList.Name)); - ShowContinueError(state, EnergyPlus::format("Also found in {} = {}", CurrentModuleObject, previousList.Name)); + ShowSevereError(state, std::format("Controller instance repeated in multiple {} objects", CurrentModuleObject)); + ShowContinueError(state, std::format("Found in {} = {}", CurrentModuleObject, thisControllerList.Name)); + ShowContinueError(state, std::format("Also found in {} = {}", CurrentModuleObject, previousList.Name)); ErrorsFound = true; } } @@ -1026,13 +1027,13 @@ void GetOutsideAirSysInputs(EnergyPlusData &state) } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid {}=\"{}\" not found.", CurrentModuleObject, OASys.Name, cAlphaFields(3), OASys.ComponentListName)); ErrorsFound = true; } } else { - ShowSevereError( - state, EnergyPlus::format("{} = \"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, OASys.Name, cAlphaFields(3))); + ShowSevereError(state, + std::format("{} = \"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, OASys.Name, cAlphaFields(3))); ErrorsFound = true; } @@ -1062,8 +1063,7 @@ void GetOutsideAirSysInputs(EnergyPlusData &state) } } else { ShowSevereError( - state, - EnergyPlus::format("{} = \"{}\" invalid {}=\"{}\" not found.", CurrentModuleObject, AlphArray(1), cAlphaFields(2), AlphArray(2))); + state, std::format("{} = \"{}\" invalid {}=\"{}\" not found.", CurrentModuleObject, AlphArray(1), cAlphaFields(2), AlphArray(2))); ErrorsFound = true; } } @@ -1096,7 +1096,7 @@ void GetOutsideAirSysInputs(EnergyPlusData &state) } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\" invalid Outside Air Component=\"{}\".", CurrentModuleObject, AlphArray(1), OASys.ComponentType(CompNum))); ErrorsFound = true; } @@ -1114,7 +1114,7 @@ void GetOutsideAirSysInputs(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in getting {}.", RoutineName, CurrentModuleObject)); + ShowFatalError(state, std::format("{}Errors found in getting {}.", RoutineName, CurrentModuleObject)); } AlphArray.deallocate(); @@ -1278,7 +1278,7 @@ void GetOAControllerInputs(EnergyPlusData &state) lAlphaBlanks.deallocate(); cAlphaFields.deallocate(); cNumericFields.deallocate(); - ShowFatalError(state, EnergyPlus::format("{}Errors found in getting {} inputs.", RoutineName, CurrentModuleObject)); + ShowFatalError(state, std::format("{}Errors found in getting {} inputs.", RoutineName, CurrentModuleObject)); } } @@ -1327,9 +1327,8 @@ void GetOAControllerInputs(EnergyPlusData &state) } else if (Util::SameString(AlphArray(3), "No") || lAlphaBlanks(3)) { thisVentilationMechanical.DCVFlag = false; } else { - ShowSevereError( - state, - EnergyPlus::format("{}=\"{}\" invalid value {}=\"{}\".", CurrentModuleObject, AlphArray(1), cAlphaFields(3), AlphArray(3))); + ShowSevereError(state, + std::format("{}=\"{}\" invalid value {}=\"{}\".", CurrentModuleObject, AlphArray(1), cAlphaFields(3), AlphArray(3))); ShowContinueError(state, "...Valid values are \"Yes\" or \"No\"."); ErrorsFound = true; } @@ -1345,7 +1344,7 @@ void GetOAControllerInputs(EnergyPlusData &state) if (!state.dataContaminantBalance->Contaminant.CO2Simulation) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}=\"{}\" valid {}=\"{}\" requires CO2 simulation.", CurrentModuleObject, AlphArray(1), cAlphaFields(2), AlphArray(2))); ShowContinueError(state, "The choice must be Yes for the field Carbon Dioxide Concentration in ZoneAirContaminantBalance"); ErrorsFound = true; @@ -1356,11 +1355,11 @@ void GetOAControllerInputs(EnergyPlusData &state) thisVentilationMechanical.SystemOAMethod == DataSizing::SysOAMethod::IAQPCOM) { if (!state.dataContaminantBalance->Contaminant.GenericContamSimulation) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" valid {}=\"{}\" requires generic contaminant simulation.", - CurrentModuleObject, - AlphArray(1), - cAlphaFields(2), - AlphArray(2))); + std::format("{}=\"{}\" valid {}=\"{}\" requires generic contaminant simulation.", + CurrentModuleObject, + AlphArray(1), + cAlphaFields(2), + AlphArray(2))); ShowContinueError(state, "The choice must be Yes for the field Generic Contaminant Concentration in ZoneAirContaminantBalance"); ErrorsFound = true; } @@ -1369,10 +1368,10 @@ void GetOAControllerInputs(EnergyPlusData &state) if (thisVentilationMechanical.SystemOAMethod == DataSizing::SysOAMethod::Invalid) { // If specified incorrectly, show errors thisVentilationMechanical.SystemOAMethod = DataSizing::SysOAMethod::ZoneSum; ShowWarningError(state, - EnergyPlus::format("{}=\"{}\" incorrect specification for {}, the ZoneSum method will be used.", - CurrentModuleObject, - AlphArray(1), - cAlphaFields(4))); + std::format("{}=\"{}\" incorrect specification for {}, the ZoneSum method will be used.", + CurrentModuleObject, + AlphArray(1), + cAlphaFields(4))); // ErrorsFound=.TRUE. } @@ -1397,18 +1396,16 @@ void GetOAControllerInputs(EnergyPlusData &state) int ObjIndex = Util::FindItemInList(designSpecOAObjName, state.dataSize->OARequirements); designSpecOAObjIndex(groupNum) = ObjIndex; if (ObjIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError(state, - EnergyPlus::format("... not found {}=\"{}\".", cAlphaFields((groupNum - 1) * 3 + 6), designSpecOAObjName)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); + ShowContinueError(state, std::format("... not found {}=\"{}\".", cAlphaFields((groupNum - 1) * 3 + 6), designSpecOAObjName)); ErrorsFound = true; } } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", Design Specification Outdoor Air Object Name blank", - CurrentModuleObject, - thisVentilationMechanical.Name)); - ShowContinueError(state, EnergyPlus::format("For Zone=\"{}\".", ventMechZoneOrListName(groupNum))); + std::format("{}=\"{}\", Design Specification Outdoor Air Object Name blank", + CurrentModuleObject, + thisVentilationMechanical.Name)); + ShowContinueError(state, std::format("For Zone=\"{}\".", ventMechZoneOrListName(groupNum))); ShowContinueError(state, "This field either needs to be filled in in this object or Sizing:Zone object."); ShowContinueError(state, "For this run, default values for these fields will be used."); } @@ -1420,10 +1417,9 @@ void GetOAControllerInputs(EnergyPlusData &state) designSpecZoneADObjIndex(groupNum) = ObjIndex; if (ObjIndex == 0) { // Cannot find the design specification Zone Air Distribution object - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError( - state, EnergyPlus::format("... not found {}=\"{}\".", cAlphaFields((groupNum - 1) * 3 + 7), designSpecZoneADObjName)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); + ShowContinueError(state, + std::format("... not found {}=\"{}\".", cAlphaFields((groupNum - 1) * 3 + 7), designSpecZoneADObjName)); ErrorsFound = true; } } @@ -1438,10 +1434,9 @@ void GetOAControllerInputs(EnergyPlusData &state) } else { ShowWarningError( state, - EnergyPlus::format( - "{}=\"{}\" invalid {} not found.", CurrentModuleObject, AlphArray(1), cAlphaFields((groupNum - 1) * 3 + 5))); - ShowContinueError( - state, EnergyPlus::format("Missing {} = {}", cAlphaFields((groupNum - 1) * 3 + 5), ventMechZoneOrListName(groupNum))); + std::format("{}=\"{}\" invalid {} not found.", CurrentModuleObject, AlphArray(1), cAlphaFields((groupNum - 1) * 3 + 5))); + ShowContinueError(state, + std::format("Missing {} = {}", cAlphaFields((groupNum - 1) * 3 + 5), ventMechZoneOrListName(groupNum))); ErrorsFound = true; } } @@ -1463,10 +1458,10 @@ void GetOAControllerInputs(EnergyPlusData &state) [ZoneNum](auto const &vmZone) { return vmZone.zoneNum == ZoneNum; })) { // Disregard duplicate zone names, show warning and do not store data for this zone ShowWarningError(state, - EnergyPlus::format("Zone name = {} for {} object = {}", - ventMechZoneOrListName(groupNum), - CurrentModuleObject, - thisVentilationMechanical.Name)); + std::format("Zone name = {} for {} object = {}", + ventMechZoneOrListName(groupNum), + CurrentModuleObject, + thisVentilationMechanical.Name)); ShowContinueError(state, "is specified more than once. The first ventilation values specified for this zone will be used"); ShowContinueError(state, "and the rest will be ignored. Simulation will continue.."); } else { @@ -1514,11 +1509,11 @@ void GetOAControllerInputs(EnergyPlusData &state) [zoneNum2](auto const &vmZone) { return vmZone.zoneNum == zoneNum2; })) { // Disregard duplicate zone names, show warning and do not store data for this zone ShowWarningError(state, - EnergyPlus::format("Zone name = {} in ZoneList = {} for {} object = {}", - state.dataHeatBal->Zone(zoneNum2).Name, - ventMechZoneOrListName(groupNum), - CurrentModuleObject, - thisVentilationMechanical.Name)); + std::format("Zone name = {} in ZoneList = {} for {} object = {}", + state.dataHeatBal->Zone(zoneNum2).Name, + ventMechZoneOrListName(groupNum), + CurrentModuleObject, + thisVentilationMechanical.Name)); ShowContinueError(state, "is a duplicate. The first ventilation values specified for this zone will be used "); ShowContinueError(state, "and the rest will be ignored. The simulation will continue..."); } else { @@ -1570,10 +1565,9 @@ void GetOAControllerInputs(EnergyPlusData &state) if (thisVentMechZone.ZoneDesignSpecOAObjIndex == 0) { // use defaults thisVentMechZone.ZoneDesignSpecOAObjIndex = DataSizing::getDefaultOAReq(state); - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); + ShowWarningError(state, std::format("{}{}=\"{}", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); ShowContinueError( - state, - EnergyPlus::format("Cannot locate a matching DesignSpecification:OutdoorAir object for Zone=\"{}\".", thisVentMechZone.name)); + state, std::format("Cannot locate a matching DesignSpecification:OutdoorAir object for Zone=\"{}\".", thisVentMechZone.name)); ShowContinueError(state, "Using default OA of 0.00944 m3/s-person and 0.0 m3/s-m2."); } assert(thisVentMechZone.ZoneDesignSpecOAObjIndex > 0); @@ -1588,11 +1582,11 @@ void GetOAControllerInputs(EnergyPlusData &state) thisVentMechZone.zoneOASched = curOARequirements.getZoneFlowFracSched(state, notAllSame); if (notAllSame) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", mixed schedules found for Zone={}.", - RoutineName, - CurrentModuleObject, - thisVentilationMechanical.Name, - thisVentMechZone.name)); + std::format("{}{}=\"{}\", mixed schedules found for Zone={}.", + RoutineName, + CurrentModuleObject, + thisVentilationMechanical.Name, + thisVentMechZone.name)); } } if (thisVentilationMechanical.SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlSchOcc || @@ -1602,21 +1596,21 @@ void GetOAControllerInputs(EnergyPlusData &state) thisVentMechZone.zonePropCtlMinRateSched = curOARequirements.getZonePropCtlMinRateSched(state, notAllSame); if (notAllSame) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", mixed schedules found for Zone={}.", - RoutineName, - CurrentModuleObject, - thisVentilationMechanical.Name, - thisVentMechZone.name)); + std::format("{}{}=\"{}\", mixed schedules found for Zone={}.", + RoutineName, + CurrentModuleObject, + thisVentilationMechanical.Name, + thisVentMechZone.name)); } } if (thisVentilationMechanical.SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlDesOARate) { if (zoneOAPeopleRate == 0.0 && zoneOAAreaRate == 0.0) { ShowSevereError( state, - EnergyPlus::format("{}{}=\"{}\", invalid input with System Outdoor Air Method = ProportionalControlBasedOnDesignOARate.", - RoutineName, - CurrentModuleObject, - thisVentilationMechanical.Name)); + std::format("{}{}=\"{}\", invalid input with System Outdoor Air Method = ProportionalControlBasedOnDesignOARate.", + RoutineName, + CurrentModuleObject, + thisVentilationMechanical.Name)); ShowContinueError(state, " The values of Outdoor Air Flow per Person and Outdoor Air Flow per Zone Floor Area in the same " "object can not be zero."); @@ -1626,12 +1620,11 @@ void GetOAControllerInputs(EnergyPlusData &state) if (thisVentilationMechanical.SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlSchOcc) { if (curOARequirements.desFlowPerACH(state) > 0.0 || curOARequirements.desFlowPerZone(state) > 0.0) { ShowWarningError( + state, std::format("{}=\"{}\", inappropriate outdoor air method", CurrentModuleObject, thisVentilationMechanical.Name)); + ShowContinueError( state, - EnergyPlus::format("{}=\"{}\", inappropriate outdoor air method", CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError(state, - EnergyPlus::format("Inappropriate method for Design Specification Outdoor Air Object Name=\"{}\".", - curOARequirements.Name)); - ShowContinueError(state, EnergyPlus::format("For Zone=\"{}\".", thisVentMechZone.name)); + std::format("Inappropriate method for Design Specification Outdoor Air Object Name=\"{}\".", curOARequirements.Name)); + ShowContinueError(state, std::format("For Zone=\"{}\".", thisVentMechZone.name)); ShowContinueError(state, "Since System Outdoor Air Method= ProportionalControlBasedOnOccupancySchedule\", AirChanges/Hour or " "Flow/Zone outdoor air methods are not valid. Simulation continues.... "); @@ -1640,12 +1633,11 @@ void GetOAControllerInputs(EnergyPlusData &state) if (thisVentilationMechanical.SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlDesOcc) { if (curOARequirements.desFlowPerACH(state) > 0.0 || curOARequirements.desFlowPerZone(state) > 0.0) { ShowWarningError( + state, std::format("{}=\"{}\", inappropriate outdoor air method", CurrentModuleObject, thisVentilationMechanical.Name)); + ShowContinueError( state, - EnergyPlus::format("{}=\"{}\", inappropriate outdoor air method", CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError(state, - EnergyPlus::format("Inappropriate method for Design Specification Outdoor Air Object Name=\"{}\".", - curOARequirements.Name)); - ShowContinueError(state, EnergyPlus::format("For Zone=\"{}\".", thisVentMechZone.name)); + std::format("Inappropriate method for Design Specification Outdoor Air Object Name=\"{}\".", curOARequirements.Name)); + ShowContinueError(state, std::format("For Zone=\"{}\".", thisVentMechZone.name)); ShowContinueError(state, "Since System Outdoor Air Method= ProportionalControlBasedOnDesignOccupancy\", AirChanges/Hour or " "Flow/Zone outdoor air methods are not valid. Simulation continues.... "); @@ -1662,10 +1654,10 @@ void GetOAControllerInputs(EnergyPlusData &state) thisVentMechZone.ZoneADEffCooling = 1.0; thisVentMechZone.ZoneADEffHeating = 1.0; thisVentMechZone.ZoneSecondaryRecirculation = 0.0; - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); + ShowWarningError(state, std::format("{}{}=\"{}\"", RoutineName, CurrentModuleObject, thisVentilationMechanical.Name)); ShowContinueError(state, - EnergyPlus::format("Cannot locate a matching DesignSpecification:ZoneAirDistribution object for Zone=\"{}\".", - thisVentMechZone.name)); + std::format("Cannot locate a matching DesignSpecification:ZoneAirDistribution object for Zone=\"{}\".", + thisVentMechZone.name)); ShowContinueError(state, "Using default zone air distribution effectiveness of 1.0 for heating and cooling."); } @@ -1703,18 +1695,16 @@ void GetOAControllerInputs(EnergyPlusData &state) DataDefineEquip::ZnAirLoopEquipType::SingleDuctConstVolFourPipeBeam) || (state.dataDefineEquipment->AirDistUnit(ADUNum).EquipTypeEnum(EquipNum) == DataDefineEquip::ZnAirLoopEquipType::DualDuctVAVOutdoorAir)) { - ShowWarningError( - state, - EnergyPlus::format("{}=\"{}\", inappropriate use of Zone secondary recirculation", - CurrentModuleObject, - thisVentilationMechanical.Name)); + ShowWarningError(state, + std::format("{}=\"{}\", inappropriate use of Zone secondary recirculation", + CurrentModuleObject, + thisVentilationMechanical.Name)); ShowContinueError(state, "A zone secondary recirculation fraction is specified for zone served by "); - ShowContinueError( - state, - EnergyPlus::format("...terminal unit \"{}\" , that indicates a single path system", - state.dataDefineEquipment->AirDistUnit(ADUNum).Name)); - ShowContinueError(state, EnergyPlus::format("For Zone=\"{}\".", thisVentMechZone.name)); + ShowContinueError(state, + std::format("...terminal unit \"{}\" , that indicates a single path system", + state.dataDefineEquipment->AirDistUnit(ADUNum).Name)); + ShowContinueError(state, std::format("For Zone=\"{}\".", thisVentMechZone.name)); ShowContinueError(state, "...The zone secondary recirculation for that zone was set to 0.0"); thisVentMechZone.ZoneSecondaryRecirculation = 0.0; } @@ -1730,33 +1720,29 @@ void GetOAControllerInputs(EnergyPlusData &state) } } if (zoneOAPeopleRate <= 0.0 && thisVentilationMechanical.DCVFlag) { - ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", Zone OA/person rate", CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError(state, EnergyPlus::format("For Zone=\"{}\".", thisVentMechZone.name)); - ShowContinueError( - state, - EnergyPlus::format("Zone outside air per person rate not set in Design Specification Outdoor Air Object=\"{}\".", - state.dataSize->OARequirements(thisVentMechZone.ZoneDesignSpecOAObjIndex).Name)); + ShowWarningError(state, std::format("{}=\"{}\", Zone OA/person rate", CurrentModuleObject, thisVentilationMechanical.Name)); + ShowContinueError(state, std::format("For Zone=\"{}\".", thisVentMechZone.name)); + ShowContinueError(state, + std::format("Zone outside air per person rate not set in Design Specification Outdoor Air Object=\"{}\".", + state.dataSize->OARequirements(thisVentMechZone.ZoneDesignSpecOAObjIndex).Name)); } if (zoneOAAreaRate < 0.0) { - ShowSevereError( - state, - EnergyPlus::format("{}=\"{}\", invalid Outdoor Air flow per area", CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError(state, EnergyPlus::format("For Zone=\"{}\".", thisVentMechZone.name)); + ShowSevereError(state, + std::format("{}=\"{}\", invalid Outdoor Air flow per area", CurrentModuleObject, thisVentilationMechanical.Name)); + ShowContinueError(state, std::format("For Zone=\"{}\".", thisVentMechZone.name)); ShowContinueError(state, - EnergyPlus::format("invalid Outdoor Air flow per area specified in object=\"{}\". Value must be >= 0.0.", - state.dataSize->OARequirements(thisVentMechZone.ZoneDesignSpecOAObjIndex).Name)); + std::format("invalid Outdoor Air flow per area specified in object=\"{}\". Value must be >= 0.0.", + state.dataSize->OARequirements(thisVentMechZone.ZoneDesignSpecOAObjIndex).Name)); ErrorsFound = true; } if (zoneOAPeopleRate < 0.0) { ShowSevereError( - state, - EnergyPlus::format("{}=\"{}\", invalid Outdoor Air flow per person", CurrentModuleObject, thisVentilationMechanical.Name)); - ShowContinueError(state, EnergyPlus::format("For Zone=\"{}\".", thisVentMechZone.name)); + state, std::format("{}=\"{}\", invalid Outdoor Air flow per person", CurrentModuleObject, thisVentilationMechanical.Name)); + ShowContinueError(state, std::format("For Zone=\"{}\".", thisVentMechZone.name)); ShowContinueError(state, - EnergyPlus::format("invalid Outdoor Air flow per person specified in object \"{}\". Value must be >= 0.0.", - state.dataSize->OARequirements(thisVentMechZone.ZoneDesignSpecOAObjIndex).Name)); + std::format("invalid Outdoor Air flow per person specified in object \"{}\". Value must be >= 0.0.", + state.dataSize->OARequirements(thisVentMechZone.ZoneDesignSpecOAObjIndex).Name)); ErrorsFound = true; } } @@ -1769,16 +1755,16 @@ void GetOAControllerInputs(EnergyPlusData &state) if (state.dataMixedAir->OAController(OAControllerNum).VentMechObjectNum == 0 && !state.dataMixedAir->OAController(OAControllerNum).VentilationMechanicalName.empty()) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", non-match to Controller:OutdoorAir", - CurrentModuleObject, - state.dataMixedAir->OAController(OAControllerNum).VentilationMechanicalName)); - ShowContinueError(state, - EnergyPlus::format("Invalid specified in Controller:OutdoorAir object = {}", - state.dataMixedAir->OAController(OAControllerNum).Name)); + std::format("{}=\"{}\", non-match to Controller:OutdoorAir", + CurrentModuleObject, + state.dataMixedAir->OAController(OAControllerNum).VentilationMechanicalName)); + ShowContinueError( + state, + std::format("Invalid specified in Controller:OutdoorAir object = {}", state.dataMixedAir->OAController(OAControllerNum).Name)); ShowContinueError(state, - EnergyPlus::format("{} object name must match the {} object name specified in Controller:OutdoorAir.", - CurrentModuleObject, - CurrentModuleObject)); + std::format("{} object name must match the {} object name specified in Controller:OutdoorAir.", + CurrentModuleObject, + CurrentModuleObject)); ErrorsFound = true; } } @@ -1795,7 +1781,7 @@ void GetOAControllerInputs(EnergyPlusData &state) ventMech.Name, (ventMech.availSched != nullptr) ? ventMech.availSched->Name : ""); - print(state.files.eio, EnergyPlus::format("{},", yesNoNames[(int)ventMech.DCVFlag])); + print(state.files.eio, std::format("{},", yesNoNames[(int)ventMech.DCVFlag])); if (ventMech.SystemOAMethod != DataSizing::SysOAMethod::Invalid) { print(state.files.eio, printSysOAMethod[(int)ventMech.SystemOAMethod]); @@ -1829,7 +1815,7 @@ void GetOAControllerInputs(EnergyPlusData &state) cNumericFields.deallocate(); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found when getting {} inputs.", RoutineName, CurrentModuleObject)); + ShowFatalError(state, std::format("{}Errors found when getting {} inputs.", RoutineName, CurrentModuleObject)); } } @@ -1958,61 +1944,61 @@ void GetOAMixerInputs(EnergyPlusData &state) // Check for dupes in the four nodes. if (state.dataMixedAir->OAMixer(OutAirNum).MixNode == state.dataMixedAir->OAMixer(OutAirNum).InletNode) { ShowSevereError(state, - EnergyPlus::format("{} = {} {} = {} duplicates the {}.", - CurrentModuleObject, - state.dataMixedAir->OAMixer(OutAirNum).Name, - cAlphaFields(3), - state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).InletNode), - cAlphaFields(2))); + std::format("{} = {} {} = {} duplicates the {}.", + CurrentModuleObject, + state.dataMixedAir->OAMixer(OutAirNum).Name, + cAlphaFields(3), + state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).InletNode), + cAlphaFields(2))); ErrorsFound = true; } else if (state.dataMixedAir->OAMixer(OutAirNum).MixNode == state.dataMixedAir->OAMixer(OutAirNum).RelNode) { ShowSevereError(state, - EnergyPlus::format("{} = {} {} = {} duplicates the {}.", - CurrentModuleObject, - state.dataMixedAir->OAMixer(OutAirNum).Name, - cAlphaFields(4), - state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RelNode), - cAlphaFields(2))); + std::format("{} = {} {} = {} duplicates the {}.", + CurrentModuleObject, + state.dataMixedAir->OAMixer(OutAirNum).Name, + cAlphaFields(4), + state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RelNode), + cAlphaFields(2))); ErrorsFound = true; } else if (state.dataMixedAir->OAMixer(OutAirNum).MixNode == state.dataMixedAir->OAMixer(OutAirNum).RetNode) { ShowSevereError(state, - EnergyPlus::format("{} = {} {} = {} duplicates the {}.", - CurrentModuleObject, - state.dataMixedAir->OAMixer(OutAirNum).Name, - cAlphaFields(5), - state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RetNode), - cAlphaFields(2))); + std::format("{} = {} {} = {} duplicates the {}.", + CurrentModuleObject, + state.dataMixedAir->OAMixer(OutAirNum).Name, + cAlphaFields(5), + state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RetNode), + cAlphaFields(2))); ErrorsFound = true; } if (state.dataMixedAir->OAMixer(OutAirNum).InletNode == state.dataMixedAir->OAMixer(OutAirNum).RelNode) { ShowSevereError(state, - EnergyPlus::format("{} = {} {} = {} duplicates the {}.", - CurrentModuleObject, - state.dataMixedAir->OAMixer(OutAirNum).Name, - cAlphaFields(4), - state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RelNode), - cAlphaFields(3))); + std::format("{} = {} {} = {} duplicates the {}.", + CurrentModuleObject, + state.dataMixedAir->OAMixer(OutAirNum).Name, + cAlphaFields(4), + state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RelNode), + cAlphaFields(3))); ErrorsFound = true; } else if (state.dataMixedAir->OAMixer(OutAirNum).InletNode == state.dataMixedAir->OAMixer(OutAirNum).RetNode) { ShowSevereError(state, - EnergyPlus::format("{} = {} {} = {} duplicates the {}.", - CurrentModuleObject, - state.dataMixedAir->OAMixer(OutAirNum).Name, - cAlphaFields(5), - state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RetNode), - cAlphaFields(3))); + std::format("{} = {} {} = {} duplicates the {}.", + CurrentModuleObject, + state.dataMixedAir->OAMixer(OutAirNum).Name, + cAlphaFields(5), + state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RetNode), + cAlphaFields(3))); ErrorsFound = true; } if (state.dataMixedAir->OAMixer(OutAirNum).RelNode == state.dataMixedAir->OAMixer(OutAirNum).RetNode) { ShowSevereError(state, - EnergyPlus::format("{} = {} {} = {} duplicates the {}.", - CurrentModuleObject, - state.dataMixedAir->OAMixer(OutAirNum).Name, - cAlphaFields(5), - state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RetNode), - cAlphaFields(4))); + std::format("{} = {} {} = {} duplicates the {}.", + CurrentModuleObject, + state.dataMixedAir->OAMixer(OutAirNum).Name, + cAlphaFields(5), + state.dataLoopNodes->NodeID(state.dataMixedAir->OAMixer(OutAirNum).RetNode), + cAlphaFields(4))); ErrorsFound = true; } Node::TestCompSet(state, CurrentModuleObject, state.dataMixedAir->OAMixer(OutAirNum).Name, AlphArray(3), AlphArray(2), "Air Nodes"); @@ -2020,7 +2006,7 @@ void GetOAMixerInputs(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in getting {}", RoutineName, CurrentModuleObject)); + ShowFatalError(state, std::format("{}Errors found in getting {}", RoutineName, CurrentModuleObject)); } state.dataMixedAir->GetOAMixerInputFlag = false; @@ -2083,8 +2069,7 @@ void ProcessOAControllerInputs(EnergyPlusData &state, Node::ObjectIsNotParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, state.dataMixedAir->OAController(OutAirNum).OANode)) { ShowWarningError( - state, - EnergyPlus::format("{}=\"{}\": {}=\"{}\" is not an OutdoorAir:Node.", CurrentModuleObject, AlphArray(1), cAlphaFields(5), AlphArray(5))); + state, std::format("{}=\"{}\": {}=\"{}\" is not an OutdoorAir:Node.", CurrentModuleObject, AlphArray(1), cAlphaFields(5), AlphArray(5))); ShowContinueError(state, "Confirm that this is the intended source for the outdoor air stream."); } if (Util::SameString(AlphArray(6), "NoEconomizer")) { @@ -2104,8 +2089,7 @@ void ProcessOAControllerInputs(EnergyPlusData &state, } else if (Util::SameString(AlphArray(6), "ElectronicEnthalpy")) { state.dataMixedAir->OAController(OutAirNum).Econo = EconoOp::ElectronicEnthalpy; } else { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" value.", CurrentModuleObject, AlphArray(1), cAlphaFields(6), AlphArray(6))); + ShowSevereError(state, std::format("{}=\"{}\" invalid {}=\"{}\" value.", CurrentModuleObject, AlphArray(1), cAlphaFields(6), AlphArray(6))); ErrorsFound = true; } // Bypass choice - Added by Amit for new feature implementation @@ -2114,8 +2098,7 @@ void ProcessOAControllerInputs(EnergyPlusData &state, } else if (Util::SameString(AlphArray(7), "MinimumFlowWithBypass")) { state.dataMixedAir->OAController(OutAirNum).EconBypass = true; } else { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" value.", CurrentModuleObject, AlphArray(1), cAlphaFields(7), AlphArray(7))); + ShowSevereError(state, std::format("{}=\"{}\" invalid {}=\"{}\" value.", CurrentModuleObject, AlphArray(1), cAlphaFields(7), AlphArray(7))); ErrorsFound = true; } @@ -2126,8 +2109,7 @@ void ProcessOAControllerInputs(EnergyPlusData &state, } else if (Util::SameString(AlphArray(9), "LockoutWithCompressor")) { state.dataMixedAir->OAController(OutAirNum).Lockout = LockoutType::LockoutWithCompressorPossible; } else { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" value.", CurrentModuleObject, AlphArray(1), cAlphaFields(9), AlphArray(9))); + ShowSevereError(state, std::format("{}=\"{}\" invalid {}=\"{}\" value.", CurrentModuleObject, AlphArray(1), cAlphaFields(9), AlphArray(9))); ErrorsFound = true; } if (Util::SameString(AlphArray(10), "FixedMinimum")) { @@ -2161,9 +2143,8 @@ void ProcessOAControllerInputs(EnergyPlusData &state, if (!lAlphaBlanks(8)) { state.dataMixedAir->OAController(OutAirNum).EnthalpyCurvePtr = Curve::GetCurveIndex(state, AlphArray(8)); // convert curve name to number if (state.dataMixedAir->OAController(OutAirNum).EnthalpyCurvePtr == 0) { - ShowSevereError( - state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", CurrentModuleObject, AlphArray(1), cAlphaFields(8), AlphArray(8))); + ShowSevereError(state, + std::format("{}=\"{}\" invalid {}=\"{}\" not found.", CurrentModuleObject, AlphArray(1), cAlphaFields(8), AlphArray(8))); ErrorsFound = true; } else { // Verify Curve Object, only legal types are Quadratic and Cubic @@ -2287,43 +2268,38 @@ void ProcessOAControllerInputs(EnergyPlusData &state, if (OASysIndex == 0) { ShowSevereError( state, - EnergyPlus::format( - "Did not find an AirLoopHVAC:OutdoorAirSystem for {} = \"{}\"", - MixedAirControllerTypeNames[static_cast(state.dataMixedAir->OAController(OutAirNum).ControllerType)], - state.dataMixedAir->OAController(OutAirNum).Name)); + std::format("Did not find an AirLoopHVAC:OutdoorAirSystem for {} = \"{}\"", + MixedAirControllerTypeNames[static_cast(state.dataMixedAir->OAController(OutAirNum).ControllerType)], + state.dataMixedAir->OAController(OutAirNum).Name)); ErrorsFound = true; } } } } if (!AirNodeFound) { - ShowSevereError( - state, - EnergyPlus::format("Did not find Air Node (Zone with Humidistat), {} = \"{}\"", - MixedAirControllerTypeNames[static_cast(state.dataMixedAir->OAController(OutAirNum).ControllerType)], - state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(17), AlphArray(17))); + ShowSevereError(state, + std::format("Did not find Air Node (Zone with Humidistat), {} = \"{}\"", + MixedAirControllerTypeNames[static_cast(state.dataMixedAir->OAController(OutAirNum).ControllerType)], + state.dataMixedAir->OAController(OutAirNum).Name)); + ShowContinueError(state, std::format("Specified {} = {}", cAlphaFields(17), AlphArray(17))); ShowContinueError(state, "Both a ZoneHVAC:EquipmentConnections object and a ZoneControl:Humidistat object must be specified for this zone."); ErrorsFound = true; } if (!AirLoopFound) { - ShowSevereError( - state, - EnergyPlus::format("Did not find correct Primary Air Loop for {} = \"{}\"", - MixedAirControllerTypeNames[static_cast(state.dataMixedAir->OAController(OutAirNum).ControllerType)], - state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, - EnergyPlus::format("{} = {} is not served by this Primary Air Loop equipment.", cAlphaFields(17), AlphArray(17))); + ShowSevereError(state, + std::format("Did not find correct Primary Air Loop for {} = \"{}\"", + MixedAirControllerTypeNames[static_cast(state.dataMixedAir->OAController(OutAirNum).ControllerType)], + state.dataMixedAir->OAController(OutAirNum).Name)); + ShowContinueError(state, std::format("{} = {} is not served by this Primary Air Loop equipment.", cAlphaFields(17), AlphArray(17))); ErrorsFound = true; } } else { - ShowSevereError( - state, - EnergyPlus::format("Did not find Air Node (Zone with Humidistat), {} = \"{}\"", - MixedAirControllerTypeNames[static_cast(state.dataMixedAir->OAController(OutAirNum).ControllerType)], - state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, EnergyPlus::format("Specified {} = {}", cAlphaFields(17), AlphArray(17))); + ShowSevereError(state, + std::format("Did not find Air Node (Zone with Humidistat), {} = \"{}\"", + MixedAirControllerTypeNames[static_cast(state.dataMixedAir->OAController(OutAirNum).ControllerType)], + state.dataMixedAir->OAController(OutAirNum).Name)); + ShowContinueError(state, std::format("Specified {} = {}", cAlphaFields(17), AlphArray(17))); ShowContinueError(state, "Both a ZoneHVAC:EquipmentConnections object and a ZoneControl:Humidistat object must be specified for this zone."); ErrorsFound = true; @@ -2331,9 +2307,9 @@ void ProcessOAControllerInputs(EnergyPlusData &state, state.dataMixedAir->OAController(OutAirNum).HighRHOAFlowRatio = NumArray(7); if (state.dataMixedAir->OAController(OutAirNum).HighRHOAFlowRatio <= 0.0 && NumNums > 6) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, EnergyPlus::format(" {} must be greater than 0.", cNumericFields(7))); - ShowContinueError(state, EnergyPlus::format(" {} is reset to 1 and the simulation continues.", cNumericFields(7))); + ShowWarningError(state, std::format("{} \"{}\"", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); + ShowContinueError(state, std::format(" {} must be greater than 0.", cNumericFields(7))); + ShowContinueError(state, std::format(" {} is reset to 1 and the simulation continues.", cNumericFields(7))); state.dataMixedAir->OAController(OutAirNum).HighRHOAFlowRatio = 1.0; } @@ -2341,23 +2317,19 @@ void ProcessOAControllerInputs(EnergyPlusData &state, if (state.dataMixedAir->OAController(OutAirNum).MaxOA > 0.0 && state.dataMixedAir->OAController(OutAirNum).MinOA != AutoSize) { Real64 OAFlowRatio = state.dataMixedAir->OAController(OutAirNum).MinOA / state.dataMixedAir->OAController(OutAirNum).MaxOA; if (state.dataMixedAir->OAController(OutAirNum).HighRHOAFlowRatio < OAFlowRatio) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); + ShowWarningError(state, std::format("{} \"{}\"", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); ShowContinueError(state, "... A fixed minimum outside air flow rate and high humidity control have been specified."); ShowContinueError( state, - EnergyPlus::format( - "... The {} is less than the ratio of the outside air controllers minimum to maximum outside air flow rate.", - cNumericFields(7))); + std::format("... The {} is less than the ratio of the outside air controllers minimum to maximum outside air flow rate.", + cNumericFields(7))); ShowContinueError( - state, - EnergyPlus::format("... Controller {} = {:.4T} m3/s.", cNumericFields(1), state.dataMixedAir->OAController(OutAirNum).MinOA)); + state, std::format("... Controller {} = {:.4f} m3/s.", cNumericFields(1), state.dataMixedAir->OAController(OutAirNum).MinOA)); ShowContinueError( - state, - EnergyPlus::format("... Controller {} = {:.4T} m3/s.", cNumericFields(2), state.dataMixedAir->OAController(OutAirNum).MaxOA)); - ShowContinueError(state, EnergyPlus::format("... Controller minimum to maximum flow ratio = {:.4T}.", OAFlowRatio)); + state, std::format("... Controller {} = {:.4f} m3/s.", cNumericFields(2), state.dataMixedAir->OAController(OutAirNum).MaxOA)); + ShowContinueError(state, std::format("... Controller minimum to maximum flow ratio = {:.4f}.", OAFlowRatio)); ShowContinueError( - state, - EnergyPlus::format("... {} = {:.4T}.", cNumericFields(7), state.dataMixedAir->OAController(OutAirNum).HighRHOAFlowRatio)); + state, std::format("... {} = {:.4f}.", cNumericFields(7), state.dataMixedAir->OAController(OutAirNum).HighRHOAFlowRatio)); } } } @@ -2368,10 +2340,9 @@ void ProcessOAControllerInputs(EnergyPlusData &state, } else if (Util::SameString(AlphArray(18), "No")) { state.dataMixedAir->OAController(OutAirNum).ModifyDuringHighOAMoisture = true; } else { - ShowSevereError( - state, - EnergyPlus::format("{} \"{}\", invalid field value", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\" - valid values are \"Yes\" or \"No\".", cAlphaFields(18), AlphArray(18))); + ShowSevereError(state, + std::format("{} \"{}\", invalid field value", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); + ShowContinueError(state, std::format("...{}=\"{}\" - valid values are \"Yes\" or \"No\".", cAlphaFields(18), AlphArray(18))); ErrorsFound = true; } } else { @@ -2380,33 +2351,29 @@ void ProcessOAControllerInputs(EnergyPlusData &state, } else { state.dataMixedAir->OAController(OutAirNum).ModifyDuringHighOAMoisture = false; ShowWarningError( - state, - EnergyPlus::format("{} \"{}\", missing field value", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, EnergyPlus::format("...{} will default to Yes when {}= \"Yes\"", cAlphaFields(18), cAlphaFields(16))); + state, std::format("{} \"{}\", missing field value", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); + ShowContinueError(state, std::format("...{} will default to Yes when {}= \"Yes\"", cAlphaFields(18), cAlphaFields(16))); } } } else if (Util::SameString(AlphArray(16), "No") || lAlphaBlanks(16)) { if (NumAlphas >= 18) { if (!Util::SameString(AlphArray(18), "Yes") && !Util::SameString(AlphArray(18), "No")) { - ShowSevereError( - state, - EnergyPlus::format("{} \"{}\", invalid field value", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\" - valid values are \"Yes\" or \"No\".", cAlphaFields(18), AlphArray(18))); + ShowSevereError(state, + std::format("{} \"{}\", invalid field value", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); + ShowContinueError(state, std::format("...{}=\"{}\" - valid values are \"Yes\" or \"No\".", cAlphaFields(18), AlphArray(18))); ErrorsFound = true; } } } else { // Invalid field 16 - ShowSevereError(state, - EnergyPlus::format("{} \"{}\", invalid field value", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\" - valid values are \"Yes\" or \"No\".", cAlphaFields(16), AlphArray(16))); + ShowSevereError(state, std::format("{} \"{}\", invalid field value", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); + ShowContinueError(state, std::format("...{}=\"{}\" - valid values are \"Yes\" or \"No\".", cAlphaFields(16), AlphArray(16))); ErrorsFound = true; if (NumAlphas >= 18) { if (!Util::SameString(AlphArray(18), "Yes") && !Util::SameString(AlphArray(18), "No")) { - ShowSevereError( - state, - EnergyPlus::format("{} \"{}\", invalid field value", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\" - valid values are \"Yes\" or \"No\".", cAlphaFields(18), AlphArray(18))); + ShowSevereError(state, + std::format("{} \"{}\", invalid field value", CurrentModuleObject, state.dataMixedAir->OAController(OutAirNum).Name)); + ShowContinueError(state, std::format("...{}=\"{}\" - valid values are \"Yes\" or \"No\".", cAlphaFields(18), AlphArray(18))); ErrorsFound = true; } } @@ -2419,8 +2386,8 @@ void ProcessOAControllerInputs(EnergyPlusData &state, } else if (Util::SameString(AlphArray(19), "BypassWhenOAFlowGreaterThanMinimum")) { state.dataMixedAir->OAController(OutAirNum).HeatRecoveryBypassControlType = HVAC::BypassWhenOAFlowGreaterThanMinimum; } else { - ShowWarningError( - state, EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\".", CurrentModuleObject, AlphArray(1), cAlphaFields(19), AlphArray(19))); + ShowWarningError(state, + std::format("{}=\"{}\" invalid {}=\"{}\".", CurrentModuleObject, AlphArray(1), cAlphaFields(19), AlphArray(19))); ShowContinueError(state, "...assuming \"BypassWhenWithinEconomizerLimits\" and the simulation continues."); state.dataMixedAir->OAController(OutAirNum).HeatRecoveryBypassControlType = HVAC::BypassWhenWithinEconomizerLimits; } @@ -2439,10 +2406,10 @@ void ProcessOAControllerInputs(EnergyPlusData &state, if (Util::SameString(AlphArray(16), "Yes") && state.dataMixedAir->OAController(OutAirNum).Econo == EconoOp::NoEconomizer) { ShowWarningError(state, - EnergyPlus::format("{} \"{}\"", - MixedAirControllerTypeNames[static_cast(state.dataMixedAir->OAController(OutAirNum).ControllerType)], - state.dataMixedAir->OAController(OutAirNum).Name)); - ShowContinueError(state, EnergyPlus::format("...Economizer operation must be enabled when {} is set to YES.", cAlphaFields(16))); + std::format("{} \"{}\"", + MixedAirControllerTypeNames[static_cast(state.dataMixedAir->OAController(OutAirNum).ControllerType)], + state.dataMixedAir->OAController(OutAirNum).Name)); + ShowContinueError(state, std::format("...Economizer operation must be enabled when {} is set to YES.", cAlphaFields(16))); ShowContinueError(state, "...The high humidity control option will be disabled and the simulation continues."); } @@ -2518,7 +2485,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } } if (thisOASys == 0) { - ShowSevereError(state, EnergyPlus::format("InitOAController: Did not find OAController=\"{}\".", thisOAController.Name)); + ShowSevereError(state, std::format("InitOAController: Did not find OAController=\"{}\".", thisOAController.Name)); ShowContinueError(state, "in list of valid OA Controllers."); ErrorsFound = true; } @@ -2531,7 +2498,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con if (thisMixerIndex != 0) { thisOAController.InletNode = state.dataMixedAir->OAMixer(thisMixerIndex).InletNode; } else { - ShowSevereError(state, EnergyPlus::format("InitOAController: Did not find OAMixer=\"{}\".", equipName)); + ShowSevereError(state, std::format("InitOAController: Did not find OAMixer=\"{}\".", equipName)); ShowContinueError(state, "in list of valid OA Mixers."); ErrorsFound = true; } @@ -2543,8 +2510,8 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con if (thisOAController.InletNode == 0) { // throw an error ShowSevereError(state, - EnergyPlus::format("InitOAController: Failed to find proper inlet node for OutdoorAir:Mixer and Controller = {}", - thisOAController.Name)); + std::format("InitOAController: Failed to find proper inlet node for OutdoorAir:Mixer and Controller = {}", + thisOAController.Name)); ErrorsFound = true; } } break; @@ -2555,8 +2522,8 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } break; default: { ShowSevereError(state, - EnergyPlus::format("InitOAController: Failed to find ControllerType: {}", - MixedAirControllerTypeNames[static_cast(thisOAController.ControllerType)])); + std::format("InitOAController: Failed to find ControllerType: {}", + MixedAirControllerTypeNames[static_cast(thisOAController.ControllerType)])); ErrorsFound = true; } break; } @@ -2572,9 +2539,9 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con if (thisOAController.Econo > EconoOp::NoEconomizer && state.dataAirLoop->AirLoopControlInfo(AirLoopNum).AnyContFan) { if (state.dataLoopNodes->Node(MixedAirNode).TempSetPoint == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError( - state, EnergyPlus::format("MixedAir: Missing temperature setpoint for economizer controller {}", thisOAController.Name)); - ShowContinueError(state, EnergyPlus::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(MixedAirNode))); + ShowSevereError(state, + std::format("MixedAir: Missing temperature setpoint for economizer controller {}", thisOAController.Name)); + ShowContinueError(state, std::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(MixedAirNode))); ShowContinueError( state, " use a Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at the mixed air node."); state.dataHVACGlobal->SetPointErrorFlag = true; @@ -2584,10 +2551,8 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con state, MixedAirNode, HVAC::CtrlVarType::Temp, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError( - state, - EnergyPlus::format("MixedAir: Missing temperature setpoint for economizer controller {}", thisOAController.Name)); - ShowContinueError(state, - EnergyPlus::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(MixedAirNode))); + state, std::format("MixedAir: Missing temperature setpoint for economizer controller {}", thisOAController.Name)); + ShowContinueError(state, std::format("Node Referenced (by Controller)={}", state.dataLoopNodes->NodeID(MixedAirNode))); ShowContinueError(state, " use a Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at the " "mixed air node."); @@ -2621,7 +2586,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } } if ((thisOAController.MaxOA - thisOAController.MinOA) < -HVAC::SmallAirVolFlow) { - ShowSevereError(state, EnergyPlus::format("For Controller:OutdoorAir: {}", thisOAController.Name)); + ShowSevereError(state, std::format("For Controller:OutdoorAir: {}", thisOAController.Name)); ShowContinueError(state, EnergyPlus::format(" maximum outdoor air flow rate ({:.4R}) < minimum outdoor air flow rate ({:.4R})", thisOAController.MaxOA, @@ -2637,10 +2602,10 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con if ((thisOAController.MinOA - DesSupplyVolFlowRate) > 0.0001) { ShowWarningError( state, - EnergyPlus::format("InitOAController: Minimum Outdoor Air Flow Rate for Controller:OutdoorAir={} is greater than Design Supply " - "Air Flow Rate for AirLoopHVAC={}.", - thisOAController.Name, - state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).Name)); + std::format("InitOAController: Minimum Outdoor Air Flow Rate for Controller:OutdoorAir={} is greater than Design Supply " + "Air Flow Rate for AirLoopHVAC={}.", + thisOAController.Name, + state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).Name)); ShowContinueError( state, EnergyPlus::format("...Minimum Outdoor Air Flow Rate={:.6R} will be reset to loop Design Supply Air Flow Rate={:.6R}", @@ -2654,10 +2619,10 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con if ((thisOAController.MaxOA - DesSupplyVolFlowRate) > 0.0001) { ShowWarningError( state, - EnergyPlus::format("InitOAController: Maximum Outdoor Air Flow Rate for Controller:OutdoorAir={} is greater than Design Supply " - "Air Flow Rate for AirLoopHVAC={}.", - thisOAController.Name, - state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).Name)); + std::format("InitOAController: Maximum Outdoor Air Flow Rate for Controller:OutdoorAir={} is greater than Design Supply " + "Air Flow Rate for AirLoopHVAC={}.", + thisOAController.Name, + state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).Name)); ShowContinueError( state, EnergyPlus::format("...Maximum Outdoor Air Flow Rate={:.6R} will be reset to loop Design Supply Air Flow Rate={:.6R}", @@ -2783,13 +2748,12 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } } if (!FoundZone) { - ShowWarningError( - state, - EnergyPlus::format("Zone name = {} in {} object name = {} is not on the same air loop as Controller:OutdoorAir = {}", - zone.Name, - CurrentModuleObjects[static_cast(CMO::MechVentilation)], - thisOAController.VentilationMechanicalName, - thisOAController.Name)); + ShowWarningError(state, + std::format("Zone name = {} in {} object name = {} is not on the same air loop as Controller:OutdoorAir = {}", + zone.Name, + CurrentModuleObjects[static_cast(CMO::MechVentilation)], + thisOAController.VentilationMechanicalName, + thisOAController.Name)); ShowContinueError(state, "This zone will not be used and the simulation will continue..."); } } @@ -2844,7 +2808,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } else { for (int n = 0; n < dsoa.numDSOA; ++n) { writeDSOAToPredefined(state.dataSize->OARequirements(dsoa.dsoaIndexes[n]), - EnergyPlus::format("{}:{}", zoneName, dsoa.dsoaSpaceNames[n])); + std::format("{}:{}", zoneName, dsoa.dsoaSpaceNames[n])); } } } @@ -2880,14 +2844,13 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } if (!FoundAreaZone) { ShowWarningError(state, - EnergyPlus::format("Zone name = {} is not accounted for by {} object name = {}", - state.dataHeatBal->Zone(NumZone).Name, - CurrentModuleObjects[static_cast(CMO::MechVentilation)], - thisOAController.VentilationMechanicalName)); + std::format("Zone name = {} is not accounted for by {} object name = {}", + state.dataHeatBal->Zone(NumZone).Name, + CurrentModuleObjects[static_cast(CMO::MechVentilation)], + thisOAController.VentilationMechanicalName)); ShowContinueError(state, "Ventilation per unit floor area has not been specified for this zone, which is connected to"); ShowContinueError( - state, - EnergyPlus::format("the air loop served by Controller:OutdoorAir = {}. Simulation will continue...", thisOAController.Name)); + state, std::format("the air loop served by Controller:OutdoorAir = {}. Simulation will continue...", thisOAController.Name)); } if (!FoundPeopleZone) { // Loop through people objects to see if this zone has a people object and only then show a warning @@ -2895,18 +2858,18 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con if (state.dataHeatBal->People(PeopleNum).ZonePtr == NumZone) { if (!FoundAreaZone) { ShowWarningError(state, - EnergyPlus::format("PEOPLE object for zone = {} is not accounted for by {} object name = {}", - state.dataHeatBal->Zone(NumZone).Name, - CurrentModuleObjects[static_cast(CMO::MechVentilation)], - thisOAController.VentilationMechanicalName)); + std::format("PEOPLE object for zone = {} is not accounted for by {} object name = {}", + state.dataHeatBal->Zone(NumZone).Name, + CurrentModuleObjects[static_cast(CMO::MechVentilation)], + thisOAController.VentilationMechanicalName)); ShowContinueError( state, - EnergyPlus::format( + std::format( "A \"PEOPLE\" object has been specified in the idf for this zone, but it is not included in this {} Object.", CurrentModuleObjects[static_cast(CMO::MechVentilation)])); ShowContinueError(state, - EnergyPlus::format("Check {} object. Simulation will continue.", - CurrentModuleObjects[static_cast(CMO::MechVentilation)])); + std::format("Check {} object. Simulation will continue.", + CurrentModuleObjects[static_cast(CMO::MechVentilation)])); } } } @@ -2921,10 +2884,10 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } if (!FoundAreaZone) { ShowWarningError(state, - EnergyPlus::format("{} = \"{}\", Zone=\"{}\".", - CurrentModuleObjects[static_cast(CMO::MechVentilation)], - thisOAController.VentilationMechanicalName, - state.dataHeatBal->Zone(NumZone).Name)); + std::format("{} = \"{}\", Zone=\"{}\".", + CurrentModuleObjects[static_cast(CMO::MechVentilation)], + thisOAController.VentilationMechanicalName, + state.dataHeatBal->Zone(NumZone).Name)); ShowContinueError(state, "No \"PEOPLE\" object has been specified in the idf for this zone, but the ventilation rate is > 0 in " "this Controller:MechanicalVentilation Object."); @@ -2978,8 +2941,8 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con bool AirLoopFound = false; if (thisOASys <= 0) { // Check outside air system name - ShowWarningError( - state, EnergyPlus::format("Cannot find the AirLoopHVAC:OutdoorAirSystem for the OA Controller: {}", loopOAController.Name)); + ShowWarningError(state, + std::format("Cannot find the AirLoopHVAC:OutdoorAirSystem for the OA Controller: {}", loopOAController.Name)); } else { // Find the primary air loop that has the outside air system for (int thisAirLoop = 1; thisAirLoop <= state.dataHVACGlobal->NumPrimaryAirSys; ++thisAirLoop) { @@ -3010,7 +2973,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con if (AirLoopFound && airLoopNum > 0) { airloopName = state.dataAirSystemsData->PrimaryAirSystems(airLoopNum).Name; // OutsideAirSys(OASysIndex)%Name } else { - ShowWarningError(state, EnergyPlus::format("Cannot find the primary air loop for the OA Controller: {}", loopOAController.Name)); + ShowWarningError(state, std::format("Cannot find the primary air loop for the OA Controller: {}", loopOAController.Name)); airloopName = "AirLoop not found"; } @@ -3327,7 +3290,7 @@ void InitOAController(EnergyPlusData &state, int const OAControllerNum, bool con } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("Error in {}; program terminated", CurrentModuleObjects[static_cast(CMO::OAController)])); + ShowFatalError(state, std::format("Error in {}; program terminated", CurrentModuleObjects[static_cast(CMO::OAController)])); } } // namespace MixedAir @@ -3485,7 +3448,7 @@ void OAControllerProps::CalcOAController(EnergyPlusData &state, int const AirLoo ++this->CountMechVentFrac; ShowWarningError( state, - EnergyPlus::format( + std::format( "{}Minimum OA fraction > Mechanical Ventilation Controller request for Controller:OutdoorAir={}, Min OA fraction is used.", RoutineName, this->Name)); @@ -3873,8 +3836,7 @@ Real64 VentilationMechanicalProps::CalcMechVentController(EnergyPlusData &state, ZoneOAMin = ZoneOAMax; ++this->OAMaxMinLimitErrorCount; if (this->OAMaxMinLimitErrorCount < 2) { - ShowSevereError(state, - EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); + ShowSevereError(state, std::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); ShowContinueError( state, EnergyPlus::format( @@ -3889,7 +3851,7 @@ Real64 VentilationMechanicalProps::CalcMechVentController(EnergyPlusData &state, } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} = \"{}\", For System Outdoor Air Method = ProportionalControlBasedOnDesignOARate, maximum " "zone outdoor air rate is not greater than minimum zone outdoor air rate. Error continues...", CurrentModuleObject, @@ -3937,8 +3899,8 @@ Real64 VentilationMechanicalProps::CalcMechVentController(EnergyPlusData &state, ++this->CO2MaxMinLimitErrorCount; if (this->SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlSchOcc) { if (this->CO2MaxMinLimitErrorCount < 2) { - ShowSevereError( - state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); + ShowSevereError(state, + std::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); ShowContinueError( state, EnergyPlus::format( @@ -3953,21 +3915,20 @@ Real64 VentilationMechanicalProps::CalcMechVentController(EnergyPlusData &state, "continues..."); ShowContinueErrorTimeStamp(state, ""); } else { - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} = \"{}\", For System Outdoor Air Method = " - "ProportionalControlBasedOnOccupancySchedule, maximum " - "target CO2 concentration is not greater than minimum " - "target CO2 concentration. Error continues...", - CurrentModuleObject, - this->Name), - this->CO2MaxMinLimitErrorIndex); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} = \"{}\", For System Outdoor Air Method = " + "ProportionalControlBasedOnOccupancySchedule, maximum " + "target CO2 concentration is not greater than minimum " + "target CO2 concentration. Error continues...", + CurrentModuleObject, + this->Name), + this->CO2MaxMinLimitErrorIndex); } } if (this->SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlDesOcc) { if (this->CO2MaxMinLimitErrorCount < 2) { - ShowSevereError( - state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); + ShowSevereError(state, + std::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); ShowContinueError( state, EnergyPlus::format( @@ -3982,21 +3943,20 @@ Real64 VentilationMechanicalProps::CalcMechVentController(EnergyPlusData &state, "continues..."); ShowContinueErrorTimeStamp(state, ""); } else { - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} = \"{}\", For System Outdoor Air Method = " - "ProportionalControlBasedOnDesignOccupancy, maximum " - "target CO2 concentration is not greater than minimum " - "target CO2 concentration. Error continues...", - CurrentModuleObject, - this->Name), - this->CO2MaxMinLimitErrorIndex); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} = \"{}\", For System Outdoor Air Method = " + "ProportionalControlBasedOnDesignOccupancy, maximum " + "target CO2 concentration is not greater than minimum " + "target CO2 concentration. Error continues...", + CurrentModuleObject, + this->Name), + this->CO2MaxMinLimitErrorIndex); } } if (this->SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlDesOARate) { if (this->CO2MaxMinLimitErrorCount < 2) { - ShowSevereError( - state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); + ShowSevereError(state, + std::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); ShowContinueError( state, EnergyPlus::format( @@ -4013,12 +3973,12 @@ Real64 VentilationMechanicalProps::CalcMechVentController(EnergyPlusData &state, } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} = \"{}\", For System Outdoor Air Method = " - "ProportionalControlBasedOnDesignOARate, maximum target " - "CO2 concentration is not greater than minimum target CO2 " - "concentration. Error continues...", - CurrentModuleObject, - this->Name), + std::format("{} = \"{}\", For System Outdoor Air Method = " + "ProportionalControlBasedOnDesignOARate, maximum target " + "CO2 concentration is not greater than minimum target CO2 " + "concentration. Error continues...", + CurrentModuleObject, + this->Name), this->CO2MaxMinLimitErrorIndex); } } @@ -4048,11 +4008,11 @@ Real64 VentilationMechanicalProps::CalcMechVentController(EnergyPlusData &state, ++this->CO2GainErrorCount; if (this->SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlSchOcc) { if (this->CO2GainErrorCount < 2) { - ShowSevereError( - state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); + ShowSevereError(state, + std::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); ShowContinueError( state, - EnergyPlus::format( + std::format( "For System Outdoor Air Method = ProportionalControlBasedOnOccupancySchedule, CO2 " "generation from people is not greater than zero. Occurs in Zone =\"{}\". ", curZone.Name)); @@ -4064,24 +4024,23 @@ Real64 VentilationMechanicalProps::CalcMechVentController(EnergyPlusData &state, } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} = \"{}\", For System Outdoor Air Method = " - "ProportionalControlBasedOnOccupancySchedule, " - "CO2 generation from people is not greater than zero. Error continues...", - CurrentModuleObject, - this->Name), + std::format("{} = \"{}\", For System Outdoor Air Method = " + "ProportionalControlBasedOnOccupancySchedule, " + "CO2 generation from people is not greater than zero. Error continues...", + CurrentModuleObject, + this->Name), this->CO2GainErrorIndex); } } if (this->SystemOAMethod == DataSizing::SysOAMethod::ProportionalControlDesOcc) { if (this->CO2GainErrorCount < 2) { - ShowSevereError( - state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); + ShowSevereError(state, + std::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, this->Name)); ShowContinueError( state, - EnergyPlus::format( - "For System Outdoor Air Method = ProportionalControlBasedOnDesignOccupancy, CO2 " - "generation from people is not greater than zero. Occurs in Zone =\"{}\". ", - curZone.Name)); + std::format("For System Outdoor Air Method = ProportionalControlBasedOnDesignOccupancy, CO2 " + "generation from people is not greater than zero. Occurs in Zone =\"{}\". ", + curZone.Name)); ShowContinueError(state, "\"ProportionalControlBasedOnDesignOccupancy\" will not be modeled. " "Default \"Standard62.1VentilationRateProcedure\" will be modeled. Simulation " @@ -4090,7 +4049,7 @@ Real64 VentilationMechanicalProps::CalcMechVentController(EnergyPlusData &state, } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} = \"{}\", For System Outdoor Air Method = ProportionalControlBasedOnDesignOccupancy, " "CO2 generation from people is not greater than zero. Error continues...", CurrentModuleObject, @@ -4781,15 +4740,15 @@ void OAControllerProps::SizeOAController(EnergyPlusData &state) if (this->MaxOA > 0.0) { Real64 OAFlowRatio = this->MinOA / this->MaxOA; if (this->HighRHOAFlowRatio < OAFlowRatio) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", CurrentModuleObject, this->Name)); + ShowWarningError(state, std::format("{} \"{}\"", CurrentModuleObject, this->Name)); ShowContinueError(state, "... A fixed minimum outdoor air flow rate and high humidity control have been specified."); ShowContinueError(state, "... The High Humidity Outdoor Air Flow Ratio is less than the ratio of the outdoor air controllers " "minimum to maximum outside air flow rate."); - ShowContinueError(state, EnergyPlus::format("... Controller minimum flow rate = {:.4T} m3/s.", this->MinOA)); - ShowContinueError(state, EnergyPlus::format("... Controller maximum flow rate = {:.4T} m3/s.", this->MaxOA)); - ShowContinueError(state, EnergyPlus::format("... Controller minimum to maximum flow ratio = {:.4T}.", OAFlowRatio)); - ShowContinueError(state, EnergyPlus::format("... High humidity control flow ratio = {:.4T}.", this->HighRHOAFlowRatio)); + ShowContinueError(state, std::format("... Controller minimum flow rate = {:.4f} m3/s.", this->MinOA)); + ShowContinueError(state, std::format("... Controller maximum flow rate = {:.4f} m3/s.", this->MaxOA)); + ShowContinueError(state, std::format("... Controller minimum to maximum flow ratio = {:.4f}.", OAFlowRatio)); + ShowContinueError(state, std::format("... High humidity control flow ratio = {:.4f}.", this->HighRHOAFlowRatio)); } } } @@ -4970,7 +4929,7 @@ Array1D_int GetOAMixerNodeNumbers(EnergyPlusData &state, } if (WhichOAMixer == 0) { - ShowSevereError(state, EnergyPlus::format("GetOAMixerNodeNumbers: Could not find OA Mixer = \"{}\"", OAMixerName)); + ShowSevereError(state, std::format("GetOAMixerNodeNumbers: Could not find OA Mixer = \"{}\"", OAMixerName)); ErrorsFound = true; OANodeNumbers = 0; } @@ -5031,9 +4990,9 @@ int GetOAMixerReliefNodeNumber(EnergyPlusData &state, int const OAMixerNum) // W if (OAMixerNum > state.dataMixedAir->NumOAMixers) { ShowFatalError(state, - EnergyPlus::format("GetOAMixerReliefNodeNumber: Requested Mixer #={}, which is > number of OA Mixers={}", - OAMixerNum, - state.dataMixedAir->NumOAMixers)); + std::format("GetOAMixerReliefNodeNumber: Requested Mixer #={}, which is > number of OA Mixers={}", + OAMixerNum, + state.dataMixedAir->NumOAMixers)); } return state.dataMixedAir->OAMixer(OAMixerNum).RelNode; @@ -5263,7 +5222,7 @@ int GetOAMixerIndex(EnergyPlusData &state, std::string const &OAMixerName) // Wh int OAMixerIndex = Util::FindItem(OAMixerName, state.dataMixedAir->OAMixer); if (OAMixerIndex == 0) { - ShowSevereError(state, EnergyPlus::format("GetOAMixerIndex: Could not find OutdoorAir:Mixer, Name=\"{}\"", OAMixerName)); + ShowSevereError(state, std::format("GetOAMixerIndex: Could not find OutdoorAir:Mixer, Name=\"{}\"", OAMixerName)); } return OAMixerIndex; @@ -5438,19 +5397,19 @@ void CheckControllerLists(EnergyPlusData &state, bool &ErrFound) if (Count == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" is not referenced on a AirLoopHVAC or AirLoopHVAC:OutdoorAirSystem object.", - CurrentModuleObject, - ControllerListName)); + std::format("{}=\"{}\" is not referenced on a AirLoopHVAC or AirLoopHVAC:OutdoorAirSystem object.", + CurrentModuleObject, + ControllerListName)); ErrFound = true; } else if (Count > 1) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" has too many references on AirLoopHVAC or AirLoopHVAC:OutdoorAirSystem objects.", - CurrentModuleObject, - ControllerListName)); + std::format("{}=\"{}\" has too many references on AirLoopHVAC or AirLoopHVAC:OutdoorAirSystem objects.", + CurrentModuleObject, + ControllerListName)); if (Found > 0) { - ShowContinueError(state, EnergyPlus::format("...AirLoopHVAC:OutdoorAirSystem=\"{}\".", state.dataAirLoop->OutsideAirSys(Found).Name)); + ShowContinueError(state, std::format("...AirLoopHVAC:OutdoorAirSystem=\"{}\".", state.dataAirLoop->OutsideAirSys(Found).Name)); } - ShowContinueError(state, EnergyPlus::format("...also on AirLoopHVAC=\"{}\".", AirLoopName)); + ShowContinueError(state, std::format("...also on AirLoopHVAC=\"{}\".", AirLoopName)); ErrFound = true; } } diff --git a/src/EnergyPlus/NodeInputManager.cc b/src/EnergyPlus/NodeInputManager.cc index 6bd56540260..e6e4244980f 100644 --- a/src/EnergyPlus/NodeInputManager.cc +++ b/src/EnergyPlus/NodeInputManager.cc @@ -46,11 +46,11 @@ // POSSIBILITY OF SUCH DAMAGE. // C++ Headers +#include #include // ObjexxFCL Headers #include -#include // EnergyPlus Headers #include @@ -118,7 +118,7 @@ void GetNodeNums(EnergyPlusData &state, if (nodeFluidType != Node::FluidType::Air && nodeFluidType != Node::FluidType::Water && nodeFluidType != Node::FluidType::Electric && nodeFluidType != Node::FluidType::Steam && nodeFluidType != Node::FluidType::Blank) { ShowSevereError(state, EnergyPlus::format("{}{}=\"{}=\", invalid fluid type.", RoutineName, objTypeStr, NodeObjectName)); - ShowContinueError(state, EnergyPlus::format("..Invalid FluidType={}", nodeFluidType)); + ShowContinueError(state, EnergyPlus::format("..Invalid FluidType={}", FluidTypeNames[static_cast(nodeFluidType)])); ErrorsFound = true; ShowFatalError(state, "Preceding issue causes termination."); } @@ -133,7 +133,7 @@ void GetNodeNums(EnergyPlusData &state, if (state.dataLoopNodes->Node(NodeNumbers(Loop)).fluidType != nodeFluidType) { ShowSevereError(state, EnergyPlus::format("{}{}=\"{}=\", invalid data.", RoutineName, objTypeStr, NodeObjectName)); if (!InputFieldName.empty()) { - ShowContinueError(state, fmt::format("...Ref field={}", InputFieldName)); + ShowContinueError(state, EnergyPlus::format("...Ref field={}", InputFieldName)); } ShowContinueError(state, EnergyPlus::format("Existing Fluid type for node, incorrect for request. Node={}", @@ -632,7 +632,7 @@ void GetNodeListsInput(EnergyPlusData &state, bool &ErrorsFound) // Set to true EnergyPlus::format("... Node {} Name=\"{}\", duplicates NodeList Name.", Loop2, state.dataNodeInputMgr->NodeLists(Loop).NodeNames(Loop2))); - ShowContinueError(state, EnergyPlus::format("... NodeList=\"{}\", is duplicated.", state.dataNodeInputMgr->NodeLists(Loop1).Name)); + ShowContinueError(state, std::format("... NodeList=\"{}\", is duplicated.", state.dataNodeInputMgr->NodeLists(Loop1).Name)); ShowContinueError(state, "... Items in NodeLists must not be the name of another NodeList."); localErrorsFound = true; } @@ -643,7 +643,7 @@ void GetNodeListsInput(EnergyPlusData &state, bool &ErrorsFound) // Set to true rNumbers.deallocate(); if (localErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}{}: Error getting input - causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError(state, std::format("{}{}: Error getting input - causes termination.", RoutineName, CurrentModuleObject)); ErrorsFound = true; } } @@ -672,7 +672,7 @@ int AssignNodeNumber(EnergyPlusData &state, if (nodeFluidType != Node::FluidType::Air && nodeFluidType != Node::FluidType::Water && nodeFluidType != Node::FluidType::Electric && nodeFluidType != Node::FluidType::Steam && nodeFluidType != Node::FluidType::Blank) { - ShowSevereError(state, EnergyPlus::format("AssignNodeNumber: Invalid FluidType={}", nodeFluidType)); + ShowSevereError(state, std::format("AssignNodeNumber: Invalid FluidType={}", FluidTypeNames[static_cast(nodeFluidType)])); ErrorsFound = true; ShowFatalError(state, "AssignNodeNumber: Preceding issue causes termination."); } @@ -687,14 +687,12 @@ int AssignNodeNumber(EnergyPlusData &state, if (state.dataLoopNodes->Node(NumNode).fluidType != nodeFluidType && state.dataLoopNodes->Node(NumNode).fluidType != Node::FluidType::Blank) { ShowSevereError( - state, - EnergyPlus::format("Existing Fluid type for node, incorrect for request. Node={}", state.dataLoopNodes->NodeID(NumNode))); + state, std::format("Existing Fluid type for node, incorrect for request. Node={}", state.dataLoopNodes->NodeID(NumNode))); ShowContinueError( state, - EnergyPlus::format( - "Existing Fluid type={}, Requested Fluid Type={}", - EnergyPlus::format("{}", Node::FluidTypeNames[static_cast(state.dataLoopNodes->Node(NumNode).fluidType)]), - EnergyPlus::format("{}", Node::FluidTypeNames[static_cast(nodeFluidType)]))); + std::format("Existing Fluid type={}, Requested Fluid Type={}", + std::format("{}", Node::FluidTypeNames[static_cast(state.dataLoopNodes->Node(NumNode).fluidType)]), + std::format("{}", Node::FluidTypeNames[static_cast(nodeFluidType)]))); ErrorsFound = true; } } @@ -788,11 +786,11 @@ int GetOnlySingleNode(EnergyPlusData &state, InputFieldName); if (NumNodes > 1) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}=\", invalid data.", RoutineName, objTypeStr, NodeObjectName)); + ShowSevereError(state, std::format("{}{}=\"{}=\", invalid data.", RoutineName, objTypeStr, NodeObjectName)); if (!InputFieldName.empty()) { - ShowContinueError(state, fmt::format("...Ref field={}", InputFieldName)); + ShowContinueError(state, std::format("...Ref field={}", InputFieldName)); } - ShowContinueError(state, EnergyPlus::format("Only 1st Node used from NodeList=\"{}\".", NodeName)); + ShowContinueError(state, std::format("Only 1st Node used from NodeList=\"{}\".", NodeName)); ShowContinueError(state, "...a Nodelist may not be valid in this context."); errFlag = true; } else if (NumNodes == 0) { @@ -825,9 +823,9 @@ void InitUniqueNodeCheck(EnergyPlusData &state, std::string const &ContextName) if (!state.dataNodeInputMgr->CurCheckContextName.empty()) { ShowFatalError(state, - EnergyPlus::format("Init Uniqueness called for \"{}, but checks for \"{}\" was already in progress.", - ContextName, - state.dataNodeInputMgr->CurCheckContextName)); + std::format("Init Uniqueness called for \"{}, but checks for \"{}\" was already in progress.", + ContextName, + state.dataNodeInputMgr->CurCheckContextName)); } if (ContextName.empty()) { ShowFatalError(state, "Init Uniqueness called with Blank Context Name"); @@ -866,9 +864,8 @@ void CheckUniqueNodeNames( if (!CheckName.empty()) { int Found = Util::FindItemInList(CheckName, state.dataNodeInputMgr->UniqueNodeNames, state.dataNodeInputMgr->NumCheckNodes); if (Found != 0) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", duplicate node names found.", state.dataNodeInputMgr->CurCheckContextName, ObjectName)); - ShowContinueError(state, EnergyPlus::format("...for Node Type(s)={}, duplicate node name=\"{}\".", NodeTypes, CheckName)); + ShowSevereError(state, std::format("{}=\"{}\", duplicate node names found.", state.dataNodeInputMgr->CurCheckContextName, ObjectName)); + ShowContinueError(state, std::format("...for Node Type(s)={}, duplicate node name=\"{}\".", NodeTypes, CheckName)); ShowContinueError(state, "...Nodes must be unique across instances of this object."); // CALL ShowSevereError(state, 'Node Types='//TRIM(NodeTypes)//', Non Unique Name found='//TRIM(CheckName)) // CALL ShowContinueError(state, 'Context='//TRIM(CurCheckContextName)) @@ -908,11 +905,9 @@ void CheckUniqueNodeNumbers( int Found = Util::FindItemInList( state.dataLoopNodes->NodeID(CheckNumber), state.dataNodeInputMgr->UniqueNodeNames, state.dataNodeInputMgr->NumCheckNodes); if (Found != 0) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", duplicate node names found.", state.dataNodeInputMgr->CurCheckContextName, ObjectName)); + ShowSevereError(state, std::format("{}=\"{}\", duplicate node names found.", state.dataNodeInputMgr->CurCheckContextName, ObjectName)); ShowContinueError( - state, - EnergyPlus::format("...for Node Type(s)={}, duplicate node name=\"{}\".", NodeTypes, state.dataLoopNodes->NodeID(CheckNumber))); + state, std::format("...for Node Type(s)={}, duplicate node name=\"{}\".", NodeTypes, state.dataLoopNodes->NodeID(CheckNumber))); ShowContinueError(state, "...Nodes must be unique across instances of this object."); ErrorsFound = true; } else { @@ -939,9 +934,9 @@ void EndUniqueNodeCheck(EnergyPlusData &state, std::string const &ContextName) if (state.dataNodeInputMgr->CurCheckContextName != ContextName) { ShowFatalError(state, - EnergyPlus::format("End Uniqueness called for \"{}, but checks for \"{}\" was in progress.", - ContextName, - state.dataNodeInputMgr->CurCheckContextName)); + std::format("End Uniqueness called for \"{}, but checks for \"{}\" was in progress.", + ContextName, + state.dataNodeInputMgr->CurCheckContextName)); } if (ContextName.empty()) { ShowFatalError(state, "End Uniqueness called with Blank Context Name"); @@ -1243,13 +1238,12 @@ void CheckMarkedNodes(EnergyPlusData &state, bool &ErrorsFound) if (state.dataLoopNodes->MarkedNode(NodeNum).IsMarked) { if (state.dataNodeInputMgr->NodeRef(NodeNum) == 0) { std::string_view objType = Node::ConnectionObjectTypeNames[static_cast(state.dataLoopNodes->MarkedNode(NodeNum).ObjectType)]; - ShowSevereError(state, - EnergyPlus::format("Node=\"{}\" did not find reference by another object.", state.dataLoopNodes->NodeID(NodeNum))); + ShowSevereError(state, std::format("Node=\"{}\" did not find reference by another object.", state.dataLoopNodes->NodeID(NodeNum))); ShowContinueError(state, - EnergyPlus::format(R"(Object="{}", Name="{}", Field=[{}])", - objType, - state.dataLoopNodes->MarkedNode(NodeNum).ObjectName, - state.dataLoopNodes->MarkedNode(NodeNum).FieldName)); + std::format(R"(Object="{}", Name="{}", Field=[{}])", + objType, + state.dataLoopNodes->MarkedNode(NodeNum).ObjectName, + state.dataLoopNodes->MarkedNode(NodeNum).FieldName)); ErrorsFound = true; } } diff --git a/src/EnergyPlus/OutdoorAirUnit.cc b/src/EnergyPlus/OutdoorAirUnit.cc index f2cd2d16d05..f44b8903e13 100644 --- a/src/EnergyPlus/OutdoorAirUnit.cc +++ b/src/EnergyPlus/OutdoorAirUnit.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -1562,7 +1563,7 @@ namespace OutdoorAirUnit { (!state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance)) { if (!thisOutAirUnit.FlowError) { ShowWarningError(state, "Air mass flow between zone supply and exhaust is not balanced. Only the first occurrence is reported."); - ShowContinueError(state, EnergyPlus::format("Occurs in ZoneHVAC:OutdoorAirUnit Object= {}", thisOutAirUnit.Name)); + ShowContinueError(state, std::format("Occurs in ZoneHVAC:OutdoorAirUnit Object= {}", thisOutAirUnit.Name)); ShowContinueError(state, "Air mass balance is required by other outdoor air units: Fan:ZoneExhaust, ZoneMixing, ZoneCrossMixing, or " "other air flow control inputs."); @@ -2099,7 +2100,7 @@ namespace OutdoorAirUnit { } } break; default: { - ShowFatalError(state, EnergyPlus::format("Invalid Outdoor Air Unit Component={}", EquipType)); // validate + ShowFatalError(state, std::format("Invalid Outdoor Air Unit Component={}", EquipType)); // validate } break; } } diff --git a/src/EnergyPlus/OutputProcessor.cc b/src/EnergyPlus/OutputProcessor.cc index 819feeed40d..b43cece76e2 100644 --- a/src/EnergyPlus/OutputProcessor.cc +++ b/src/EnergyPlus/OutputProcessor.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include #include #include #include @@ -57,8 +58,10 @@ #include #include +// Third Party Headers +#include + // EnergyPlus Headers -#include "re2/re2.h" #include #include #include @@ -76,8 +79,8 @@ #include #include -#include -#include +// Local Headers +#include "re2/re2.h" namespace EnergyPlus { @@ -881,7 +884,7 @@ namespace OutputProcessor { // Somehow, this meter is not linked to any variables either directly or via another meter if (!itemsAssigned) { - ShowWarningError(state, EnergyPlus::format("Meter:Custom=\"{}\", no items assigned ", ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("Meter:Custom=\"{}\", no items assigned ", ipsc->cAlphaArgs(1))); ShowContinueError( state, "...will not be shown with the Meter results. This may be caused by a Meter:Custom being assigned to another Meter:Custom."); @@ -900,7 +903,7 @@ namespace OutputProcessor { bool errFlag = false; meter->RT_forIPUnits = GetResourceIPUnits(state, meter->resource, meter->units, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("..on {}=\"{}\".", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("..on {}=\"{}\".", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, "..requests for IP units from this meter will be ignored."); } @@ -941,9 +944,9 @@ namespace OutputProcessor { if (std::find(meter->srcMeterNums.begin(), meter->srcMeterNums.end(), srcMeterNum) != meter->srcMeterNums.end()) { ShowWarningCustom(state, eoh, - EnergyPlus::format("{}=\"{}\" referenced multiple times, only first instance will be used", - ipsc->cAlphaFieldNames(fldIndex + 1), - meterOrVarNameUC)); + std::format("{}=\"{}\" referenced multiple times, only first instance will be used", + ipsc->cAlphaFieldNames(fldIndex + 1), + meterOrVarNameUC)); continue; } @@ -974,8 +977,8 @@ namespace OutputProcessor { if (std::find(meter->srcVarNums.begin(), meter->srcVarNums.end(), keyOutVarNum) != meter->srcVarNums.end()) { ShowWarningCustom(state, eoh, - EnergyPlus::format("Output variable \"{}\" referenced multiple times (directly or via meter)", - op->outVars[keyOutVarNum]->keyColonNameUC)); + std::format("Output variable \"{}\" referenced multiple times (directly or via meter)", + op->outVars[keyOutVarNum]->keyColonNameUC)); } else { meter->srcVarNums.push_back(keyOutVarNum); @@ -988,8 +991,8 @@ namespace OutputProcessor { if (std::find(meter->srcVarNums.begin(), meter->srcVarNums.end(), keyOutVarNum) != meter->srcVarNums.end()) { ShowWarningCustom(state, eoh, - EnergyPlus::format("Output variable \"{}\" referenced multiple times (directly or via meter)", - op->outVars[keyOutVarNum]->keyColonNameUC)); + std::format("Output variable \"{}\" referenced multiple times (directly or via meter)", + op->outVars[keyOutVarNum]->keyColonNameUC)); } else { meter->srcVarNums.push_back(keyOutVarNum); op->outVars[keyOutVarNum]->meterNums.push_back(meterNum); @@ -1054,12 +1057,11 @@ namespace OutputProcessor { // DecMeter cannot be a Meter:Custom if (std::find(customDecMeterNames.begin(), customDecMeterNames.end(), decMeterNameUC) != customDecMeterNames.end()) { - ShowWarningError( - state, - EnergyPlus::format(R"(Meter:CustomDec="{}", contains a reference to another Meter:CustomDecrement in field: {}="{}".)", - ipsc->cAlphaArgs(1), - ipsc->cAlphaFieldNames(3), - ipsc->cAlphaArgs(3))); + ShowWarningError(state, + std::format(R"(Meter:CustomDec="{}", contains a reference to another Meter:CustomDecrement in field: {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(3), + ipsc->cAlphaArgs(3))); ErrorsFound = true; continue; } @@ -1101,12 +1103,11 @@ namespace OutputProcessor { // A custom meter cannot reference another custom meter if (std::find(customDecMeterNames.begin(), customDecMeterNames.end(), meterOrVarNameUC) != customDecMeterNames.end()) { - ShowWarningError( - state, - EnergyPlus::format(R"(Meter:Custom="{}", contains a reference to another Meter:CustomDecrement in field: {}="{}".)", - ipsc->cAlphaArgs(1), - ipsc->cAlphaFieldNames(fldIndex + 1), - ipsc->cAlphaArgs(fldIndex + 1))); + ShowWarningError(state, + std::format(R"(Meter:Custom="{}", contains a reference to another Meter:CustomDecrement in field: {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(fldIndex + 1), + ipsc->cAlphaArgs(fldIndex + 1))); foundBadSrc = true; break; } @@ -1123,15 +1124,14 @@ namespace OutputProcessor { } else if (units != srcMeter->units) { ShowWarningCustom(state, eoh, - EnergyPlus::format(R"(Meter:Custom="{}", differing units in {}="{}".)", - ipsc->cAlphaArgs(1), - ipsc->cAlphaFieldNames(fldIndex + 1), - meterOrVarNameUC)); - ShowContinueError( - state, - EnergyPlus::format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", - Constant::unitNames[(int)units], - Constant::unitNames[(int)srcMeter->units])); + std::format(R"(Meter:Custom="{}", differing units in {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(fldIndex + 1), + meterOrVarNameUC)); + ShowContinueError(state, + std::format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", + Constant::unitNames[(int)units], + Constant::unitNames[(int)srcMeter->units])); foundBadSrc = true; break; } @@ -1145,15 +1145,14 @@ namespace OutputProcessor { if (srcDDVar->storeType != StoreType::Sum) { ShowWarningCustom(state, eoh, - EnergyPlus::format(R"(Meter:Custom="{}", variable not summed variable {}="{}".)", - ipsc->cAlphaArgs(1), - ipsc->cAlphaFieldNames(fldIndex + 1), - meterOrVarNameUC)); - ShowContinueError( - state, - EnergyPlus::format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", - Constant::unitNames[(int)units], - Constant::unitNames[(int)srcDDVar->units])); + std::format(R"(Meter:Custom="{}", variable not summed variable {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(fldIndex + 1), + meterOrVarNameUC)); + ShowContinueError(state, + std::format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", + Constant::unitNames[(int)units], + Constant::unitNames[(int)srcDDVar->units])); foundBadSrc = true; break; } @@ -1164,12 +1163,11 @@ namespace OutputProcessor { // Otherwise it has to match the existing units } else if (units != srcDDVar->units) { ShowWarningCustom( - state, eoh, EnergyPlus::format("differing units in {}=\"{}\".", ipsc->cAlphaFieldNames(fldIndex + 1), meterOrVarNameUC)); - ShowContinueError( - state, - EnergyPlus::format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", - Constant::unitNames[(int)units], - Constant::unitNames[(int)srcDDVar->units])); + state, eoh, std::format("differing units in {}=\"{}\".", ipsc->cAlphaFieldNames(fldIndex + 1), meterOrVarNameUC)); + ShowContinueError(state, + std::format("...will not be shown with the Meter results; units for meter={}, units for this variable={}.", + Constant::unitNames[(int)units], + Constant::unitNames[(int)srcDDVar->units])); foundBadSrc = true; break; } @@ -1204,10 +1202,10 @@ namespace OutputProcessor { } else { // Cannot use ShowWarningItemNotFound because this string appears in a unit test ShowWarningError(state, - EnergyPlus::format(R"(Meter:Custom="{}", invalid {}="{}".)", - ipsc->cAlphaArgs(1), - ipsc->cAlphaFieldNames(fldIndex + 1), - ipsc->cAlphaArgs(fldIndex + 1))); + std::format(R"(Meter:Custom="{}", invalid {}="{}".)", + ipsc->cAlphaArgs(1), + ipsc->cAlphaFieldNames(fldIndex + 1), + ipsc->cAlphaArgs(fldIndex + 1))); ShowContinueError(state, "...will not be shown with the Meter results."); foundBadSrc = true; break; @@ -1217,7 +1215,7 @@ namespace OutputProcessor { // Somehow, this meter is not linked to any variables either directly or via another meter if (!itemsAssigned) { - ShowWarningError(state, EnergyPlus::format("Meter:Custom=\"{}\", no items assigned ", ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("Meter:Custom=\"{}\", no items assigned ", ipsc->cAlphaArgs(1))); ShowContinueError( state, "...will not be shown with the Meter results. This may be caused by a Meter:Custom being assigned to another Meter:Custom."); @@ -1236,7 +1234,7 @@ namespace OutputProcessor { bool errFlag = false; meter->RT_forIPUnits = GetResourceIPUnits(state, meter->resource, meter->units, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("..on {}=\"{}\".", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("..on {}=\"{}\".", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, "..requests for IP units from this meter will be ignored."); } @@ -1290,9 +1288,9 @@ namespace OutputProcessor { if (std::find(meter->srcMeterNums.begin(), meter->srcMeterNums.end(), srcMeterNum) != meter->srcMeterNums.end()) { ShowWarningCustom(state, eoh, - EnergyPlus::format("{}=\"{}\" referenced multiple times, only first instance will be used", - ipsc->cAlphaFieldNames(fldIndex + 1), - meterOrVarNameUC)); + std::format("{}=\"{}\" referenced multiple times, only first instance will be used", + ipsc->cAlphaFieldNames(fldIndex + 1), + meterOrVarNameUC)); continue; } @@ -1323,8 +1321,8 @@ namespace OutputProcessor { if (std::find(meter->srcVarNums.begin(), meter->srcVarNums.end(), keyOutVarNum) != meter->srcVarNums.end()) { ShowWarningCustom(state, eoh, - EnergyPlus::format("Output variable \"{}\" referenced multiple times (directly or via meter)", - op->outVars[keyOutVarNum]->keyColonNameUC)); + std::format("Output variable \"{}\" referenced multiple times (directly or via meter)", + op->outVars[keyOutVarNum]->keyColonNameUC)); } else { meter->srcVarNums.push_back(keyOutVarNum); @@ -1337,8 +1335,8 @@ namespace OutputProcessor { if (std::find(meter->srcVarNums.begin(), meter->srcVarNums.end(), keyOutVarNum) != meter->srcVarNums.end()) { ShowWarningCustom(state, eoh, - EnergyPlus::format("Output variable \"{}\" referenced multiple times (directly or via meter)", - op->outVars[keyOutVarNum]->keyColonNameUC)); + std::format("Output variable \"{}\" referenced multiple times (directly or via meter)", + op->outVars[keyOutVarNum]->keyColonNameUC)); } else { meter->srcVarNums.push_back(keyOutVarNum); op->outVars[keyOutVarNum]->meterNums.push_back(meterNum); @@ -1416,7 +1414,7 @@ namespace OutputProcessor { bool errFlag = false; meter->RT_forIPUnits = GetResourceIPUnits(state, meter->resource, units, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("..on Meter=\"{}\".", Name)); + ShowContinueError(state, std::format("..on Meter=\"{}\".", Name)); ShowContinueError(state, "..requests for IP units from this meter will be ignored."); } } @@ -1464,20 +1462,20 @@ namespace OutputProcessor { addEndUseSpaceType(state, endUseCat, SpaceType); } - std::string meterName = EnergyPlus::format("{}:Facility", resourceName); + std::string meterName = std::format("{}:Facility", resourceName); AddMeter(state, meterName, units, resource, EndUseCat::Invalid, "", Group::Invalid, outVarNum); if (group != Group::Invalid) { - std::string groupMeterName = EnergyPlus::format("{}:{}", resourceName, groupNames[(int)group]); + std::string groupMeterName = std::format("{}:{}", resourceName, groupNames[(int)group]); AddMeter(state, groupMeterName, units, resource, EndUseCat::Invalid, "", group, outVarNum); if (group == Group::Building) { if (!ZoneName.empty()) { - std::string zoneMeterName = EnergyPlus::format("{}:Zone:{}", resourceName, ZoneName); + std::string zoneMeterName = std::format("{}:Zone:{}", resourceName, ZoneName); AddMeter(state, zoneMeterName, units, resource, EndUseCat::Invalid, "", Group::Zone, outVarNum); } if (!SpaceType.empty()) { - std::string spaceMeterName = EnergyPlus::format("{}:SpaceType:{}", resourceName, SpaceType); + std::string spaceMeterName = std::format("{}:SpaceType:{}", resourceName, SpaceType); AddMeter(state, spaceMeterName, units, resource, EndUseCat::Invalid, "", Group::SpaceType, outVarNum); } } // if (Group == "Building") @@ -1486,33 +1484,32 @@ namespace OutputProcessor { //!! Following if we do EndUse by ResourceType if (endUseCat != EndUseCat::Invalid) { std::string_view endUseCatName = endUseCatNames[(int)endUseCat]; - std::string enduseMeterName = EnergyPlus::format("{}:{}", endUseCatName, resourceName); + std::string enduseMeterName = std::format("{}:{}", endUseCatName, resourceName); AddMeter(state, enduseMeterName, units, resource, endUseCat, "", Group::Invalid, outVarNum); if (group == Group::Building) { // Match to Zone and Space if (!ZoneName.empty()) { - std::string enduseZoneMeterName = EnergyPlus::format("{}:{}:Zone:{}", endUseCatName, resourceName, ZoneName); + std::string enduseZoneMeterName = std::format("{}:{}:Zone:{}", endUseCatName, resourceName, ZoneName); AddMeter(state, enduseZoneMeterName, units, resource, endUseCat, "", Group::Zone, outVarNum); } if (!SpaceType.empty()) { - std::string enduseSpaceMeterName = EnergyPlus::format("{}:{}:SpaceType:{}", endUseCatName, resourceName, SpaceType); + std::string enduseSpaceMeterName = std::format("{}:{}:SpaceType:{}", endUseCatName, resourceName, SpaceType); AddMeter(state, enduseSpaceMeterName, units, resource, endUseCat, "", Group::SpaceType, outVarNum); } } // End-Use Subcategories if (!endUseSub.empty()) { - std::string subEnduseMeterName = EnergyPlus::format("{}:{}:{}", endUseSub, endUseCatNames[(int)endUseCat], resourceName); + std::string subEnduseMeterName = std::format("{}:{}:{}", endUseSub, endUseCatNames[(int)endUseCat], resourceName); AddMeter(state, subEnduseMeterName, units, resource, endUseCat, endUseSub, Group::Invalid, outVarNum); if (group == Group::Building) { // Match to Zone and Space if (!ZoneName.empty()) { - std::string subEnduseZoneMeterName = EnergyPlus::format("{}:{}:{}:Zone:{}", endUseSub, endUseCatName, resourceName, ZoneName); + std::string subEnduseZoneMeterName = std::format("{}:{}:{}:Zone:{}", endUseSub, endUseCatName, resourceName, ZoneName); AddMeter(state, subEnduseZoneMeterName, units, resource, endUseCat, endUseSub, Group::Zone, outVarNum); } if (!SpaceType.empty()) { - std::string subEnduseSpaceMeterName = - EnergyPlus::format("{}:{}:{}:SpaceType:{}", endUseSub, endUseCatName, resourceName, SpaceType); + std::string subEnduseSpaceMeterName = std::format("{}:{}:{}:SpaceType:{}", endUseSub, endUseCatName, resourceName, SpaceType); AddMeter(state, subEnduseSpaceMeterName, units, resource, endUseCat, endUseSub, Group::SpaceType, outVarNum); } } // if (sovGroup == Building) @@ -1603,9 +1600,9 @@ namespace OutputProcessor { // write(outputfiledebug,*) 'resourcetype=',TRIM(resourcetype) // write(outputfiledebug,*) 'ipunits type=',CodeForIPUnits if (units != Constant::Units::kg && units != Constant::Units::J && units != Constant::Units::m3 && units != Constant::Units::L) { - ShowWarningMessage(state, - EnergyPlus::format("DetermineMeterIPUnits: Meter units not recognized for IP Units conversion=[{}].", - Constant::unitNames[(int)units])); + ShowWarningMessage( + state, + std::format("DetermineMeterIPUnits: Meter units not recognized for IP Units conversion=[{}].", Constant::unitNames[(int)units])); ErrorsFound = true; } return IPUnits; @@ -2143,10 +2140,10 @@ namespace OutputProcessor { static constexpr std::string_view DateFmt("{:02}-{:3}-{:02}:{:02}"); // ((month*100 + day)*100 + hour)*100 + minute - int Month; // month in integer format (1-12) - int Day; // day in integer format (1-31) - int Hour; // hour in integer format (1-24) - int Minute; // minute in integer format (0:59) + int Month; // month in integer EnergyPlus::format(1-12) + int Day; // day in integer EnergyPlus::format(1-31) + int Hour; // hour in integer EnergyPlus::format(1-24) + int Minute; // minute in integer EnergyPlus::format(0:59) General::DecodeMonDayHrMin(codedDate, Month, Day, Hour, Minute); @@ -2218,7 +2215,7 @@ namespace OutputProcessor { { return (ZoneMult == 1 && ZoneListMult == 1) ? "" - : EnergyPlus::format(" * {} (Zone Multiplier = {}, Zone List Multiplier = {})", ZoneMult * ZoneListMult, ZoneMult, ZoneListMult); + : std::format(" * {} (Zone Multiplier = {}, Zone List Multiplier = {})", ZoneMult * ZoneListMult, ZoneMult, ZoneListMult); } void ReportMeterDetails(EnergyPlusData &state) @@ -2835,7 +2832,7 @@ namespace OutputProcessor { // Can someone explain why we are printing integers as // floats and why we are doing it differently than // floats? - NumberOut = (repVal == 0.0) ? "0.0" : EnergyPlus::format("{:f}", repVal); + NumberOut = (repVal == 0.0) ? "0.0" : std::format("{:f}", repVal); } if ((freq == ReportFreq::EachCall) || (freq == ReportFreq::TimeStep) || (freq == ReportFreq::Hour)) { // -1, 0, 1 @@ -2936,11 +2933,11 @@ namespace OutputProcessor { } if (meter->resource != Constant::eResource::Invalid) { - indexGroup += EnergyPlus::format(":{}", Constant::eResourceNames[(int)meter->resource]); + indexGroup += std::format(":{}", Constant::eResourceNames[(int)meter->resource]); } if (meter->endUseCat != EndUseCat::Invalid) { - indexGroup += EnergyPlus::format(":{}", endUseCatNames[(int)meter->endUseCat]); + indexGroup += std::format(":{}", endUseCatNames[(int)meter->endUseCat]); } if (len(meter->EndUseSub) > 0) { @@ -2993,7 +2990,7 @@ namespace OutputProcessor { // This function is here just for unit test purposes DDOutVar *ddVar = state.dataOutputProcessor->ddOutVars[ddNum]; Constant::Units units = ddVar->units; - return EnergyPlus::format(" [{}]", units == Constant::Units::customEMS ? ddVar->unitNameCustomEMS : Constant::unitNames[(int)units]); + return std::format(" [{}]", units == Constant::Units::customEMS ? ddVar->unitNameCustomEMS : Constant::unitNames[(int)units]); } // unitStringFromDDitem() } // namespace OutputProcessor @@ -3059,7 +3056,7 @@ void SetupOutputVariable(EnergyPlusData &state, if (OnMeter && store == StoreType::Average) { ShowSevereError(state, "Meters can only be \"Summed\" variables"); - ShowContinueError(state, fmt::format("..reference variable={}:{}", key, name)); + ShowContinueError(state, std::format("..reference variable={}:{}", key, name)); OnMeter = false; } @@ -3102,7 +3099,7 @@ void SetupOutputVariable(EnergyPlusData &state, var->nameUC = Util::makeUPPER(var->name); var->key = key; var->keyUC = Util::makeUPPER(key); - var->keyColonName = fmt::format("{}:{}", key, name); + var->keyColonName = std::format("{}:{}", key, name); var->keyColonNameUC = Util::makeUPPER(var->keyColonName); var->units = units; if (units == Constant::Units::customEMS) { @@ -3217,7 +3214,7 @@ void SetupOutputVariable(EnergyPlusData &state, var->nameUC = Util::makeUPPER(var->name); var->key = key; var->keyUC = Util::makeUPPER(key); - var->keyColonName = fmt::format("{}:{}", key, name); + var->keyColonName = std::format("{}:{}", key, name); var->keyColonNameUC = Util::makeUPPER(var->keyColonName); var->units = units; var->ReportID = ++op->ReportNumberCounter; @@ -3796,8 +3793,7 @@ void GenOutputVariablesAuditReport(EnergyPlusData &state) "or the requested variable is an advanced output which requires Output : Diagnostics, DisplayAdvancedReportVariables;"); state.dataOutputProcessor->Rept = true; } - ShowMessage(state, - EnergyPlus::format("Key={}, VarName={}, Frequency={}", reqVar->key, reqVar->name, localReportFreqNames[(int)reqVar->freq])); + ShowMessage(state, std::format("Key={}, VarName={}, Frequency={}", reqVar->key, reqVar->name, localReportFreqNames[(int)reqVar->freq])); } } // GenOutputVariablesAuditReport() @@ -3932,8 +3928,8 @@ void UpdateMeterReporting(EnergyPlusData &state) ReportFreq freq = determineFrequency(state, Util::makeUPPER(Alphas(2))); if (!setupMeterFromMeterName(Alphas(1), freq, meterFileOnlyIndicator, cumulativeIndicator)) { - ShowWarningError( - state, EnergyPlus::format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); + ShowWarningError(state, + std::format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); } } @@ -3958,8 +3954,8 @@ void UpdateMeterReporting(EnergyPlusData &state) bool cumulativeIndicator = false; ReportFreq freq = determineFrequency(state, Util::makeUPPER(Alphas(2))); if (!setupMeterFromMeterName(Alphas(1), freq, meterFileOnlyIndicator, cumulativeIndicator)) { - ShowWarningError( - state, EnergyPlus::format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); + ShowWarningError(state, + std::format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); } } @@ -3985,8 +3981,8 @@ void UpdateMeterReporting(EnergyPlusData &state) bool cumulativeIndicator = true; ReportFreq freq = determineFrequency(state, Util::makeUPPER(Alphas(2))); if (!setupMeterFromMeterName(Alphas(1), freq, meterFileOnlyIndicator, cumulativeIndicator)) { - ShowWarningError( - state, EnergyPlus::format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); + ShowWarningError(state, + std::format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); } } @@ -4011,8 +4007,8 @@ void UpdateMeterReporting(EnergyPlusData &state) bool cumulativeIndicator = true; ReportFreq freq = determineFrequency(state, Util::makeUPPER(Alphas(2))); if (!setupMeterFromMeterName(Alphas(1), freq, meterFileOnlyIndicator, cumulativeIndicator)) { - ShowWarningError( - state, EnergyPlus::format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); + ShowWarningError(state, + std::format("{}: invalid {}=\"{}\" - not found.", ipsc->cCurrentModuleObject, ipsc->cAlphaFieldNames(1), Alphas(1))); } } @@ -4053,11 +4049,11 @@ void SetInitialMeterReportingAndOutputNames(EnergyPlusData &state, if (MeterFileOnlyIndicator && period.Rpt) { ShowWarningError( state, - EnergyPlus::format(R"(Output:Meter:MeterFileOnly requested for "{}" ({}), already on "Output:Meter". Will report to both {} and {})", - meter->Name, - reportFreqNames[(freq == ReportFreq::EachCall) ? (int)ReportFreq::TimeStep : (int)freq], - state.files.eso.filePath.filename(), - state.files.mtr.filePath.filename())); + std::format(R"(Output:Meter:MeterFileOnly requested for "{}" ({}), already on "Output:Meter". Will report to both {} and {})", + meter->Name, + reportFreqNames[(freq == ReportFreq::EachCall) ? (int)ReportFreq::TimeStep : (int)freq], + state.files.eso.filePath.filename().string(), + state.files.mtr.filePath.filename().string())); } if (!period.Rpt) { period.Rpt = true; @@ -4074,11 +4070,11 @@ void SetInitialMeterReportingAndOutputNames(EnergyPlusData &state, } else { // !CumulativeIndicator if (MeterFileOnlyIndicator && period.accRpt) { ShowWarningError(state, - EnergyPlus::format("Output:Meter:MeterFileOnly requested for \"Cumulative {}\" (TimeStep), already on \"Output:Meter\". " - "Will report to both {} and {}", - meter->Name, - state.files.eso.filePath.filename(), - state.files.mtr.filePath.filename())); + std::format("Output:Meter:MeterFileOnly requested for \"Cumulative {}\" (TimeStep), already on \"Output:Meter\". " + "Will report to both {} and {}", + meter->Name, + state.files.eso.filePath.filename().string(), + state.files.mtr.filePath.filename().string())); } if (!period.accRpt) { @@ -4239,7 +4235,7 @@ Real64 GetInternalVariableValue(EnergyPlusData &state, } else if (varType == VariableType::Integer || varType == VariableType::Real) { if (keyVarIndex < 0 || keyVarIndex >= (int)op->outVars.size()) { ShowFatalError(state, "GetInternalVariableValue: passed variable index beyond range of array."); - ShowContinueError(state, EnergyPlus::format("Index = {} Number of variables = {}", keyVarIndex, op->outVars.size())); + ShowContinueError(state, std::format("Index = {} Number of variables = {}", keyVarIndex, op->outVars.size())); } // must use %Which, %Value is always zero if variable is not a requested report variable @@ -4662,7 +4658,7 @@ void InitPollutionMeterReporting(EnergyPlusData &state, OutputProcessor::ReportF auto &op = state.dataOutputProcessor; for (int iResource = 0; iResource < (int)Constant::eResource::Num; ++iResource) { - std::string meterName = EnergyPlus::format("{}:Facility", Constant::eResourceNames[iResource]); + std::string meterName = std::format("{}:Facility", Constant::eResourceNames[iResource]); std::string meterNameUC = Util::makeUPPER(meterName); auto found = op->meterMap.find(meterNameUC); @@ -4777,10 +4773,10 @@ void ProduceRDDMDD(EnergyPlusData &state) (ddVar->units == Constant::Units::customEMS) ? ddVar->unitNameCustomEMS : Constant::unitNames[(int)ddVar->units]; if (op->ProduceReportVDD == ReportVDD::Yes) { print(state.files.rdd, "{},{},{} [{}]\n", timeStepName, storeTypeName, varName, unitName); - rf->RDD.push_back(EnergyPlus::format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); + rf->RDD.push_back(std::format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); } else { print(state.files.rdd, "Output:Variable,*,{},hourly; !- {} {} [{}]\n", varName, timeStepName, storeTypeName, unitName); - rf->RDD.push_back(EnergyPlus::format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); + rf->RDD.push_back(std::format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); } ddVar->ReportedOnDDFile = true; @@ -4794,10 +4790,10 @@ void ProduceRDDMDD(EnergyPlusData &state) if (op->ProduceReportVDD == ReportVDD::Yes) { print(state.files.rdd, "{},{},{} [{}]\n", timeStepName, storeTypeName, varName, unitName); - rf->RDD.push_back(EnergyPlus::format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); + rf->RDD.push_back(std::format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); } else { print(state.files.rdd, "Output:Variable,*,{},hourly; !- {} {} [{}]\n", varName, timeStepName, storeTypeName, unitName); - rf->RDD.push_back(EnergyPlus::format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); + rf->RDD.push_back(std::format("{},{},{} [{}]", timeStepName, storeTypeName, varName, unitName)); } ddVar->ReportedOnDDFile = true; } // while (ddVar->Next != 0) @@ -4813,12 +4809,12 @@ void ProduceRDDMDD(EnergyPlusData &state) std::string_view unitName = Constant::unitNames[(int)meter->units]; if (op->ProduceReportVDD == ReportVDD::Yes) { print(state.files.mdd, "Zone,Meter,{} [{}]\n", meter->Name, unitName); - rf->MDD.push_back(EnergyPlus::format("Zone,Meter,{} [{}]", meter->Name, unitName)); + rf->MDD.push_back(std::format("Zone,Meter,{} [{}]", meter->Name, unitName)); } else if (op->ProduceReportVDD == ReportVDD::IDF) { print(state.files.mdd, "Output:Meter,{},hourly; !- [{}]\n", meter->Name, unitName); - rf->MDD.push_back(EnergyPlus::format("Output:Meter,{} [{}]", meter->Name, unitName)); + rf->MDD.push_back(std::format("Output:Meter,{} [{}]", meter->Name, unitName)); print(state.files.mdd, "Output:Meter:Cumulative,{},hourly; !- [{}]\n", meter->Name, unitName); - rf->MDD.push_back(EnergyPlus::format("Output:Meter:Cumulative,{} [{}]", meter->Name, unitName)); + rf->MDD.push_back(std::format("Output:Meter:Cumulative,{} [{}]", meter->Name, unitName)); } } state.files.mdd.close(); @@ -4906,7 +4902,7 @@ int initErrorFile(EnergyPlusData &state) { state.files.err_stream = std::make_unique(state.files.outputErrFilePath); if (state.files.err_stream->bad()) { - DisplayString(state, fmt::format("ERROR: Could not open file {} for output (write).", state.files.outputErrFilePath)); + DisplayString(state, std::format("ERROR: Could not open file {} for output (write).", state.files.outputErrFilePath.string())); return EXIT_FAILURE; } diff --git a/src/EnergyPlus/OutputReportTabular.cc b/src/EnergyPlus/OutputReportTabular.cc index 55900950b94..f91cc1847af 100644 --- a/src/EnergyPlus/OutputReportTabular.cc +++ b/src/EnergyPlus/OutputReportTabular.cc @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -66,12 +67,14 @@ #include #include -// Third-party Headers +// Local Headers +#include + +// Third Party Headers #include #include // EnergyPlus Headers -#include #include #include #include @@ -201,7 +204,7 @@ std::ofstream &open_tbl_stream(EnergyPlusData &state, int const iStyle, fs::path if (output_to_file) { tbl_stream.open(filePath); if (!tbl_stream) { - ShowFatalError(state, EnergyPlus::format("OpenOutputTabularFile: Could not open file \"{}\" for output (write).", filePath)); + ShowFatalError(state, EnergyPlus::format("OpenOutputTabularFile: Could not open file \"{}\" for output (write).", filePath.string())); } } else { tbl_stream.setstate(std::ios_base::badbit); @@ -252,7 +255,8 @@ void UpdateTabularReports(EnergyPlusData &state, OutputProcessor::TimeStepType t } else { if (state.dataHeatBal->Resilience(ZoneNum).ColdStressTempThresh != ColdTempThresh) { ShowWarningMessage( - state, fmt::format("Zone {} has multiple people objects with different Cold Stress Temperature Threshold.", ZoneNum)); + state, + EnergyPlus::format("Zone {} has multiple people objects with different Cold Stress Temperature Threshold.", ZoneNum)); } } @@ -262,7 +266,8 @@ void UpdateTabularReports(EnergyPlusData &state, OutputProcessor::TimeStepType t } else { if (state.dataHeatBal->Resilience(ZoneNum).HeatStressTempThresh != HeatTempThresh) { ShowWarningMessage( - state, fmt::format("Zone {} has multiple people objects with different Heat Stress Temperature Threshold.", ZoneNum)); + state, + EnergyPlus::format("Zone {} has multiple people objects with different Heat Stress Temperature Threshold.", ZoneNum)); } } } @@ -1356,7 +1361,7 @@ void GetInputTabularStyle(EnergyPlusData &state) } else { ShowWarningError( state, - EnergyPlus::format( + std::format( "{}: Invalid {}=\"{}\". Commas will be used.", CurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(1), AlphArray(1))); ort->numStyles = 1; ort->TableStyle(1) = TableStyle::Comma; @@ -1368,17 +1373,17 @@ void GetInputTabularStyle(EnergyPlusData &state) ort->unitsStyle_Tabular = SetUnitsStyleFromString(AlphArray(2)); if (ort->unitsStyle_Tabular == UnitsStyle::NotFound) { ShowWarningError(state, - EnergyPlus::format("{}: Invalid {}=\"{}\". No unit conversion will be performed. Normal SI units will be shown.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(2), - AlphArray(2))); + std::format("{}: Invalid {}=\"{}\". No unit conversion will be performed. Normal SI units will be shown.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(2), + AlphArray(2))); } } else { ort->unitsStyle_Tabular = UnitsStyle::None; AlphArray(2) = "None"; } } else if (NumTabularStyle > 1) { - ShowWarningError(state, EnergyPlus::format("{}: Only one instance of this object is allowed. Commas will be used.", CurrentModuleObject)); + ShowWarningError(state, std::format("{}: Only one instance of this object is allowed. Commas will be used.", CurrentModuleObject)); ort->TableStyle = TableStyle::Comma; ort->del = std::string(1, DataStringGlobals::CharComma); // comma AlphArray(1) = "COMMA"; @@ -1690,14 +1695,14 @@ void GetInputOutputTableSummaryReports(EnergyPlusData &state) } if (!nameFound) { if (Util::SameString(AlphArray(iReport), "Standard62.1Summary")) { - ShowWarningError( - state, EnergyPlus::format("{} Field[{}]=\"Standard62.1Summary\", Report is not enabled.", CurrentModuleObject, iReport)); + ShowWarningError(state, + std::format("{} Field[{}]=\"Standard62.1Summary\", Report is not enabled.", CurrentModuleObject, iReport)); ShowContinueError(state, "Do Zone Sizing or Do System Sizing must be enabled in SimulationControl."); } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} Field[{}]=\"{}\", invalid report name -- will not be reported.", CurrentModuleObject, iReport, AlphArray(iReport))); // ErrorsFound=.TRUE. } @@ -1705,11 +1710,11 @@ void GetInputOutputTableSummaryReports(EnergyPlusData &state) } CreatePredefinedMonthlyReports(state); } else if (NumTabularPredefined > 1) { - ShowSevereError(state, EnergyPlus::format("{}: Only one instance of this object is allowed.", CurrentModuleObject)); + ShowSevereError(state, std::format("{}: Only one instance of this object is allowed.", CurrentModuleObject)); ErrorsFound = true; } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}: Preceding errors cause termination.", CurrentModuleObject)); + ShowFatalError(state, std::format("{}: Preceding errors cause termination.", CurrentModuleObject)); } // if the BEPS report has been called for than initialize its arrays if (ort->displayTabularBEPS || ort->displayDemandEndUse || ort->displaySourceEnergyEndUseSummary || ort->displayLEEDSummary) { @@ -1775,28 +1780,28 @@ void GetInputOutputTableSummaryReports(EnergyPlusData &state) // loop through all of the resources and end uses and sub end uses for the entire facility for (int iResource = 1; iResource <= numResourceTypes; ++iResource) { - std::string meterName = EnergyPlus::format("{}:FACILITY", ort->resourceTypeNames(iResource)); + std::string meterName = std::format("{}:FACILITY", ort->resourceTypeNames(iResource)); int meterNumber = GetMeterIndex(state, Util::makeUPPER(meterName)); ort->meterNumTotalsBEPS(iResource) = meterNumber; for (int jEndUse = 1; jEndUse <= static_cast(Constant::EndUse::Num); ++jEndUse) { - meterName = EnergyPlus::format("{}:{}", ort->endUseNames(jEndUse), ort->resourceTypeNames(iResource)); //// ':FACILITY' + meterName = std::format("{}:{}", ort->endUseNames(jEndUse), ort->resourceTypeNames(iResource)); //// ':FACILITY' meterNumber = GetMeterIndex(state, Util::makeUPPER(meterName)); ort->meterNumEndUseBEPS(iResource, jEndUse) = meterNumber; for (int kEndUseSub = 1; kEndUseSub <= op->EndUseCategory(jEndUse).NumSubcategories; ++kEndUseSub) { - meterName = EnergyPlus::format("{}:{}:{}", - op->EndUseCategory(jEndUse).SubcategoryName(kEndUseSub), - ort->endUseNames(jEndUse), - ort->resourceTypeNames(iResource)); + meterName = std::format("{}:{}:{}", + op->EndUseCategory(jEndUse).SubcategoryName(kEndUseSub), + ort->endUseNames(jEndUse), + ort->resourceTypeNames(iResource)); meterNumber = GetMeterIndex(state, Util::makeUPPER(meterName)); ort->meterNumEndUseSubBEPS(kEndUseSub, jEndUse, iResource) = meterNumber; } for (int kEndUseSpType = 1; kEndUseSpType <= op->EndUseCategory(jEndUse).numSpaceTypes; ++kEndUseSpType) { - meterName = EnergyPlus::format("{}:{}:SpaceType:{}", - ort->endUseNames(jEndUse), - ort->resourceTypeNames(iResource), - op->EndUseCategory(jEndUse).spaceTypeName(kEndUseSpType)); + meterName = std::format("{}:{}:SpaceType:{}", + ort->endUseNames(jEndUse), + ort->resourceTypeNames(iResource), + op->EndUseCategory(jEndUse).spaceTypeName(kEndUseSpType)); meterNumber = GetMeterIndex(state, Util::makeUPPER(meterName)); ort->meterNumEndUseSpTypeBEPS(kEndUseSpType, jEndUse, iResource) = meterNumber; } @@ -1804,7 +1809,7 @@ void GetInputOutputTableSummaryReports(EnergyPlusData &state) } for (int iResource = 1; iResource <= numSourceTypes; ++iResource) { - int const meterNumber = GetMeterIndex(state, Util::makeUPPER(EnergyPlus::format("{}Emissions:Source", ort->sourceTypeNames(iResource)))); + int const meterNumber = GetMeterIndex(state, Util::makeUPPER(std::format("{}Emissions:Source", ort->sourceTypeNames(iResource)))); ort->meterNumTotalsSource(iResource) = meterNumber; } @@ -2075,17 +2080,17 @@ void InitializePredefinedMonthlyTitles(EnergyPlusData &state) if (numNamedMonthly != NumMonthlyReports) { ShowFatalError( state, - EnergyPlus::format("InitializePredefinedMonthlyTitles: Number of Monthly Reports in OutputReportTabular=[{}] does not match number in " - "DataOutputs=[{}].", - numNamedMonthly, - NumMonthlyReports)); + std::format("InitializePredefinedMonthlyTitles: Number of Monthly Reports in OutputReportTabular=[{}] does not match number in " + "DataOutputs=[{}].", + numNamedMonthly, + NumMonthlyReports)); } else { for (int xcount = 1; xcount <= numNamedMonthly; ++xcount) { if (!Util::SameString(MonthlyNamedReports(xcount), ort->namedMonthly(xcount).title)) { ShowSevereError(state, "InitializePredefinedMonthlyTitles: Monthly Report Titles in OutputReportTabular do not match titles in DataOutput."); - ShowContinueError(state, EnergyPlus::format("first mismatch at ORT [{}] =\"{}\".", numNamedMonthly, ort->namedMonthly(xcount).title)); - ShowContinueError(state, EnergyPlus::format("same location in DO =\"{}\".", MonthlyNamedReports(xcount))); + ShowContinueError(state, std::format("first mismatch at ORT [{}] =\"{}\".", numNamedMonthly, ort->namedMonthly(xcount).title)); + ShowContinueError(state, std::format("same location in DO =\"{}\".", MonthlyNamedReports(xcount))); ShowFatalError(state, "Preceding condition causes termination."); } } @@ -3336,15 +3341,15 @@ void WriteTableOfContents(EnergyPlusData &state) int const curTable = ort->OutputTableBinned(iInput).resIndex + (jTable - 1); std::string curName; if (ort->ip()) { - std::string origName = EnergyPlus::format("{} [{}]", - ort->OutputTableBinned(iInput).varOrMeter, - Constant::unitNames[(int)ort->OutputTableBinned(iInput).units]); + std::string origName = std::format("{} [{}]", + ort->OutputTableBinned(iInput).varOrMeter, + Constant::unitNames[(int)ort->OutputTableBinned(iInput).units]); [[maybe_unused]] int indexUnitConv = -1; LookupSItoIP(state, origName, indexUnitConv, curName); } else { - curName = EnergyPlus::format("{}[{}]", - ort->OutputTableBinned(iInput).varOrMeter, - Constant::unitNames[(int)ort->OutputTableBinned(iInput).units]); + curName = std::format("{}[{}]", + ort->OutputTableBinned(iInput).varOrMeter, + Constant::unitNames[(int)ort->OutputTableBinned(iInput).units]); } if (ort->OutputTableBinned(iInput).sched == nullptr) { tbl_stream << "BinObjVarID(curTable).namesOfObj) << "\">" @@ -3396,7 +3401,7 @@ void AddTOCReportPeriod(const int nReportPeriods, { static std::string const Entire_Facility("Entire Facility"); for (int i = 1; i <= nReportPeriods; i++) { - std::string ReportPeriod_Resilience_Summary = fmt::format("{} Resilience Summary for Reporting Period {}: {} {}", + std::string ReportPeriod_Resilience_Summary = std::format("{} Resilience Summary for Reporting Period {}: {} {}", kw, i, ReportPeriodInputData(i).title, @@ -7210,8 +7215,8 @@ void WriteMonthlyTables(EnergyPlusData &state) // do the unit conversions if (currentStyle.unitsStyle == OutputReportTabular::UnitsStyle::InchPound || currentStyle.unitsStyle == OutputReportTabular::UnitsStyle::InchPoundExceptElectricity) { - varNameWithUnits = EnergyPlus::format( - "{} [{}]", ort->MonthlyColumns(curCol).varName, Constant::unitNames[(int)ort->MonthlyColumns(curCol).units]); + varNameWithUnits = + std::format("{} [{}]", ort->MonthlyColumns(curCol).varName, Constant::unitNames[(int)ort->MonthlyColumns(curCol).units]); LookupSItoIP(state, varNameWithUnits, indexUnitConv, curUnits); GetUnitConversion(state, indexUnitConv, curConversionFactor, state.dataOutRptTab->curConversionOffset, curUnits); } else if (Util::SameString(Constant::unitNames[(int)ort->MonthlyColumns(curCol).units], "J")) { @@ -7575,8 +7580,8 @@ void WriteTimeBinTables(EnergyPlusData &state) for (int iInObj = 1; iInObj <= ort->OutputTableBinnedCount; ++iInObj) { int const firstReport = ort->OutputTableBinned(iInObj).resIndex; - curNameWithSIUnits = EnergyPlus::format( - "{} [{}]", ort->OutputTableBinned(iInObj).varOrMeter, Constant::unitNames[(int)ort->OutputTableBinned(iInObj).units]); + curNameWithSIUnits = + std::format("{} [{}]", ort->OutputTableBinned(iInObj).varOrMeter, Constant::unitNames[(int)ort->OutputTableBinned(iInObj).units]); Real64 curIntervalStart; Real64 curIntervalSize; int indexUnitConv = -1; @@ -7613,7 +7618,7 @@ void WriteTimeBinTables(EnergyPlusData &state) tableBody(1, 1) = "less than"; tableBody(1, 2) = RealToStr(currentStyle.formatReals, curIntervalStart, numIntervalDigits); for (int nCol = 1; nCol <= curIntervalCount; ++nCol) { - columnHead(nCol + 1) = fmt::format("{} [hr]", nCol); + columnHead(nCol + 1) = std::format("{} [hr]", nCol); // beginning of interval tableBody(nCol + 1, 1) = RealToStr(currentStyle.formatReals, curIntervalStart + (nCol - 1) * curIntervalSize, numIntervalDigits) + "<="; @@ -11727,16 +11732,15 @@ void WriteVeriSumTable(EnergyPlusData &state) // wallAreaE + wallAreaW),3)))//, &, //, //, &, //, TRIM(ADJUSTL(RealToStr(currentStyle.formatReals, // SUM(Zone(1:NumOfZones)%ExtGrossWallArea_Multiplied),3)))//', m2.'), ShowContinueError(state, "Check classes of surfaces // and tilts for discrepancies.")); - ShowContinueError( - state, - EnergyPlus::format("Total wall area by ASHRAE 90.1 definition={} m2.", - stripped(RealToStr(currentStyle.formatReals, (wallAreaN + wallAreaS + wallAreaE + wallAreaW), 3)))); ShowContinueError(state, - EnergyPlus::format("Total exterior wall area from user entered classes={} m2.", - stripped(RealToStr(currentStyle.formatReals, totExtGrossWallArea_Multiplied, 3)))); + std::format("Total wall area by ASHRAE 90.1 definition={} m2.", + stripped(RealToStr(currentStyle.formatReals, (wallAreaN + wallAreaS + wallAreaE + wallAreaW), 3)))); + ShowContinueError(state, + std::format("Total exterior wall area from user entered classes={} m2.", + stripped(RealToStr(currentStyle.formatReals, totExtGrossWallArea_Multiplied, 3)))); ShowContinueError(state, - EnergyPlus::format("Total ground contact wall area from user entered classes={} m2.", - stripped(RealToStr(currentStyle.formatReals, totExtGrossGroundWallArea_Multiplied, 3)))); + std::format("Total ground contact wall area from user entered classes={} m2.", + stripped(RealToStr(currentStyle.formatReals, totExtGrossGroundWallArea_Multiplied, 3)))); } } } @@ -12438,9 +12442,9 @@ void WriteAdaptiveComfortTable(EnergyPlusData &state) std::string formatReportPeriodTimestamp(const int year, const int month, const int day, const int hour) { if (year != 0) { - return fmt::format("{}/{}/{} {}:00", year, month, day, hour); + return std::format("{}/{}/{} {}:00", year, month, day, hour); } - return fmt::format("{}/{} {}:00", month, day, hour); + return std::format("{}/{} {}:00", month, day, hour); } void WriteReportHeaderReportingPeriod(EnergyPlusData &state, @@ -12450,7 +12454,7 @@ void WriteReportHeaderReportingPeriod(EnergyPlusData &state, { WriteReportHeaders( state, - fmt::format("{} Resilience Summary for Reporting Period {}: {}", reportKeyWord, periodIdx, ReportPeriodInputData(periodIdx).title), + std::format("{} Resilience Summary for Reporting Period {}: {}", reportKeyWord, periodIdx, ReportPeriodInputData(periodIdx).title), "Entire Facility", OutputProcessor::StoreType::Average); @@ -12680,9 +12684,9 @@ void WriteThermalResilienceTablesRepPeriod(EnergyPlusData &state, int const peri if (ort->displayThermalResilienceSummaryExplicitly) { ShowWarningError( state, - EnergyPlus::format("Writing Reporting Period Thermal Resilience Summary - SET Degree-Hours reports: Zone Thermal Comfort " - "Pierce Model Standard Effective Temperature is required, but no Pierce model is defined in {} object.", - state.dataHeatBal->People(iPeople).Name)); + std::format("Writing Reporting Period Thermal Resilience Summary - SET Degree-Hours reports: Zone Thermal Comfort " + "Pierce Model Standard Effective Temperature is required, but no Pierce model is defined in {} object.", + state.dataHeatBal->People(iPeople).Name)); } } } @@ -13511,9 +13515,9 @@ void WriteThermalResilienceTables(EnergyPlusData &state) if (ort->displayThermalResilienceSummaryExplicitly) { ShowWarningError( state, - EnergyPlus::format("Writing Annual Thermal Resilience Summary - SET Degree-Hours reports: Zone Thermal Comfort Pierce Model " - "Standard Effective Temperature is required, but no Pierce model is defined in {} object.", - state.dataHeatBal->People(iPeople).Name)); + std::format("Writing Annual Thermal Resilience Summary - SET Degree-Hours reports: Zone Thermal Comfort Pierce Model " + "Standard Effective Temperature is required, but no Pierce model is defined in {} object.", + state.dataHeatBal->People(iPeople).Name)); } } } @@ -13758,9 +13762,9 @@ void WriteVisualResilienceTables(EnergyPlusData &state) if (state.dataOutRptTab->displayVisualResilienceSummaryExplicitly) { ShowWarningError( state, - EnergyPlus::format("Writing Annual Visual Resilience Summary - Lighting Level Hours reports: Zone Average Daylighting Reference " - "Point Illuminance output is required, but no Daylighting Controls are defined in Zone:{}", - state.dataHeatBal->Zone(ZoneNum).Name)); + std::format("Writing Annual Visual Resilience Summary - Lighting Level Hours reports: Zone Average Daylighting Reference " + "Point Illuminance output is required, but no Daylighting Controls are defined in Zone:{}", + state.dataHeatBal->Zone(ZoneNum).Name)); } } } @@ -14150,7 +14154,7 @@ void WritePredefinedTables(EnergyPlusData &state) value, state.dataOutRptPredefined->tableEntry(lTableEntry).significantDigits); } else { - tableBody(colCurrent, rowCurrent) = EnergyPlus::format("{}", value); + tableBody(colCurrent, rowCurrent) = std::format("{}", value); } } else { tableBody(colCurrent, rowCurrent) = state.dataOutRptPredefined->tableEntry(lTableEntry).charEntry; @@ -16426,10 +16430,10 @@ void CollectPeakZoneConditions(EnergyPlusData &state, if (isCooling) { // Time of Peak Load if ((desDaySelected > 0) && ((size_t)desDaySelected <= state.dataWeather->DesDayInput.size())) { - compLoad.peakDateHrMin = EnergyPlus::format("{}/{} {}", - state.dataWeather->DesDayInput(desDaySelected).Month, - state.dataWeather->DesDayInput(desDaySelected).DayOfMonth, - ReportCoilSelection::getTimeText(state, timeOfMax)); + compLoad.peakDateHrMin = std::format("{}/{} {}", + state.dataWeather->DesDayInput(desDaySelected).Month, + state.dataWeather->DesDayInput(desDaySelected).DayOfMonth, + ReportCoilSelection::getTimeText(state, timeOfMax)); } else { compLoad.peakDateHrMin = szCalcFinalSizing.CoolPeakDateHrMin; } @@ -16478,10 +16482,10 @@ void CollectPeakZoneConditions(EnergyPlusData &state, } else { // Time of Peak Load if ((size_t)desDaySelected <= state.dataWeather->DesDayInput.size()) { - compLoad.peakDateHrMin = EnergyPlus::format("{}/{} {}", - state.dataWeather->DesDayInput(desDaySelected).Month, - state.dataWeather->DesDayInput(desDaySelected).DayOfMonth, - ReportCoilSelection::getTimeText(state, timeOfMax)); + compLoad.peakDateHrMin = std::format("{}/{} {}", + state.dataWeather->DesDayInput(desDaySelected).Month, + state.dataWeather->DesDayInput(desDaySelected).DayOfMonth, + ReportCoilSelection::getTimeText(state, timeOfMax)); } else { compLoad.peakDateHrMin = szCalcFinalSizing.HeatPeakDateHrMin; } @@ -17231,7 +17235,7 @@ void OutputCompLoadSummary(EnergyPlusData &state, rowHead(6) = "Number of People"; } - tableBody(1, 1) = fmt::format("{:.{}f}", curCompLoad.outsideAirRatio, 4); // outside Air + tableBody(1, 1) = std::format("{:.{}f}", curCompLoad.outsideAirRatio, 4); // outside Air tableBody(1, 2) = fmt::format("{:0.3E}", curCompLoad.airflowPerFlrArea); // airflow per floor area tableBody(1, 3) = fmt::format("{:0.3E}", curCompLoad.airflowPerTotCap); // airflow per total capacity tableBody(1, 4) = fmt::format("{:0.3E}", curCompLoad.areaPerTotCap); // area per total capacity @@ -17579,7 +17583,7 @@ void WriteTable(EnergyPlusData &state, tbl_stream << InsertCurrencySymbol(state, outputLine, false) << '\n'; } if (!footnoteText.empty()) { - tbl_stream << fmt::format("{}\n", footnoteText); + tbl_stream << std::format("{}\n", footnoteText); } tbl_stream << "\n\n"; @@ -17628,7 +17632,7 @@ void WriteTable(EnergyPlusData &state, tbl_stream << InsertCurrencySymbol(state, outputLine, false) << '\n'; } if (!footnoteText.empty()) { - tbl_stream << fmt::format("{}\n", footnoteText); + tbl_stream << std::format("{}\n", footnoteText); } tbl_stream << "\n\n"; @@ -17670,7 +17674,7 @@ void WriteTable(EnergyPlusData &state, // end the table tbl_stream << "\n"; if (!footnoteText.empty()) { - tbl_stream << fmt::format("
{}
\n", footnoteText); + tbl_stream << std::format("
{}
\n", footnoteText); } tbl_stream << "

\n"; } else if (thisStyle == TableStyle::XML) { @@ -17801,9 +17805,9 @@ void WriteTable(EnergyPlusData &state, } if (!footnoteText.empty()) { if (footnoteText.find("\n", footnoteText); + tbl_stream << std::format(" \n", footnoteText); } else { - tbl_stream << fmt::format(" {}\n", footnoteText); + tbl_stream << std::format(" {}\n", footnoteText); } } } @@ -18593,7 +18597,7 @@ std::string RealToStr(bool const formatReals, Real64 const RealIn, int const num if (!formatReals) { // No rounding - return EnergyPlus::format("{}", RealIn); + return std::format("{}", RealIn); } int nDigits = numDigits; if (RealIn < 0.0) { @@ -18607,7 +18611,7 @@ std::string RealToStr(bool const formatReals, Real64 const RealIn, int const num } if (std::abs(RealIn) > maxvalDigitsA.at(nDigits)) { - return EnergyPlus::format("{:12.6E}", RealIn); + return std::format("{:12.6E}", RealIn); } return format(formDigitsA.at(nDigits), RealIn); @@ -18656,10 +18660,10 @@ std::string DateToString(int const codedDate) // word containing encoded month, // Convert the coded date format into a usable // string - int Month; // month in integer format (1-12) - int Day; // day in integer format (1-31) - int Hour; // hour in integer format (1-24) - int Minute; // minute in integer format (0:59) + int Month; // month in integer EnergyPlus::format(1-12) + int Day; // day in integer EnergyPlus::format(1-31) + int Hour; // hour in integer EnergyPlus::format(1-24) + int Minute; // minute in integer EnergyPlus::format(0:59) static constexpr std::array Months{"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"}; if (codedDate == 0) { @@ -18677,7 +18681,7 @@ std::string DateToString(int const codedDate) // word containing encoded month, Minute = 0; } - return fmt::format("{:02}-{:3}-{:02}:{:02}", Day, Months[Month - 1], Hour, Minute); + return std::format("{:02}-{:3}-{:02}:{:02}", Day, Months[Month - 1], Hour, Minute); } bool isNumber(std::string const &s) @@ -19404,7 +19408,7 @@ void LookupSItoIP(EnergyPlusData &state, std::string const &stringInWithSI, int // Add warning if units not found. if (unitConvIndex == 0 && !noBrackets) { - ShowWarningError(state, EnergyPlus::format("Unable to find a unit conversion from {} into IP units", stringInWithSI)); + ShowWarningError(state, std::format("Unable to find a unit conversion from {} into IP units", stringInWithSI)); ShowContinueError(state, "Applying default conversion factor of 1.0"); } } @@ -19641,7 +19645,7 @@ Real64 getSpecificUnitMultiplier(EnergyPlusData &state, std::string const &SIuni if (state.dataOutRptTab->foundGsum != 0) { getSpecificUnitMultiplier = ort->UnitConv(state.dataOutRptTab->foundGsum).mult; } else { - ShowWarningError(state, EnergyPlus::format("Unable to find a unit conversion from {} to {}", SIunit, IPunit)); + ShowWarningError(state, std::format("Unable to find a unit conversion from {} to {}", SIunit, IPunit)); ShowContinueError(state, "Applying default conversion factor of 1.0"); getSpecificUnitMultiplier = 1.0; } @@ -19696,7 +19700,7 @@ Real64 getSpecificUnitDivider(EnergyPlusData &state, std::string const &SIunit, if (mult != 0) { getSpecificUnitDivider = 1 / mult; } else { - ShowWarningError(state, EnergyPlus::format("Unable to find a unit conversion from {} to {}", SIunit, IPunit)); + ShowWarningError(state, std::format("Unable to find a unit conversion from {} to {}", SIunit, IPunit)); ShowContinueError(state, "Applying default conversion factor of 1.0"); getSpecificUnitDivider = 1.0; } diff --git a/src/EnergyPlus/OutputReports.cc b/src/EnergyPlus/OutputReports.cc index 9b978275ae7..82be7a4c1bd 100644 --- a/src/EnergyPlus/OutputReports.cc +++ b/src/EnergyPlus/OutputReports.cc @@ -408,7 +408,7 @@ static void WriteDXFCommon(EnergyPlusData &state, InputOutputFile &of, const std print(of, Format_710, "Zone Names"); for (int zones = 1; zones <= state.dataGlobal->NumOfZones; ++zones) { - print(of, Format_710, fmt::format("Zone={}:{}", zones, normalizeName(state.dataHeatBal->Zone(zones).Name))); + print(of, Format_710, EnergyPlus::format("Zone={}:{}", zones, normalizeName(state.dataHeatBal->Zone(zones).Name))); } } diff --git a/src/EnergyPlus/PVWatts.cc b/src/EnergyPlus/PVWatts.cc index 424f65b5251..297d2455562 100644 --- a/src/EnergyPlus/PVWatts.cc +++ b/src/EnergyPlus/PVWatts.cc @@ -49,7 +49,12 @@ #include #include -// ObjexxFCL Headers +// Third Party Headers +// #include <../third_party/ssc/shared/lib_irradproc.h> +// #include <../third_party/ssc/shared/lib_pv_incidence_modifier.h> +// #include <../third_party/ssc/shared/lib_pvshade.h> +// #include <../third_party/ssc/shared/lib_pvwatts.h> +#include <../third_party/ssc/ssc/sscapi.h> // EnergyPlus Headers #include @@ -65,13 +70,6 @@ #include #include -// SAM Headers -// #include <../third_party/ssc/shared/lib_irradproc.h> -// #include <../third_party/ssc/shared/lib_pvwatts.h> -// #include <../third_party/ssc/shared/lib_pvshade.h> -// #include <../third_party/ssc/shared/lib_pv_incidence_modifier.h> -#include <../third_party/ssc/ssc/sscapi.h> - namespace EnergyPlus { namespace PVWatts { diff --git a/src/EnergyPlus/PackagedThermalStorageCoil.cc b/src/EnergyPlus/PackagedThermalStorageCoil.cc index 6419c17df47..d878370d384 100644 --- a/src/EnergyPlus/PackagedThermalStorageCoil.cc +++ b/src/EnergyPlus/PackagedThermalStorageCoil.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -426,12 +427,11 @@ void GetTESCoilInput(EnergyPlusData &state) if (thisTESCoil.CoolingOnlyCapFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(12)) { ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(12))); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(12))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(12), state.dataIPShortCut->cAlphaArgs(12))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(12), state.dataIPShortCut->cAlphaArgs(12))); } ErrorsFound = true; } else { @@ -448,13 +448,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingOnlyEIRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(13)); if (thisTESCoil.CoolingOnlyEIRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(13)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(13))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(13))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(13), state.dataIPShortCut->cAlphaArgs(13))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(13), state.dataIPShortCut->cAlphaArgs(13))); } ErrorsFound = true; } else { @@ -471,13 +470,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingOnlyEIRFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(14)); if (thisTESCoil.CoolingOnlyEIRFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(14)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(14))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(14))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(14), state.dataIPShortCut->cAlphaArgs(14))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(14), state.dataIPShortCut->cAlphaArgs(14))); } ErrorsFound = true; } else { @@ -494,13 +492,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingOnlyPLFFPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(15)); if (thisTESCoil.CoolingOnlyPLFFPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(15)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(15))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(15))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(15), state.dataIPShortCut->cAlphaArgs(15))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(15), state.dataIPShortCut->cAlphaArgs(15))); } ErrorsFound = true; } else { @@ -517,13 +514,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingOnlySHRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(16)); if (thisTESCoil.CoolingOnlySHRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(16)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(16))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(16))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(16), state.dataIPShortCut->cAlphaArgs(16))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(16), state.dataIPShortCut->cAlphaArgs(16))); } ErrorsFound = true; } else { @@ -540,13 +536,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingOnlySHRFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(17)); if (thisTESCoil.CoolingOnlySHRFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(17)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(17))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(17))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(17), state.dataIPShortCut->cAlphaArgs(17))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(17), state.dataIPShortCut->cAlphaArgs(17))); } ErrorsFound = true; } else { @@ -569,9 +564,8 @@ void GetTESCoilInput(EnergyPlusData &state) break; default: thisTESCoil.CoolingAndChargeModeAvailable = false; - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(18), state.dataIPShortCut->cAlphaArgs(18))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(18), state.dataIPShortCut->cAlphaArgs(18))); ShowContinueError(state, "Available choices are Yes or No."); ErrorsFound = true; } @@ -592,13 +586,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeCoolingCapFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(19)); if (thisTESCoil.CoolingAndChargeCoolingCapFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(19)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(19))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(19))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(19), state.dataIPShortCut->cAlphaArgs(19))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(19), state.dataIPShortCut->cAlphaArgs(19))); } ErrorsFound = true; } else { @@ -615,13 +608,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeCoolingCapFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(20)); if (thisTESCoil.CoolingAndChargeCoolingCapFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(20)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(20))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(20))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(20), state.dataIPShortCut->cAlphaArgs(20))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(20), state.dataIPShortCut->cAlphaArgs(20))); } ErrorsFound = true; } else { @@ -637,13 +629,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeCoolingEIRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(21)); if (thisTESCoil.CoolingAndChargeCoolingEIRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(21)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(21))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(21))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(21), state.dataIPShortCut->cAlphaArgs(21))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(21), state.dataIPShortCut->cAlphaArgs(21))); } ErrorsFound = true; } else { @@ -660,13 +651,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeCoolingEIRFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(22)); if (thisTESCoil.CoolingAndChargeCoolingEIRFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(22)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(22))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(22))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(22), state.dataIPShortCut->cAlphaArgs(22))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(22), state.dataIPShortCut->cAlphaArgs(22))); } ErrorsFound = true; } else { @@ -683,13 +673,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeCoolingPLFFPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(23)); if (thisTESCoil.CoolingAndChargeCoolingPLFFPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(23)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(23))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(23))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(23), state.dataIPShortCut->cAlphaArgs(23))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(23), state.dataIPShortCut->cAlphaArgs(23))); } ErrorsFound = true; } else { @@ -706,13 +695,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeChargingCapFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(24)); if (thisTESCoil.CoolingAndChargeChargingCapFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(24)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(24))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(24))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(24), state.dataIPShortCut->cAlphaArgs(24))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(24), state.dataIPShortCut->cAlphaArgs(24))); } ErrorsFound = true; } else { @@ -729,13 +717,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeChargingCapFEvapPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(25)); if (thisTESCoil.CoolingAndChargeChargingCapFEvapPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(25)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(25))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(25))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(25), state.dataIPShortCut->cAlphaArgs(25))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(25), state.dataIPShortCut->cAlphaArgs(25))); } ErrorsFound = true; } else { @@ -752,13 +739,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeChargingEIRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(26)); if (thisTESCoil.CoolingAndChargeChargingEIRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(26)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(26))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(26))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(26), state.dataIPShortCut->cAlphaArgs(26))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(26), state.dataIPShortCut->cAlphaArgs(26))); } ErrorsFound = true; } else { @@ -775,13 +761,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeChargingEIRFFLowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(27)); if (thisTESCoil.CoolingAndChargeChargingEIRFFLowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(27)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(27))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(27))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(27), state.dataIPShortCut->cAlphaArgs(27))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(27), state.dataIPShortCut->cAlphaArgs(27))); } ErrorsFound = true; } else { @@ -798,13 +783,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeChargingPLFFPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(28)); if (thisTESCoil.CoolingAndChargeChargingPLFFPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(28)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(28))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(28))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(28), state.dataIPShortCut->cAlphaArgs(28))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(28), state.dataIPShortCut->cAlphaArgs(28))); } ErrorsFound = true; } else { @@ -821,13 +805,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeSHRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(29)); if (thisTESCoil.CoolingAndChargeSHRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(29)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(29))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(29))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(29), state.dataIPShortCut->cAlphaArgs(29))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(29), state.dataIPShortCut->cAlphaArgs(29))); } ErrorsFound = true; } else { @@ -844,13 +827,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndChargeSHRFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(30)); if (thisTESCoil.CoolingAndChargeSHRFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(30)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(30))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(30))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(30), state.dataIPShortCut->cAlphaArgs(30))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(30), state.dataIPShortCut->cAlphaArgs(30))); } ErrorsFound = true; } else { @@ -874,9 +856,8 @@ void GetTESCoilInput(EnergyPlusData &state) break; default: thisTESCoil.CoolingAndDischargeModeAvailable = false; - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(31), state.dataIPShortCut->cAlphaArgs(31))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(31), state.dataIPShortCut->cAlphaArgs(31))); ShowContinueError(state, "Available choices are Yes or No."); ErrorsFound = true; } @@ -897,13 +878,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeCoolingCapFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(32)); if (thisTESCoil.CoolingAndDischargeCoolingCapFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(32)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(32))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(32))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(32), state.dataIPShortCut->cAlphaArgs(32))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(32), state.dataIPShortCut->cAlphaArgs(32))); } ErrorsFound = true; } else { @@ -920,13 +900,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeCoolingCapFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(33)); if (thisTESCoil.CoolingAndDischargeCoolingCapFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(33)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(33))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(33))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(33), state.dataIPShortCut->cAlphaArgs(33))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(33), state.dataIPShortCut->cAlphaArgs(33))); } ErrorsFound = true; } else { @@ -943,13 +922,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeCoolingEIRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(34)); if (thisTESCoil.CoolingAndDischargeCoolingEIRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(34)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(34))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(34))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(34), state.dataIPShortCut->cAlphaArgs(34))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(34), state.dataIPShortCut->cAlphaArgs(34))); } ErrorsFound = true; } else { @@ -966,13 +944,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeCoolingEIRFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(35)); if (thisTESCoil.CoolingAndDischargeCoolingEIRFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(35)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(35))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(35))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(35), state.dataIPShortCut->cAlphaArgs(35))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(35), state.dataIPShortCut->cAlphaArgs(35))); } ErrorsFound = true; } else { @@ -989,13 +966,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeCoolingPLFFPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(36)); if (thisTESCoil.CoolingAndDischargeCoolingPLFFPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(36)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(36))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(36))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(36), state.dataIPShortCut->cAlphaArgs(36))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(36), state.dataIPShortCut->cAlphaArgs(36))); } ErrorsFound = true; } else { @@ -1012,13 +988,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeDischargingCapFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(37)); if (thisTESCoil.CoolingAndDischargeDischargingCapFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(37)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(37))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(37))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(37), state.dataIPShortCut->cAlphaArgs(37))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(37), state.dataIPShortCut->cAlphaArgs(37))); } ErrorsFound = true; } else { @@ -1035,13 +1010,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeDischargingCapFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(38)); if (thisTESCoil.CoolingAndDischargeDischargingCapFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(38)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(38))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(38))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(38), state.dataIPShortCut->cAlphaArgs(38))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(38), state.dataIPShortCut->cAlphaArgs(38))); } ErrorsFound = true; } else { @@ -1058,13 +1032,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeDischargingCapFEvapPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(39)); if (thisTESCoil.CoolingAndDischargeDischargingCapFEvapPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(39)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(39))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(39))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(39), state.dataIPShortCut->cAlphaArgs(39))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(39), state.dataIPShortCut->cAlphaArgs(39))); } ErrorsFound = true; } else { @@ -1081,13 +1054,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeDischargingEIRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(40)); if (thisTESCoil.CoolingAndDischargeDischargingEIRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(40)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(40))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(40))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(40), state.dataIPShortCut->cAlphaArgs(40))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(40), state.dataIPShortCut->cAlphaArgs(40))); } ErrorsFound = true; } else { @@ -1104,13 +1076,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeDischargingEIRFFLowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(41)); if (thisTESCoil.CoolingAndDischargeDischargingEIRFFLowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(41)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(41))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(41))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(41), state.dataIPShortCut->cAlphaArgs(41))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(41), state.dataIPShortCut->cAlphaArgs(41))); } ErrorsFound = true; } else { @@ -1127,13 +1098,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeDischargingPLFFPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(42)); if (thisTESCoil.CoolingAndDischargeDischargingPLFFPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(42)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(42))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(42))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(42), state.dataIPShortCut->cAlphaArgs(42))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(42), state.dataIPShortCut->cAlphaArgs(42))); } ErrorsFound = true; } else { @@ -1150,13 +1120,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeSHRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(43)); if (thisTESCoil.CoolingAndDischargeSHRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(43)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(43))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(43))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(43), state.dataIPShortCut->cAlphaArgs(43))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(43), state.dataIPShortCut->cAlphaArgs(43))); } ErrorsFound = true; } else { @@ -1173,13 +1142,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CoolingAndDischargeSHRFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(44)); if (thisTESCoil.CoolingAndDischargeSHRFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(44)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(44))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(44))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(44), state.dataIPShortCut->cAlphaArgs(44))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(44), state.dataIPShortCut->cAlphaArgs(44))); } ErrorsFound = true; } else { @@ -1203,9 +1171,8 @@ void GetTESCoilInput(EnergyPlusData &state) break; default: thisTESCoil.ChargeOnlyModeAvailable = false; - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(45), state.dataIPShortCut->cAlphaArgs(45))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(45), state.dataIPShortCut->cAlphaArgs(45))); ShowContinueError(state, "Available choices are Yes or No."); ErrorsFound = true; } @@ -1219,13 +1186,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.ChargeOnlyChargingCapFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(46)); if (thisTESCoil.ChargeOnlyChargingCapFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(46)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(46))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(46))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(46), state.dataIPShortCut->cAlphaArgs(46))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(46), state.dataIPShortCut->cAlphaArgs(46))); } ErrorsFound = true; } else { @@ -1242,13 +1208,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.ChargeOnlyChargingEIRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(47)); if (thisTESCoil.ChargeOnlyChargingEIRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(47)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(47))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(47))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(47), state.dataIPShortCut->cAlphaArgs(47))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(47), state.dataIPShortCut->cAlphaArgs(47))); } ErrorsFound = true; } else { @@ -1272,9 +1237,8 @@ void GetTESCoilInput(EnergyPlusData &state) break; default: thisTESCoil.DischargeOnlyModeAvailable = false; - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(48), state.dataIPShortCut->cAlphaArgs(48))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("...{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(48), state.dataIPShortCut->cAlphaArgs(48))); ShowContinueError(state, "Available choices are Yes or No."); ErrorsFound = true; } @@ -1288,13 +1252,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.DischargeOnlyCapFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(49)); if (thisTESCoil.DischargeOnlyCapFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(49)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(49))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(49))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(49), state.dataIPShortCut->cAlphaArgs(49))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(49), state.dataIPShortCut->cAlphaArgs(49))); } ErrorsFound = true; } else { @@ -1311,13 +1274,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.DischargeOnlyCapFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(50)); if (thisTESCoil.DischargeOnlyCapFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(50)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(50))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(50))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(50), state.dataIPShortCut->cAlphaArgs(50))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(50), state.dataIPShortCut->cAlphaArgs(50))); } ErrorsFound = true; } else { @@ -1334,13 +1296,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.DischargeOnlyEIRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(51)); if (thisTESCoil.DischargeOnlyEIRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(51)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(51))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(51))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(51), state.dataIPShortCut->cAlphaArgs(51))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(51), state.dataIPShortCut->cAlphaArgs(51))); } ErrorsFound = true; } else { @@ -1357,13 +1318,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.DischargeOnlyEIRFFlowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(52)); if (thisTESCoil.DischargeOnlyEIRFFlowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(52)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(52))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(52))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(52), state.dataIPShortCut->cAlphaArgs(52))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(52), state.dataIPShortCut->cAlphaArgs(52))); } ErrorsFound = true; } else { @@ -1380,13 +1340,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.DischargeOnlyPLFFPLRCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(53)); if (thisTESCoil.DischargeOnlyPLFFPLRCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(53)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(53))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(53))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(53), state.dataIPShortCut->cAlphaArgs(53))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(53), state.dataIPShortCut->cAlphaArgs(53))); } ErrorsFound = true; } else { @@ -1403,13 +1362,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.DischargeOnlySHRFTempCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(54)); if (thisTESCoil.DischargeOnlySHRFTempCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(54)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(54))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(54))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(54), state.dataIPShortCut->cAlphaArgs(54))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(54), state.dataIPShortCut->cAlphaArgs(54))); } ErrorsFound = true; } else { @@ -1426,13 +1384,12 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.DischargeOnlySHRFFLowCurve = GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(55)); if (thisTESCoil.DischargeOnlySHRFFLowCurve == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(55)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(55))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("Required {}is blank.", state.dataIPShortCut->cAlphaFieldNames(55))); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(55), state.dataIPShortCut->cAlphaArgs(55))); + state, std::format("Not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(55), state.dataIPShortCut->cAlphaArgs(55))); } ErrorsFound = true; } else { @@ -1475,9 +1432,8 @@ void GetTESCoilInput(EnergyPlusData &state) thisTESCoil.CondenserType = static_cast(getEnumValue(condenserTypesUC, state.dataIPShortCut->cAlphaArgs(58))); if (thisTESCoil.CondenserType == TESCondenserType::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(58), state.dataIPShortCut->cAlphaArgs(58))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("{}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(58), state.dataIPShortCut->cAlphaArgs(58))); ShowContinueError(state, "Available choices are AirCooled or EvaporativelyCooled."); ErrorsFound = true; } @@ -1549,8 +1505,8 @@ void GetTESCoilInput(EnergyPlusData &state) Node::ObjectIsNotParent); } else { if (thisTESCoil.TESPlantConnectionAvailable) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be blank.", state.dataIPShortCut->cAlphaFieldNames(63))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, cCurrentModuleObject, thisTESCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be blank.", state.dataIPShortCut->cAlphaFieldNames(63))); ErrorsFound = true; } } @@ -1600,8 +1556,7 @@ void GetTESCoilInput(EnergyPlusData &state) if (ErrorsFound) { ShowFatalError( - state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, cCurrentModuleObject)); + state, std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, cCurrentModuleObject)); } // setup reporting @@ -1940,25 +1895,23 @@ void InitTESCoil(EnergyPlusData &state, int &TESCoilNum) if ((DataPlant::CompData::getPlantComponent(state, plantLoc).NodeNumIn != thisTESCoil.TESPlantInletNodeNum) || (DataPlant::CompData::getPlantComponent(state, plantLoc).NodeNumOut != thisTESCoil.TESPlantOutletNodeNum)) { - ShowSevereError(state, - EnergyPlus::format("InitTESCoil: Coil:Cooling:DX:SingleSpeed:ThermalStorage =\"{}\", non-matching plant nodes.", - thisTESCoil.Name)); + ShowSevereError( + state, + std::format("InitTESCoil: Coil:Cooling:DX:SingleSpeed:ThermalStorage =\"{}\", non-matching plant nodes.", thisTESCoil.Name)); ShowContinueError(state, - EnergyPlus::format("...in Branch=\"{}\", Component referenced with:", - state.dataPlnt->PlantLoop(thisTESCoil.TESPlantLoopNum) - .LoopSide(thisTESCoil.TESPlantLoopSideNum) - .Branch(thisTESCoil.TESPlantBranchNum) - .Name)); + std::format("...in Branch=\"{}\", Component referenced with:", + state.dataPlnt->PlantLoop(thisTESCoil.TESPlantLoopNum) + .LoopSide(thisTESCoil.TESPlantLoopSideNum) + .Branch(thisTESCoil.TESPlantBranchNum) + .Name)); ShowContinueError(state, - EnergyPlus::format("...Inlet Node=\"{}", - state.dataLoopNodes->NodeID(DataPlant::CompData::getPlantComponent(state, plantLoc).NodeNumIn))); - ShowContinueError( - state, - EnergyPlus::format("...Outlet Node=\"{}", - state.dataLoopNodes->NodeID(DataPlant::CompData::getPlantComponent(state, plantLoc).NodeNumOut))); - ShowContinueError(state, EnergyPlus::format("...TES Inlet Node=\"{}", state.dataLoopNodes->NodeID(thisTESCoil.TESPlantInletNodeNum))); + std::format("...Inlet Node=\"{}", + state.dataLoopNodes->NodeID(DataPlant::CompData::getPlantComponent(state, plantLoc).NodeNumIn))); ShowContinueError(state, - EnergyPlus::format("...TES Outlet Node=\"{}", state.dataLoopNodes->NodeID(thisTESCoil.TESPlantOutletNodeNum))); + std::format("...Outlet Node=\"{}", + state.dataLoopNodes->NodeID(DataPlant::CompData::getPlantComponent(state, plantLoc).NodeNumOut))); + ShowContinueError(state, std::format("...TES Inlet Node=\"{}", state.dataLoopNodes->NodeID(thisTESCoil.TESPlantInletNodeNum))); + ShowContinueError(state, std::format("...TES Outlet Node=\"{}", state.dataLoopNodes->NodeID(thisTESCoil.TESPlantOutletNodeNum))); errFlag = true; } if (errFlag) { @@ -2034,7 +1987,7 @@ void InitTESCoil(EnergyPlusData &state, int &TESCoilNum) thisTESCoil.CurControlMode = PTSCOperatingMode::Off; if (thisTESCoil.ControlModeErrorIndex == 0) { ShowSevereMessage(state, "InitTESCoil: Invalid control schedule value for operating mode"); - ShowContinueError(state, EnergyPlus::format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); + ShowContinueError(state, std::format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); ShowContinueError(state, EnergyPlus::format("Value returned from schedule ={:.8R}", tmpSchedValue)); ShowContinueError(state, "Operating mode will be set to Off, and the simulation continues"); } @@ -2054,8 +2007,7 @@ void InitTESCoil(EnergyPlusData &state, int &TESCoilNum) thisTESCoil.CurControlMode = PTSCOperatingMode::Off; if (thisTESCoil.ControlModeErrorIndex == 0) { ShowSevereMessage(state, "InitTESCoil: Invalid control value for operating mode"); - ShowContinueError(state, - EnergyPlus::format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); + ShowContinueError(state, std::format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); ShowContinueError(state, EnergyPlus::format("Value returned from EMS ={:.8R}", thisTESCoil.EMSControlModeValue)); ShowContinueError(state, "Operating mode will be set to Off, and the simulation continues"); } @@ -2075,8 +2027,8 @@ void InitTESCoil(EnergyPlusData &state, int &TESCoilNum) case PTSCOperatingMode::CoolingOnly: if (!(thisTESCoil.CoolingOnlyModeIsAvailable)) { ShowSevereMessage(state, "InitTESCoil: Invalid control value for operating mode"); - ShowContinueError( - state, EnergyPlus::format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); + ShowContinueError(state, + std::format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); ShowContinueError(state, "Value returned from EMS indicates Cooling Only Mode but that mode is not available."); ShowContinueError(state, "Operating mode will be set to Off, and the simulation continues"); thisTESCoil.CurControlMode = PTSCOperatingMode::Off; @@ -2085,8 +2037,8 @@ void InitTESCoil(EnergyPlusData &state, int &TESCoilNum) case PTSCOperatingMode::CoolingAndCharge: if (!(thisTESCoil.CoolingAndChargeModeAvailable)) { ShowSevereMessage(state, "InitTESCoil: Invalid control value for operating mode"); - ShowContinueError( - state, EnergyPlus::format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); + ShowContinueError(state, + std::format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); ShowContinueError(state, "Value returned from EMS indicates Cooling And Charge Mode but that mode is not available."); ShowContinueError(state, "Operating mode will be set to Off, and the simulation continues"); thisTESCoil.CurControlMode = PTSCOperatingMode::Off; @@ -2095,8 +2047,8 @@ void InitTESCoil(EnergyPlusData &state, int &TESCoilNum) case PTSCOperatingMode::CoolingAndDischarge: if (!(thisTESCoil.CoolingAndDischargeModeAvailable)) { ShowSevereMessage(state, "InitTESCoil: Invalid control value for operating mode"); - ShowContinueError( - state, EnergyPlus::format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); + ShowContinueError(state, + std::format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); ShowContinueError(state, "Value returned from EMS indicates Cooling And Discharge Mode but that mode is not available."); ShowContinueError(state, "Operating mode will be set to Off, and the simulation continues"); thisTESCoil.CurControlMode = PTSCOperatingMode::Off; @@ -2105,8 +2057,8 @@ void InitTESCoil(EnergyPlusData &state, int &TESCoilNum) case PTSCOperatingMode::ChargeOnly: if (!(thisTESCoil.ChargeOnlyModeAvailable)) { ShowSevereMessage(state, "InitTESCoil: Invalid control value for operating mode"); - ShowContinueError( - state, EnergyPlus::format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); + ShowContinueError(state, + std::format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); ShowContinueError(state, "Value returned from EMS indicates Charge Only Mode but that mode is not available."); ShowContinueError(state, "Operating mode will be set to Off, and the simulation continues"); thisTESCoil.CurControlMode = PTSCOperatingMode::Off; @@ -2115,8 +2067,8 @@ void InitTESCoil(EnergyPlusData &state, int &TESCoilNum) case PTSCOperatingMode::DischargeOnly: if (!(thisTESCoil.DischargeOnlyModeAvailable)) { ShowSevereMessage(state, "InitTESCoil: Invalid control value for operating mode"); - ShowContinueError( - state, EnergyPlus::format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); + ShowContinueError(state, + std::format("Occurs for Coil:Cooling:DX:SingleSpeed:ThermalStorage name = {}", thisTESCoil.Name)); ShowContinueError(state, "Value returned from EMS indicates Discharge Only Mode but that mode is not available."); ShowContinueError(state, "Operating mode will be set to Off, and the simulation continues"); thisTESCoil.CurControlMode = PTSCOperatingMode::Off; @@ -4301,9 +4253,9 @@ void GetTESCoilIndex( if (CoilIndex == 0) { if (!CurrentModuleObject.empty()) { - ShowSevereError(state, fmt::format("{}, GetTESCoilIndex: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); + ShowSevereError(state, std::format("{}, GetTESCoilIndex: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); } else { - ShowSevereError(state, EnergyPlus::format("GetTESCoilIndex: TES Cooling Coil not found={}", CoilName)); + ShowSevereError(state, std::format("GetTESCoilIndex: TES Cooling Coil not found={}", CoilName)); } ErrorsFound = true; } @@ -4340,7 +4292,7 @@ void GetTESCoilAirInletNode( } if (CoilIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{}, GetTESCoilAirInletNode: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); + ShowSevereError(state, std::format("{}, GetTESCoilAirInletNode: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); ErrorsFound = true; CoilAirInletNode = 0; } else { @@ -4379,7 +4331,7 @@ void GetTESCoilAirOutletNode( } if (CoilIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{}, GetTESCoilAirOutletNode: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); + ShowSevereError(state, std::format("{}, GetTESCoilAirOutletNode: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); ErrorsFound = true; CoilAirOutletNode = 0; } else { @@ -4418,7 +4370,7 @@ void GetTESCoilCoolingCapacity( } if (CoilIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{}, GetTESCoilCoolingCapacity: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); + ShowSevereError(state, std::format("{}, GetTESCoilCoolingCapacity: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); ErrorsFound = true; CoilCoolCapacity = 0.0; } else { @@ -4465,7 +4417,7 @@ void GetTESCoilCoolingAirFlowRate( } if (CoilIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{}, GetTESCoilCoolingCapacity: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); + ShowSevereError(state, std::format("{}, GetTESCoilCoolingCapacity: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); ErrorsFound = true; CoilCoolAirFlow = 0.0; } else { diff --git a/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.cc b/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.cc index cc14a14ff24..007911d70d1 100644 --- a/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.cc +++ b/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.cc @@ -45,8 +45,10 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// ObjexxFCL Headers #include +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index 8e106a03da8..10177b50109 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include #include // ObjexxFCL Headers @@ -122,7 +123,7 @@ namespace PhotovoltaicThermalCollectors { } // If we didn't find it, fatal - ShowFatalError(state, EnergyPlus::format("Solar Thermal Collector Factory: Error getting inputs for object named: {}", objectName)); + ShowFatalError(state, std::format("Solar Thermal Collector Factory: Error getting inputs for object named: {}", objectName)); // Shut up the compiler return nullptr; } @@ -272,10 +273,10 @@ namespace PhotovoltaicThermalCollectors { int Found = Util::FindItemInList(thisTmpBIPVTperf.OSCMName, state.dataSurface->OSCM); if (Found == 0) { ShowSevereError(state, - EnergyPlus::format("GetBIPVTCollectorsInput: Invalid outside model name={}, object type={}, object name={}", - thisTmpBIPVTperf.OSCMName, - state.dataIPShortCut->cCurrentModuleObject, - thisTmpBIPVTperf.Name)); + std::format("GetBIPVTCollectorsInput: Invalid outside model name={}, object type={}, object name={}", + thisTmpBIPVTperf.OSCMName, + state.dataIPShortCut->cCurrentModuleObject, + thisTmpBIPVTperf.Name)); } thisTmpBIPVTperf.OSCMPtr = Found; thisTmpBIPVTperf.PVEffGapWidth = state.dataIPShortCut->rNumericArgs(1); @@ -343,42 +344,38 @@ namespace PhotovoltaicThermalCollectors { // check surface if (thisPVT.SurfNum == 0) { if (state.dataIPShortCut->lAlphaFieldBlanks(2)) { - ShowSevereError( - state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + ShowSevereError(state, + std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); ShowContinueError( - state, - EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Surface name cannot be blank."); } else { - ShowSevereError( - state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + ShowSevereError(state, + std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); ShowContinueError( - state, - EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Surface was not found."); } ErrorsFound = true; } else { if (!state.dataSurface->Surface(thisPVT.SurfNum).ExtSolar) { - ShowSevereError( - state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + ShowSevereError(state, + std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); ShowContinueError( - state, - EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Surface must be exposed to solar."); ErrorsFound = true; } // check surface orientation, warn if upside down if ((state.dataSurface->Surface(thisPVT.SurfNum).Tilt < -95.0) || (state.dataSurface->Surface(thisPVT.SurfNum).Tilt > 95.0)) { ShowWarningError(state, - EnergyPlus::format("Suspected input problem with {} = {}", - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2))); + std::format("Suspected input problem with {} = {}", + state.dataIPShortCut->cAlphaFieldNames(2), + state.dataIPShortCut->cAlphaArgs(2))); ShowContinueError( - state, - EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Surface used for solar collector faces down"); ShowContinueError(state, EnergyPlus::format("Surface tilt angle (degrees from ground outward normal) = {:.2R}", @@ -387,11 +384,11 @@ namespace PhotovoltaicThermalCollectors { } // check surface if (state.dataIPShortCut->lAlphaFieldBlanks(3)) { - ShowSevereError( - state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); - ShowContinueError( - state, EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{}, name cannot be blank.", state.dataIPShortCut->cAlphaFieldNames(3))); + ShowSevereError(state, + std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); + ShowContinueError(state, + std::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("{}, name cannot be blank.", state.dataIPShortCut->cAlphaFieldNames(3))); ErrorsFound = true; } else { thisPVT.PVTModelName = state.dataIPShortCut->cAlphaArgs(3); @@ -410,12 +407,11 @@ namespace PhotovoltaicThermalCollectors { thisPVT.ModelType = PVTModelType::BIPVT; } else { ShowSevereError( + state, std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); + ShowContinueError( state, - EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); - ShowContinueError(state, - EnergyPlus::format( - "Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{}, was not found.", state.dataIPShortCut->cAlphaFieldNames(3))); + std::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("{}, was not found.", state.dataIPShortCut->cAlphaFieldNames(3))); ErrorsFound = true; } } @@ -425,11 +421,10 @@ namespace PhotovoltaicThermalCollectors { // check PV if (thisPVT.PVnum == 0) { ShowSevereError( + state, std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(4), state.dataIPShortCut->cAlphaArgs(4))); + ShowContinueError( state, - EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(4), state.dataIPShortCut->cAlphaArgs(4))); - ShowContinueError(state, - EnergyPlus::format( - "Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + std::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else { thisPVT.PVname = state.dataIPShortCut->cAlphaArgs(4); @@ -447,19 +442,17 @@ namespace PhotovoltaicThermalCollectors { } else { if (state.dataIPShortCut->lAlphaFieldBlanks(5)) { ShowSevereError( + state, std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); + ShowContinueError( state, - EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); - ShowContinueError(state, - EnergyPlus::format( - "Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} field cannot be blank.", state.dataIPShortCut->cAlphaFieldNames(5))); + std::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} field cannot be blank.", state.dataIPShortCut->cAlphaFieldNames(5))); } else { ShowSevereError( + state, std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); + ShowContinueError( state, - EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); - ShowContinueError(state, - EnergyPlus::format( - "Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + std::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); } ErrorsFound = true; } @@ -632,15 +625,15 @@ namespace PhotovoltaicThermalCollectors { if (allocated(state.dataPhotovoltaic->PVarray)) { this->PVnum = Util::FindItemInList(this->PVname, state.dataPhotovoltaic->PVarray); if (this->PVnum == 0) { - ShowSevereError(state, EnergyPlus::format("Invalid name for photovoltaic generator = {}", this->PVname)); - ShowContinueError(state, EnergyPlus::format("Entered in flat plate photovoltaic-thermal collector = {}", this->Name)); + ShowSevereError(state, std::format("Invalid name for photovoltaic generator = {}", this->PVname)); + ShowContinueError(state, std::format("Entered in flat plate photovoltaic-thermal collector = {}", this->Name)); } else { this->PVfound = true; } } else { if ((!state.dataGlobal->BeginEnvrnFlag) && (!FirstHVACIteration)) { ShowSevereError(state, "Photovoltaic generators are missing for Photovoltaic Thermal modeling"); - ShowContinueError(state, EnergyPlus::format("Needed for flat plate photovoltaic-thermal collector = {}", this->Name)); + ShowContinueError(state, std::format("Needed for flat plate photovoltaic-thermal collector = {}", this->Name)); } } } @@ -653,8 +646,8 @@ namespace PhotovoltaicThermalCollectors { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, "Missing temperature setpoint for PVT outlet node "); ShowContinueError(state, - EnergyPlus::format("Add a setpoint manager to outlet node of PVT named {}", - state.dataPhotovoltaicThermalCollector->PVT(PVTindex).Name)); + std::format("Add a setpoint manager to outlet node of PVT named {}", + state.dataPhotovoltaicThermalCollector->PVT(PVTindex).Name)); state.dataHVACGlobal->SetPointErrorFlag = true; } else { // need call to EMS to check node @@ -665,8 +658,8 @@ namespace PhotovoltaicThermalCollectors { if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, "Missing temperature setpoint for PVT outlet node "); ShowContinueError(state, - EnergyPlus::format("Add a setpoint manager to outlet node of PVT named {}", - state.dataPhotovoltaicThermalCollector->PVT(PVTindex).Name)); + std::format("Add a setpoint manager to outlet node of PVT named {}", + state.dataPhotovoltaicThermalCollector->PVT(PVTindex).Name)); ShowContinueError(state, " or use an EMS actuator to establish a setpoint at the outlet node of PVT"); } } @@ -812,7 +805,7 @@ namespace PhotovoltaicThermalCollectors { if (this->DesignVolFlowRateWasAutoSized) { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of PVT solar collector design flow rate requires a Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in PVT object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in PVT object={}", this->Name)); ErrorsFound = true; } } else { // Hardsized @@ -860,7 +853,7 @@ namespace PhotovoltaicThermalCollectors { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(DesignVolFlowRateDes - DesignVolFlowRateUser) / DesignVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, EnergyPlus::format("SizeSolarCollector: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeSolarCollector: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Flow Rate of {:.5R} [W]", DesignVolFlowRateUser)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Design Flow Rate of {:.5R} [W]", DesignVolFlowRateDes)); @@ -930,8 +923,7 @@ namespace PhotovoltaicThermalCollectors { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(DesignVolFlowRateDes - DesignVolFlowRateUser) / DesignVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeSolarCollector: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeSolarCollector: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Flow Rate of {:.5R} [W]", DesignVolFlowRateUser)); ShowContinueError( @@ -1889,8 +1881,7 @@ namespace PhotovoltaicThermalCollectors { if (WhichPVT != 0) { NodeNum = state.dataPhotovoltaicThermalCollector->PVT(WhichPVT).HVACInletNodeNum; } else { - ShowSevereError(state, - EnergyPlus::format("GetAirInletNodeNum: Could not find SolarCollector FlatPlate PhotovoltaicThermal = \"{}\"", PVTName)); + ShowSevereError(state, std::format("GetAirInletNodeNum: Could not find SolarCollector FlatPlate PhotovoltaicThermal = \"{}\"", PVTName)); ErrorsFound = true; NodeNum = 0; } @@ -1921,8 +1912,7 @@ namespace PhotovoltaicThermalCollectors { if (WhichPVT != 0) { NodeNum = state.dataPhotovoltaicThermalCollector->PVT(WhichPVT).HVACOutletNodeNum; } else { - ShowSevereError(state, - EnergyPlus::format("GetAirInletNodeNum: Could not find SolarCollector FlatPlate PhotovoltaicThermal = \"{}\"", PVTName)); + ShowSevereError(state, std::format("GetAirInletNodeNum: Could not find SolarCollector FlatPlate PhotovoltaicThermal = \"{}\"", PVTName)); ErrorsFound = true; NodeNum = 0; } @@ -1944,7 +1934,7 @@ namespace PhotovoltaicThermalCollectors { } // If we didn't find it, fatal - ShowFatalError(state, EnergyPlus::format("Solar Thermal Collector GetIndexFromName: Error getting inputs for object named: {}", objectName)); + ShowFatalError(state, std::format("Solar Thermal Collector GetIndexFromName: Error getting inputs for object named: {}", objectName)); assert(false); return 0; // Shutup compiler } diff --git a/src/EnergyPlus/Photovoltaics.cc b/src/EnergyPlus/Photovoltaics.cc index 6c9b0339f12..1f3a6943933 100644 --- a/src/EnergyPlus/Photovoltaics.cc +++ b/src/EnergyPlus/Photovoltaics.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -433,21 +434,20 @@ namespace Photovoltaics { ShowSevereError(state, EnergyPlus::format("{}: problem detected with multiple PV arrays.", s_ipsc->cCurrentModuleObject)); ShowContinueError(state, "When using IntegratedExteriorVentedCavity heat transfer mode, only one PV array can be coupled"); ShowContinueError(state, - EnergyPlus::format("Both {} and {} are using exterior vented surface = {}", - state.dataPhotovoltaic->PVarray(PVnum).Name, - thisPVarray.Name, - state.dataPhotovoltaic->PVarray(PVnum).SurfaceName)); + std::format("Both {} and {} are using exterior vented surface = {}", + state.dataPhotovoltaic->PVarray(PVnum).Name, + thisPVarray.Name, + state.dataPhotovoltaic->PVarray(PVnum).SurfaceName)); ErrorsFound = true; } else if (thisPVarray.CellIntegrationMode == CellIntegration::PVTSolarCollector) { ShowSevereError( state, - EnergyPlus::format( - "Problem detected with multiple PV arrays for={}. When using PhotovoltaicThermalSolarCollector heat transfer " - "mode, only one PV array can be coupled. Both this PV array={} and this PV array={} are using PVT surface={}", - s_ipsc->cCurrentModuleObject, - state.dataPhotovoltaic->PVarray(PVnum).Name, - thisPVarray.Name, - state.dataPhotovoltaic->PVarray(PVnum).SurfaceName)); + std::format("Problem detected with multiple PV arrays for={}. When using PhotovoltaicThermalSolarCollector heat transfer " + "mode, only one PV array can be coupled. Both this PV array={} and this PV array={} are using PVT surface={}", + s_ipsc->cCurrentModuleObject, + state.dataPhotovoltaic->PVarray(PVnum).Name, + thisPVarray.Name, + state.dataPhotovoltaic->PVarray(PVnum).SurfaceName)); ErrorsFound = true; } } @@ -627,10 +627,9 @@ namespace Photovoltaics { state.dataSurface->Surface(state.dataPhotovoltaic->PVarray(PVnum).SurfacePtr).Area * state.dataPhotovoltaic->PVarray(PVnum).SimplePVModule.ActiveFraction; } else { - ShowSevereError( - state, EnergyPlus::format("Invalid PV performance object name of {}", state.dataPhotovoltaic->PVarray(PVnum).PerfObjName)); - ShowContinueError(state, - EnergyPlus::format("Entered in {} = {}", cPVGeneratorObjectName, state.dataPhotovoltaic->PVarray(PVnum).Name)); + ShowSevereError(state, + std::format("Invalid PV performance object name of {}", state.dataPhotovoltaic->PVarray(PVnum).PerfObjName)); + ShowContinueError(state, std::format("Entered in {} = {}", cPVGeneratorObjectName, state.dataPhotovoltaic->PVarray(PVnum).Name)); ErrorsFound = true; } } break; @@ -639,10 +638,9 @@ namespace Photovoltaics { if (ThisParamObj > 0) { state.dataPhotovoltaic->PVarray(PVnum).TRNSYSPVModule = tmpTRNSYSModuleParams(ThisParamObj); // entire structure assignment } else { - ShowSevereError( - state, EnergyPlus::format("Invalid PV performance object name of {}", state.dataPhotovoltaic->PVarray(PVnum).PerfObjName)); - ShowContinueError(state, - EnergyPlus::format("Entered in {} = {}", cPVGeneratorObjectName, state.dataPhotovoltaic->PVarray(PVnum).Name)); + ShowSevereError(state, + std::format("Invalid PV performance object name of {}", state.dataPhotovoltaic->PVarray(PVnum).PerfObjName)); + ShowContinueError(state, std::format("Entered in {} = {}", cPVGeneratorObjectName, state.dataPhotovoltaic->PVarray(PVnum).Name)); ErrorsFound = true; } } break; @@ -652,10 +650,9 @@ namespace Photovoltaics { if (ThisParamObj > 0) { state.dataPhotovoltaic->PVarray(PVnum).SNLPVModule = tmpSNLModuleParams(ThisParamObj); // entire structure assignment } else { - ShowSevereError( - state, EnergyPlus::format("Invalid PV performance object name of {}", state.dataPhotovoltaic->PVarray(PVnum).PerfObjName)); - ShowContinueError(state, - EnergyPlus::format("Entered in {} = {}", cPVGeneratorObjectName, state.dataPhotovoltaic->PVarray(PVnum).Name)); + ShowSevereError(state, + std::format("Invalid PV performance object name of {}", state.dataPhotovoltaic->PVarray(PVnum).PerfObjName)); + ShowContinueError(state, std::format("Entered in {} = {}", cPVGeneratorObjectName, state.dataPhotovoltaic->PVarray(PVnum).Name)); ErrorsFound = true; } } break; @@ -720,16 +717,15 @@ namespace Photovoltaics { // check that surface is HeatTransfer and a Construction with Internal Source was used if (!state.dataSurface->Surface(state.dataPhotovoltaic->PVarray(PVnum).SurfacePtr).HeatTransSurf) { ShowSevereError(state, - EnergyPlus::format("Must use a surface with heat transfer for IntegratedSurfaceOutsideFace mode in {}", - state.dataPhotovoltaic->PVarray(PVnum).Name)); + std::format("Must use a surface with heat transfer for IntegratedSurfaceOutsideFace mode in {}", + state.dataPhotovoltaic->PVarray(PVnum).Name)); ErrorsFound = true; } else if (!state.dataConstruction ->Construct(state.dataSurface->Surface(state.dataPhotovoltaic->PVarray(PVnum).SurfacePtr).Construction) .SourceSinkPresent) { - ShowSevereError( - state, - EnergyPlus::format("Must use a surface with internal source construction for IntegratedSurfaceOutsideFace mode in {}", - state.dataPhotovoltaic->PVarray(PVnum).Name)); + ShowSevereError(state, + std::format("Must use a surface with internal source construction for IntegratedSurfaceOutsideFace mode in {}", + state.dataPhotovoltaic->PVarray(PVnum).Name)); ErrorsFound = true; } } @@ -1000,7 +996,7 @@ namespace Photovoltaics { thisPVarray.SNLPVModule.DT0); } break; default: { - ShowSevereError(state, EnergyPlus::format("Sandia PV Simulation Temperature Modeling Mode Error in {}", thisPVarray.Name)); + ShowSevereError(state, std::format("Sandia PV Simulation Temperature Modeling Mode Error in {}", thisPVarray.Name)); } break; } @@ -1631,7 +1627,7 @@ namespace Photovoltaics { } else { ShowSevereError(state, "EquivalentOneDiode Photovoltaic model failed to find maximum power point"); ShowContinueError(state, "Numerical solver failed trying to take exponential of too large a number"); - ShowContinueError(state, EnergyPlus::format("Check input data in {}", pvModelNames[(int)PVModel::TRNSYS])); + ShowContinueError(state, std::format("Check input data in {}", pvModelNames[(int)PVModel::TRNSYS])); ShowContinueError(state, EnergyPlus::format("VV (voltage) = {:.5R}", VV)); ShowContinueError(state, EnergyPlus::format("II (current) = {:.5R}", II)); ShowFatalError(state, "FUN: EnergyPlus terminates because of numerical problem in EquivalentOne-Diode PV model"); @@ -1664,7 +1660,7 @@ namespace Photovoltaics { } else { ShowSevereError(state, "EquivalentOneDiode Photovoltaic model failed to find maximum power point"); ShowContinueError(state, "Numerical solver failed trying to take exponential of too large a number"); - ShowContinueError(state, EnergyPlus::format("Check input data in {}", pvModelNames[(int)PVModel::TRNSYS])); + ShowContinueError(state, std::format("Check input data in {}", pvModelNames[(int)PVModel::TRNSYS])); ShowContinueError(state, EnergyPlus::format("VV (voltage) = {:.5R}", VV)); ShowContinueError(state, EnergyPlus::format("II (current) = {:.5R}", II)); ShowFatalError(state, "FI: EnergyPlus terminates because of numerical problem in EquivalentOne-Diode PV model"); @@ -1697,7 +1693,7 @@ namespace Photovoltaics { } else { ShowSevereError(state, "EquivalentOneDiode Photovoltaic model failed to find maximum power point"); ShowContinueError(state, "Numerical solver failed trying to take exponential of too large a number"); - ShowContinueError(state, EnergyPlus::format("Check input data in {}", pvModelNames[(int)PVModel::TRNSYS])); + ShowContinueError(state, std::format("Check input data in {}", pvModelNames[(int)PVModel::TRNSYS])); ShowContinueError(state, EnergyPlus::format("VV (voltage) = {:.5R}", VV)); ShowContinueError(state, EnergyPlus::format("II (current) = {:.5R}", II)); ShowFatalError(state, "FI: EnergyPlus terminates because of numerical problem in EquivalentOne-Diode PV model"); @@ -2263,10 +2259,9 @@ namespace Photovoltaics { } if (!Found) { - ShowFatalError( - state, - EnergyPlus::format("Did not find surface in Exterior Vented Cavity description in GetExtVentedCavityIndex, Surface name = {}", - state.dataSurface->Surface(SurfacePtr).Name)); + ShowFatalError(state, + std::format("Did not find surface in Exterior Vented Cavity description in GetExtVentedCavityIndex, Surface name = {}", + state.dataSurface->Surface(SurfacePtr).Name)); } else { VentCavIndex = CavNum; diff --git a/src/EnergyPlus/PipeHeatTransfer.cc b/src/EnergyPlus/PipeHeatTransfer.cc index 5f4f14de116..4f7e271432f 100644 --- a/src/EnergyPlus/PipeHeatTransfer.cc +++ b/src/EnergyPlus/PipeHeatTransfer.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include #include // ObjexxFCL Headers @@ -372,7 +373,7 @@ void GetPipesHeatTransfer(EnergyPlusData &state) ShowSevereError(state, EnergyPlus::format("GetPipesHeatTransfer: invalid {} of {:.4R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); ShowContinueError(state, EnergyPlus::format("{} must be > 0.0", s_ipsc->cNumericFieldNames(2))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } @@ -418,8 +419,8 @@ void GetPipesHeatTransfer(EnergyPlusData &state) state.dataPipeHT->PipeHT(Item).ConstructionNum = Util::FindItemInList(s_ipsc->cAlphaArgs(2), state.dataConstruction->Construct); if (state.dataPipeHT->PipeHT(Item).ConstructionNum == 0) { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } @@ -435,8 +436,8 @@ void GetPipesHeatTransfer(EnergyPlusData &state) Node::CompFluidStream::Primary, Node::ObjectIsNotParent); if (state.dataPipeHT->PipeHT(Item).InletNodeNum == 0) { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } @@ -452,8 +453,8 @@ void GetPipesHeatTransfer(EnergyPlusData &state) Node::CompFluidStream::Primary, Node::ObjectIsNotParent); if (state.dataPipeHT->PipeHT(Item).OutletNodeNum == 0) { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } @@ -475,15 +476,15 @@ void GetPipesHeatTransfer(EnergyPlusData &state) Node::ObjectIsNotParent); if (!s_ipsc->lAlphaFieldBlanks(5)) { if (!CheckOutAirNodeNumber(state, state.dataPipeHT->PipeHT(Item).EnvrAirNodeNum)) { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Outdoor Air Node not on OutdoorAir:NodeList or OutdoorAir:Node"); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("An {} must be used ", s_ipsc->cAlphaFieldNames(5))); + ShowSevereError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("An {} must be used ", s_ipsc->cAlphaFieldNames(5))); ErrorsFound = true; } @@ -491,16 +492,16 @@ void GetPipesHeatTransfer(EnergyPlusData &state) state.dataPipeHT->PipeHT(Item).PipeID = s_ipsc->rNumericArgs(1); if (s_ipsc->rNumericArgs(1) <= 0.0) { // not really necessary because idd field has "minimum> 0" ShowSevereError(state, EnergyPlus::format("Invalid {} of {:.4R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} must be > 0.0", s_ipsc->cNumericFieldNames(1))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} must be > 0.0", s_ipsc->cNumericFieldNames(1))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } state.dataPipeHT->PipeHT(Item).Length = s_ipsc->rNumericArgs(2); if (s_ipsc->rNumericArgs(2) <= 0.0) { // not really necessary because idd field has "minimum> 0" ShowSevereError(state, EnergyPlus::format("Invalid {} of {:.4R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); - ShowContinueError(state, EnergyPlus::format("{} must be > 0.0", s_ipsc->cNumericFieldNames(2))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} must be > 0.0", s_ipsc->cNumericFieldNames(2))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } @@ -548,8 +549,8 @@ void GetPipesHeatTransfer(EnergyPlusData &state) state.dataPipeHT->PipeHT(Item).ConstructionNum = Util::FindItemInList(s_ipsc->cAlphaArgs(2), state.dataConstruction->Construct); if (state.dataPipeHT->PipeHT(Item).ConstructionNum == 0) { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } @@ -565,8 +566,8 @@ void GetPipesHeatTransfer(EnergyPlusData &state) Node::CompFluidStream::Primary, Node::ObjectIsNotParent); if (state.dataPipeHT->PipeHT(Item).InletNodeNum == 0) { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } @@ -582,8 +583,8 @@ void GetPipesHeatTransfer(EnergyPlusData &state) Node::CompFluidStream::Primary, Node::ObjectIsNotParent); if (state.dataPipeHT->PipeHT(Item).OutletNodeNum == 0) { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } @@ -598,8 +599,8 @@ void GetPipesHeatTransfer(EnergyPlusData &state) } else if (Util::SameString(s_ipsc->cAlphaArgs(5), "NOSUN")) { state.dataPipeHT->PipeHT(Item).SolarExposed = false; } else { - ShowSevereError(state, EnergyPlus::format("GetPipesHeatTransfer: invalid key for sun exposure flag for {}", s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Key should be either SunExposed or NoSun. Entered Key: {}", s_ipsc->cAlphaArgs(5))); + ShowSevereError(state, std::format("GetPipesHeatTransfer: invalid key for sun exposure flag for {}", s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Key should be either SunExposed or NoSun. Entered Key: {}", s_ipsc->cAlphaArgs(5))); ErrorsFound = true; } @@ -607,16 +608,16 @@ void GetPipesHeatTransfer(EnergyPlusData &state) state.dataPipeHT->PipeHT(Item).PipeID = s_ipsc->rNumericArgs(1); if (s_ipsc->rNumericArgs(1) <= 0.0) { // not really necessary because idd field has "minimum> 0" ShowSevereError(state, EnergyPlus::format("Invalid {} of {:.4R}", s_ipsc->cNumericFieldNames(1), s_ipsc->rNumericArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} must be > 0.0", s_ipsc->cNumericFieldNames(1))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} must be > 0.0", s_ipsc->cNumericFieldNames(1))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } state.dataPipeHT->PipeHT(Item).Length = s_ipsc->rNumericArgs(2); if (s_ipsc->rNumericArgs(2) <= 0.0) { // not really necessary because idd field has "minimum> 0" ShowSevereError(state, EnergyPlus::format("Invalid {} of {:.4R}", s_ipsc->cNumericFieldNames(2), s_ipsc->rNumericArgs(2))); - ShowContinueError(state, EnergyPlus::format("{} must be > 0.0", s_ipsc->cNumericFieldNames(2))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} must be > 0.0", s_ipsc->cNumericFieldNames(2))); + ShowContinueError(state, std::format("Entered in {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } @@ -881,9 +882,9 @@ void PipeHTData::ValidatePipeConstruction(EnergyPlusData &state, this->InsulationOD = this->PipeOD + 2.0 * this->InsulationThickness; } else { - ShowSevereError(state, - EnergyPlus::format( - "{}: invalid {}=\"{}\", too many layers=[{}], only 1 or 2 allowed.", PipeType, FieldName, ConstructionName, TotalLayers)); + ShowSevereError( + state, + std::format("{}: invalid {}=\"{}\", too many layers=[{}], only 1 or 2 allowed.", PipeType, FieldName, ConstructionName, TotalLayers)); ErrorsFound = true; } } @@ -1358,7 +1359,7 @@ void PipeHTData::CalcBuriedPipeSoil(EnergyPlusData &state) // Current Simulation for (IterationIndex = 1; IterationIndex <= MaxIterations; ++IterationIndex) { if (IterationIndex == MaxIterations) { - ShowWarningError(state, EnergyPlus::format("BuriedPipeHeatTransfer: Large number of iterations detected in object: {}", this->Name)); + ShowWarningError(state, std::format("BuriedPipeHeatTransfer: Large number of iterations detected in object: {}", this->Name)); } // Store computed values in T_O array @@ -1862,8 +1863,7 @@ Real64 PipeHTData::OutsidePipeHeatTransCoef(EnergyPlusData &state) AirVisc = DynVisc[NumOfPropDivisions - 1]; if (AirTemp > Temperature[NumOfPropDivisions - 1]) { ShowWarningError( - state, - EnergyPlus::format("Heat Transfer Pipe = {}Viscosity out of range, air temperature too high, setting to upper limit.", this->Name)); + state, std::format("Heat Transfer Pipe = {}Viscosity out of range, air temperature too high, setting to upper limit.", this->Name)); } } @@ -1886,8 +1886,8 @@ Real64 PipeHTData::OutsidePipeHeatTransCoef(EnergyPlusData &state) Coef = CCoef[NumOfParamDivisions - 1]; rExp = mExp[NumOfParamDivisions - 1]; if (ReD > UpperBound[NumOfParamDivisions - 1]) { - ShowWarningError( - state, EnergyPlus::format("Heat Transfer Pipe = {}Reynolds Number out of range, setting coefficients to upper limit.", this->Name)); + ShowWarningError(state, + std::format("Heat Transfer Pipe = {}Reynolds Number out of range, setting coefficients to upper limit.", this->Name)); } } diff --git a/src/EnergyPlus/Plant/Branch.cc b/src/EnergyPlus/Plant/Branch.cc index 107f6b95987..4bf7f459f99 100644 --- a/src/EnergyPlus/Plant/Branch.cc +++ b/src/EnergyPlus/Plant/Branch.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/Plant/Component.cc b/src/EnergyPlus/Plant/Component.cc index 848e7c910a3..8f0895af3c3 100644 --- a/src/EnergyPlus/Plant/Component.cc +++ b/src/EnergyPlus/Plant/Component.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/Plant/EquipAndOperations.cc b/src/EnergyPlus/Plant/EquipAndOperations.cc index 05fc8da26bc..78aad5433c5 100644 --- a/src/EnergyPlus/Plant/EquipAndOperations.cc +++ b/src/EnergyPlus/Plant/EquipAndOperations.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/Plant/Loop.cc b/src/EnergyPlus/Plant/Loop.cc index ab907bcac66..f502093a9e1 100644 --- a/src/EnergyPlus/Plant/Loop.cc +++ b/src/EnergyPlus/Plant/Loop.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/Plant/LoopSide.cc b/src/EnergyPlus/Plant/LoopSide.cc index 96f89530300..108a0788210 100644 --- a/src/EnergyPlus/Plant/LoopSide.cc +++ b/src/EnergyPlus/Plant/LoopSide.cc @@ -45,8 +45,10 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// ObjexxFCL Headers #include +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/Plant/PlantManager.cc b/src/EnergyPlus/Plant/PlantManager.cc index a5a08d1cb76..b02d3b13c3e 100644 --- a/src/EnergyPlus/Plant/PlantManager.cc +++ b/src/EnergyPlus/Plant/PlantManager.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -80,7 +81,6 @@ #include #include #include -#include #include #include #include @@ -2254,9 +2254,9 @@ void fillPlantToplogyComponentRow2(EnergyPlusData &state, OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantLoopType2, EnergyPlus::format("{}", rowCounter), loopType); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantLoopName2, EnergyPlus::format("{}", rowCounter), loopName); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantSide2, EnergyPlus::format("{}", rowCounter), side); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantBranchName2, EnergyPlus::format("{}", rowCounter), branchName); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantCompType2, EnergyPlus::format("{}", rowCounter), compType); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantCompName2, EnergyPlus::format("{}", rowCounter), compName); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantBranchName2, std::format("{}", rowCounter), branchName); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantCompType2, std::format("{}", rowCounter), compType); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopPlantCompName2, std::format("{}", rowCounter), compName); ++rowCounter; } @@ -2281,7 +2281,7 @@ void FillPlantEquipmentOperationLoad(EnergyPlusData &state) for (int jScheme = 1; jScheme <= thisLoop.NumOpSchemes; ++jScheme) { for (int kList = 1; kList <= thisLoop.OpScheme(jScheme).NumEquipLists; ++kList) { ++row; - std::string rowS = EnergyPlus::format("{}", row); + std::string rowS = std::format("{}", row); OutputReportPredefined::PreDefTableEntry(state, orp->pdchPLtEqOpLbPltLpNm, rowS, thisLoop.Name); OutputReportPredefined::PreDefTableEntry(state, orp->pdchPLtEqOpLbNm, rowS, thisLoop.OpScheme(jScheme).Name); OutputReportPredefined::PreDefTableEntry(state, orp->pdchPLtEqOpLbType, rowS, thisLoop.OpScheme(jScheme).TypeOf); @@ -2290,7 +2290,7 @@ void FillPlantEquipmentOperationLoad(EnergyPlusData &state) } else { OutputReportPredefined::PreDefTableEntry(state, orp->pdchPLtEqOpLbSchNm, rowS, "n/a"); } - OutputReportPredefined::PreDefTableEntry(state, orp->pdchPLtEqOpLbIndex, rowS, EnergyPlus::format("{}", kList)); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchPLtEqOpLbIndex, rowS, std::format("{}", kList)); OutputReportPredefined::PreDefTableEntry(state, orp->pdchPLtEqOpLbEqLstNm, rowS, thisLoop.OpScheme(jScheme).EquipList(kList).Name); OutputReportPredefined::PreDefTableEntry( state, orp->pdchPLtEqOpLbLow, rowS, thisLoop.OpScheme(jScheme).EquipList(kList).RangeLowerLimit); diff --git a/src/EnergyPlus/PlantCentralGSHP.cc b/src/EnergyPlus/PlantCentralGSHP.cc index dfb25193c83..b571a76fc17 100644 --- a/src/EnergyPlus/PlantCentralGSHP.cc +++ b/src/EnergyPlus/PlantCentralGSHP.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include #include // ObjexxFCL Headers @@ -999,7 +1000,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Heating Electricity Energy Unit {}", ChillerHeaterNum), + std::format("Chiller Heater Heating Electricity Energy Unit {}", ChillerHeaterNum), Constant::Units::J, chillerHeater.Report.HeatingEnergy, OutputProcessor::TimeStepType::System, @@ -1007,7 +1008,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Cooling Rate Unit {}", ChillerHeaterNum), + std::format("Chiller Heater Cooling Rate Unit {}", ChillerHeaterNum), Constant::Units::W, chillerHeater.Report.QEvap, OutputProcessor::TimeStepType::System, @@ -1015,7 +1016,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Cooling Energy Unit {}", ChillerHeaterNum), + std::format("Chiller Heater Cooling Energy Unit {}", ChillerHeaterNum), Constant::Units::J, chillerHeater.Report.EvapEnergy, OutputProcessor::TimeStepType::System, @@ -1023,7 +1024,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater False Load Heat Transfer Rate Unit {}", ChillerHeaterNum), + std::format("Chiller Heater False Load Heat Transfer Rate Unit {}", ChillerHeaterNum), Constant::Units::W, chillerHeater.Report.ChillerFalseLoadRate, OutputProcessor::TimeStepType::System, @@ -1031,7 +1032,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater False Load Heat Transfer Energy Unit {}", ChillerHeaterNum), + std::format("Chiller Heater False Load Heat Transfer Energy Unit {}", ChillerHeaterNum), Constant::Units::J, chillerHeater.Report.ChillerFalseLoad, OutputProcessor::TimeStepType::System, @@ -1039,7 +1040,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Evaporator Inlet Temperature Unit {}", ChillerHeaterNum), + std::format("Chiller Heater Evaporator Inlet Temperature Unit {}", ChillerHeaterNum), Constant::Units::C, chillerHeater.Report.EvapInletTemp, OutputProcessor::TimeStepType::System, @@ -1047,7 +1048,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Evaporator Outlet Temperature Unit {}", ChillerHeaterNum), + std::format("Chiller Heater Evaporator Outlet Temperature Unit {}", ChillerHeaterNum), Constant::Units::C, chillerHeater.Report.EvapOutletTemp, OutputProcessor::TimeStepType::System, @@ -1055,7 +1056,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Evaporator Mass Flow Rate Unit {}", ChillerHeaterNum), + std::format("Chiller Heater Evaporator Mass Flow Rate Unit {}", ChillerHeaterNum), Constant::Units::kg_s, chillerHeater.Report.Evapmdot, OutputProcessor::TimeStepType::System, @@ -1063,7 +1064,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Condenser Heat Transfer Rate Unit {}", ChillerHeaterNum), + std::format("Chiller Heater Condenser Heat Transfer Rate Unit {}", ChillerHeaterNum), Constant::Units::W, chillerHeater.Report.QCond, OutputProcessor::TimeStepType::System, @@ -1071,7 +1072,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Condenser Heat Transfer Energy Unit {}", ChillerHeaterNum), + std::format("Chiller Heater Condenser Heat Transfer Energy Unit {}", ChillerHeaterNum), Constant::Units::J, chillerHeater.Report.CondEnergy, OutputProcessor::TimeStepType::System, @@ -1079,7 +1080,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater COP Unit {}", ChillerHeaterNum), + std::format("Chiller Heater COP Unit {}", ChillerHeaterNum), Constant::Units::W_W, chillerHeater.Report.ActualCOP, OutputProcessor::TimeStepType::System, @@ -1087,7 +1088,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Capacity Temperature Modifier Multiplier Unit {}", ChillerHeaterNum), + std::format("Chiller Heater Capacity Temperature Modifier Multiplier Unit {}", ChillerHeaterNum), Constant::Units::None, chillerHeater.Report.ChillerCapFT, OutputProcessor::TimeStepType::System, @@ -1095,7 +1096,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater EIR Temperature Modifier Multiplier Unit {}", ChillerHeaterNum), + std::format("Chiller Heater EIR Temperature Modifier Multiplier Unit {}", ChillerHeaterNum), Constant::Units::None, chillerHeater.Report.ChillerEIRFT, OutputProcessor::TimeStepType::System, @@ -1103,7 +1104,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater EIR Part Load Modifier Multiplier Unit {}", ChillerHeaterNum), + std::format("Chiller Heater EIR Part Load Modifier Multiplier Unit {}", ChillerHeaterNum), Constant::Units::None, chillerHeater.Report.ChillerEIRFPLR, OutputProcessor::TimeStepType::System, @@ -1111,7 +1112,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Condenser Inlet Temperature Unit {}", ChillerHeaterNum), + std::format("Chiller Heater Condenser Inlet Temperature Unit {}", ChillerHeaterNum), Constant::Units::C, chillerHeater.Report.CondInletTemp, OutputProcessor::TimeStepType::System, @@ -1119,7 +1120,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Condenser Outlet Temperature Unit {}", ChillerHeaterNum), + std::format("Chiller Heater Condenser Outlet Temperature Unit {}", ChillerHeaterNum), Constant::Units::C, chillerHeater.Report.CondOutletTemp, OutputProcessor::TimeStepType::System, @@ -1127,7 +1128,7 @@ void WrapperSpecs::setupOutputVars(EnergyPlusData &state) chillerHeater.Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller Heater Condenser Mass Flow Rate Unit {}", ChillerHeaterNum), + std::format("Chiller Heater Condenser Mass Flow Rate Unit {}", ChillerHeaterNum), Constant::Units::kg_s, chillerHeater.Report.Condmdot, OutputProcessor::TimeStepType::System, @@ -1158,7 +1159,7 @@ void GetChillerHeaterInput(EnergyPlusData &state) state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (state.dataPlantCentralGSHP->numChillerHeaters <= 0) { - ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, std::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); CHErrorsFound = true; } @@ -1195,30 +1196,24 @@ void GetChillerHeaterInput(EnergyPlusData &state) state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerCapFTCoolingIDX = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(5)); if (state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerCapFTCoolingIDX == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); CHErrorsFound = true; } state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFTCoolingIDX = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(6)); if (state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFTCoolingIDX == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(6), state.dataIPShortCut->cAlphaArgs(6))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(6), state.dataIPShortCut->cAlphaArgs(6))); CHErrorsFound = true; } state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFPLRCoolingIDX = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(7)); if (state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFPLRCoolingIDX == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); CHErrorsFound = true; } @@ -1232,30 +1227,26 @@ void GetChillerHeaterInput(EnergyPlusData &state) state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerCapFTHeatingIDX = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(9)); if (state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerCapFTHeatingIDX == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); CHErrorsFound = true; } state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFTHeatingIDX = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(10)); if (state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFTHeatingIDX == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(10), state.dataIPShortCut->cAlphaArgs(10))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(10), state.dataIPShortCut->cAlphaArgs(10))); CHErrorsFound = true; } state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFPLRHeatingIDX = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(11)); if (state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ChillerEIRFPLRHeatingIDX == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(11), state.dataIPShortCut->cAlphaArgs(11))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(11), state.dataIPShortCut->cAlphaArgs(11))); CHErrorsFound = true; } @@ -1268,10 +1259,8 @@ void GetChillerHeaterInput(EnergyPlusData &state) } else { // Assume a constant flow chiller if none is specified state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ConstantFlow = true; state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).VariableFlow = false; - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); ShowContinueError(state, "simulation assumes CONSTANTFLOW and continues.."); } @@ -1280,11 +1269,11 @@ void GetChillerHeaterInput(EnergyPlusData &state) state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum - 1).ConstantFlow) { state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ConstantFlow = true; ShowWarningError(state, - EnergyPlus::format("Water flow mode is different from the other chiller heater(s) {}={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + std::format("Water flow mode is different from the other chiller heater(s) {}={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); ShowContinueError(state, "Simulation assumes CONSTANTFLOW and continues.."); } } @@ -1292,10 +1281,8 @@ void GetChillerHeaterInput(EnergyPlusData &state) if (Util::SameString(state.dataIPShortCut->cAlphaArgs(3), "WaterCooled")) { state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).condenserType = CondenserType::WaterCooled; } else { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("Entered in {}={}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); ShowContinueError(state, "Valid entries is WaterCooled"); CHErrorsFound = true; } @@ -1306,8 +1293,7 @@ void GetChillerHeaterInput(EnergyPlusData &state) state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).RefCapCoolingWasAutoSized = true; } if (state.dataIPShortCut->rNumericArgs(1) == 0.0) { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, EnergyPlus::format("Entered in {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); @@ -1315,8 +1301,7 @@ void GetChillerHeaterInput(EnergyPlusData &state) } state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).RefCOPCooling = state.dataIPShortCut->rNumericArgs(2); if (state.dataIPShortCut->rNumericArgs(2) == 0.0) { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, EnergyPlus::format("Entered in {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); @@ -1330,8 +1315,7 @@ void GetChillerHeaterInput(EnergyPlusData &state) // Reference Heating Mode Ratios for Capacity and Power state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ClgHtgToCoolingCapRatio = state.dataIPShortCut->rNumericArgs(6); if (state.dataIPShortCut->rNumericArgs(6) == 0.0) { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, EnergyPlus::format("Entered in {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(6), state.dataIPShortCut->rNumericArgs(6))); @@ -1340,8 +1324,7 @@ void GetChillerHeaterInput(EnergyPlusData &state) state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).ClgHtgtoCogPowerRatio = state.dataIPShortCut->rNumericArgs(7); if (state.dataIPShortCut->rNumericArgs(7) == 0.0) { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, EnergyPlus::format("Entered in {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(7), state.dataIPShortCut->rNumericArgs(7))); @@ -1386,12 +1369,11 @@ void GetChillerHeaterInput(EnergyPlusData &state) if (state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).OpenMotorEff < 0.0 || state.dataPlantCentralGSHP->ChillerHeater(ChillerHeaterNum).OpenMotorEff > 1.0) { ShowSevereError( - state, - EnergyPlus::format("GetCurveInput: For {}: {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("GetCurveInput: For {}: {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, EnergyPlus::format("{} = {:.3R}", state.dataIPShortCut->cNumericFieldNames(14), state.dataIPShortCut->rNumericArgs(14))); - ShowContinueError(state, EnergyPlus::format("{} must be greater than or equal to zero", state.dataIPShortCut->cNumericFieldNames(14))); - ShowContinueError(state, EnergyPlus::format("{} must be less than or equal to one", state.dataIPShortCut->cNumericFieldNames(14))); + ShowContinueError(state, std::format("{} must be greater than or equal to zero", state.dataIPShortCut->cNumericFieldNames(14))); + ShowContinueError(state, std::format("{} must be less than or equal to one", state.dataIPShortCut->cNumericFieldNames(14))); CHErrorsFound = true; } @@ -1404,10 +1386,10 @@ void GetChillerHeaterInput(EnergyPlusData &state) if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, "Capacity ratio as a function of temperature curve output is not equal to 1.0"); ShowContinueError(state, - EnergyPlus::format("(+ or - 10%) at reference conditions for {}= {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Curve output at reference conditions = {:.3T}", CurveVal)); + std::format("(+ or - 10%) at reference conditions for {}= {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("Curve output at reference conditions = {:.3f}", CurveVal)); } } @@ -1419,10 +1401,10 @@ void GetChillerHeaterInput(EnergyPlusData &state) if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, "Energy input ratio as a function of temperature curve output is not equal to 1.0"); ShowContinueError(state, - EnergyPlus::format("(+ or - 10%) at reference conditions for {}= {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Curve output at reference conditions = {:.3T}", CurveVal)); + std::format("(+ or - 10%) at reference conditions for {}= {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("Curve output at reference conditions = {:.3f}", CurveVal)); } } @@ -1432,10 +1414,10 @@ void GetChillerHeaterInput(EnergyPlusData &state) if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, "Energy input ratio as a function of part-load ratio curve output is not equal to 1.0"); ShowContinueError(state, - EnergyPlus::format("(+ or - 10%) at reference conditions for {}= {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Curve output at reference conditions = {:.3T}", CurveVal)); + std::format("(+ or - 10%) at reference conditions for {}= {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("Curve output at reference conditions = {:.3f}", CurveVal)); } } @@ -1451,8 +1433,7 @@ void GetChillerHeaterInput(EnergyPlusData &state) } if (FoundNegValue) { ShowWarningError(state, "Energy input ratio as a function of part-load ratio curve shows negative values "); - ShowContinueError(state, - EnergyPlus::format("for {}= {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("for {}= {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "EIR as a function of PLR curve output at various part-load ratios shown below:"); ShowContinueError(state, "PLR = 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00"); @@ -1470,10 +1451,10 @@ void GetChillerHeaterInput(EnergyPlusData &state) if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, "Capacity ratio as a function of temperature curve output is not equal to 1.0"); ShowContinueError(state, - EnergyPlus::format("(+ or - 10%) at reference conditions for {}= {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Curve output at reference conditions = {:.3T}", CurveVal)); + std::format("(+ or - 10%) at reference conditions for {}= {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("Curve output at reference conditions = {:.3f}", CurveVal)); } } @@ -1485,10 +1466,10 @@ void GetChillerHeaterInput(EnergyPlusData &state) if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, "Energy input ratio as a function of temperature curve output is not equal to 1.0"); ShowContinueError(state, - EnergyPlus::format("(+ or - 10%) at reference conditions for {}= {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Curve output at reference conditions = {:.3T}", CurveVal)); + std::format("(+ or - 10%) at reference conditions for {}= {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("Curve output at reference conditions = {:.3f}", CurveVal)); } } @@ -1498,10 +1479,10 @@ void GetChillerHeaterInput(EnergyPlusData &state) if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, "Energy input ratio as a function of part-load ratio curve output is not equal to 1.0"); ShowContinueError(state, - EnergyPlus::format("(+ or - 10%) at reference conditions for {}= {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Curve output at reference conditions = {:.3T}", CurveVal)); + std::format("(+ or - 10%) at reference conditions for {}= {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("Curve output at reference conditions = {:.3f}", CurveVal)); } } @@ -1517,8 +1498,7 @@ void GetChillerHeaterInput(EnergyPlusData &state) } if (FoundNegValue) { ShowWarningError(state, "Energy input ratio as a function of part-load ratio curve shows negative values "); - ShowContinueError(state, - EnergyPlus::format("for {}= {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("for {}= {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "EIR as a function of PLR curve output at various part-load ratios shown below:"); ShowContinueError(state, "PLR = 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00"); @@ -1541,7 +1521,7 @@ void GetChillerHeaterInput(EnergyPlusData &state) } if (CHErrorsFound) { - ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, std::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -1626,8 +1606,8 @@ void WrapperSpecs::initialize(EnergyPlusData &state, if (state.dataLoopNodes->Node(this->CHWOutletNodeNum).TempSetPoint == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->CoolSetPointErrDone) { - ShowWarningError( - state, EnergyPlus::format("Missing temperature setpoint on cooling side for CentralHeatPumpSystem named {}", this->Name)); + ShowWarningError(state, + std::format("Missing temperature setpoint on cooling side for CentralHeatPumpSystem named {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the outlet node of a CentralHeatPumpSystem, use a SetpointManager"); ShowContinueError(state, @@ -1642,8 +1622,7 @@ void WrapperSpecs::initialize(EnergyPlusData &state, if (FatalError) { if (!this->CoolSetPointErrDone) { ShowWarningError( - state, - EnergyPlus::format("Missing temperature setpoint on cooling side for CentralHeatPumpSystem named {}", this->Name)); + state, std::format("Missing temperature setpoint on cooling side for CentralHeatPumpSystem named {}", this->Name)); ShowContinueError(state, "A temperature setpoint is needed at the outlet node of a CentralHeatPumpSystem "); ShowContinueError(state, "use a Setpoint Manager to establish a setpoint at the chiller side outlet node "); ShowContinueError(state, "or use an EMS actuator to establish a setpoint at the outlet node "); @@ -1660,8 +1639,8 @@ void WrapperSpecs::initialize(EnergyPlusData &state, if (state.dataLoopNodes->Node(this->HWOutletNodeNum).TempSetPoint == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->HeatSetPointErrDone) { - ShowWarningError( - state, EnergyPlus::format("Missing temperature setpoint on heating side for CentralHeatPumpSystem named {}", this->Name)); + ShowWarningError(state, + std::format("Missing temperature setpoint on heating side for CentralHeatPumpSystem named {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the outlet node of a CentralHeatPumpSystem, use a SetpointManager"); ShowContinueError(state, @@ -1676,8 +1655,7 @@ void WrapperSpecs::initialize(EnergyPlusData &state, if (FatalError) { if (!this->HeatSetPointErrDone) { ShowWarningError( - state, - EnergyPlus::format("Missing temperature setpoint on heating side for CentralHeatPumpSystem named {}", this->Name)); + state, std::format("Missing temperature setpoint on heating side for CentralHeatPumpSystem named {}", this->Name)); ShowContinueError(state, "A temperature setpoint is needed at the outlet node of a CentralHeatPumpSystem "); ShowContinueError(state, "use a Setpoint Manager to establish a setpoint at the chiller side outlet node "); ShowContinueError(state, "or use an EMS actuator to establish a setpoint at the outlet node "); @@ -1908,8 +1886,8 @@ void WrapperSpecs::CalcChillerModel(EnergyPlusData &state) } if (CompNum > this->NumOfComp) { - ShowSevereError(state, EnergyPlus::format("CalcChillerModel: ChillerHeater=\"{}\", calculated component number too big.", this->Name)); - ShowContinueError(state, EnergyPlus::format("Max number of components=[{}], indicated component number=[{}].", this->NumOfComp, CompNum)); + ShowSevereError(state, std::format("CalcChillerModel: ChillerHeater=\"{}\", calculated component number too big.", this->Name)); + ShowContinueError(state, std::format("Max number of components=[{}], indicated component number=[{}].", this->NumOfComp, CompNum)); ShowFatalError(state, "Program terminates due to preceding condition."); } @@ -2087,7 +2065,7 @@ void WrapperSpecs::CalcChillerModel(EnergyPlusData &state) Cp = this->GLHEPlantLoc.loop->glycol->getSpecificHeat(state, CondInletTemp, RoutineNameElecEIRChiller); CondOutletTemp = QCondenser / CondMassFlowRate / Cp + CondInletTemp; } else { - ShowSevereError(state, EnergyPlus::format("CalcChillerheaterModel: Condenser flow = 0, for Chillerheater={}", chillerHeater.Name)); + ShowSevereError(state, std::format("CalcChillerheaterModel: Condenser flow = 0, for Chillerheater={}", chillerHeater.Name)); ShowContinueErrorTimeStamp(state, ""); } @@ -2286,9 +2264,9 @@ void WrapperSpecs::CalcChillerHeaterModel(EnergyPlusData &state) if (CondDeltaTemp < 0.0) { // Hot water temperature is greater than the maximum if (chillerHeater.ChillerEIRRefTempErrorIndex == 0) { - ShowSevereMessage(state, - EnergyPlus::format("CalcChillerHeaterModel: ChillerHeaterPerformance:Electric:EIR=\"{}\", DeltaTemp < 0", - chillerHeater.Name)); + ShowSevereMessage( + state, + std::format("CalcChillerHeaterModel: ChillerHeaterPerformance:Electric:EIR=\"{}\", DeltaTemp < 0", chillerHeater.Name)); ShowContinueError(state, EnergyPlus::format(" Reference Simultaneous Cooling-Heating Mode Leaving Condenser Water Temperature [{:.1R}]", CondOutletTemp)); @@ -2629,7 +2607,7 @@ Real64 WrapperSpecs::calcChillerCapFT(EnergyPlusData &state, int const numChille if (chillCapFT < 0) { if (this->ChillerHeater(numChillerHeater).ChillerCapFTError < 1 && !state.dataGlobal->WarmupFlag) { ++this->ChillerHeater(numChillerHeater).ChillerCapFTError; - ShowWarningError(state, EnergyPlus::format("ChillerHeaterPerformance:Electric:EIR \"{}\":", this->ChillerHeater(numChillerHeater).Name)); + ShowWarningError(state, std::format("ChillerHeaterPerformance:Electric:EIR \"{}\":", this->ChillerHeater(numChillerHeater).Name)); ShowContinueError( state, EnergyPlus::format(" ChillerHeater Capacity as a Function of Temperature curve output is negative ({:.3R}).", chillCapFT)); ShowContinueError( diff --git a/src/EnergyPlus/PlantChillers.cc b/src/EnergyPlus/PlantChillers.cc index fc700cf8f3d..cd9451a8198 100644 --- a/src/EnergyPlus/PlantChillers.cc +++ b/src/EnergyPlus/PlantChillers.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -479,11 +480,10 @@ namespace PlantChillers { Node::CompFluidStream::Tertiary, Node::ObjectIsNotParent); if (thisChiller.HeatRecInletNodeNum == 0) { - ShowSevereError( - state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); + ShowSevereError(state, + std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } thisChiller.HeatRecOutletNodeNum = Node::GetOnlySingleNode(state, @@ -496,11 +496,10 @@ namespace PlantChillers { Node::CompFluidStream::Tertiary, Node::ObjectIsNotParent); if (thisChiller.HeatRecOutletNodeNum == 0) { - ShowSevereError( - state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); + ShowSevereError(state, + std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -523,8 +522,7 @@ namespace PlantChillers { state.dataIPShortCut->rNumericArgs(10))); ShowContinueError(state, "Condenser fluid flow rate must be specified for Heat Reclaim applications."); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -575,9 +573,9 @@ namespace PlantChillers { } if ((!state.dataIPShortCut->lAlphaFieldBlanks(8)) || (!state.dataIPShortCut->lAlphaFieldBlanks(9))) { ShowWarningError(state, - EnergyPlus::format("Since Design Heat Flow Rate = 0.0, Heat Recovery inactive for {}={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Since Design Heat Flow Rate = 0.0, Heat Recovery inactive for {}={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "However, Node names were specified for Heat Recovery inlet or outlet nodes"); } } @@ -585,9 +583,9 @@ namespace PlantChillers { thisChiller.BasinHeaterPowerFTempDiff = state.dataIPShortCut->rNumericArgs(23); if (state.dataIPShortCut->rNumericArgs(23) < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}, \"{}\" TRIM(state.dataIPShortCut->cNumericFieldNames(23)) must be >= 0", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name)); + std::format("{}, \"{}\" TRIM(state.dataIPShortCut->cNumericFieldNames(23)) must be >= 0", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name)); ErrorsFound = true; } @@ -599,10 +597,10 @@ namespace PlantChillers { } if (thisChiller.BasinHeaterSetPointTemp < 2.0) { ShowWarningError(state, - EnergyPlus::format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name, - state.dataIPShortCut->cNumericFieldNames(24))); + std::format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name, + state.dataIPShortCut->cNumericFieldNames(24))); } } @@ -623,11 +621,9 @@ namespace PlantChillers { if (!state.dataIPShortCut->lAlphaFieldBlanks(14)) { thisChiller.thermosiphonTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(14))); if (thisChiller.thermosiphonTempCurveIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\"", RoutineName, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name)); ShowContinueError( - state, - EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(14), state.dataIPShortCut->cAlphaArgs(14))); + state, std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(14), state.dataIPShortCut->cAlphaArgs(14))); ErrorsFound = true; } } @@ -635,7 +631,7 @@ namespace PlantChillers { } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, std::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -935,8 +931,7 @@ namespace PlantChillers { if (THeatRecSetPoint == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->HRSPErrDone) { - ShowWarningError(state, - EnergyPlus::format("Missing heat recovery temperature setpoint for chiller named {}", this->Name)); + ShowWarningError(state, std::format("Missing heat recovery temperature setpoint for chiller named {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the heat recovery leaving temperature setpoint node " "specified, use a SetpointManager"); @@ -952,8 +947,8 @@ namespace PlantChillers { state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->HRSPErrDone) { - ShowWarningError( - state, EnergyPlus::format("Missing heat recovery temperature setpoint for chiller named {}", this->Name)); + ShowWarningError(state, + std::format("Missing heat recovery temperature setpoint for chiller named {}", this->Name)); ShowContinueError(state, " A temperature setpoint is needed at the heat recovery leaving temperature setpoint node " "specified, use a SetpointManager to establish a setpoint"); @@ -1078,8 +1073,7 @@ namespace PlantChillers { this->NomCap); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - this->NomCap) / this->NomCap) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerElectric: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeChillerElectric: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Nominal Capacity of {:.2R} [W]", this->NomCap)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); @@ -1095,7 +1089,7 @@ namespace PlantChillers { } else { if (this->NomCapWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Electric Chiller nominal capacity requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Electric Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->NomCapWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->NomCap > 0.0)) { @@ -1136,8 +1130,7 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - this->EvapVolFlowRate) / this->EvapVolFlowRate) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerElectric: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeChillerElectric: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", this->EvapVolFlowRate)); @@ -1156,7 +1149,7 @@ namespace PlantChillers { } else { if (this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Electric Chiller evap flow rate requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Electric Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->EvapVolFlowRate > 0.0)) { @@ -1202,8 +1195,7 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - this->CondVolFlowRate) / this->CondVolFlowRate) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerElectric: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeChillerElectric: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", this->CondVolFlowRate)); @@ -1223,7 +1215,7 @@ namespace PlantChillers { if (this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Electric Chiller condenser flow rate requires a condenser"); ShowContinueError(state, "loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Electric Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Electric Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->CondVolFlowRate > 0.0)) { @@ -1272,8 +1264,7 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHeatRecVolFlowRate - this->DesignHeatRecVolFlowRate) / this->DesignHeatRecVolFlowRate) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("SizeChillerElectric: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeChillerElectric: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", this->DesignHeatRecVolFlowRate)); @@ -1405,7 +1396,7 @@ namespace PlantChillers { ++this->MsgErrorCount; // Show single warning and pass additional info to ShowRecurringWarningErrorAtEnd if (this->MsgErrorCount < 2) { - ShowWarningError(state, EnergyPlus::format("{}.", this->MsgBuffer1)); + ShowWarningError(state, std::format("{}.", this->MsgBuffer1)); ShowContinueError(state, this->MsgBuffer2); } else { ShowRecurringWarningErrorAtEnd( @@ -1493,13 +1484,13 @@ namespace PlantChillers { // Warn user if entering condenser temperature falls below 0C if (state.dataLoopNodes->Node(this->CondInletNodeNum).Temp < 0.0 && !state.dataGlobal->WarmupFlag) { this->PrintMessage = true; - this->MsgBuffer1 = EnergyPlus::format( - "CalcElectricChillerModel - Chiller:Electric \"{}\" - Air Cooled Condenser Inlet Temperature below 0C", this->Name); - this->MsgBuffer2 = EnergyPlus::format("... Outdoor Dry-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", - state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); + this->MsgBuffer1 = + std::format("CalcElectricChillerModel - Chiller:Electric \"{}\" - Air Cooled Condenser Inlet Temperature below 0C", this->Name); + this->MsgBuffer2 = std::format("... Outdoor Dry-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", + state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state)); this->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -1514,13 +1505,13 @@ namespace PlantChillers { // Warn user if evap condenser wet bulb temperature falls below 10C if (state.dataLoopNodes->Node(this->CondInletNodeNum).Temp < 10.0 && !state.dataGlobal->WarmupFlag) { this->PrintMessage = true; - this->MsgBuffer1 = EnergyPlus::format( - "CalcElectricChillerModel - Chiller:Electric \"{}\" - Evap Cooled Condenser Inlet Temperature below 10C", this->Name); - this->MsgBuffer2 = EnergyPlus::format("... Outdoor Wet-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", - state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); + this->MsgBuffer1 = + std::format("CalcElectricChillerModel - Chiller:Electric \"{}\" - Evap Cooled Condenser Inlet Temperature below 10C", this->Name); + this->MsgBuffer2 = std::format("... Outdoor Wet-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", + state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state)); this->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -1835,7 +1826,7 @@ namespace PlantChillers { Real64 CpCond = this->CDPlantLoc.loop->glycol->getSpecificHeat(state, condInletTemp, RoutineName); this->CondOutletTemp = this->QCondenser / this->CondMassFlowRate / CpCond + condInletTemp; } else { - ShowSevereError(state, EnergyPlus::format("CalcElectricChillerModel: Condenser flow = 0, for ElectricChiller={}", this->Name)); + ShowSevereError(state, std::format("CalcElectricChillerModel: Condenser flow = 0, for ElectricChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); } } else { // Air Cooled or Evap Cooled @@ -1871,8 +1862,7 @@ namespace PlantChillers { if (condInletTemp > 70.0) { ShowSevereError( state, - EnergyPlus::format("CalcElectricChillerModel: Condenser loop inlet temperatures over 70.0 C for ElectricChiller={}", - this->Name)); + std::format("CalcElectricChillerModel: Condenser loop inlet temperatures over 70.0 C for ElectricChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, EnergyPlus::format("Condenser loop water temperatures are too high at{:.2R}", condInletTemp)); ShowContinueError(state, "Check input for condenser plant loop, especially cooling tower"); @@ -1884,8 +1874,7 @@ namespace PlantChillers { } if (!state.dataGlobal->WarmupFlag) { if (AvailNomCapRat < 0.0) { // apparently the real reason energy goes negative - ShowSevereError(state, - EnergyPlus::format("CalcElectricChillerModel: Capacity ratio below zero for ElectricChiller={}", this->Name)); + ShowSevereError(state, std::format("CalcElectricChillerModel: Capacity ratio below zero for ElectricChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "Check input for Capacity Ratio Curve"); ShowContinueError(state, EnergyPlus::format("Condenser inlet temperature: {:.2R}", condInletTemp)); @@ -2092,8 +2081,7 @@ namespace PlantChillers { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { ShowWarningError( - state, - EnergyPlus::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + state, std::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); ShowContinueError( state, " A temperature setpoint is needed at the outlet node of a chiller in variable flow mode, use a SetpointManager"); @@ -2107,9 +2095,9 @@ namespace PlantChillers { state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, - EnergyPlus::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", - this->Name)); + ShowWarningError( + state, + std::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); ShowContinueError( state, " A temperature setpoint is needed at the outlet node of a chiller evaporator in variable flow mode"); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the chiller evaporator outlet node "); @@ -2163,7 +2151,7 @@ namespace PlantChillers { return &thisChiller; } } - ShowFatalError(state, EnergyPlus::format("Could not locate engine driven chiller with name: {}", chillerName)); + ShowFatalError(state, std::format("Could not locate engine driven chiller with name: {}", chillerName)); return nullptr; } @@ -2225,7 +2213,7 @@ namespace PlantChillers { state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (state.dataPlantChillers->NumEngineDrivenChillers <= 0) { - ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, std::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); ErrorsFound = true; } // See if load distribution manager has already gotten the input @@ -2272,8 +2260,8 @@ namespace PlantChillers { ShowSevereError( state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -2282,8 +2270,8 @@ namespace PlantChillers { ShowSevereError( state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -2294,10 +2282,9 @@ namespace PlantChillers { } else if (state.dataIPShortCut->cAlphaArgs(2) == "EVAPORATIVELYCOOLED") { thisChiller.CondenserType = DataPlant::CondenserType::EvapCooled; } else { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -2359,9 +2346,9 @@ namespace PlantChillers { OutAirNodeManager::CheckAndAddAirNodeNumber(state, thisChiller.CondInletNodeNum, Okay); if (!Okay) { ShowWarningError(state, - EnergyPlus::format("{}, Adding OutdoorAir:Node::Node={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(5))); + std::format("{}, Adding OutdoorAir:Node::Node={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(5))); } thisChiller.CondOutletNodeNum = Node::GetOnlySingleNode(state, @@ -2400,16 +2387,14 @@ namespace PlantChillers { "Condenser Water Nodes"); // Condenser Inlet node name is necessary for Water Cooled if (state.dataIPShortCut->lAlphaFieldBlanks(5)) { - ShowSevereError(state, EnergyPlus::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); + ShowSevereError(state, std::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else if (state.dataIPShortCut->lAlphaFieldBlanks(6)) { - ShowSevereError(state, EnergyPlus::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); + ShowSevereError(state, std::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } else { @@ -2439,16 +2424,14 @@ namespace PlantChillers { "Condenser (unknown?) Nodes"); // Condenser Inlet node name is necessary for Water Cooled if (state.dataIPShortCut->lAlphaFieldBlanks(5)) { - ShowSevereError(state, EnergyPlus::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); + ShowSevereError(state, std::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else if (state.dataIPShortCut->lAlphaFieldBlanks(6)) { - ShowSevereError(state, EnergyPlus::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); + ShowSevereError(state, std::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -2474,9 +2457,9 @@ namespace PlantChillers { thisChiller.CapRatCoef(3) = state.dataIPShortCut->rNumericArgs(13); if ((state.dataIPShortCut->rNumericArgs(11) + state.dataIPShortCut->rNumericArgs(12) + state.dataIPShortCut->rNumericArgs(13)) == 0.0) { ShowSevereError(state, - EnergyPlus::format("{}: Sum of Capacity Ratio Coef = 0.0, chiller={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}: Sum of Capacity Ratio Coef = 0.0, chiller={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } thisChiller.PowerRatCoef(1) = state.dataIPShortCut->rNumericArgs(14); @@ -2490,46 +2473,43 @@ namespace PlantChillers { // Load Special EngineDriven Chiller Curve Fit Inputs thisChiller.ClngLoadtoFuelCurve = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(7)); // convert curve name to number if (thisChiller.ClngLoadtoFuelCurve == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } thisChiller.RecJacHeattoFuelCurve = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(8)); // convert curve name to number if (thisChiller.RecJacHeattoFuelCurve == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } thisChiller.RecLubeHeattoFuelCurve = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(9)); // convert curve name to number if (thisChiller.RecLubeHeattoFuelCurve == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } thisChiller.TotExhausttoFuelCurve = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(10)); // convert curve name to number if (thisChiller.TotExhausttoFuelCurve == 0) { - ShowSevereError( - state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(10), state.dataIPShortCut->cAlphaArgs(10))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(10), state.dataIPShortCut->cAlphaArgs(10))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } thisChiller.ExhaustTempCurve = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(11)); // convert curve name to number if (thisChiller.ExhaustTempCurve == 0) { - ShowSevereError( - state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(11), state.dataIPShortCut->cAlphaArgs(11))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(11), state.dataIPShortCut->cAlphaArgs(11))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -2559,11 +2539,10 @@ namespace PlantChillers { Node::CompFluidStream::Tertiary, Node::ObjectIsNotParent); if (thisChiller.HeatRecInletNodeNum == 0) { - ShowSevereError( - state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(13), state.dataIPShortCut->cAlphaArgs(13))); + ShowSevereError(state, + std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(13), state.dataIPShortCut->cAlphaArgs(13))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } thisChiller.HeatRecOutletNodeNum = Node::GetOnlySingleNode(state, @@ -2576,11 +2555,10 @@ namespace PlantChillers { Node::CompFluidStream::Tertiary, Node::ObjectIsNotParent); if (thisChiller.HeatRecOutletNodeNum == 0) { - ShowSevereError( - state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(14), state.dataIPShortCut->cAlphaArgs(14))); + ShowSevereError(state, + std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(14), state.dataIPShortCut->cAlphaArgs(14))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } Node::TestCompSet(state, @@ -2605,8 +2583,7 @@ namespace PlantChillers { state.dataIPShortCut->rNumericArgs(10))); ShowContinueError(state, "Condenser fluid flow rate must be specified for Heat Reclaim applications."); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -2624,9 +2601,9 @@ namespace PlantChillers { } if ((!state.dataIPShortCut->lAlphaFieldBlanks(13)) || (!state.dataIPShortCut->lAlphaFieldBlanks(14))) { ShowWarningError(state, - EnergyPlus::format("Since Design Heat Flow Rate = 0.0, Heat Recovery inactive for {}={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Since Design Heat Flow Rate = 0.0, Heat Recovery inactive for {}={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "However, Node names were specified for Heat Recovery inlet or outlet nodes"); } } @@ -2634,10 +2611,9 @@ namespace PlantChillers { thisChiller.FlowMode = static_cast(getEnumValue(DataPlant::FlowModeNamesUC, state.dataIPShortCut->cAlphaArgs(15))); if (thisChiller.FlowMode == DataPlant::FlowMode::Invalid) { ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError( - state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(15), state.dataIPShortCut->cAlphaArgs(15))); + state, std::format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(15), state.dataIPShortCut->cAlphaArgs(15))); ShowContinueError(state, "Available choices are ConstantFlow, NotModulated, or LeavingSetpointModulated"); ShowContinueError(state, "Flow mode NotModulated is assumed and the simulation continues."); thisChiller.FlowMode = DataPlant::FlowMode::NotModulated; @@ -2653,9 +2629,9 @@ namespace PlantChillers { thisChiller.BasinHeaterPowerFTempDiff = state.dataIPShortCut->rNumericArgs(29); if (state.dataIPShortCut->rNumericArgs(29) < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}, \"{}\" TRIM(state.dataIPShortCut->cNumericFieldNames(29)) must be >= 0", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name)); + std::format("{}, \"{}\" TRIM(state.dataIPShortCut->cNumericFieldNames(29)) must be >= 0", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name)); ErrorsFound = true; } @@ -2667,10 +2643,10 @@ namespace PlantChillers { } if (thisChiller.BasinHeaterSetPointTemp < 2.0) { ShowWarningError(state, - EnergyPlus::format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name, - state.dataIPShortCut->cNumericFieldNames(30))); + std::format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name, + state.dataIPShortCut->cNumericFieldNames(30))); } } @@ -2695,7 +2671,7 @@ namespace PlantChillers { } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, std::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -2820,14 +2796,14 @@ namespace PlantChillers { std::string_view const sFuelType = Constant::eFuelNames[static_cast(this->FuelType)]; SetupOutputVariable(state, - EnergyPlus::format("Chiller {} Rate", sFuelType), + std::format("Chiller {} Rate", sFuelType), Constant::Units::W, this->FuelEnergyUseRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller {} Energy", sFuelType), + std::format("Chiller {} Energy", sFuelType), Constant::Units::J, this->FuelEnergy, OutputProcessor::TimeStepType::System, @@ -2845,7 +2821,7 @@ namespace PlantChillers { OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller {} Mass Flow Rate", sFuelType), + std::format("Chiller {} Mass Flow Rate", sFuelType), Constant::Units::kg_s, this->FuelMdot, OutputProcessor::TimeStepType::System, @@ -3132,9 +3108,8 @@ namespace PlantChillers { this->NomCap); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - this->NomCap) / this->NomCap) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizeChillerEngineDriven: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, + std::format("SizeChillerEngineDriven: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Nominal Capacity of {:.2R} [W]", this->NomCap)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); @@ -3150,7 +3125,7 @@ namespace PlantChillers { } else { if (this->NomCapWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Engine Driven Chiller nominal capacity requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Engine Driven Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Engine Driven Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->NomCapWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->NomCap > 0.0)) { @@ -3190,9 +3165,8 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - this->EvapVolFlowRate) / this->EvapVolFlowRate) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizeChillerEngineDriven: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, + std::format("SizeChillerEngineDriven: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", this->EvapVolFlowRate)); @@ -3211,7 +3185,7 @@ namespace PlantChillers { } else { if (this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Engine Driven Chiller evap flow rate requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Engine Driven Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Engine Driven Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->EvapVolFlowRate > 0.0)) { @@ -3260,9 +3234,8 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - this->CondVolFlowRate) / this->CondVolFlowRate) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizeChillerEngineDriven: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, + std::format("SizeChillerEngineDriven: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", this->CondVolFlowRate)); @@ -3282,7 +3255,7 @@ namespace PlantChillers { if (this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of EngineDriven Chiller condenser flow rate requires a condenser"); ShowContinueError(state, "loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in EngineDriven Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in EngineDriven Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->CondVolFlowRate > 0.0)) { @@ -3338,9 +3311,8 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHeatRecVolFlowRate - DesignHeatRecVolFlowRateUser) / DesignHeatRecVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizeEngineDrivenChiller: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, + std::format("SizeEngineDrivenChiller: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", DesignHeatRecVolFlowRateUser)); @@ -3501,7 +3473,7 @@ namespace PlantChillers { ++this->MsgErrorCount; // Show single warning and pass additional info to ShowRecurringWarningErrorAtEnd if (this->MsgErrorCount < 2) { - ShowWarningError(state, EnergyPlus::format("{}.", this->MsgBuffer1)); + ShowWarningError(state, std::format("{}.", this->MsgBuffer1)); ShowContinueError(state, this->MsgBuffer2); } else { ShowRecurringWarningErrorAtEnd( @@ -3549,13 +3521,13 @@ namespace PlantChillers { // Warn user if entering condenser temperature falls below 0C if (state.dataLoopNodes->Node(this->CondInletNodeNum).Temp < 0.0 && !state.dataGlobal->WarmupFlag) { this->PrintMessage = true; - this->MsgBuffer1 = EnergyPlus::format( + this->MsgBuffer1 = std::format( "CalcEngineDrivenChillerModel - Chiller:EngineDriven \"{}\" - Air Cooled Condenser Inlet Temperature below 0C", this->Name); - this->MsgBuffer2 = EnergyPlus::format("... Outdoor Dry-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", - state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); + this->MsgBuffer2 = std::format("... Outdoor Dry-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", + state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state)); this->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -3565,13 +3537,13 @@ namespace PlantChillers { // Warn user if evap condenser wet bulb temperature falls below 10C if (state.dataLoopNodes->Node(this->CondInletNodeNum).Temp < 10.0 && !state.dataGlobal->WarmupFlag) { this->PrintMessage = true; - this->MsgBuffer1 = EnergyPlus::format( + this->MsgBuffer1 = std::format( "CalcEngineDrivenChillerModel - Chiller:EngineDriven \"{}\" - Evap Cooled Condenser Inlet Temperature below 10C", this->Name); - this->MsgBuffer2 = EnergyPlus::format("... Outdoor Wet-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", - state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); + this->MsgBuffer2 = std::format("... Outdoor Wet-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", + state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state)); this->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -3896,8 +3868,7 @@ namespace PlantChillers { Real64 CpCond = this->CDPlantLoc.loop->glycol->getSpecificHeat(state, this->CondInletTemp, RoutineName); this->CondOutletTemp = this->QCondenser / this->CondMassFlowRate / CpCond + this->CondInletTemp; } else { - ShowSevereError(state, - EnergyPlus::format("CalcEngineDrivenChillerModel: Condenser flow = 0, for EngineDrivenChiller={}", this->Name)); + ShowSevereError(state, std::format("CalcEngineDrivenChillerModel: Condenser flow = 0, for EngineDrivenChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); } @@ -3993,10 +3964,9 @@ namespace PlantChillers { if (this->CondenserType == DataPlant::CondenserType::WaterCooled) { // first check for run away condenser loop temps (only reason yet to be observed for this?) if (this->CondInletTemp > 70.0) { - ShowSevereError( - state, - EnergyPlus::format("CalcEngineDrivenChillerModel: Condenser loop inlet temperatures > 70.0 C for EngineDrivenChiller={}", - this->Name)); + ShowSevereError(state, + std::format("CalcEngineDrivenChillerModel: Condenser loop inlet temperatures > 70.0 C for EngineDrivenChiller={}", + this->Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, EnergyPlus::format("Condenser loop water temperatures are too high at{:.2R}", this->CondInletTemp)); ShowContinueError(state, "Check input for condenser plant loop, especially cooling tower"); @@ -4008,8 +3978,8 @@ namespace PlantChillers { } if (!state.dataGlobal->WarmupFlag) { if (AvailNomCapRat < 0.0) { // apparently the real reason energy goes negative - ShowSevereError( - state, EnergyPlus::format("CalcEngineDrivenChillerModel: Capacity ratio below zero for EngineDrivenChiller={}", this->Name)); + ShowSevereError(state, + std::format("CalcEngineDrivenChillerModel: Capacity ratio below zero for EngineDrivenChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "Check input for Capacity Ratio Curve"); ShowContinueError(state, EnergyPlus::format("Condenser inlet temperature: {:.2R}", this->CondInletTemp)); @@ -4179,8 +4149,7 @@ namespace PlantChillers { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { ShowWarningError( - state, - EnergyPlus::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + state, std::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); ShowContinueError( state, " A temperature setpoint is needed at the outlet node of a chiller in variable flow mode, use a SetpointManager"); @@ -4194,9 +4163,9 @@ namespace PlantChillers { state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, - EnergyPlus::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", - this->Name)); + ShowWarningError( + state, + std::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); ShowContinueError( state, " A temperature setpoint is needed at the outlet node of a chiller evaporator in variable flow mode"); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the chiller evaporator outlet node "); @@ -4229,7 +4198,7 @@ namespace PlantChillers { return &thisChiller; } } - ShowFatalError(state, EnergyPlus::format("Could not locate gas turbine chiller with name: {}", chillerName)); + ShowFatalError(state, std::format("Could not locate gas turbine chiller with name: {}", chillerName)); return nullptr; } @@ -4293,7 +4262,7 @@ namespace PlantChillers { state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (state.dataPlantChillers->NumGTChillers <= 0) { - ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, std::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); ErrorsFound = true; } // See if load distribution manager has already gotten the input @@ -4340,8 +4309,8 @@ namespace PlantChillers { ShowSevereError( state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -4350,8 +4319,8 @@ namespace PlantChillers { ShowSevereError( state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -4362,10 +4331,9 @@ namespace PlantChillers { } else if (state.dataIPShortCut->cAlphaArgs(2) == "EVAPORATIVELYCOOLED") { thisChiller.CondenserType = DataPlant::CondenserType::EvapCooled; } else { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -4427,9 +4395,9 @@ namespace PlantChillers { OutAirNodeManager::CheckAndAddAirNodeNumber(state, thisChiller.CondInletNodeNum, Okay); if (!Okay) { ShowWarningError(state, - EnergyPlus::format("{}, Adding OutdoorAir:Node={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(5))); + std::format("{}, Adding OutdoorAir:Node={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(5))); } thisChiller.CondOutletNodeNum = Node::GetOnlySingleNode(state, @@ -4468,16 +4436,14 @@ namespace PlantChillers { "Condenser (unknown?) Nodes"); // Condenser Inlet node name is necessary for Water Cooled if (state.dataIPShortCut->lAlphaFieldBlanks(5)) { - ShowSevereError(state, EnergyPlus::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); + ShowSevereError(state, std::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else if (state.dataIPShortCut->lAlphaFieldBlanks(6)) { - ShowSevereError(state, EnergyPlus::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); + ShowSevereError(state, std::format("Invalid, {} is blank ", state.dataIPShortCut->cAlphaFieldNames(6))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -4504,9 +4470,9 @@ namespace PlantChillers { thisChiller.CapRatCoef(3) = state.dataIPShortCut->rNumericArgs(13); if ((state.dataIPShortCut->rNumericArgs(11) + state.dataIPShortCut->rNumericArgs(12) + state.dataIPShortCut->rNumericArgs(13)) == 0.0) { ShowSevereError(state, - EnergyPlus::format("{}: Sum of Capacity Ratio Coef = 0.0, chiller={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}: Sum of Capacity Ratio Coef = 0.0, chiller={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } thisChiller.PowerRatCoef(1) = state.dataIPShortCut->rNumericArgs(14); @@ -4569,11 +4535,10 @@ namespace PlantChillers { Node::CompFluidStream::Tertiary, Node::ObjectIsNotParent); if (thisChiller.HeatRecInletNodeNum == 0) { - ShowSevereError( - state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); + ShowSevereError(state, + std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } thisChiller.HeatRecOutletNodeNum = Node::GetOnlySingleNode(state, @@ -4586,11 +4551,10 @@ namespace PlantChillers { Node::CompFluidStream::Tertiary, Node::ObjectIsNotParent); if (thisChiller.HeatRecOutletNodeNum == 0) { - ShowSevereError( - state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); + ShowSevereError(state, + std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } Node::TestCompSet(state, @@ -4616,8 +4580,7 @@ namespace PlantChillers { state.dataIPShortCut->rNumericArgs(10))); ShowContinueError(state, "Condenser fluid flow rate must be specified for Heat Reclaim applications."); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -4629,9 +4592,9 @@ namespace PlantChillers { thisChiller.HeatRecOutletNodeNum = 0; if ((!state.dataIPShortCut->lAlphaFieldBlanks(7)) || (!state.dataIPShortCut->lAlphaFieldBlanks(8))) { ShowWarningError(state, - EnergyPlus::format("Since Design Heat Flow Rate = 0.0, Heat Recovery inactive for {}={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Since Design Heat Flow Rate = 0.0, Heat Recovery inactive for {}={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "However, Node names were specified for heat recovery inlet or outlet nodes"); } if (thisChiller.CondenserType == DataPlant::CondenserType::AirCooled || @@ -4643,10 +4606,9 @@ namespace PlantChillers { thisChiller.FlowMode = static_cast(getEnumValue(DataPlant::FlowModeNamesUC, state.dataIPShortCut->cAlphaArgs(9))); if (thisChiller.FlowMode == DataPlant::FlowMode::Invalid) { ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError( - state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); + state, std::format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); ShowContinueError(state, "Available choices are ConstantFlow, NotModulated, or LeavingSetpointModulated"); ShowContinueError(state, "Flow mode NotModulated is assumed and the simulation continues."); thisChiller.FlowMode = DataPlant::FlowMode::NotModulated; @@ -4655,10 +4617,10 @@ namespace PlantChillers { // Fuel Type Case Statement thisChiller.FuelType = static_cast(getEnumValue(Constant::eFuelNamesUC, state.dataIPShortCut->cAlphaArgs(10))); if (thisChiller.FuelType == Constant::eFuel::Invalid) { - ShowSevereError( - state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(10), state.dataIPShortCut->cAlphaArgs(10))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(10), state.dataIPShortCut->cAlphaArgs(10))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, "Valid choices are Electricity, NaturalGas, Propane, Diesel, Gasoline, FuelOilNo1, FuelOilNo2,OtherFuel1 or OtherFuel2"); ErrorsFound = true; @@ -4674,10 +4636,10 @@ namespace PlantChillers { thisChiller.BasinHeaterPowerFTempDiff = state.dataIPShortCut->rNumericArgs(48); if (state.dataIPShortCut->rNumericArgs(48) < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\"{} must be >= 0", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name, - state.dataIPShortCut->cNumericFieldNames(48))); + std::format("{}=\"{}\"{} must be >= 0", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name, + state.dataIPShortCut->cNumericFieldNames(48))); ErrorsFound = true; } @@ -4689,10 +4651,10 @@ namespace PlantChillers { } if (thisChiller.BasinHeaterSetPointTemp < 2.0) { ShowWarningError(state, - EnergyPlus::format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name, - state.dataIPShortCut->cNumericFieldNames(49))); + std::format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name, + state.dataIPShortCut->cNumericFieldNames(49))); } } @@ -4727,7 +4689,7 @@ namespace PlantChillers { } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, std::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -4870,7 +4832,7 @@ namespace PlantChillers { std::string_view const sFuelType = Constant::eFuelNames[static_cast(this->FuelType)]; SetupOutputVariable(state, - EnergyPlus::format("Chiller {} Rate", sFuelType), + std::format("Chiller {} Rate", sFuelType), Constant::Units::W, this->FuelEnergyUsedRate, OutputProcessor::TimeStepType::System, @@ -4878,7 +4840,7 @@ namespace PlantChillers { this->Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller {} Energy", sFuelType), + std::format("Chiller {} Energy", sFuelType), Constant::Units::J, this->FuelEnergyUsed, OutputProcessor::TimeStepType::System, @@ -4889,14 +4851,14 @@ namespace PlantChillers { OutputProcessor::EndUseCat::Cooling); SetupOutputVariable(state, - EnergyPlus::format("Chiller {} Mass Flow Rate", sFuelType), + std::format("Chiller {} Mass Flow Rate", sFuelType), Constant::Units::kg_s, this->FuelMassUsedRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - EnergyPlus::format("Chiller {} Mass", sFuelType), + std::format("Chiller {} Mass", sFuelType), Constant::Units::kg, this->FuelMassUsed, OutputProcessor::TimeStepType::System, @@ -5117,7 +5079,7 @@ namespace PlantChillers { this->NomCap); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - this->NomCap) / this->NomCap) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, EnergyPlus::format("SizeGTChiller: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeGTChiller: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Nominal Capacity of {:.2R} [W]", this->NomCap)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); @@ -5133,7 +5095,7 @@ namespace PlantChillers { } else { if (this->NomCapWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Gas Turbine Chiller nominal capacity requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Gas Turbine Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Gas Turbine Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->NomCapWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->NomCap > 0.0)) { @@ -5177,7 +5139,7 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - this->EvapVolFlowRate) / this->EvapVolFlowRate) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, EnergyPlus::format("SizeGTChiller: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeGTChiller: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", this->EvapVolFlowRate)); @@ -5196,7 +5158,7 @@ namespace PlantChillers { } else { if (this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Gas Turbine Chiller evap flow rate requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Gas Turbine Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Gas Turbine Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->EvapVolFlowRate > 0.0)) { @@ -5247,7 +5209,7 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - this->CondVolFlowRate) / this->CondVolFlowRate) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, EnergyPlus::format("SizeGTChiller: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeGTChiller: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", this->CondVolFlowRate)); @@ -5267,7 +5229,7 @@ namespace PlantChillers { if (this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Gas Turbine Chiller condenser flow rate requires a condenser"); ShowContinueError(state, "loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Gas Turbine Chiller object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Gas Turbine Chiller object={}", this->Name)); ErrorsFound = true; } if (!this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->CondVolFlowRate > 0.0)) { @@ -5306,7 +5268,7 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(GTEngineCapacityDes - this->GTEngineCapacity) / this->GTEngineCapacity) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, EnergyPlus::format("SizeGTChiller: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, std::format("SizeGTChiller: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Gas Turbine Engine Capacity of {:.2R} [W]", this->GTEngineCapacity)); ShowContinueError( @@ -5361,8 +5323,8 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHeatRecVolFlowRate - DesignHeatRecVolFlowRateUser) / DesignHeatRecVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, EnergyPlus::format("SizeGasTurbineChiller: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, + std::format("SizeGasTurbineChiller: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Heat Recovery Fluid Flow Rate of {:.5R} [m3/s]", DesignHeatRecVolFlowRateUser)); @@ -5510,7 +5472,7 @@ namespace PlantChillers { ++this->MsgErrorCount; // Show single warning and pass additional info to ShowRecurringWarningErrorAtEnd if (this->MsgErrorCount < 2) { - ShowWarningError(state, EnergyPlus::format("{}.", this->MsgBuffer1)); + ShowWarningError(state, std::format("{}.", this->MsgBuffer1)); ShowContinueError(state, this->MsgBuffer2); } else { ShowRecurringWarningErrorAtEnd( @@ -5561,11 +5523,11 @@ namespace PlantChillers { this->PrintMessage = true; this->MsgBuffer1 = "CalcGasTurbineChillerModel - Chiller:CombustionTurbine \"" + this->Name + "\" - Air Cooled Condenser Inlet Temperature below 0C"; - this->MsgBuffer2 = EnergyPlus::format("... Outdoor Dry-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", - state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); + this->MsgBuffer2 = std::format("... Outdoor Dry-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", + state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state)); this->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -5577,11 +5539,11 @@ namespace PlantChillers { this->PrintMessage = true; this->MsgBuffer1 = "CalcGasTurbineChillerModel - Chiller:CombustionTurbine \"" + this->Name + "\" - Evap Cooled Condenser Inlet Temperature below 10C"; - this->MsgBuffer2 = EnergyPlus::format("... Outdoor Wet-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", - state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); + this->MsgBuffer2 = std::format("... Outdoor Wet-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", + state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state)); this->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -5885,7 +5847,7 @@ namespace PlantChillers { Real64 CpCond = this->CDPlantLoc.loop->glycol->getSpecificHeat(state, condInletTemp, RoutineName); this->CondOutletTemp = this->QCondenser / this->CondMassFlowRate / CpCond + condInletTemp; } else { - ShowSevereError(state, EnergyPlus::format("CalcGasTurbineChillerModel: Condenser flow = 0, for GasTurbineChiller={}", this->Name)); + ShowSevereError(state, std::format("CalcGasTurbineChillerModel: Condenser flow = 0, for GasTurbineChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); } @@ -6014,8 +5976,8 @@ namespace PlantChillers { if (this->CondenserType == DataPlant::CondenserType::WaterCooled) { // first check for run away condenser loop temps (only reason yet to be observed for this?) if (condInletTemp > 70.0) { - ShowSevereError( - state, EnergyPlus::format("CalcGTChillerModel: Condenser loop inlet temperatures over 70.0 C for GTChiller={}", this->Name)); + ShowSevereError(state, + std::format("CalcGTChillerModel: Condenser loop inlet temperatures over 70.0 C for GTChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, EnergyPlus::format("Condenser loop water temperatures are too high at{:.2R}", condInletTemp)); ShowContinueError(state, "Check input for condenser plant loop, especially cooling tower"); @@ -6027,7 +5989,7 @@ namespace PlantChillers { } if (!state.dataGlobal->WarmupFlag) { if (AvailNomCapRat < 0.0) { // apparently the real reason energy goes negative - ShowSevereError(state, EnergyPlus::format("CalcGTChillerModel: Capacity ratio below zero for GTChiller={}", this->Name)); + ShowSevereError(state, std::format("CalcGTChillerModel: Capacity ratio below zero for GTChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, "Check input for Capacity Ratio Curve"); ShowContinueError(state, EnergyPlus::format("Condenser inlet temperature: {:.2R}", condInletTemp)); @@ -6156,8 +6118,7 @@ namespace PlantChillers { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { ShowWarningError( - state, - EnergyPlus::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + state, std::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); ShowContinueError( state, " A temperature setpoint is needed at the outlet node of a chiller in variable flow mode, use a SetpointManager"); @@ -6171,9 +6132,9 @@ namespace PlantChillers { state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, - EnergyPlus::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", - this->Name)); + ShowWarningError( + state, + std::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); ShowContinueError( state, " A temperature setpoint is needed at the outlet node of a chiller evaporator in variable flow mode"); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the chiller evaporator outlet node "); @@ -6206,7 +6167,7 @@ namespace PlantChillers { return &thisChiller; } } - ShowFatalError(state, EnergyPlus::format("Could not locate constant COP chiller with name: {}", chillerName)); + ShowFatalError(state, std::format("Could not locate constant COP chiller with name: {}", chillerName)); return nullptr; } @@ -6261,7 +6222,7 @@ namespace PlantChillers { state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, state.dataIPShortCut->cCurrentModuleObject); if (state.dataPlantChillers->NumConstCOPChillers <= 0) { - ShowSevereError(state, EnergyPlus::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, std::format("No {} equipment specified in input file", state.dataIPShortCut->cCurrentModuleObject)); ErrorsFound = true; } @@ -6307,8 +6268,8 @@ namespace PlantChillers { ShowSevereError( state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(1), state.dataIPShortCut->rNumericArgs(1))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } thisChiller.COP = state.dataIPShortCut->rNumericArgs(2); @@ -6316,8 +6277,8 @@ namespace PlantChillers { ShowSevereError( state, EnergyPlus::format("Invalid {}={:.2R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -6329,10 +6290,9 @@ namespace PlantChillers { } else if (state.dataIPShortCut->cAlphaArgs(6) == "WATERCOOLED") { thisChiller.CondenserType = DataPlant::CondenserType::WaterCooled; } else { - ShowSevereError(state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(6), state.dataIPShortCut->cAlphaArgs(6))); - ShowContinueError( - state, EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(6), state.dataIPShortCut->cAlphaArgs(6))); + ShowContinueError(state, + std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -6411,9 +6371,9 @@ namespace PlantChillers { OutAirNodeManager::CheckAndAddAirNodeNumber(state, thisChiller.CondInletNodeNum, Okay); if (!Okay) { ShowWarningError(state, - EnergyPlus::format("{}, Adding OutdoorAir:Node::Node={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(4))); + std::format("{}, Adding OutdoorAir:Node::Node={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(4))); } thisChiller.CondOutletNodeNum = Node::GetOnlySingleNode(state, @@ -6452,16 +6412,14 @@ namespace PlantChillers { "Condenser Water Nodes"); // Condenser Inlet node name is necessary for Water Cooled if (state.dataIPShortCut->lAlphaFieldBlanks(4)) { - ShowSevereError(state, EnergyPlus::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(4))); + ShowSevereError(state, std::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(4))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else if (state.dataIPShortCut->lAlphaFieldBlanks(5)) { - ShowSevereError(state, EnergyPlus::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); + ShowSevereError(state, std::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } else { @@ -6491,16 +6449,14 @@ namespace PlantChillers { "Condenser (unknown?) Nodes"); // Condenser Inlet node name is necessary for Water Cooled if (state.dataIPShortCut->lAlphaFieldBlanks(4)) { - ShowSevereError(state, EnergyPlus::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(4))); + ShowSevereError(state, std::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(4))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else if (state.dataIPShortCut->lAlphaFieldBlanks(5)) { - ShowSevereError(state, EnergyPlus::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); + ShowSevereError(state, std::format("Invalid, {}is blank ", state.dataIPShortCut->cAlphaFieldNames(5))); ShowContinueError( - state, - EnergyPlus::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {}={}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -6508,10 +6464,9 @@ namespace PlantChillers { thisChiller.FlowMode = static_cast(getEnumValue(DataPlant::FlowModeNamesUC, state.dataIPShortCut->cAlphaArgs(7))); if (thisChiller.FlowMode == DataPlant::FlowMode::Invalid) { ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError( - state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); + state, std::format("{}{}=\"{}\",", RoutineName, state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); ShowContinueError(state, "Available choices are ConstantFlow, NotModulated, or LeavingSetpointModulated"); ShowContinueError(state, "Flow mode NotModulated is assumed and the simulation continues."); thisChiller.FlowMode = DataPlant::FlowMode::NotModulated; @@ -6521,9 +6476,9 @@ namespace PlantChillers { thisChiller.BasinHeaterPowerFTempDiff = state.dataIPShortCut->rNumericArgs(6); if (state.dataIPShortCut->rNumericArgs(6) < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}, \"{}\" TRIM(state.dataIPShortCut->cNumericFieldNames(6)) must be >= 0", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name)); + std::format("{}, \"{}\" TRIM(state.dataIPShortCut->cNumericFieldNames(6)) must be >= 0", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name)); ErrorsFound = true; } @@ -6535,10 +6490,10 @@ namespace PlantChillers { } if (thisChiller.BasinHeaterSetPointTemp < 2.0) { ShowWarningError(state, - EnergyPlus::format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", - state.dataIPShortCut->cCurrentModuleObject, - thisChiller.Name, - state.dataIPShortCut->cNumericFieldNames(7))); + std::format("{}:\"{}\", {} is less than 2 deg C. Freezing could occur.", + state.dataIPShortCut->cCurrentModuleObject, + thisChiller.Name, + state.dataIPShortCut->cNumericFieldNames(7))); } } @@ -6554,10 +6509,9 @@ namespace PlantChillers { if (!state.dataIPShortCut->lAlphaFieldBlanks(9)) { thisChiller.thermosiphonTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(9))); if (thisChiller.thermosiphonTempCurveIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\"", RoutineName, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name)); - ShowContinueError( - state, EnergyPlus::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, state.dataIPShortCut->cCurrentModuleObject, thisChiller.Name)); + ShowContinueError(state, + std::format("Invalid {} = {}", state.dataIPShortCut->cAlphaFieldNames(9), state.dataIPShortCut->cAlphaArgs(9))); ErrorsFound = true; } } @@ -6578,7 +6532,7 @@ namespace PlantChillers { } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); + ShowFatalError(state, std::format("Errors found in processing input for {}", state.dataIPShortCut->cCurrentModuleObject)); } } @@ -6883,9 +6837,8 @@ namespace PlantChillers { NomCapUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpNomCap - NomCapUser) / NomCapUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizeChillerConstantCOP: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, + std::format("SizeChillerConstantCOP: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Nominal Capacity of {:.2R} [W]", NomCapUser)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Nominal Capacity of {:.2R} [W]", tmpNomCap)); @@ -6901,7 +6854,7 @@ namespace PlantChillers { } else { if (this->NomCapWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Constant COP Chiller nominal capacity requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Chiller:ConstantCOP object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Chiller:ConstantCOP object={}", this->Name)); ErrorsFound = true; } if (!this->NomCapWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->NomCap > 0.0)) { @@ -6946,9 +6899,8 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpEvapVolFlowRate - EvapVolFlowRateUser) / EvapVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizeChillerConstantCOP: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, + std::format("SizeChillerConstantCOP: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Design Chilled Water Flow Rate of {:.5R} [m3/s]", EvapVolFlowRateUser)); @@ -6967,7 +6919,7 @@ namespace PlantChillers { } else { if (this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Constant COP Chiller evap flow rate requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Chiller:ConstantCOP object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Chiller:ConstantCOP object={}", this->Name)); ErrorsFound = true; } if (!this->EvapVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->EvapVolFlowRate > 0.0)) { @@ -7017,9 +6969,8 @@ namespace PlantChillers { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCondVolFlowRate - CondVolFlowRateUser) / CondVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizeChillerConstantCOP: Potential issue with equipment sizing for {}", this->Name)); + ShowMessage(state, + std::format("SizeChillerConstantCOP: Potential issue with equipment sizing for {}", this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Design Condenser Water Flow Rate of {:.5R} [m3/s]", CondVolFlowRateUser)); @@ -7041,7 +6992,7 @@ namespace PlantChillers { if (this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "Autosizing of Constant COP Chiller condenser flow rate requires a condenser"); ShowContinueError(state, "loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in Chiller:ConstantCOP object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in Chiller:ConstantCOP object={}", this->Name)); ErrorsFound = true; } if (!this->CondVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport && (this->CondVolFlowRate > 0.0)) { @@ -7240,7 +7191,7 @@ namespace PlantChillers { ++this->MsgErrorCount; // Show single warning and pass additional info to ShowRecurringWarningErrorAtEnd if (this->MsgErrorCount < 2) { - ShowWarningError(state, EnergyPlus::format("{}.", this->MsgBuffer1)); + ShowWarningError(state, std::format("{}.", this->MsgBuffer1)); ShowContinueError(state, this->MsgBuffer2); } else { ShowRecurringWarningErrorAtEnd( @@ -7262,11 +7213,11 @@ namespace PlantChillers { this->PrintMessage = true; this->MsgBuffer1 = "CalcConstCOPChillerModel - Chiller:ConstantCOP \"" + this->Name + "\" - Air Cooled Condenser Inlet Temperature below 0C"; - this->MsgBuffer2 = EnergyPlus::format("... Outdoor Dry-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", - state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); + this->MsgBuffer2 = std::format("... Outdoor Dry-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", + state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state)); this->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -7278,11 +7229,11 @@ namespace PlantChillers { this->PrintMessage = true; this->MsgBuffer1 = "CalcConstCOPChillerModel - Chiller:ConstantCOP \"" + this->Name + "\" - Evap Cooled Condenser Inlet Temperature below 10C"; - this->MsgBuffer2 = EnergyPlus::format("... Outdoor Wet-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", - state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); + this->MsgBuffer2 = std::format("... Outdoor Wet-bulb Condition = {:6.2F} C. Occurrence info = {}, {} {}", + state.dataLoopNodes->Node(this->CondInletNodeNum).Temp, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state)); this->MsgDataLast = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; } else { this->PrintMessage = false; @@ -7503,7 +7454,7 @@ namespace PlantChillers { if (this->CondMassFlowRate > DataBranchAirLoopPlant::MassFlowTolerance) { this->CondOutletTemp = this->QCondenser / this->CondMassFlowRate / CpCond + CondInletTemp; } else { - ShowSevereError(state, EnergyPlus::format("CalcConstCOPChillerModel: Condenser flow = 0, for CONST COP Chiller={}", this->Name)); + ShowSevereError(state, std::format("CalcConstCOPChillerModel: Condenser flow = 0, for CONST COP Chiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); } } else { // Air Cooled or Evap Cooled @@ -7525,8 +7476,7 @@ namespace PlantChillers { if (CondInletTemp > 70.0) { ShowSevereError( state, - EnergyPlus::format("CalcConstCOPChillerModel: Condenser loop inlet temperatures over 70.0 C for ConstCOPChiller={}", - this->Name)); + std::format("CalcConstCOPChillerModel: Condenser loop inlet temperatures over 70.0 C for ConstCOPChiller={}", this->Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, EnergyPlus::format("Condenser loop water temperatures are too high at{:.2R}", CondInletTemp)); ShowContinueError(state, "Check input for condenser plant loop, especially cooling tower"); @@ -7617,8 +7567,7 @@ namespace PlantChillers { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->ModulatedFlowErrDone) { ShowWarningError( - state, - EnergyPlus::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); + state, std::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); ShowContinueError( state, " A temperature setpoint is needed at the outlet node of a chiller in variable flow mode, use a SetpointManager"); @@ -7632,9 +7581,9 @@ namespace PlantChillers { state.dataLoopNodes->NodeSetpointCheck(this->EvapOutletNodeNum).needsSetpointChecking = false; if (FatalError) { if (!this->ModulatedFlowErrDone) { - ShowWarningError(state, - EnergyPlus::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", - this->Name)); + ShowWarningError( + state, + std::format("Missing temperature setpoint for LeavingSetpointModulated mode chiller named {}", this->Name)); ShowContinueError( state, " A temperature setpoint is needed at the outlet node of a chiller evaporator in variable flow mode"); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the chiller evaporator outlet node "); diff --git a/src/EnergyPlus/PlantCondLoopOperation.cc b/src/EnergyPlus/PlantCondLoopOperation.cc index 8bf1bb18496..69b1b8d2bf4 100644 --- a/src/EnergyPlus/PlantCondLoopOperation.cc +++ b/src/EnergyPlus/PlantCondLoopOperation.cc @@ -49,6 +49,7 @@ #include #include #include +#include #include // ObjexxFCL Headers @@ -1139,21 +1140,21 @@ void LoadEquipList(EnergyPlusData &state, bool firstblank = false; if (state.dataIPShortCut->lAlphaFieldBlanks(MachineNum)) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid component specification.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum))); + std::format("{}=\"{}\", invalid component specification.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum))); firstblank = true; ErrorsFound = true; } if (state.dataIPShortCut->lAlphaFieldBlanks(MachineNum + 1)) { if (!firstblank) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid component specification.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}=\"{}\", invalid component specification.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } - ShowContinueError(state, EnergyPlus::format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum + 1))); + ShowContinueError(state, std::format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum + 1))); ErrorsFound = true; } } else { @@ -1163,8 +1164,8 @@ void LoadEquipList(EnergyPlusData &state, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError( - state, EnergyPlus::format("{}=\"{}\", Input Error.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("{}=\"{}\", Input Error.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -1197,21 +1198,21 @@ void LoadEquipList(EnergyPlusData &state, bool firstblank = false; if (state.dataIPShortCut->lAlphaFieldBlanks(MachineNum)) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid component specification.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum))); + std::format("{}=\"{}\", invalid component specification.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum))); firstblank = true; ErrorsFound = true; } if (state.dataIPShortCut->lAlphaFieldBlanks(MachineNum + 1)) { if (!firstblank) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid component specification.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}=\"{}\", invalid component specification.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } - ShowContinueError(state, EnergyPlus::format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum + 1))); + ShowContinueError(state, std::format("{} is blank.", state.dataIPShortCut->cAlphaFieldNames(MachineNum + 1))); ErrorsFound = true; } } else { @@ -1221,8 +1222,8 @@ void LoadEquipList(EnergyPlusData &state, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError( - state, EnergyPlus::format("{}=\"{}\", Input Error.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, + std::format("{}=\"{}\", Input Error.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -1308,10 +1309,10 @@ void LoadEquipList(EnergyPlusData &state, "HEATPUMP:AIRTOWATER:COOLING"; } else { ShowSevereError(state, - EnergyPlus::format("Equipment type={} with Name={} not found on PlantLoop={}.", - type_str, - machineName, - state.dataPlnt->PlantLoop(LoopNum).Name)); + std::format("Equipment type={} with Name={} not found on PlantLoop={}.", + type_str, + machineName, + state.dataPlnt->PlantLoop(LoopNum).Name)); ErrorsFound = true; } } @@ -1328,8 +1329,8 @@ void LoadEquipList(EnergyPlusData &state, if (!FoundIntendedList) { ShowSevereError(state, - EnergyPlus::format("LoadEquipList: Failed to find PlantEquipmentList or CondenserEquipmentList object named = {}", - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(ListNum).Name)); + std::format("LoadEquipList: Failed to find PlantEquipmentList or CondenserEquipmentList object named = {}", + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(ListNum).Name)); ErrorsFound = true; } } @@ -1399,11 +1400,11 @@ void FindCompSPInput(EnergyPlusData &state, } if (Num == NumSchemes) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", could not find {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - CurrentModuleObject, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + std::format("{} = \"{}\", could not find {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + CurrentModuleObject, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ErrorsFound = true; SchemeNameFound = false; } @@ -1494,7 +1495,7 @@ void FindCompSPInput(EnergyPlusData &state, BaseSizer::reportSizerOutput(state, CurrentModuleObject, state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name, - EnergyPlus::format("Design Water Flow Rate [m3/s] Equipment # {}", Num), + std::format("Design Water Flow Rate [m3/s] Equipment # {}", Num), CompFlowRate); } @@ -1506,7 +1507,7 @@ void FindCompSPInput(EnergyPlusData &state, if (CurrentModuleObject == "PlantEquipmentOperation:ThermalEnergyStorage") { ShowSevereError( state, - EnergyPlus::format( + std::format( "Equipment Operation Mode cannot be HEATING for any equipment found in {} in thermal energy storage control", state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; @@ -1520,9 +1521,9 @@ void FindCompSPInput(EnergyPlusData &state, if ((state.dataIPShortCut->cAlphaArgs(CompNumA + 1) != "COOLING") && (state.dataIPShortCut->cAlphaArgs(CompNumA + 1) != "HEATING") && (state.dataIPShortCut->cAlphaArgs(CompNumA + 1) != "DUAL")) { ShowSevereError(state, - EnergyPlus::format("Equipment Operation Mode should be either HEATING or COOLING or DUAL mode, for {}={}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Equipment Operation Mode should be either HEATING or COOLING or DUAL mode, for {}={}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } if (CurrentModuleObject == "PlantEquipmentOperation:ThermalEnergyStorage") { @@ -1533,13 +1534,13 @@ void FindCompSPInput(EnergyPlusData &state, (state.dataIPShortCut->cAlphaArgs(CompNumA + 1) != "DUAL")) { ShowWarningError(state, - EnergyPlus::format("Equipment Operation Mode was reset to 'DUAL' for Component '{}' in {}='{}'.", - state.dataIPShortCut->cAlphaArgs(CompNumA - 2), - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Equipment Operation Mode was reset to 'DUAL' for Component '{}' in {}='{}'.", + state.dataIPShortCut->cAlphaArgs(CompNumA - 2), + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - EnergyPlus::format("Equipment Operation Mode can only be 'DUAL' for {} objects.", - state.dataIPShortCut->cAlphaArgs(CompNumA - 3))); + std::format("Equipment Operation Mode can only be 'DUAL' for {} objects.", + state.dataIPShortCut->cAlphaArgs(CompNumA - 3))); state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).CtrlType = CtrlType::DualOp; } @@ -1580,18 +1581,17 @@ void FindCompSPInput(EnergyPlusData &state, .TempSetPoint == SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - EnergyPlus::format("Missing temperature setpoint for {} named {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Missing temperature setpoint for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - EnergyPlus::format( - "A temperature setpoint is needed at the node named {}", - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).SetPointNodeName)); + std::format("A temperature setpoint is needed at the node named {}", + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).SetPointNodeName)); if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Plant) { ShowContinueError(state, - EnergyPlus::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=SingleSetpoint", - state.dataPlnt->PlantLoop(LoopNum).Name)); + std::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=SingleSetpoint", + state.dataPlnt->PlantLoop(LoopNum).Name)); } else if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Condenser) { // not applicable to Condenser loops } @@ -1607,18 +1607,18 @@ void FindCompSPInput(EnergyPlusData &state, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { ShowSevereError(state, - EnergyPlus::format("Missing temperature setpoint for {} named {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Missing temperature setpoint for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - EnergyPlus::format( + std::format( "A temperature setpoint is needed at the node named {}", state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).SetPointNodeName)); if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Plant) { ShowContinueError(state, - EnergyPlus::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=SingleSetpoint", - state.dataPlnt->PlantLoop(LoopNum).Name)); + std::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=SingleSetpoint", + state.dataPlnt->PlantLoop(LoopNum).Name)); } else if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Condenser) { // not applicable to Condenser loops } @@ -1637,19 +1637,18 @@ void FindCompSPInput(EnergyPlusData &state, .TempSetPointHi == SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - EnergyPlus::format("Missing temperature high setpoint for {} named {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Missing temperature high setpoint for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - EnergyPlus::format( + std::format( "A temperature high setpoint is needed at the node named {}", state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).SetPointNodeName)); if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Plant) { - ShowContinueError( - state, - EnergyPlus::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", - state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowContinueError(state, + std::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", + state.dataPlnt->PlantLoop(LoopNum).Name)); } else if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Condenser) { // not applicable to Condenser loops } @@ -1665,19 +1664,19 @@ void FindCompSPInput(EnergyPlusData &state, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { ShowSevereError(state, - EnergyPlus::format("Missing high temperature setpoint for {} named {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Missing high temperature setpoint for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - EnergyPlus::format( + std::format( "A high temperature setpoint is needed at the node named {}", state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).SetPointNodeName)); if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Plant) { ShowContinueError( state, - EnergyPlus::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", - state.dataPlnt->PlantLoop(LoopNum).Name)); + std::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", + state.dataPlnt->PlantLoop(LoopNum).Name)); } else if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Condenser) { // not applicable to Condenser loops } @@ -1694,19 +1693,18 @@ void FindCompSPInput(EnergyPlusData &state, .TempSetPointLo == SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - EnergyPlus::format("Missing temperature low setpoint for {} named {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Missing temperature low setpoint for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - EnergyPlus::format( + std::format( "A temperature low setpoint is needed at the node named {}", state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).SetPointNodeName)); if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Plant) { - ShowContinueError( - state, - EnergyPlus::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", - state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowContinueError(state, + std::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", + state.dataPlnt->PlantLoop(LoopNum).Name)); } else if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Condenser) { // not applicable to Condenser loops } @@ -1727,19 +1725,19 @@ void FindCompSPInput(EnergyPlusData &state, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { ShowSevereError(state, - EnergyPlus::format("Missing low temperature setpoint for {} named {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Missing low temperature setpoint for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - EnergyPlus::format( + std::format( "A low temperature setpoint is needed at the node named {}", state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).SetPointNodeName)); if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Plant) { ShowContinueError( state, - EnergyPlus::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", - state.dataPlnt->PlantLoop(LoopNum).Name)); + std::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", + state.dataPlnt->PlantLoop(LoopNum).Name)); } else if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Condenser) { // not applicable to Condenser loops } @@ -1758,19 +1756,18 @@ void FindCompSPInput(EnergyPlusData &state, .TempSetPointLo == SensedNodeFlagValue)) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError(state, - EnergyPlus::format("Missing temperature dual setpoints for {} named {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Missing temperature dual setpoints for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - EnergyPlus::format( + std::format( "A dual temperaturesetpoint is needed at the node named {}", state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).SetPointNodeName)); if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Plant) { - ShowContinueError( - state, - EnergyPlus::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", - state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowContinueError(state, + std::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", + state.dataPlnt->PlantLoop(LoopNum).Name)); } else if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Condenser) { // not applicable to Condenser loops } @@ -1786,19 +1783,19 @@ void FindCompSPInput(EnergyPlusData &state, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { ShowSevereError(state, - EnergyPlus::format("Missing dual temperature setpoint for {} named {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Missing dual temperature setpoint for {} named {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, - EnergyPlus::format( + std::format( "A dual temperature setpoint is needed at the node named {}", state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).EquipList(1).Comp(CompNum).SetPointNodeName)); if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Plant) { ShowContinueError( state, - EnergyPlus::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", - state.dataPlnt->PlantLoop(LoopNum).Name)); + std::format("PlantLoop=\"{}\", Plant Loop Demand Calculation Scheme=DualSetpointDeadband", + state.dataPlnt->PlantLoop(LoopNum).Name)); } else if (state.dataPlnt->PlantLoop(LoopNum).TypeOfLoop == LoopType::Condenser) { // not applicable to Condenser loops } @@ -1817,18 +1814,17 @@ void FindCompSPInput(EnergyPlusData &state, } } else { ShowSevereError( - state, - EnergyPlus::format("{} = \"{}\", specified without any machines.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("{} = \"{}\", specified without any machines.", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } } else { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", could not find {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - CurrentModuleObject, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + std::format("{} = \"{}\", could not find {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + CurrentModuleObject, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ErrorsFound = true; } } @@ -2005,10 +2001,10 @@ void GetChillerHeaterChangeoverOpSchemeInput(EnergyPlusData &state, if (!allocated(scheme.CoolingOnlyEquipList)) { // never found a match ShowSevereError( state, - EnergyPlus::format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " - "=\"{}\", PlantEquipmentOperation:CoolingLoad name = \"{}\" was not found.", - scheme.Name, - coolingOnlyLoadOpName)); + std::format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " + "=\"{}\", PlantEquipmentOperation:CoolingLoad name = \"{}\" was not found.", + scheme.Name, + coolingOnlyLoadOpName)); ErrorsFound = true; } @@ -2112,10 +2108,10 @@ void GetChillerHeaterChangeoverOpSchemeInput(EnergyPlusData &state, if (!allocated(scheme.HeatingOnlyEquipList)) { // never found a match ShowSevereError( state, - EnergyPlus::format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " - "=\"{}\", PlantEquipmentOperation:HeatingLoad name = \"{}\" was not found.", - scheme.Name, - heatingOnlyLoadOpName)); + std::format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " + "=\"{}\", PlantEquipmentOperation:HeatingLoad name = \"{}\" was not found.", + scheme.Name, + heatingOnlyLoadOpName)); ErrorsFound = true; } @@ -2228,10 +2224,10 @@ void GetChillerHeaterChangeoverOpSchemeInput(EnergyPlusData &state, if (scheme.PlantOps.SimulHeatCoolCoolingOpInput && !allocated(scheme.SimultHeatCoolCoolingEquipList)) { ShowSevereError( state, - EnergyPlus::format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " - "=\"{}\", PlantEquipmentOperation:CoolingLoad name = \"{}\" was not found.", - scheme.Name, - simulHeatCoolCoolingOpName)); + std::format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " + "=\"{}\", PlantEquipmentOperation:CoolingLoad name = \"{}\" was not found.", + scheme.Name, + simulHeatCoolCoolingOpName)); ErrorsFound = true; } @@ -2343,10 +2339,10 @@ void GetChillerHeaterChangeoverOpSchemeInput(EnergyPlusData &state, if (scheme.PlantOps.SimultHeatCoolHeatingOpInput && !allocated(scheme.SimultHeatCoolHeatingEquipList)) { ShowSevereError( state, - EnergyPlus::format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " - "=\"{}\", PlantEquipmentOperation:HeatingLoad name = \"{}\" was not found.", - scheme.Name, - simultHeatCoolHeatingOpName)); + std::format("GetChillerHeaterChangeoverOpSchemeInput problem with PlantEquipmentOperation:ChillerHeaterChangeover name " + "=\"{}\", PlantEquipmentOperation:HeatingLoad name = \"{}\" was not found.", + scheme.Name, + simultHeatCoolHeatingOpName)); ErrorsFound = true; } @@ -2442,11 +2438,11 @@ void GetUserDefinedOpSchemeInput(EnergyPlusData &state, } if (Num == NumSchemes) { // did not find it ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", could not find {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - CurrentModuleObject, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + std::format("{} = \"{}\", could not find {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + CurrentModuleObject, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ErrorsFound = true; SchemeNameFound = false; } @@ -2492,9 +2488,9 @@ void GetUserDefinedOpSchemeInput(EnergyPlusData &state, state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).simPluginLocation = state.dataPluginManager->pluginManager->getLocationOfUserDefinedPlugin(state, state.dataIPShortCut->cAlphaArgs(2)); if (state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).simPluginLocation == -1) { - ShowSevereError( - state, EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); + ShowContinueError(state, std::format("Entered in {}={}", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Not found as either an EMS Program Manager or a Python Plugin instance."); ErrorsFound = true; } @@ -2507,10 +2503,9 @@ void GetUserDefinedOpSchemeInput(EnergyPlusData &state, state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).initPluginLocation = state.dataPluginManager->pluginManager->getLocationOfUserDefinedPlugin(state, state.dataIPShortCut->cAlphaArgs(3)); if (state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).initPluginLocation == -1) { - ShowSevereError( - state, - EnergyPlus::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + std::format("Invalid {}={}", state.dataIPShortCut->cAlphaFieldNames(3), state.dataIPShortCut->cAlphaArgs(3))); + ShowContinueError(state, std::format("Entered in {}={}", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Not found as either an EMS Program Manager or a Python Plugin instance."); ErrorsFound = true; } @@ -2527,11 +2522,11 @@ void GetUserDefinedOpSchemeInput(EnergyPlusData &state, } else { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\", could not find {} = \"{}\".", - LoopOpSchemeObj, - state.dataPlnt->PlantLoop(LoopNum).OperationScheme, - CurrentModuleObject, - state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); + std::format("{} = \"{}\", could not find {} = \"{}\".", + LoopOpSchemeObj, + state.dataPlnt->PlantLoop(LoopNum).OperationScheme, + CurrentModuleObject, + state.dataPlnt->PlantLoop(LoopNum).OpScheme(SchemeNum).Name)); ErrorsFound = true; } } @@ -2605,9 +2600,9 @@ void InitLoadDistribution(EnergyPlusData &state, bool const FirstHVACIteration) if (errFlag1) { ShowSevereError(state, "InitLoadDistribution: Equipment specified for operation scheme not found on correct loop"); - ShowContinueError(state, EnergyPlus::format("Operation Scheme name = {}", this_op_scheme.Name)); - ShowContinueError(state, EnergyPlus::format("Loop name = {}", this_plant_loop.Name)); - ShowContinueError(state, EnergyPlus::format("Component name = {}", this_equip.Name)); + ShowContinueError(state, std::format("Operation Scheme name = {}", this_op_scheme.Name)); + ShowContinueError(state, std::format("Loop name = {}", this_plant_loop.Name)); + ShowContinueError(state, std::format("Component name = {}", this_equip.Name)); ShowFatalError(state, "InitLoadDistribution: Simulation terminated because of error in operation scheme."); } @@ -2618,33 +2613,32 @@ void InitLoadDistribution(EnergyPlusData &state, bool const FirstHVACIteration) if (ValidLoopEquipTypes[static_cast(Type)] == LoopType::Plant && this_plant_loop.TypeOfLoop == LoopType::Condenser) { ShowSevereError(state, - EnergyPlus::format("InitLoadDistribution: CondenserLoop=\"{}\", Operation Scheme=\"{}\",", - this_plant_loop.Name, - this_plant_loop.OperationScheme)); - ShowContinueError( - state, - EnergyPlus::format("Scheme type={}, Name=\"{}\" includes equipment that is not valid on a Condenser Loop", - this_op_scheme.TypeOf, - this_op_scheme.Name)); + std::format("InitLoadDistribution: CondenserLoop=\"{}\", Operation Scheme=\"{}\",", + this_plant_loop.Name, + this_plant_loop.OperationScheme)); ShowContinueError(state, - EnergyPlus::format("Component {} not allowed as supply equipment on this type of loop.", - PlantEquipTypeNames[static_cast(Type)])); - ShowContinueError(state, EnergyPlus::format("Component name = {}", this_equip.Name)); + std::format("Scheme type={}, Name=\"{}\" includes equipment that is not valid on a Condenser Loop", + this_op_scheme.TypeOf, + this_op_scheme.Name)); + ShowContinueError(state, + std::format("Component {} not allowed as supply equipment on this type of loop.", + PlantEquipTypeNames[static_cast(Type)])); + ShowContinueError(state, std::format("Component name = {}", this_equip.Name)); errFlag2 = true; } if (ValidLoopEquipTypes[static_cast(Type)] == LoopType::Condenser && this_plant_loop.TypeOfLoop == LoopType::Plant) { ShowSevereError(state, - EnergyPlus::format("InitLoadDistribution: PlantLoop=\"{}\", Operation Scheme=\"{}\",", - this_plant_loop.Name, - this_plant_loop.OperationScheme)); + std::format("InitLoadDistribution: PlantLoop=\"{}\", Operation Scheme=\"{}\",", + this_plant_loop.Name, + this_plant_loop.OperationScheme)); ShowContinueError(state, - EnergyPlus::format("Scheme type={}, Name=\"{}\" includes equipment that is not valid on a Plant Loop", - this_op_scheme.TypeOf, - this_op_scheme.Name)); + std::format("Scheme type={}, Name=\"{}\" includes equipment that is not valid on a Plant Loop", + this_op_scheme.TypeOf, + this_op_scheme.Name)); ShowContinueError(state, - EnergyPlus::format("Component {} not allowed as supply equipment on this type of loop.", - PlantEquipTypeNames[static_cast(Type)])); - ShowContinueError(state, EnergyPlus::format("Component name = {}", this_equip.Name)); + std::format("Component {} not allowed as supply equipment on this type of loop.", + PlantEquipTypeNames[static_cast(Type)])); + ShowContinueError(state, std::format("Component name = {}", this_equip.Name)); errFlag2 = true; } @@ -2663,11 +2657,10 @@ void InitLoadDistribution(EnergyPlusData &state, bool const FirstHVACIteration) if (found) { this_op_scheme.ChillerHeaterSupervisoryOperation->OneTimeInitChillerHeaterChangeoverOpScheme(state); } else { - ShowSevereError( - state, - EnergyPlus::format("InitLoadDistribution: PlantLoop=\"{}\", Operation Scheme=\"{}\", was not found, check input", - this_plant_loop.Name, - this_op_scheme.Name)); + ShowSevereError(state, + std::format("InitLoadDistribution: PlantLoop=\"{}\", Operation Scheme=\"{}\", was not found, check input", + this_plant_loop.Name, + this_op_scheme.Name)); ShowFatalError(state, "Program halted because ChillerHeaterSupervisory operation scheme not found."); } } @@ -2755,11 +2748,10 @@ void InitLoadDistribution(EnergyPlusData &state, bool const FirstHVACIteration) for (int Index = 1; Index <= this_component.NumOpSchemes; ++Index) { int OpSchemePtr = this_component.OpScheme(Index).OpSchemePtr; if (OpSchemePtr == 0) { - ShowSevereError( - state, - EnergyPlus::format("InitLoadDistribution: no operation scheme index found for component on PlantLoop={}", - this_plant_loop.Name)); - ShowContinueError(state, EnergyPlus::format("Component name = {}", this_component.Name)); + ShowSevereError(state, + std::format("InitLoadDistribution: no operation scheme index found for component on PlantLoop={}", + this_plant_loop.Name)); + ShowContinueError(state, std::format("Component name = {}", this_component.Name)); errFlag2 = true; } DataPlant::OpScheme SchemeType{}; @@ -2896,8 +2888,8 @@ void InitLoadDistribution(EnergyPlusData &state, bool const FirstHVACIteration) } else { ShowSevereError(state, "Invalid [pump] component found on equipment list. Pumps are not allowed on equipment lists."); - ShowContinueError( - state, EnergyPlus::format("Problem component name = {}", this_op_scheme.EquipList(ListNum).Comp(CompNum).Name)); + ShowContinueError(state, + std::format("Problem component name = {}", this_op_scheme.EquipList(ListNum).Comp(CompNum).Name)); ShowContinueError(state, "Remove pump component and place other plant equipment on the list to correct."); errFlag2 = true; } @@ -3299,8 +3291,8 @@ void DistributePlantLoad(EnergyPlusData &state, PlantCapacity += this_component.MaxLoad; if (this_component.MaxLoad < SmallLoad) { - ShowWarningMessage( - state, EnergyPlus::format("Plant component {} has zero available capacity. Check component controls.", this_component.Name)); + ShowWarningMessage(state, + std::format("Plant component {} has zero available capacity. Check component controls.", this_component.Name)); MinCompPLR = 0.0; } else { MinCompPLR = this_component.MinLoad / this_component.MaxLoad; @@ -3339,8 +3331,7 @@ void DistributePlantLoad(EnergyPlusData &state, if (PlantCapacity > 0.0) { PlantPLR = min(1.0, std::abs(RemLoopDemand) / PlantCapacity); } else { - ShowWarningError(state, - EnergyPlus::format("Zero available plant capacity for Plant Loop = {}", state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowWarningError(state, std::format("Zero available plant capacity for Plant Loop = {}", state.dataPlnt->PlantLoop(LoopNum).Name)); } // Distribute load to each machine @@ -3421,8 +3412,8 @@ void DistributePlantLoad(EnergyPlusData &state, PlantCapacity += this_component.MaxLoad; if (this_component.MaxLoad < SmallLoad) { - ShowWarningMessage( - state, EnergyPlus::format("Plant component {} has zero available capacity. Check component controls.", this_component.Name)); + ShowWarningMessage(state, + std::format("Plant component {} has zero available capacity. Check component controls.", this_component.Name)); MinCompPLR = 0.0; } else { MinCompPLR = this_component.MinLoad / this_component.MaxLoad; @@ -3442,8 +3433,7 @@ void DistributePlantLoad(EnergyPlusData &state, if (PlantCapacity > 0.0) { PlantPLR = min(1.0, std::abs(RemLoopDemand) / PlantCapacity); } else { - ShowWarningError(state, - EnergyPlus::format("Zero available plant capacity for Plant Loop = {}", state.dataPlnt->PlantLoop(LoopNum).Name)); + ShowWarningError(state, std::format("Zero available plant capacity for Plant Loop = {}", state.dataPlnt->PlantLoop(LoopNum).Name)); } // Distribute load to each machine @@ -4254,10 +4244,9 @@ void SetupPlantEMSActuators(EnergyPlusData &state) } for (int CompNum = 1; CompNum <= state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Branch(BranchNum).TotalComponents; ++CompNum) { - ActuatorName = - EnergyPlus::format("Plant Component {}", - PlantEquipTypeNames[static_cast( - state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Branch(BranchNum).Comp(CompNum).Type)]); + ActuatorName = std::format("Plant Component {}", + PlantEquipTypeNames[static_cast( + state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Branch(BranchNum).Comp(CompNum).Type)]); UniqueIDName = state.dataPlnt->PlantLoop(LoopNum).LoopSide(LoopSideNum).Branch(BranchNum).Comp(CompNum).Name; ActuatorType = "On/Off Supervisory"; SetupEMSActuator(state, diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc index 7f04fcd3685..89860c83db6 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -549,7 +550,7 @@ void GetFluidHeatExchangerInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in processing {} input.", RoutineName, cCurrentModuleObject)); + ShowFatalError(state, std::format("{}Errors found in processing {} input.", RoutineName, cCurrentModuleObject)); } } @@ -742,7 +743,7 @@ void HeatExchangerStruct::size(EnergyPlusData &state) } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "SizeFluidHeatExchanger: Autosizing of requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in heat exchanger object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in heat exchanger object={}", this->Name)); } } } @@ -845,7 +846,7 @@ void HeatExchangerStruct::size(EnergyPlusData &state) } else { if (state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "SizeFluidHeatExchanger: Autosizing of heat Exchanger UA requires a loop Sizing:Plant objects for both loops"); - ShowContinueError(state, EnergyPlus::format("Occurs in heat exchanger object={}", this->Name)); + ShowContinueError(state, std::format("Occurs in heat exchanger object={}", this->Name)); } } } @@ -1741,9 +1742,9 @@ void HeatExchangerStruct::findDemandSideLoopFlow(EnergyPlusData &state, Real64 c if (this->DmdSideModulatSolvNoConvergeErrorCount < 1) { ++this->DmdSideModulatSolvNoConvergeErrorCount; ShowWarningError(state, - EnergyPlus::format("{} named {} - Iteration Limit exceeded calculating demand side loop flow rate", - ComponentClassName, - this->Name)); + std::format("{} named {} - Iteration Limit exceeded calculating demand side loop flow rate", + ComponentClassName, + this->Name)); ShowContinueError( state, EnergyPlus::format("Simulation continues with calculated demand side mass flow rate = {:.7R}", DmdSideMdot)); } @@ -1760,9 +1761,9 @@ void HeatExchangerStruct::findDemandSideLoopFlow(EnergyPlusData &state, Real64 c if (!state.dataGlobal->WarmupFlag) { if (this->DmdSideModulatSolvFailErrorCount < 1) { ++this->DmdSideModulatSolvFailErrorCount; - ShowWarningError(state, - EnergyPlus::format( - "{} named {} - Solver failed to calculate demand side loop flow rate", ComponentClassName, this->Name)); + ShowWarningError( + state, + std::format("{} named {} - Solver failed to calculate demand side loop flow rate", ComponentClassName, this->Name)); ShowContinueError(state, EnergyPlus::format("Simulation continues with estimated demand side mass flow rate = {:.7R}", DmdSideMdot)); } @@ -1807,9 +1808,9 @@ void HeatExchangerStruct::findDemandSideLoopFlow(EnergyPlusData &state, Real64 c if (this->DmdSideModulatSolvNoConvergeErrorCount < 1) { ++this->DmdSideModulatSolvNoConvergeErrorCount; ShowWarningError(state, - EnergyPlus::format("{} named {} - Iteration Limit exceeded calculating demand side loop flow rate", - ComponentClassName, - this->Name)); + std::format("{} named {} - Iteration Limit exceeded calculating demand side loop flow rate", + ComponentClassName, + this->Name)); ShowContinueError( state, EnergyPlus::format("Simulation continues with calculated demand side mass flow rate = {:.7R}", DmdSideMdot)); } @@ -1826,9 +1827,9 @@ void HeatExchangerStruct::findDemandSideLoopFlow(EnergyPlusData &state, Real64 c if (!state.dataGlobal->WarmupFlag) { if (this->DmdSideModulatSolvFailErrorCount < 1) { ++this->DmdSideModulatSolvFailErrorCount; - ShowWarningError(state, - EnergyPlus::format( - "{} named {} - Solver failed to calculate demand side loop flow rate", ComponentClassName, this->Name)); + ShowWarningError( + state, + std::format("{} named {} - Solver failed to calculate demand side loop flow rate", ComponentClassName, this->Name)); ShowContinueError(state, EnergyPlus::format("Simulation continues with estimated demand side mass flow rate = {:.7R}", DmdSideMdot)); } @@ -1888,12 +1889,11 @@ void HeatExchangerStruct::oneTimeInit(EnergyPlusData &state) _); if (this->DemandSideLoop.loopSideNum != DataPlant::LoopSideLocation::Demand) { // throw error - ShowSevereError( - state, - EnergyPlus::format("{} Invalid connections for {} name = \"{}\"", - RoutineName, - DataPlant::PlantEquipTypeNames[static_cast(DataPlant::PlantEquipmentType::FluidToFluidPlantHtExchg)], - this->Name)); + ShowSevereError(state, + std::format("{} Invalid connections for {} name = \"{}\"", + RoutineName, + DataPlant::PlantEquipTypeNames[static_cast(DataPlant::PlantEquipmentType::FluidToFluidPlantHtExchg)], + this->Name)); ShowContinueError(state, "The \"Loop Demand Side\" connections are not on the Demand Side of a plant loop"); errFlag = true; } @@ -1910,24 +1910,22 @@ void HeatExchangerStruct::oneTimeInit(EnergyPlusData &state) _); if (this->SupplySideLoop.loopSideNum != DataPlant::LoopSideLocation::Supply) { // throw error - ShowSevereError( - state, - EnergyPlus::format("{} Invalid connections for {} name = \"{}\"", - RoutineName, - DataPlant::PlantEquipTypeNames[static_cast(DataPlant::PlantEquipmentType::FluidToFluidPlantHtExchg)], - this->Name)); + ShowSevereError(state, + std::format("{} Invalid connections for {} name = \"{}\"", + RoutineName, + DataPlant::PlantEquipTypeNames[static_cast(DataPlant::PlantEquipmentType::FluidToFluidPlantHtExchg)], + this->Name)); ShowContinueError(state, "The \"Loop Supply Side\" connections are not on the Supply Side of a plant loop"); errFlag = true; } // make sure it is not the same loop on both sides. if (this->SupplySideLoop.loopNum == this->DemandSideLoop.loopNum) { // user is being too tricky, don't allow - ShowSevereError( - state, - EnergyPlus::format("{} Invalid connections for {} name = \"{}\"", - RoutineName, - DataPlant::PlantEquipTypeNames[static_cast(DataPlant::PlantEquipmentType::FluidToFluidPlantHtExchg)], - this->Name)); + ShowSevereError(state, + std::format("{} Invalid connections for {} name = \"{}\"", + RoutineName, + DataPlant::PlantEquipTypeNames[static_cast(DataPlant::PlantEquipmentType::FluidToFluidPlantHtExchg)], + this->Name)); ShowContinueError(state, R"(The "Loop Supply Side" and "Loop Demand Side" need to be on different loops.)"); errFlag = true; } else { @@ -2006,7 +2004,7 @@ void HeatExchangerStruct::oneTimeInit(EnergyPlusData &state) } if (errFlag) { - ShowFatalError(state, EnergyPlus::format("{} Program terminated due to previous condition(s).", RoutineName)); + ShowFatalError(state, std::format("{} Program terminated due to previous condition(s).", RoutineName)); } this->MyFlag = false; } diff --git a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc index bed4d4a42c5..1bd1ef2617a 100644 --- a/src/EnergyPlus/PlantLoopHeatPumpEIR.cc +++ b/src/EnergyPlus/PlantLoopHeatPumpEIR.cc @@ -45,12 +45,13 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -// C++ headers +// C++ Headers #include +#include #include #include -// EnergyPlus headers +// EnergyPlus Headers #include #include #include @@ -878,10 +879,10 @@ void EIRPlantLoopHeatPump::capModFTCurveCheck(EnergyPlusData &state, const Real6 ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); ShowContinueError( state, - EnergyPlus::format(" Capacity Modifier curve (function of Temperatures) output is negative ({:.3T}).", capacityModifierFuncTemp)); + EnergyPlus::format(" Capacity Modifier curve (function of Temperatures) output is negative ({:.3f}).", capacityModifierFuncTemp)); ShowContinueError( state, - EnergyPlus::format(" Negative value occurs using a water temperature of {:.2T}C and an outdoor air temperature of {:.2T}C.", + EnergyPlus::format(" Negative value occurs using a water temperature of {:.2f}C and an outdoor air temperature of {:.2f}C.", loadSideOutletSetpointTemp, this->sourceSideInletTemp)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); @@ -907,12 +908,12 @@ void EIRPlantLoopHeatPump::heatRecoveryCapModFTCurveCheck(EnergyPlusData &state, ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); ShowContinueError( state, - EnergyPlus::format(" Heat Recovery mode Capacity Modifier curve (function of Temperatures) output is negative ({:.3T}).", + EnergyPlus::format(" Heat Recovery mode Capacity Modifier curve (function of Temperatures) output is negative ({:.3f}).", capacityModifierFuncTemp)); ShowContinueError( state, - EnergyPlus::format(" Negative value occurs using a load side water temperature of {:.2T}C and heat recovery entering water " - "temperature of {:.2T}C.", + EnergyPlus::format(" Negative value occurs using a load side water temperature of {:.2f}C and heat recovery entering water " + "temperature of {:.2f}C.", loadSideOutletSetpointTemp, this->heatRecoveryInletTemp)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); @@ -936,10 +937,10 @@ void EIRPlantLoopHeatPump::eirModCurveCheck(EnergyPlusData &state, Real64 &eirMo if (this->eirModFTErrorIndex == 0) { ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); ShowContinueError(state, - EnergyPlus::format(" EIR Modifier curve (function of Temperatures) output is negative ({:.3T}).", eirModifierFuncTemp)); + EnergyPlus::format(" EIR Modifier curve (function of Temperatures) output is negative ({:.3f}).", eirModifierFuncTemp)); ShowContinueError( state, - EnergyPlus::format(" Negative value occurs using a water temperature of {:.2T}C and an outdoor air temperature of {:.2T}C.", + EnergyPlus::format(" Negative value occurs using a water temperature of {:.2f}C and an outdoor air temperature of {:.2f}C.", this->loadSideOutletTemp, this->sourceSideInletTemp)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); @@ -962,12 +963,12 @@ void EIRPlantLoopHeatPump::heatRecoveryEIRModCurveCheck(EnergyPlusData &state, R if (this->heatRecEIRModFTErrorIndex == 0 && heatRecoveryEIRFTempCurveIndex > 0) { ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); ShowContinueError(state, - EnergyPlus::format(" Heat Recovery mode EIR Modifier curve (function of Temperatures) output is negative ({:.3T}).", + EnergyPlus::format(" Heat Recovery mode EIR Modifier curve (function of Temperatures) output is negative ({:.3f}).", eirModifierFuncTemp)); ShowContinueError( state, - EnergyPlus::format(" Negative value occurs using a load side water temperature of {:.2T}C and heat recovery entering water " - "temperature of {:.2T}C.", + EnergyPlus::format(" Negative value occurs using a load side water temperature of {:.2f}C and heat recovery entering water " + "temperature of {:.2f}C.", this->loadSideOutletTemp, this->heatRecoveryInletTemp)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); @@ -989,14 +990,14 @@ void EIRPlantLoopHeatPump::eirModFPLRCurveCheck(EnergyPlusData &state, Real64 &e if (eirModifierFuncPLR < 0.0) { if (this->eirModFPLRErrorIndex == 0) { ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError(state, EnergyPlus::format(" EIR Modifier curve (function of PLR) output is negative ({:.3T}).", eirModifierFuncPLR)); - ShowContinueError(state, EnergyPlus::format(" Negative value occurs using a Part Load Ratio of {:.2T}", this->partLoadRatio)); + ShowContinueError(state, EnergyPlus::format(" EIR Modifier curve (function of PLR) output is negative ({:.3f}).", eirModifierFuncPLR)); + ShowContinueError(state, std::format(" Negative value occurs using a Part Load Ratio of {:.2f}", this->partLoadRatio)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{} \"{}\": EIR Modifier curve (function of PLR) output is negative warning continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name), + std::format("{} \"{}\": EIR Modifier curve (function of PLR) output is negative warning continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name), this->eirModFPLRErrorIndex, eirModifierFuncPLR, eirModifierFuncPLR); @@ -1172,7 +1173,7 @@ void HeatPumpAirToWater::reportEquipmentSummary(EnergyPlusData &state) } else if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpAirToWaterCooling) { modeKeyWord = "Cooling"; } - objectName = EnergyPlus::format("{} {} Component", this->name, modeKeyWord); + objectName = std::format("{} {} Component", this->name, modeKeyWord); constexpr std::array(ControlType::Num)> AWHPCompressorControlTypeUC = {"FIXEDSPEED", "VARIABLESPEED"}; auto typeNameCompressor = AWHPCompressorControlTypeUC[static_cast(this->controlType)]; OutputReportPredefined::PreDefTableEntry(state, state.dataOutRptPredefined->pdchAWHPType, objectName, typeNameCompressor); @@ -1252,10 +1253,10 @@ void EIRPlantLoopHeatPump::sizeLoadSide(EnergyPlusData &state) flowRateKW = "Rated Water Volume Flow Rate in Heating Mode"; typeName = "HeatPump:AirToWater"; } - std::string userCapacityKW = fmt::format("User-Specified {} [W]", capacityKW); - std::string designCapacityKW = fmt::format("Design Size {} [W]", capacityKW); - std::string userFlowKW = fmt::format("User-Specified {} [m3/s]", flowRateKW); - std::string designFlowKW = fmt::format("Design Size {} [m3/s]", flowRateKW); + std::string userCapacityKW = std::format("User-Specified {} [W]", capacityKW); + std::string designCapacityKW = std::format("Design Size {} [W]", capacityKW); + std::string userFlowKW = std::format("User-Specified {} [m3/s]", flowRateKW); + std::string designFlowKW = std::format("Design Size {} [m3/s]", flowRateKW); Real64 loadSideInitTemp = (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpEIRHeating) ? Constant::HWInitConvTemp : Constant::CWInitConvTemp; // I guess I can assume the plant fluids are the same for HW and CW. So only the sizing type is an issue on which to use. @@ -1377,7 +1378,7 @@ void EIRPlantLoopHeatPump::sizeLoadSide(EnergyPlusData &state) BaseSizer::reportSizerOutput(state, typeName, this->name, designCapacityKW, tmpCapacity); } if (state.dataPlnt->PlantFirstSizesOkayToReport) { - BaseSizer::reportSizerOutput(state, typeName, this->name, fmt::format("Initial {}", designCapacityKW), tmpCapacity); + BaseSizer::reportSizerOutput(state, typeName, this->name, std::format("Initial {}", designCapacityKW), tmpCapacity); } } else { // this blocks means the capacity value was hard-sized @@ -1395,8 +1396,7 @@ void EIRPlantLoopHeatPump::sizeLoadSide(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpCapacity - hardSizedCapacity) / hardSizedCapacity) > state.dataSize->AutoVsHardSizingThreshold) { ShowWarningMessage( - state, - EnergyPlus::format("EIRPlantLoopHeatPump::size(): Potential issue with equipment sizing for {}", this->name)); + state, std::format("EIRPlantLoopHeatPump::size(): Potential issue with equipment sizing for {}", this->name)); ShowContinueError(state, EnergyPlus::format("User-Specified {} of {:.2R} [W]", capacityKW, hardSizedCapacity)); ShowContinueError(state, EnergyPlus::format("differs from Design Size {} of {:.2R} [W]", capacityKW, tmpCapacity)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); @@ -1416,7 +1416,7 @@ void EIRPlantLoopHeatPump::sizeLoadSide(EnergyPlusData &state) BaseSizer::reportSizerOutput(state, typeName, this->name, designFlowKW, tmpLoadVolFlow); } if (state.dataPlnt->PlantFirstSizesOkayToReport) { - BaseSizer::reportSizerOutput(state, typeName, this->name, fmt::format("Initial {}", designFlowKW), tmpLoadVolFlow); + BaseSizer::reportSizerOutput(state, typeName, this->name, std::format("Initial {}", designFlowKW), tmpLoadVolFlow); } } else { if (this->loadSideDesignVolFlowRate > 0.0 && tmpLoadVolFlow > 0.0) { @@ -1431,9 +1431,8 @@ void EIRPlantLoopHeatPump::sizeLoadSide(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpLoadVolFlow - hardSizedLoadSideFlow) / hardSizedLoadSideFlow) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("EIRPlantLoopHeatPump::size(): Potential issue with equipment sizing for {}", this->name)); + ShowMessage(state, + std::format("EIRPlantLoopHeatPump::size(): Potential issue with equipment sizing for {}", this->name)); ShowContinueError(state, EnergyPlus::format("User-Specified {} of {:.2R} [m3/s]", flowRateKW, hardSizedLoadSideFlow)); ShowContinueError(state, EnergyPlus::format("differs from Design Size {} of {:.2R} [m3/s]", flowRateKW, tmpLoadVolFlow)); @@ -1457,7 +1456,7 @@ void EIRPlantLoopHeatPump::sizeLoadSide(EnergyPlusData &state) BaseSizer::reportSizerOutput(state, typeName, this->name, designFlowKW, tmpLoadVolFlow); } if (state.dataPlnt->PlantFirstSizesOkayToReport) { - BaseSizer::reportSizerOutput(state, typeName, this->name, fmt::format("Initial {} [m3/s]", designFlowKW), tmpLoadVolFlow); + BaseSizer::reportSizerOutput(state, typeName, this->name, std::format("Initial {} [m3/s]", designFlowKW), tmpLoadVolFlow); } } } @@ -1469,7 +1468,7 @@ void EIRPlantLoopHeatPump::sizeLoadSide(EnergyPlusData &state) BaseSizer::reportSizerOutput(state, typeName, this->name, designCapacityKW, tmpCapacity); } if (state.dataPlnt->PlantFirstSizesOkayToReport) { - BaseSizer::reportSizerOutput(state, typeName, this->name, fmt::format("Initial {}", designCapacityKW), tmpCapacity); + BaseSizer::reportSizerOutput(state, typeName, this->name, std::format("Initial {}", designCapacityKW), tmpCapacity); } } } @@ -1478,14 +1477,14 @@ void EIRPlantLoopHeatPump::sizeLoadSide(EnergyPlusData &state) if ((this->loadSideDesignVolFlowRateWasAutoSized || this->referenceCapacityWasAutoSized) && state.dataPlnt->PlantFirstSizesOkayToFinalize) { ShowSevereError(state, "EIRPlantLoopHeatPump::size(): Autosizing requires a loop Sizing:Plant object."); - ShowContinueError(state, EnergyPlus::format("Occurs in HeatPump:PlantLoop:EquationFit:Cooling object = {}", this->name)); + ShowContinueError(state, std::format("Occurs in HeatPump:PlantLoop:EquationFit:Cooling object = {}", this->name)); errorsFound = true; } } if (!this->loadSideDesignVolFlowRateWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport) { std::string flowRateKW_no_v = "Load Side Flow Rate"; BaseSizer::reportSizerOutput( - state, typeName, this->name, fmt::format("User-Specified {} [m3/s]", flowRateKW_no_v), this->loadSideDesignVolFlowRate); + state, typeName, this->name, std::format("User-Specified {} [m3/s]", flowRateKW_no_v), this->loadSideDesignVolFlowRate); } if (!this->referenceCapacityWasAutoSized && state.dataPlnt->PlantFinalSizesOkayToReport) { BaseSizer::reportSizerOutput(state, typeName, this->name, userCapacityKW, this->referenceCapacity); @@ -1572,8 +1571,7 @@ void EIRPlantLoopHeatPump::sizeSrcSideWSHP(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpSourceVolFlow - hardSizedSourceSideFlow) / hardSizedSourceSideFlow) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("EIRPlantLoopHeatPump::size(): Potential issue with equipment sizing for {}", this->name)); + ShowMessage(state, std::format("EIRPlantLoopHeatPump::size(): Potential issue with equipment sizing for {}", this->name)); ShowContinueError( state, EnergyPlus::format("User-Specified Source Side Volume Flow Rate of {:.2R} [m3/s]", hardSizedSourceSideFlow)); ShowContinueError( @@ -1666,9 +1664,9 @@ void EIRPlantLoopHeatPump::sizeSrcSideASHP(EnergyPlusData &state) // fatal out just in case errorsFound = true; // LCOV_EXCL_LINE ShowSevereError(state, - EnergyPlus::format("Invalid condenser flow rate for EIR PLHP (name={}; entered value: {}", - this->name, - this->sourceSideDesignVolFlowRate)); // LCOV_EXCL_LINE + std::format("Invalid condenser flow rate for EIR PLHP (name={}; entered value: {}", + this->name, + this->sourceSideDesignVolFlowRate)); // LCOV_EXCL_LINE } else { // can't imagine how it would ever get to this point // just assume it's the same as the load side if we don't have any sizing information @@ -1692,15 +1690,15 @@ void EIRPlantLoopHeatPump::sizeSrcSideASHP(EnergyPlusData &state) flowRateKW = "Rated Air Volume Flow Rate in Heating Mode"; typeName = "HeatPump:AirToWater"; } - std::string userFlowKW = fmt::format("User-Specified {} [m3/s]", flowRateKW); - std::string designFlowKW = fmt::format("Design Size {} [m3/s]", flowRateKW); + std::string userFlowKW = std::format("User-Specified {} [m3/s]", flowRateKW); + std::string designFlowKW = std::format("Design Size {} [m3/s]", flowRateKW); if (this->sourceSideDesignVolFlowRateWasAutoSized) { this->sourceSideDesignVolFlowRate = tmpSourceVolFlow; if (state.dataPlnt->PlantFinalSizesOkayToReport) { BaseSizer::reportSizerOutput(state, typeName, this->name, designFlowKW, tmpSourceVolFlow); } if (state.dataPlnt->PlantFirstSizesOkayToReport) { - BaseSizer::reportSizerOutput(state, typeName, this->name, fmt::format("Initial {}", designFlowKW), tmpSourceVolFlow); + BaseSizer::reportSizerOutput(state, typeName, this->name, std::format("Initial {}", designFlowKW), tmpSourceVolFlow); } } else { // source design flow was hard-sized @@ -1803,8 +1801,7 @@ void EIRPlantLoopHeatPump::sizeHeatRecoveryASHP(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(tmpHeatRecoveryVolFlow - hardSizedHeatRecoveryFlow) / hardSizedHeatRecoveryFlow) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format("EIRPlantLoopHeatPump::size(): Potential issue with equipment sizing for {}", this->name)); + ShowMessage(state, std::format("EIRPlantLoopHeatPump::size(): Potential issue with equipment sizing for {}", this->name)); ShowContinueError( state, EnergyPlus::format("User-Specified Heat Recovery Side Volume Flow Rate of {:.2R} [m3/s]", hardSizedHeatRecoveryFlow)); @@ -1834,7 +1831,7 @@ PlantComponent *EIRPlantLoopHeatPump::factory(EnergyPlusData &state, DataPlant:: } } - ShowFatalError(state, EnergyPlus::format("EIR Plant Loop Heat Pump factory: Error getting inputs for PLHP named: {}", hp_name)); + ShowFatalError(state, std::format("EIR Plant Loop Heat Pump factory: Error getting inputs for PLHP named: {}", hp_name)); return nullptr; // LCOV_EXCL_LINE } @@ -1854,8 +1851,8 @@ void EIRPlantLoopHeatPump::pairUpCompanionCoils(EnergyPlusData &state) } if (potentialCompanionName == targetCompanionName) { if (thisCoilType == potentialCompanionType) { - ShowSevereError( - state, EnergyPlus::format("Invalid companion specification for EIR Plant Loop Heat Pump named \"{}\"", thisCoilName)); + ShowSevereError(state, + std::format("Invalid companion specification for EIR Plant Loop Heat Pump named \"{}\"", thisCoilName)); ShowContinueError(state, "For heating objects, the companion must be a cooling object, and vice-versa"); ShowFatalError(state, "Invalid companion object causes program termination"); } @@ -1865,8 +1862,8 @@ void EIRPlantLoopHeatPump::pairUpCompanionCoils(EnergyPlusData &state) } if (thisHP.companionHeatPumpCoil == nullptr) { ShowSevereError(state, "Could not find matching companion heat pump coil."); - ShowContinueError(state, EnergyPlus::format("Base coil: {}", thisCoilName)); - ShowContinueError(state, EnergyPlus::format("Looking for companion coil named: {}", targetCompanionName)); + ShowContinueError(state, std::format("Base coil: {}", thisCoilName)); + ShowContinueError(state, std::format("Looking for companion coil named: {}", targetCompanionName)); ShowFatalError(state, "Simulation aborts due to previous severe error"); } } @@ -1967,8 +1964,7 @@ void EIRPlantLoopHeatPump::processInputForEIRPLHP(EnergyPlusData &state) std::string const capFtName = Util::makeUPPER(fields.at("capacity_modifier_function_of_temperature_curve_name").get()); thisPLHP.capFuncTempCurveIndex = Curve::GetCurveIndex(state, capFtName); if (thisPLHP.capFuncTempCurveIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid curve name for EIR PLHP (name={}; entered curve name: {}", thisPLHP.name, capFtName)); + ShowSevereError(state, std::format("Invalid curve name for EIR PLHP (name={}; entered curve name: {}", thisPLHP.name, capFtName)); errorsFound = true; } @@ -1976,8 +1972,7 @@ void EIRPlantLoopHeatPump::processInputForEIRPLHP(EnergyPlusData &state) Util::makeUPPER(fields.at("electric_input_to_output_ratio_modifier_function_of_temperature_curve_name").get()); thisPLHP.powerRatioFuncTempCurveIndex = Curve::GetCurveIndex(state, eirFtName); if (thisPLHP.powerRatioFuncTempCurveIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid curve name for EIR PLHP (name={}; entered curve name: {}", thisPLHP.name, eirFtName)); + ShowSevereError(state, std::format("Invalid curve name for EIR PLHP (name={}; entered curve name: {}", thisPLHP.name, eirFtName)); errorsFound = true; } @@ -1985,8 +1980,8 @@ void EIRPlantLoopHeatPump::processInputForEIRPLHP(EnergyPlusData &state) Util::makeUPPER(fields.at("electric_input_to_output_ratio_modifier_function_of_part_load_ratio_curve_name").get()); thisPLHP.powerRatioFuncPLRCurveIndex = Curve::GetCurveIndex(state, eirFplrName); if (thisPLHP.powerRatioFuncPLRCurveIndex == 0) { - ShowSevereError( - state, EnergyPlus::format("Invalid curve name for EIR PLHP (name={}; entered curve name: {}", thisPLHP.name, eirFplrName)); + ShowSevereError(state, + std::format("Invalid curve name for EIR PLHP (name={}; entered curve name: {}", thisPLHP.name, eirFplrName)); errorsFound = true; } @@ -2016,10 +2011,10 @@ void EIRPlantLoopHeatPump::processInputForEIRPLHP(EnergyPlusData &state) thisPLHP.thermosiphonTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(thermosiphonTempCurveName.value().get())); if (thisPLHP.thermosiphonTempCurveIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{} =\"{}\"", state.dataIPShortCut->cCurrentModuleObject, thisPLHP.name)); + ShowSevereError(state, std::format("{} =\"{}\"", state.dataIPShortCut->cCurrentModuleObject, thisPLHP.name)); ShowContinueError(state, - EnergyPlus::format("Invalid Thermosiphon Capacity Fraction Curve Name = {}", - thermosiphonTempCurveName.value().get())); + std::format("Invalid Thermosiphon Capacity Fraction Curve Name = {}", + thermosiphonTempCurveName.value().get())); errorsFound = true; } } @@ -2147,17 +2142,17 @@ void EIRPlantLoopHeatPump::processInputForEIRPLHP(EnergyPlusData &state) condenserNodeConnectionType_Inlet = Node::ConnectionType::Inlet; condenserNodeConnectionType_Outlet = Node::ConnectionType::Outlet; if (sourceSideInletNodeName == sourceSideOutletNodeName) { - ShowSevereError(state, EnergyPlus::format("PlantLoopHeatPump {} has the same inlet and outlet node.", thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Node Name: {}", sourceSideInletNodeName)); + ShowSevereError(state, std::format("PlantLoopHeatPump {} has the same inlet and outlet node.", thisObjectName)); + ShowContinueError(state, std::format("Node Name: {}", sourceSideInletNodeName)); errorsFound = true; } } else { // Again, this should be protected by the input processor ShowErrorMessage(state, - EnergyPlus::format("Invalid heat pump condenser type (name={}; entered type: {}", - thisPLHP.name, - condenserType)); // LCOV_EXCL_LINE - errorsFound = true; // LCOV_EXCL_LINE + std::format("Invalid heat pump condenser type (name={}; entered type: {}", + thisPLHP.name, + condenserType)); // LCOV_EXCL_LINE + errorsFound = true; // LCOV_EXCL_LINE } thisPLHP.sourceSideNodes.inlet = Node::GetOnlySingleNode(state, sourceSideInletNodeName, @@ -2351,28 +2346,28 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) // setup output variables SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Part Load Ratio{}", suffix), + std::format("Heat Pump Part Load Ratio{}", suffix), Constant::Units::None, this->partLoadRatio, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Cycling Ratio{}", suffix), + std::format("Heat Pump Cycling Ratio{}", suffix), Constant::Units::None, this->cyclingRatio, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Load Side Heat Transfer Rate{}", suffix), + std::format("Heat Pump Load Side Heat Transfer Rate{}", suffix), Constant::Units::W, this->loadSideHeatTransfer, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Load Side Heat Transfer Energy{}", suffix), + std::format("Heat Pump Load Side Heat Transfer Energy{}", suffix), Constant::Units::J, this->loadSideEnergy, OutputProcessor::TimeStepType::System, @@ -2381,49 +2376,49 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) Constant::eResource::EnergyTransfer, OutputProcessor::Group::Plant); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Source Side Heat Transfer Rate{}", suffix), + std::format("Heat Pump Source Side Heat Transfer Rate{}", suffix), Constant::Units::W, this->sourceSideHeatTransfer, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Source Side Heat Transfer Energy{}", suffix), + std::format("Heat Pump Source Side Heat Transfer Energy{}", suffix), Constant::Units::J, this->sourceSideEnergy, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Sum, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Load Side Inlet Temperature{}", suffix), + std::format("Heat Pump Load Side Inlet Temperature{}", suffix), Constant::Units::C, this->loadSideInletTemp, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Load Side Outlet Temperature{}", suffix), + std::format("Heat Pump Load Side Outlet Temperature{}", suffix), Constant::Units::C, this->loadSideOutletTemp, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Source Side Inlet Temperature{}", suffix), + std::format("Heat Pump Source Side Inlet Temperature{}", suffix), Constant::Units::C, this->sourceSideInletTemp, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Source Side Outlet Temperature{}", suffix), + std::format("Heat Pump Source Side Outlet Temperature{}", suffix), Constant::Units::C, this->sourceSideOutletTemp, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Electricity Rate{}", suffix), + std::format("Heat Pump Electricity Rate{}", suffix), Constant::Units::W, this->powerUsage, OutputProcessor::TimeStepType::System, @@ -2432,7 +2427,7 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpEIRCooling || this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpAirToWaterCooling) { // energy from HeatPump:PlantLoop:EIR:Cooling object SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Electricity Energy{}", suffix), + std::format("Heat Pump Electricity Energy{}", suffix), Constant::Units::J, this->powerEnergy, OutputProcessor::TimeStepType::System, @@ -2452,7 +2447,7 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) } else if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpEIRHeating || this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpAirToWaterHeating) { // energy from HeatPump:PlantLoop:EIR:Heating object SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Electricity Energy{}", suffix), + std::format("Heat Pump Electricity Energy{}", suffix), Constant::Units::J, this->powerEnergy, OutputProcessor::TimeStepType::System, @@ -2498,14 +2493,14 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) } } SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Load Side Mass Flow Rate{}", suffix), + std::format("Heat Pump Load Side Mass Flow Rate{}", suffix), Constant::Units::kg_s, this->loadSideMassFlowRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Source Side Mass Flow Rate{}", suffix), + std::format("Heat Pump Source Side Mass Flow Rate{}", suffix), Constant::Units::kg_s, this->sourceSideMassFlowRate, OutputProcessor::TimeStepType::System, @@ -2574,18 +2569,18 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) if (thisErrFlag) { ShowSevereError(state, - EnergyPlus::format("{}: Plant topology problem for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + std::format("{}: Plant topology problem for {} name = \"{}\"", + routineName, + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name)); ShowContinueError(state, "Could not locate component's load side connections on a plant loop"); errFlag = true; } else if (this->loadSidePlantLoc.loopSideNum != DataPlant::LoopSideLocation::Supply) { // only check if !thisErrFlag ShowSevereError(state, - EnergyPlus::format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + std::format("{}: Invalid connections for {} name = \"{}\"", + routineName, + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name)); ShowContinueError(state, "The load side connections are not on the Supply Side of a plant loop"); errFlag = true; } @@ -2597,18 +2592,18 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) if (thisErrFlag) { ShowSevereError(state, - EnergyPlus::format("{}: Plant topology problem for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + std::format("{}: Plant topology problem for {} name = \"{}\"", + routineName, + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name)); ShowContinueError(state, "Could not locate component's source side connections on a plant loop"); errFlag = true; } else if (this->sourceSidePlantLoc.loopSideNum != DataPlant::LoopSideLocation::Demand) { // only check if !thisErrFlag ShowSevereError(state, - EnergyPlus::format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + std::format("{}: Invalid connections for {} name = \"{}\"", + routineName, + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name)); ShowContinueError(state, "The source side connections are not on the Demand Side of a plant loop"); errFlag = true; } @@ -2616,10 +2611,10 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) // make sure it is not the same loop on both sides. if (this->loadSidePlantLoc.loopNum == this->sourceSidePlantLoc.loopNum) { // user is being too tricky, don't allow ShowSevereError(state, - EnergyPlus::format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + std::format("{}: Invalid connections for {} name = \"{}\"", + routineName, + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name)); ShowContinueError(state, "The load and source sides need to be on different loops."); errFlag = true; } else { @@ -2634,18 +2629,18 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) if (thisErrFlag) { ShowSevereError(state, - EnergyPlus::format("{}: Plant topology problem for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + std::format("{}: Plant topology problem for {} name = \"{}\"", + routineName, + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name)); ShowContinueError(state, "Could not locate component's heat recovery side connections on a plant loop."); errFlag = true; } else if (this->heatRecoveryPlantLoc.loopSideNum != DataPlant::LoopSideLocation::Demand) { // only check if !thisErrFlag ShowSevereError(state, - EnergyPlus::format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + std::format("{}: Invalid connections for {} name = \"{}\"", + routineName, + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name)); ShowContinueError(state, "The heat recovery side connections are not on the Demand Side of a plant loop."); errFlag = true; } @@ -2653,10 +2648,10 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) // make sure it is not the same loop on both sides. if (this->loadSidePlantLoc.loopNum == this->heatRecoveryPlantLoc.loopNum) { // user is being too tricky, don't allow ShowSevereError(state, - EnergyPlus::format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + std::format("{}: Invalid connections for {} name = \"{}\"", + routineName, + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name)); ShowContinueError(state, "The load and heat recovery sides need to be on different loops."); errFlag = true; } else { @@ -2674,10 +2669,10 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { if (!this->SetpointSetToLoopErrDone) { ShowWarningError(state, - EnergyPlus::format("{}: Missing temperature setpoint for Setpoint Controlled {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + std::format("{}: Missing temperature setpoint for Setpoint Controlled {} name = \"{}\"", + routineName, + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name)); ShowContinueError(state, " A temperature setpoint is needed at the load side outlet node, use a SetpointManager"); ShowContinueError(state, " The overall loop setpoint will be assumed for the Heat Pump. The simulation continues ... "); this->SetpointSetToLoopErrDone = true; @@ -2690,10 +2685,10 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) if (fatalError) { if (!this->SetpointSetToLoopErrDone) { ShowWarningError(state, - EnergyPlus::format("{}: Missing temperature setpoint for Setpoint Controlled {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + std::format("{}: Missing temperature setpoint for Setpoint Controlled {} name = \"{}\"", + routineName, + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name)); ShowContinueError(state, " A temperature setpoint is needed at the load side outlet node when ControlType = Setpoint"); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the outlet node "); ShowContinueError(state, " or use an EMS actuator to establish a setpoint at the outlet node "); @@ -2711,7 +2706,7 @@ void EIRPlantLoopHeatPump::oneTimeInit(EnergyPlusData &state) } if (errFlag) { - ShowFatalError(state, EnergyPlus::format("{}: Program terminated due to previous condition(s).", routineName)); + ShowFatalError(state, std::format("{}: Program terminated due to previous condition(s).", routineName)); } this->oneTimeInitFlag = false; } @@ -2732,14 +2727,14 @@ void HeatPumpAirToWater::oneTimeInit(EnergyPlusData &state) if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpAirToWaterHeating || this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpAirToWaterCooling) { SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Total {} Rate", mode_keyword), + std::format("Heat Pump Total {} Rate", mode_keyword), Constant::Units::W, this->loadSideHeatTransfer, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Number Of {} Unit On", mode_keyword), + std::format("Heat Pump Number Of {} Unit On", mode_keyword), Constant::Units::None, this->operatingMode, OutputProcessor::TimeStepType::System, @@ -2747,35 +2742,35 @@ void HeatPumpAirToWater::oneTimeInit(EnergyPlusData &state) this->name); // note this is 1-indexed SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Speed Level in {} Mode", mode_keyword), + std::format("Heat Pump Speed Level in {} Mode", mode_keyword), Constant::Units::None, this->speedLevel, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Speed Ratio in {} Mode", mode_keyword), + std::format("Heat Pump Speed Ratio in {} Mode", mode_keyword), Constant::Units::None, this->speedRatio, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Air Flow Rate in {} Mode", mode_keyword), + std::format("Heat Pump Air Flow Rate in {} Mode", mode_keyword), Constant::Units::m3_s, this->sourceSideMassFlowRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Inlet Air Temperature in {} Mode", mode_keyword), + std::format("Heat Pump Inlet Air Temperature in {} Mode", mode_keyword), Constant::Units::C, this->sourceSideInletTemp, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Outlet Air Temperature in {} Mode", mode_keyword), + std::format("Heat Pump Outlet Air Temperature in {} Mode", mode_keyword), Constant::Units::C, this->sourceSideOutletTemp, OutputProcessor::TimeStepType::System, @@ -2783,7 +2778,7 @@ void HeatPumpAirToWater::oneTimeInit(EnergyPlusData &state) this->name); // fixme add these variables and compute their values SetupOutputVariable(state, - EnergyPlus::format("Heat Pump Capacity Temperature Modifier in {} Mode", mode_keyword), + std::format("Heat Pump Capacity Temperature Modifier in {} Mode", mode_keyword), Constant::Units::None, this->capFuncTempCurveValue, OutputProcessor::TimeStepType::System, @@ -2791,14 +2786,14 @@ void HeatPumpAirToWater::oneTimeInit(EnergyPlusData &state) this->name); // fixme add these variables and compute their values SetupOutputVariable(state, - EnergyPlus::format("Heat Pump EIR Temperature Modifier in {} Mode", mode_keyword), + std::format("Heat Pump EIR Temperature Modifier in {} Mode", mode_keyword), Constant::Units::None, this->eirFuncTempCurveValue, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->name); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump EIR PLR Modifier in {} Mode", mode_keyword), + std::format("Heat Pump EIR PLR Modifier in {} Mode", mode_keyword), Constant::Units::None, this->eirFuncPLRModifierValue, OutputProcessor::TimeStepType::System, @@ -2825,7 +2820,7 @@ void HeatPumpAirToWater::oneTimeInit(EnergyPlusData &state) OutputProcessor::Group::HVAC, OutputProcessor::EndUseCat::Cooling); SetupOutputVariable(state, - EnergyPlus::format("Heat Pump {} COP", mode_keyword), + std::format("Heat Pump {} COP", mode_keyword), Constant::Units::None, this->heatingCOP, OutputProcessor::TimeStepType::System, @@ -2833,7 +2828,7 @@ void HeatPumpAirToWater::oneTimeInit(EnergyPlusData &state) this->name); } else if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpAirToWaterCooling) { SetupOutputVariable(state, - EnergyPlus::format("Heat Pump {} COP", mode_keyword), + std::format("Heat Pump {} COP", mode_keyword), Constant::Units::None, this->coolingCOP, OutputProcessor::TimeStepType::System, @@ -2972,22 +2967,20 @@ void EIRFuelFiredHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) if (capacityModifierFuncTemp < 0.0) { if (this->capModFTErrorIndex == 0) { - ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError( - state, - EnergyPlus::format(" Capacity Modifier curve (function of Temperatures) output is negative ({:.3T}).", capacityModifierFuncTemp)); + ShowSevereMessage(state, std::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); ShowContinueError( - state, - EnergyPlus::format(" Negative value occurs using a water temperature of {:.2T}C and an outdoor air temperature of {:.2T}C.", - waterTempforCurve, - oaTempforCurve)); + state, std::format(" Capacity Modifier curve (function of Temperatures) output is negative ({:.3f}).", capacityModifierFuncTemp)); + ShowContinueError(state, + std::format(" Negative value occurs using a water temperature of {:.2f}C and an outdoor air temperature of {:.2f}C.", + waterTempforCurve, + oaTempforCurve)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\": Capacity Modifier curve (function of Temperatures) output is negative warning continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name), + std::format("{} \"{}\": Capacity Modifier curve (function of Temperatures) output is negative warning continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name), this->capModFTErrorIndex, capacityModifierFuncTemp, capacityModifierFuncTemp); @@ -3019,24 +3012,21 @@ void EIRFuelFiredHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) if (eirModifierFuncTemp < 0.0) { if (this->eirModFTErrorIndex == 0) { - ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); + ShowSevereMessage(state, std::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); + ShowContinueError(state, std::format(" EIR Modifier curve (function of Temperatures) output is negative ({:.3f}).", eirModifierFuncTemp)); ShowContinueError(state, - EnergyPlus::format(" EIR Modifier curve (function of Temperatures) output is negative ({:.3T}).", eirModifierFuncTemp)); - ShowContinueError( - state, - EnergyPlus::format(" Negative value occurs using a water temperature of {:.2T}C and an outdoor air temperature of {:.2T}C.", - waterTempforCurve, - oaTempforCurve)); + std::format(" Negative value occurs using a water temperature of {:.2f}C and an outdoor air temperature of {:.2f}C.", + waterTempforCurve, + oaTempforCurve)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} \"{}\": EIR Modifier curve (function of Temperatures) output is negative warning continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name), - this->eirModFTErrorIndex, - eirModifierFuncTemp, - eirModifierFuncTemp); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} \"{}\": EIR Modifier curve (function of Temperatures) output is negative warning continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name), + this->eirModFTErrorIndex, + eirModifierFuncTemp, + eirModifierFuncTemp); eirModifierFuncTemp = 0.0; } @@ -3049,15 +3039,15 @@ void EIRFuelFiredHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) if (eirModifierFuncPLR < 0.0) { if (this->eirModFPLRErrorIndex == 0) { - ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError(state, EnergyPlus::format(" EIR Modifier curve (function of PLR) output is negative ({:.3T}).", eirModifierFuncPLR)); - ShowContinueError(state, EnergyPlus::format(" Negative value occurs using a Part Load Ratio of {:.2T}", PLFf)); + ShowSevereMessage(state, std::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); + ShowContinueError(state, std::format(" EIR Modifier curve (function of PLR) output is negative ({:.3f}).", eirModifierFuncPLR)); + ShowContinueError(state, std::format(" Negative value occurs using a Part Load Ratio of {:.2f}", PLFf)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("{} \"{}\": EIR Modifier curve (function of PLR) output is negative warning continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name), + std::format("{} \"{}\": EIR Modifier curve (function of PLR) output is negative warning continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name), this->eirModFPLRErrorIndex, eirModifierFuncPLR, eirModifierFuncPLR); @@ -3077,21 +3067,19 @@ void EIRFuelFiredHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) if (eirDefrost < 1.0) { if (this->eirDefrostFTErrorIndex == 0) { - ShowSevereMessage(state, - EnergyPlus::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError( - state, EnergyPlus::format(" EIR defrost Modifier curve (function of Temperature) output is less than 1.0 ({:.3T}).", eirDefrost)); - ShowContinueError(state, EnergyPlus::format(" Negative value occurs using an outdoor air temperature of {:.2T}", oaTemp2)); + ShowSevereMessage(state, std::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); + ShowContinueError(state, + std::format(" EIR defrost Modifier curve (function of Temperature) output is less than 1.0 ({:.3f}).", eirDefrost)); + ShowContinueError(state, std::format(" Negative value occurs using an outdoor air temperature of {:.2f}", oaTemp2)); ShowContinueErrorTimeStamp(state, " Resetting curve output to 1.0 and continuing simulation."); } - ShowRecurringWarningErrorAtEnd( - state, - EnergyPlus::format("{} \"{}\": EIR Modifier curve (function of PLR) output out of range warning continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name), - this->eirDefrostFTErrorIndex, - eirDefrost, - eirDefrost); + ShowRecurringWarningErrorAtEnd(state, + std::format("{} \"{}\": EIR Modifier curve (function of PLR) output out of range warning continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name), + this->eirDefrostFTErrorIndex, + eirDefrost, + eirDefrost); eirDefrost = 1.0; } } @@ -3122,22 +3110,20 @@ void EIRFuelFiredHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) if (eirAuxElecFuncTemp < 0.0) { if (this->eirAuxElecFTErrorIndex == 0) { - ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); - ShowContinueError( - state, - EnergyPlus::format(" Auxiliary EIR Modifier curve (function of Temperatures) output is negative ({:.3T}).", eirAuxElecFuncTemp)); + ShowSevereMessage(state, std::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); ShowContinueError( - state, - EnergyPlus::format(" Negative value occurs using a water temperature of {:.2T}C and an outdoor air temperature of {:.2T}C.", - waterTempforCurve, - oaTempforCurve)); + state, std::format(" Auxiliary EIR Modifier curve (function of Temperatures) output is negative ({:.3f}).", eirAuxElecFuncTemp)); + ShowContinueError(state, + std::format(" Negative value occurs using a water temperature of {:.2f}C and an outdoor air temperature of {:.2f}C.", + waterTempforCurve, + oaTempforCurve)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\": Auxiliary EIR Modifier curve (function of Temperatures) output is negative warning continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name), + std::format("{} \"{}\": Auxiliary EIR Modifier curve (function of Temperatures) output is negative warning continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name), this->eirAuxElecFTErrorIndex, eirAuxElecFuncTemp, eirAuxElecFuncTemp); @@ -3151,18 +3137,17 @@ void EIRFuelFiredHeatPump::doPhysics(EnergyPlusData &state, Real64 currentLoad) if (eirAuxElecFuncPLR < 0.0) { if (this->eirAuxElecFPLRErrorIndex == 0) { - ShowSevereMessage(state, EnergyPlus::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); + ShowSevereMessage(state, std::format("{} \"{}\":", DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], this->name)); ShowContinueError( - state, - EnergyPlus::format(" Auxiliary EIR Modifier curve (function of Temperatures) output is negative ({:.3T}).", eirAuxElecFuncPLR)); - ShowContinueError(state, EnergyPlus::format(" Negative value occurs using a Part Load Ratio of {:.2T}.", partLoadRatio)); + state, std::format(" Auxiliary EIR Modifier curve (function of Temperatures) output is negative ({:.3f}).", eirAuxElecFuncPLR)); + ShowContinueError(state, std::format(" Negative value occurs using a Part Load Ratio of {:.2f}.", partLoadRatio)); ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation."); } ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\": Auxiliary EIR Modifier curve (function of PLR) output is negative warning continues...", - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name), + std::format("{} \"{}\": Auxiliary EIR Modifier curve (function of PLR) output is negative warning continues...", + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name), this->eirAuxElecFPLRErrorIndex, eirAuxElecFuncPLR, eirAuxElecFuncPLR); @@ -3241,9 +3226,9 @@ void EIRFuelFiredHeatPump::sizeSrcSideASHP(EnergyPlusData &state) // fatal out just in case errorsFound = true; // LCOV_EXCL_LINE ShowSevereError(state, - EnergyPlus::format("Invalid condenser flow rate for EIR PLHP (name={}; entered value: {}", - this->name, - this->sourceSideDesignVolFlowRate)); // LCOV_EXCL_LINE + std::format("Invalid condenser flow rate for EIR PLHP (name={}; entered value: {}", + this->name, + this->sourceSideDesignVolFlowRate)); // LCOV_EXCL_LINE } else { // can't imagine how it would ever get to this point // just assume it's the same as the load side if we don't have any sizing information @@ -3295,7 +3280,7 @@ PlantComponent *EIRFuelFiredHeatPump::factory(EnergyPlusData &state, DataPlant:: } } - ShowFatalError(state, EnergyPlus::format("EIR Fuel-Fired Heat Pump factory: Error getting inputs for PLFFHP named: {}.", hp_name)); + ShowFatalError(state, std::format("EIR Fuel-Fired Heat Pump factory: Error getting inputs for PLFFHP named: {}.", hp_name)); return nullptr; // LCOV_EXCL_LINE } @@ -3321,7 +3306,7 @@ PlantComponent *HeatPumpAirToWater::factory( } } - ShowFatalError(state, EnergyPlus::format("Air To Water Heat Pump factory: Error getting inputs for AWHP named: {}.", hp_name)); + ShowFatalError(state, std::format("Air To Water Heat Pump factory: Error getting inputs for AWHP named: {}.", hp_name)); return nullptr; // LCOV_EXCL_LINE } @@ -3342,8 +3327,7 @@ void EIRFuelFiredHeatPump::pairUpCompanionCoils(EnergyPlusData &state) if (potentialCompanionName == targetCompanionName) { if (thisCoilType == potentialCompanionType) { ShowSevereError( - state, - EnergyPlus::format("Invalid companion specification for EIR Plant Loop Fuel-Fired Heat Pump named \"{}\"", thisCoilName)); + state, std::format("Invalid companion specification for EIR Plant Loop Fuel-Fired Heat Pump named \"{}\"", thisCoilName)); ShowContinueError(state, "For heating objects, the companion must be a cooling object, and vice-versa"); ShowFatalError(state, "Invalid companion object causes program termination"); } @@ -3353,8 +3337,8 @@ void EIRFuelFiredHeatPump::pairUpCompanionCoils(EnergyPlusData &state) } if (thisHP.companionHeatPumpCoil == nullptr) { ShowSevereError(state, "Could not find matching companion heat pump coil."); - ShowContinueError(state, EnergyPlus::format("Base coil: {}", thisCoilName)); - ShowContinueError(state, EnergyPlus::format("Looking for companion coil named: {}", targetCompanionName)); + ShowContinueError(state, std::format("Base coil: {}", thisCoilName)); + ShowContinueError(state, std::format("Looking for companion coil named: {}", targetCompanionName)); ShowFatalError(state, "Simulation aborts due to previous severe error"); } } @@ -3451,7 +3435,7 @@ void EIRFuelFiredHeatPump::processInputForEIRPLHP(EnergyPlusData &state) // A4 std::string sourceSideInletNodeName = Util::makeUPPER(fields.at("air_source_node_name").get()); // Util::makeUPPER(fields.at("source_side_outlet_node_name").get()); - std::string sourceSideOutletNodeName = EnergyPlus::format("{}_SOURCE_SIDE_OUTLET_NODE", thisPLHP.name); + std::string sourceSideOutletNodeName = std::format("{}_SOURCE_SIDE_OUTLET_NODE", thisPLHP.name); // A5 auto compCoilFound = fields.find(companionCoilFieldTag); @@ -3465,8 +3449,8 @@ void EIRFuelFiredHeatPump::processInputForEIRPLHP(EnergyPlusData &state) // Validate fuel type input static constexpr std::string_view RoutineName("processInputForEIRPLHP: "); if (thisPLHP.fuelType == Constant::eFuel::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\",", RoutineName, cCurrentModuleObject, thisPLHP.name)); - ShowContinueError(state, EnergyPlus::format("Invalid Fuel Type = {}", tempRsrStr)); + ShowSevereError(state, std::format("{}{}=\"{}\",", RoutineName, cCurrentModuleObject, thisPLHP.name)); + ShowContinueError(state, std::format("Invalid Fuel Type = {}", tempRsrStr)); ShowContinueError(state, "Reset the Fuel Type to \"NaturalGas\"."); thisPLHP.fuelType = Constant::eFuel::NaturalGas; errorsFound = true; @@ -3548,8 +3532,7 @@ void EIRFuelFiredHeatPump::processInputForEIRPLHP(EnergyPlusData &state) thisPLHP.capFuncTempCurveIndex = Curve::GetCurveIndex(state, capFtName); if (thisPLHP.capFuncTempCurveIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid curve name for EIR PLFFHP (name={}; entered curve name: {}", thisPLHP.name, capFtName)); + ShowSevereError(state, std::format("Invalid curve name for EIR PLFFHP (name={}; entered curve name: {}", thisPLHP.name, capFtName)); errorsFound = true; } @@ -3558,16 +3541,14 @@ void EIRFuelFiredHeatPump::processInputForEIRPLHP(EnergyPlusData &state) Util::makeUPPER(fields.at("fuel_energy_input_ratio_function_of_temperature_curve_name").get()); thisPLHP.powerRatioFuncTempCurveIndex = Curve::GetCurveIndex(state, eirFtName); if (thisPLHP.capFuncTempCurveIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid curve name for EIR PLFFHP (name={}; entered curve name: {}", thisPLHP.name, eirFtName)); + ShowSevereError(state, std::format("Invalid curve name for EIR PLFFHP (name={}; entered curve name: {}", thisPLHP.name, eirFtName)); errorsFound = true; } // A13 fuel_energy_input_ratio_function_of_plr_curve_name std::string const &eirFplrName = Util::makeUPPER(fields.at("fuel_energy_input_ratio_function_of_plr_curve_name").get()); thisPLHP.powerRatioFuncPLRCurveIndex = Curve::GetCurveIndex(state, eirFplrName); if (thisPLHP.capFuncTempCurveIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid curve name for EIR PLFFHP (name={}; entered curve name: {}", thisPLHP.name, eirFplrName)); + ShowSevereError(state, std::format("Invalid curve name for EIR PLFFHP (name={}; entered curve name: {}", thisPLHP.name, eirFplrName)); errorsFound = true; } @@ -3596,9 +3577,9 @@ void EIRFuelFiredHeatPump::processInputForEIRPLHP(EnergyPlusData &state) std::string const eirDefrostCurveName = Util::makeUPPER(eirDefrostCurveFound.value().get()); thisPLHP.defrostEIRCurveIndex = Curve::GetCurveIndex(state, eirDefrostCurveName); if (thisPLHP.defrostEIRCurveIndex == 0) { - ShowSevereError(state, - EnergyPlus::format( - "Invalid curve name for EIR FFHP (name={}; entered curve name: {}", thisPLHP.name, eirDefrostCurveName)); + ShowSevereError( + state, + std::format("Invalid curve name for EIR FFHP (name={}; entered curve name: {}", thisPLHP.name, eirDefrostCurveName)); errorsFound = true; } } else { @@ -3615,10 +3596,10 @@ void EIRFuelFiredHeatPump::processInputForEIRPLHP(EnergyPlusData &state) if (thisPLHP.defrostType == DefrostType::Invalid) { thisPLHP.defrostType = DefrostType::OnDemand; // set to default thisPLHP.defrostOpTimeFrac = 0.0; - ShowWarningError( - state, EnergyPlus::format("Invalid Defrost Control Type for EIR PLFFHP ({} name={})", cCurrentModuleObject, thisPLHP.name)); - ShowContinueError( - state, EnergyPlus::format("The Input Variable is reset to: {}", DefrostTypeNamesUC[static_cast(thisPLHP.defrostType)])); + ShowWarningError(state, + std::format("Invalid Defrost Control Type for EIR PLFFHP ({} name={})", cCurrentModuleObject, thisPLHP.name)); + ShowContinueError(state, + std::format("The Input Variable is reset to: {}", DefrostTypeNamesUC[static_cast(thisPLHP.defrostType)])); } } @@ -3668,8 +3649,7 @@ void EIRFuelFiredHeatPump::processInputForEIRPLHP(EnergyPlusData &state) thisPLHP.cycRatioCurveIndex = Curve::GetCurveIndex(state, cycRatioCurveName); if (thisPLHP.cycRatioCurveIndex == 0) { ShowSevereError( - state, - EnergyPlus::format("Invalid curve name for EIR PLFFHP (name={}; entered curve name: {})", thisPLHP.name, cycRatioCurveName)); + state, std::format("Invalid curve name for EIR PLFFHP (name={}; entered curve name: {})", thisPLHP.name, cycRatioCurveName)); errorsFound = true; } } else { @@ -3690,8 +3670,8 @@ void EIRFuelFiredHeatPump::processInputForEIRPLHP(EnergyPlusData &state) std::string const &auxEIRFTName = Util::makeUPPER(auxElecEIRFTCurveFound.value().get()); thisPLHP.auxElecEIRFoTempCurveIndex = Curve::GetCurveIndex(state, auxEIRFTName); if (thisPLHP.auxElecEIRFoTempCurveIndex == 0) { - ShowSevereError( - state, EnergyPlus::format("Invalid curve name for EIR FFHP (name={}; entered curve name: {}", thisPLHP.name, auxEIRFTName)); + ShowSevereError(state, + std::format("Invalid curve name for EIR FFHP (name={}; entered curve name: {}", thisPLHP.name, auxEIRFTName)); errorsFound = true; } } else { @@ -3704,8 +3684,8 @@ void EIRFuelFiredHeatPump::processInputForEIRPLHP(EnergyPlusData &state) std::string const &auxEIRFPLRName = Util::makeUPPER(auxElecEIRFPLRCurveFound.value().get()); thisPLHP.auxElecEIRFoPLRCurveIndex = Curve::GetCurveIndex(state, auxEIRFPLRName); if (thisPLHP.auxElecEIRFoPLRCurveIndex == 0) { - ShowSevereError( - state, EnergyPlus::format("Invalid curve name for EIR FFHP (name={}; entered curve name: {}", thisPLHP.name, auxEIRFPLRName)); + ShowSevereError(state, + std::format("Invalid curve name for EIR FFHP (name={}; entered curve name: {}", thisPLHP.name, auxEIRFPLRName)); errorsFound = true; } } else { @@ -3922,23 +3902,23 @@ void HeatPumpAirToWater::processInputForEIRPLHP(EnergyPlusData &state) modeKeyWord = "cooling"; } // if there's no inlet node for the corresponding component, don't create this object - if (fields.find(EnergyPlus::format("{}_water_inlet_node_name", waterNodePrefix)) == fields.end()) { + if (fields.find(std::format("{}_water_inlet_node_name", waterNodePrefix)) == fields.end()) { continue; } - auto availSchedFound = fields.find(EnergyPlus::format("availability_schedule_name_{}", modeKeyWord)); + auto availSchedFound = fields.find(std::format("availability_schedule_name_{}", modeKeyWord)); if (availSchedFound == fields.end()) { thisAWHP.availSchedName = ""; thisAWHP.availSched = Sched::GetScheduleAlwaysOn(state); } else { thisAWHP.availSchedName = - Util::makeUPPER(fields.at(EnergyPlus::format("availability_schedule_name_{}", modeKeyWord)).get()); + Util::makeUPPER(fields.at(std::format("availability_schedule_name_{}", modeKeyWord)).get()); if ((thisAWHP.availSched = Sched::GetSchedule(state, thisAWHP.availSchedName)) == nullptr) { - ShowSevereItemNotFound(state, eoh, EnergyPlus::format("availability_schedule_name_{}", modeKeyWord), thisAWHP.availSchedName); + ShowSevereItemNotFound(state, eoh, std::format("availability_schedule_name_{}", modeKeyWord), thisAWHP.availSchedName); errorsFound = true; } } - auto boosterOnFound = fields.find(EnergyPlus::format("booster_mode_on_{}", modeKeyWord)); + auto boosterOnFound = fields.find(std::format("booster_mode_on_{}", modeKeyWord)); thisAWHP.boosterOn = false; if (boosterOnFound != fields.end()) { auto boosterOnStr = boosterOnFound.value().get(); @@ -3947,82 +3927,80 @@ void HeatPumpAirToWater::processInputForEIRPLHP(EnergyPlusData &state) } } - auto const boosterMultCap = fields.find(EnergyPlus::format("booster_mode_{}_capacity_multiplier", modeKeyWord)); + auto const boosterMultCap = fields.find(std::format("booster_mode_{}_capacity_multiplier", modeKeyWord)); if (boosterMultCap != fields.end()) { thisAWHP.boosterMultCap = boosterMultCap.value().get(); } else { thisAWHP.boosterMultCap = 1.0; } - auto const boosterMultCOP = fields.find(EnergyPlus::format("booster_mode_{}_cop_multiplier", modeKeyWord)); + auto const boosterMultCOP = fields.find(std::format("booster_mode_{}_cop_multiplier", modeKeyWord)); if (boosterMultCOP != fields.end()) { thisAWHP.boosterMultCOP = boosterMultCOP.value().get(); } else { thisAWHP.boosterMultCOP = 1.0; } - auto sourceSideDesignInletTemp = fields.find(EnergyPlus::format("rated_inlet_air_temperature_in_{}_mode", modeKeyWord)); + auto sourceSideDesignInletTemp = fields.find(std::format("rated_inlet_air_temperature_in_{}_mode", modeKeyWord)); if (sourceSideDesignInletTemp != fields.end()) { thisAWHP.sourceSideDesignInletTemp = sourceSideDesignInletTemp.value().get(); } else { thisAWHP.sourceSideDesignInletTemp = 8.0; } thisAWHP.sourceSideDesignVolFlowRate = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, EnergyPlus::format("rated_air_flow_rate_in_{}_mode", modeKeyWord)); + fields, schemaProps, std::format("rated_air_flow_rate_in_{}_mode", modeKeyWord)); if (thisAWHP.sourceSideDesignVolFlowRate == DataSizing::AutoSize) { thisAWHP.sourceSideDesignVolFlowRateWasAutoSized = true; } - auto ratedLeavingWaterTemperature = fields.find(EnergyPlus::format("rated_leaving_water_temperature_in_{}_mode", modeKeyWord)); + auto ratedLeavingWaterTemperature = fields.find(std::format("rated_leaving_water_temperature_in_{}_mode", modeKeyWord)); if (ratedLeavingWaterTemperature != fields.end()) { thisAWHP.ratedLeavingWaterTemperature = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, EnergyPlus::format("rated_leaving_water_temperature_in_{}_mode", modeKeyWord)); + fields, schemaProps, std::format("rated_leaving_water_temperature_in_{}_mode", modeKeyWord)); } else { thisAWHP.ratedLeavingWaterTemperature = 40.0; } thisAWHP.loadSideDesignVolFlowRate = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, EnergyPlus::format("rated_water_flow_rate_in_{}_mode", modeKeyWord)); + fields, schemaProps, std::format("rated_water_flow_rate_in_{}_mode", modeKeyWord)); if (thisAWHP.loadSideDesignVolFlowRate == DataSizing::AutoSize) { thisAWHP.loadSideDesignVolFlowRateWasAutoSized = true; } - auto minSourceTempLimit = fields.find(EnergyPlus::format("minimum_outdoor_air_temperature_in_{}_mode", modeKeyWord)); + auto minSourceTempLimit = fields.find(std::format("minimum_outdoor_air_temperature_in_{}_mode", modeKeyWord)); if (minSourceTempLimit == fields.end()) { thisAWHP.minSourceTempLimit = -30.0; // default value } else { thisAWHP.minSourceTempLimit = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, EnergyPlus::format("minimum_outdoor_air_temperature_in_{}_mode", modeKeyWord)); + fields, schemaProps, std::format("minimum_outdoor_air_temperature_in_{}_mode", modeKeyWord)); } - auto maxSourceTempLimit = fields.find(EnergyPlus::format("maximum_outdoor_air_temperature_in_{}_mode", modeKeyWord)); + auto maxSourceTempLimit = fields.find(std::format("maximum_outdoor_air_temperature_in_{}_mode", modeKeyWord)); if (maxSourceTempLimit != fields.end()) { thisAWHP.maxSourceTempLimit = maxSourceTempLimit.value().get(); } else { thisAWHP.maxSourceTempLimit = 100.0; // default value } - auto minLeavingWaterTempCurveName = - fields.find(EnergyPlus::format("minimum_leaving_water_temperature_curve_name_in_{}_mode", modeKeyWord)); + auto minLeavingWaterTempCurveName = fields.find(std::format("minimum_leaving_water_temperature_curve_name_in_{}_mode", modeKeyWord)); if (minLeavingWaterTempCurveName != fields.end()) { thisAWHP.minSupplyWaterTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(minLeavingWaterTempCurveName.value().get())); if (thisAWHP.minSupplyWaterTempCurveIndex == 0) { ShowSevereError(state, - EnergyPlus::format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {})", - thisAWHP.name, - minLeavingWaterTempCurveName.value().get())); + std::format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {})", + thisAWHP.name, + minLeavingWaterTempCurveName.value().get())); errorsFound = true; } } - auto maxLeavingWaterTempCurveName = - fields.find(EnergyPlus::format("maximum_leaving_water_temperature_curve_name_in_{}_mode", modeKeyWord)); + auto maxLeavingWaterTempCurveName = fields.find(std::format("maximum_leaving_water_temperature_curve_name_in_{}_mode", modeKeyWord)); if (maxLeavingWaterTempCurveName != fields.end()) { thisAWHP.maxSupplyWaterTempCurveIndex = Curve::GetCurveIndex(state, Util::makeUPPER(maxLeavingWaterTempCurveName.value().get())); if (thisAWHP.maxSupplyWaterTempCurveIndex == 0) { ShowSevereError(state, - EnergyPlus::format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {})", - thisAWHP.name, - maxLeavingWaterTempCurveName.value().get())); + std::format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {})", + thisAWHP.name, + maxLeavingWaterTempCurveName.value().get())); errorsFound = true; } } thisAWHP.sizingFactor = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, EnergyPlus::format("sizing_factor_for_{}", modeKeyWord)); + fields, schemaProps, std::format("sizing_factor_for_{}", modeKeyWord)); std::string sourceSideInletNodeName = Util::makeUPPER(fields.at("air_inlet_node_name").get()); std::string sourceSideOutletNodeName = Util::makeUPPER(fields.at("air_outlet_node_name").get()); @@ -4098,9 +4076,9 @@ void HeatPumpAirToWater::processInputForEIRPLHP(EnergyPlusData &state) } std::string loadSideInletNodeName = - Util::makeUPPER(fields.at(EnergyPlus::format("{}_water_inlet_node_name", waterNodePrefix)).get()); + Util::makeUPPER(fields.at(std::format("{}_water_inlet_node_name", waterNodePrefix)).get()); std::string loadSideOutletNodeName = - Util::makeUPPER(fields.at(EnergyPlus::format("{}_water_outlet_node_name", waterNodePrefix)).get()); + Util::makeUPPER(fields.at(std::format("{}_water_outlet_node_name", waterNodePrefix)).get()); bool nodeErrorsFound = false; thisAWHP.loadSideNodes.inlet = Node::GetOnlySingleNode(state, @@ -4156,133 +4134,128 @@ void HeatPumpAirToWater::processInputForEIRPLHP(EnergyPlusData &state) thisAWHP.calcSourceOutletTemp = classToInput.calcSourceOutletTemp; thisAWHP.numSpeeds = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, EnergyPlus::format("number_of_speeds_for_{}", modeKeyWord)); + fields, schemaProps, std::format("number_of_speeds_for_{}", modeKeyWord)); for (int i = 0; i < thisAWHP.numSpeeds; i++) { - auto capFtFieldName = - EnergyPlus::format("normalized_{}_capacity_function_of_temperature_curve_name_at_speed_{}", modeKeyWord, i + 1); + auto capFtFieldName = std::format("normalized_{}_capacity_function_of_temperature_curve_name_at_speed_{}", modeKeyWord, i + 1); if (fields.find(capFtFieldName) == fields.end()) { ShowSevereError(state, - EnergyPlus::format("curve missing for speed {} of HeatPump:AirToWater (name={}; curve field name: {}", - i + 1, - thisAWHP.name, - capFtFieldName)); + std::format("curve missing for speed {} of HeatPump:AirToWater (name={}; curve field name: {}", + i + 1, + thisAWHP.name, + capFtFieldName)); errorsFound = true; } std::string const capFtName = Util::makeUPPER(fields.at(capFtFieldName).get()); thisAWHP.ratedCapacity[i] = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, EnergyPlus::format("rated_{}_capacity_at_speed_{}", modeKeyWord, i + 1)); + fields, schemaProps, std::format("rated_{}_capacity_at_speed_{}", modeKeyWord, i + 1)); if (i != thisAWHP.numSpeeds - 1 && thisAWHP.ratedCapacity[i] == DataSizing::AutoSize) { ShowSevereError(state, - EnergyPlus::format("cannot autosize capacity below maximum speed (name={}, field={})", - thisAWHP.name, - EnergyPlus::format("rated_{}_capacity_at_speed_{}", modeKeyWord, i + 1))); + std::format("cannot autosize capacity below maximum speed (name={}, field={})", + thisAWHP.name, + EnergyPlus::format("rated_{}_capacity_at_speed_{}", modeKeyWord, i + 1))); errorsFound = true; } thisAWHP.ratedCOP[i] = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, EnergyPlus::format("rated_cop_for_{}_at_speed_{}", modeKeyWord, i + 1)); + fields, schemaProps, std::format("rated_cop_for_{}_at_speed_{}", modeKeyWord, i + 1)); thisAWHP.capFuncTempCurveIndex[i] = Curve::GetCurveIndex(state, capFtName); if (thisAWHP.capFuncTempCurveIndex[i] == 0) { - ShowSevereError(state, - EnergyPlus::format( - "Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, capFtName)); + ShowSevereError( + state, + std::format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, capFtName)); errorsFound = true; } - auto eirFtFieldName = - EnergyPlus::format("{}_energy_input_ratio_function_of_temperature_curve_name_at_speed_{}", modeKeyWord, i + 1); + auto eirFtFieldName = std::format("{}_energy_input_ratio_function_of_temperature_curve_name_at_speed_{}", modeKeyWord, i + 1); if (fields.find(eirFtFieldName) == fields.end()) { ShowSevereError(state, - EnergyPlus::format("curve missing for speed {} of HeatPump:AirToWater (name={}; curve field name: {}", - i + 1, - thisAWHP.name, - eirFtFieldName)); + std::format("curve missing for speed {} of HeatPump:AirToWater (name={}; curve field name: {}", + i + 1, + thisAWHP.name, + eirFtFieldName)); errorsFound = true; } std::string const eirFtName = Util::makeUPPER(fields.at(eirFtFieldName).get()); thisAWHP.powerRatioFuncTempCurveIndex[i] = Curve::GetCurveIndex(state, eirFtName); if (thisAWHP.powerRatioFuncTempCurveIndex[i] == 0) { - ShowSevereError(state, - EnergyPlus::format( - "Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, eirFtName)); + ShowSevereError( + state, + std::format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, eirFtName)); errorsFound = true; } - auto eirFplrFieldName = EnergyPlus::format("{}_energy_input_ratio_function_of_plr_curve_name_at_speed_{}", modeKeyWord, i + 1); + auto eirFplrFieldName = std::format("{}_energy_input_ratio_function_of_plr_curve_name_at_speed_{}", modeKeyWord, i + 1); if (fields.find(eirFplrFieldName) == fields.end()) { ShowSevereError(state, - EnergyPlus::format("curve missing for speed {} of HeatPump:AirToWater (name={}; curve field name: {}", - i + 1, - thisAWHP.name, - eirFplrFieldName)); + std::format("curve missing for speed {} of HeatPump:AirToWater (name={}; curve field name: {}", + i + 1, + thisAWHP.name, + eirFplrFieldName)); errorsFound = true; } std::string const eirFplrName = Util::makeUPPER(fields.at(eirFplrFieldName).get()); thisAWHP.powerRatioFuncPLRCurveIndex[i] = Curve::GetCurveIndex(state, eirFplrName); if (thisAWHP.powerRatioFuncPLRCurveIndex[i] == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", - thisAWHP.name, - eirFplrName)); + ShowSevereError( + state, + std::format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, eirFplrName)); errorsFound = true; } } if (thisAWHP.boosterOn) { thisAWHP.numSpeeds += 1; - auto capFtFieldName = - EnergyPlus::format("normalized_{}_capacity_function_of_temperature_curve_name_in_booster_mode", modeKeyWord); + auto capFtFieldName = std::format("normalized_{}_capacity_function_of_temperature_curve_name_in_booster_mode", modeKeyWord); if (fields.find(capFtFieldName) == fields.end()) { ShowSevereError(state, - EnergyPlus::format("curve missing for booster mode of HeatPump:AirToWater (name={}; curve field name: {}", - thisAWHP.name, - capFtFieldName)); + std::format("curve missing for booster mode of HeatPump:AirToWater (name={}; curve field name: {}", + thisAWHP.name, + capFtFieldName)); errorsFound = true; } std::string const capFtName = Util::makeUPPER(fields.at(capFtFieldName).get()); int speedLevelBooster = thisAWHP.numSpeeds - 1; thisAWHP.ratedCapacity[speedLevelBooster] = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, EnergyPlus::format("rated_{}_capacity_in_booster_mode", modeKeyWord)); + fields, schemaProps, std::format("rated_{}_capacity_in_booster_mode", modeKeyWord)); thisAWHP.ratedCOP[speedLevelBooster] = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, EnergyPlus::format("rated_{}_cop_in_booster_mode", modeKeyWord)); + fields, schemaProps, std::format("rated_{}_cop_in_booster_mode", modeKeyWord)); thisAWHP.capFuncTempCurveIndex[speedLevelBooster] = Curve::GetCurveIndex(state, capFtName); if (thisAWHP.capFuncTempCurveIndex[speedLevelBooster] == 0) { - ShowSevereError(state, - EnergyPlus::format( - "Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, capFtName)); + ShowSevereError( + state, + std::format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, capFtName)); errorsFound = true; } - auto eirFtFieldName = EnergyPlus::format("{}_energy_input_ratio_function_of_temperature_curve_name_in_booster_mode", modeKeyWord); + auto eirFtFieldName = std::format("{}_energy_input_ratio_function_of_temperature_curve_name_in_booster_mode", modeKeyWord); if (fields.find(eirFtFieldName) == fields.end()) { ShowSevereError(state, - EnergyPlus::format("curve missing for booster mode of HeatPump:AirToWater (name={}; curve field name: {}", - thisAWHP.name, - eirFtFieldName)); + std::format("curve missing for booster mode of HeatPump:AirToWater (name={}; curve field name: {}", + thisAWHP.name, + eirFtFieldName)); errorsFound = true; } std::string const eirFtName = Util::makeUPPER(fields.at(eirFtFieldName).get()); thisAWHP.powerRatioFuncTempCurveIndex[speedLevelBooster] = Curve::GetCurveIndex(state, eirFtName); if (thisAWHP.powerRatioFuncTempCurveIndex[speedLevelBooster] == 0) { - ShowSevereError(state, - EnergyPlus::format( - "Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, eirFtName)); + ShowSevereError( + state, + std::format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, eirFtName)); errorsFound = true; } - auto eirFplrFieldName = EnergyPlus::format("{}_energy_input_ratio_function_of_plr_curve_name_in_booster_mode", modeKeyWord); + auto eirFplrFieldName = std::format("{}_energy_input_ratio_function_of_plr_curve_name_in_booster_mode", modeKeyWord); if (fields.find(eirFplrFieldName) == fields.end()) { ShowSevereError(state, - EnergyPlus::format("curve missing for booster mode of HeatPump:AirToWater (name={}; curve field name: {}", - thisAWHP.name, - eirFplrFieldName)); + std::format("curve missing for booster mode of HeatPump:AirToWater (name={}; curve field name: {}", + thisAWHP.name, + eirFplrFieldName)); errorsFound = true; } std::string const eirFplrName = Util::makeUPPER(fields.at(eirFplrFieldName).get()); thisAWHP.powerRatioFuncPLRCurveIndex[speedLevelBooster] = Curve::GetCurveIndex(state, eirFplrName); if (thisAWHP.powerRatioFuncPLRCurveIndex[speedLevelBooster] == 0) { - ShowSevereError(state, - EnergyPlus::format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", - thisAWHP.name, - eirFplrName)); + ShowSevereError( + state, + std::format("Invalid curve name for HeatPump:AirToWater (name={}; entered curve name: {}", thisAWHP.name, eirFplrName)); errorsFound = true; } } @@ -4462,18 +4435,18 @@ void EIRFuelFiredHeatPump::oneTimeInit(EnergyPlusData &state) if (thisErrFlag) { ShowSevereError(state, - EnergyPlus::format("{}: Plant topology problem for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + std::format("{}: Plant topology problem for {} name = \"{}\"", + routineName, + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name)); ShowContinueError(state, "Could not locate component's load side connections on a plant loop"); errFlag = true; } else if (this->loadSidePlantLoc.loopSideNum != DataPlant::LoopSideLocation::Supply) { // only check if !thisErrFlag ShowSevereError(state, - EnergyPlus::format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + std::format("{}: Invalid connections for {} name = \"{}\"", + routineName, + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name)); ShowContinueError(state, "The load side connections are not on the Supply Side of a plant loop"); errFlag = true; } @@ -4485,18 +4458,18 @@ void EIRFuelFiredHeatPump::oneTimeInit(EnergyPlusData &state) if (thisErrFlag) { ShowSevereError(state, - EnergyPlus::format("{}: Plant topology problem for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + std::format("{}: Plant topology problem for {} name = \"{}\"", + routineName, + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name)); ShowContinueError(state, "Could not locate component's source side connections on a plant loop."); errFlag = true; } else if (this->sourceSidePlantLoc.loopSideNum != DataPlant::LoopSideLocation::Demand) { // only check if !thisErrFlag ShowSevereError(state, - EnergyPlus::format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + std::format("{}: Invalid connections for {} name = \"{}\"", + routineName, + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name)); ShowContinueError(state, "The source side connections are not on the Demand Side of a plant loop."); errFlag = true; } @@ -4504,10 +4477,10 @@ void EIRFuelFiredHeatPump::oneTimeInit(EnergyPlusData &state) // make sure it is not the same loop on both sides. if (this->loadSidePlantLoc.loopNum == this->sourceSidePlantLoc.loopNum) { // user is being too tricky, don't allow ShowSevereError(state, - EnergyPlus::format("{}: Invalid connections for {} name = \"{}\"", - routineName, - DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], - this->name)); + std::format("{}: Invalid connections for {} name = \"{}\"", + routineName, + DataPlant::PlantEquipTypeNames[static_cast(this->EIRHPType)], + this->name)); ShowContinueError(state, "The load and source sides need to be on different loops."); errFlag = true; } else { @@ -4519,7 +4492,7 @@ void EIRFuelFiredHeatPump::oneTimeInit(EnergyPlusData &state) } if (errFlag) { - ShowFatalError(state, EnergyPlus::format("{}: Program terminated due to previous condition(s).", routineName)); + ShowFatalError(state, std::format("{}: Program terminated due to previous condition(s).", routineName)); } this->oneTimeInitFlag = false; } diff --git a/src/EnergyPlus/PlantPipingSystemsManager.cc b/src/EnergyPlus/PlantPipingSystemsManager.cc index faa352b0f05..754c6a22942 100644 --- a/src/EnergyPlus/PlantPipingSystemsManager.cc +++ b/src/EnergyPlus/PlantPipingSystemsManager.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include #include #include @@ -490,7 +491,7 @@ namespace PlantPipingSystemsManager { RoutineName)); ShowContinueError(state, EnergyPlus::format("Pipe segment name:{}", thisSegment->Name)); ShowContinueError(state, - EnergyPlus::format("Corrected pipe location: ( x,y )=( {:.2T},{:.2T} )", + EnergyPlus::format("Corrected pipe location: ( x,y )=( {:.2f},{:.2f} )", thisSegment->PipeLocation.X, thisSegment->PipeLocation.Y)); } @@ -1015,8 +1016,8 @@ namespace PlantPipingSystemsManager { } else if (Util::SameString(s_ipsc->cAlphaArgs(12), "HOURLY")) { thisDomain.SimHourlyFlag = true; } else { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(12), s_ipsc->cAlphaArgs(12))); - ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); + ShowSevereError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(12), s_ipsc->cAlphaArgs(12))); + ShowContinueError(state, std::format("Found in: {}", thisDomain.Name)); ErrorsFound = true; } #endif // GET_OUT @@ -1075,7 +1076,7 @@ namespace PlantPipingSystemsManager { ShowContinueError(state, EnergyPlus::format("{}: Perimeter insulation width is too large.", routineName)); ShowContinueError(state, "This would cause overlapping insulation. Check inputs."); ShowContinueError(state, "Defaulting to full horizontal insulation."); - ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); + ShowContinueError(state, std::format("Found in: {}", thisDomain.Name)); thisDomain.HorizIns = HorizInsulation::Full; } } @@ -1209,8 +1210,7 @@ namespace PlantPipingSystemsManager { // check if there are blank inputs related to the basement, if (s_ipsc->lNumericFieldBlanks(11) || s_ipsc->lAlphaFieldBlanks(5) || s_ipsc->lAlphaFieldBlanks(10)) { - ShowSevereError(state, - EnergyPlus::format("Erroneous basement inputs for {}={}", ObjName_ZoneCoupled_Basement, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("Erroneous basement inputs for {}={}", ObjName_ZoneCoupled_Basement, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "At least one basement input was left blank."); ErrorsFound = true; } @@ -1219,8 +1219,8 @@ namespace PlantPipingSystemsManager { int CurIndex = 11; thisDomain.BasementZone.Depth = s_ipsc->rNumericArgs(CurIndex); if (thisDomain.BasementZone.Depth >= thisDomain.Extents.yMax || thisDomain.BasementZone.Depth <= 0.0) { - ShowSevereError(state, EnergyPlus::format("Invalid {}", s_ipsc->cNumericFieldNames(CurIndex))); - ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); + ShowSevereError(state, std::format("Invalid {}", s_ipsc->cNumericFieldNames(CurIndex))); + ShowContinueError(state, std::format("Found in: {}", thisDomain.Name)); ErrorsFound = true; } @@ -1359,8 +1359,8 @@ namespace PlantPipingSystemsManager { } else if (thisDomain.HorizIns == HorizInsulation::Perimeter) { // Horizontal insulation perimeter width if (thisDomain.HorizInsWidth <= 0.0) { - ShowSevereError(state, EnergyPlus::format("Invalid {}", s_ipsc->cNumericFieldNames(10))); - ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); + ShowSevereError(state, std::format("Invalid {}", s_ipsc->cNumericFieldNames(10))); + ShowContinueError(state, std::format("Found in: {}", thisDomain.Name)); ErrorsFound = true; } } @@ -1381,8 +1381,8 @@ namespace PlantPipingSystemsManager { if (thisDomain.VertInsPresentFlag) { // Check if vertical insulation is in domain if (thisDomain.VertInsDepth >= thisDomain.Extents.yMax || thisDomain.VertInsDepth <= 0.0) { - ShowSevereError(state, EnergyPlus::format("Invalid {}", s_ipsc->cNumericFieldNames(12))); - ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); + ShowSevereError(state, std::format("Invalid {}", s_ipsc->cNumericFieldNames(12))); + ShowContinueError(state, std::format("Found in: {}", thisDomain.Name)); ErrorsFound = true; } thisDomain.VertInsMaterialNum = Material::GetMaterialNum(state, s_ipsc->cAlphaArgs(10)); @@ -1410,8 +1410,8 @@ namespace PlantPipingSystemsManager { } else if (Util::SameString(s_ipsc->cAlphaArgs(11), "HOURLY")) { thisDomain.SimHourlyFlag = true; } else { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(11), s_ipsc->cAlphaArgs(11))); - ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); + ShowSevereError(state, std::format("Invalid {}={}", s_ipsc->cAlphaFieldNames(11), s_ipsc->cAlphaArgs(11))); + ShowContinueError(state, std::format("Found in: {}", thisDomain.Name)); ErrorsFound = true; } #endif // GET_OUT @@ -1445,10 +1445,10 @@ namespace PlantPipingSystemsManager { if (thisDomain.HorizIns == HorizInsulation::Perimeter && ThisArea > 0.0) { if ((thisDomain.HorizInsWidth + thisDomain.VertInsThickness) > thisDomain.BasementZone.Width / 2.0 || (thisDomain.HorizInsWidth + thisDomain.VertInsThickness) > thisDomain.BasementZone.Length / 2.0) { - ShowContinueError(state, EnergyPlus::format("{}: Perimeter insulation width is too large.", routineName)); + ShowContinueError(state, std::format("{}: Perimeter insulation width is too large.", routineName)); ShowContinueError(state, "This would cause overlapping insulation. Check inputs."); ShowContinueError(state, "Defaulting to full horizontal insulation."); - ShowContinueError(state, EnergyPlus::format("Found in: {}", thisDomain.Name)); + ShowContinueError(state, std::format("Found in: {}", thisDomain.Name)); thisDomain.HorizIns = HorizInsulation::Full; } } @@ -1480,10 +1480,10 @@ namespace PlantPipingSystemsManager { std::string const &ObjectName) { - ShowSevereError(state, EnergyPlus::format("Invalid {}={} was found in: {}", FieldName, UserInputField, ObjectName)); + ShowSevereError(state, std::format("Invalid {}={} was found in: {}", FieldName, UserInputField, ObjectName)); ShowContinueError( state, "The user of no mass materials or ones with no thickness are not allowed for the insulation fields of the following objects:"); - ShowContinueError(state, EnergyPlus::format(" {} or {}", ObjName_ZoneCoupled_Slab, ObjName_ZoneCoupled_Basement)); + ShowContinueError(state, std::format(" {} or {}", ObjName_ZoneCoupled_Slab, ObjName_ZoneCoupled_Basement)); ShowContinueError( state, "Change any insulation designations in these objects from no mass materials to regular materials that have a thickness, etc."); } @@ -1675,12 +1675,12 @@ namespace PlantPipingSystemsManager { // Issue a severe if Inner >= Outer diameter if (thisCircuit.PipeSize.InnerDia >= thisCircuit.PipeSize.OuterDia) { - ShowSevereError( - state, EnergyPlus::format("{}: {}=\"{}\" has invalid pipe diameters.", routineName, ObjName_HorizTrench, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + std::format("{}: {}=\"{}\" has invalid pipe diameters.", routineName, ObjName_HorizTrench, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - EnergyPlus::format("Outer diameter [{:.3T}] must be greater than inner diameter [{:.3T}].", - thisCircuit.PipeSize.OuterDia, - thisCircuit.PipeSize.InnerDia)); + std::format("Outer diameter [{:.3f}] must be greater than inner diameter [{:.3f}].", + thisCircuit.PipeSize.OuterDia, + thisCircuit.PipeSize.InnerDia)); ErrorsFound = true; } @@ -1739,8 +1739,7 @@ namespace PlantPipingSystemsManager { } } // If we didn't find it, fatal - ShowFatalError(state, - EnergyPlus::format("PipeSegmentInfoFactory: Error getting inputs for segment named: {}", segmentName)); // LCOV_EXCL_LINE + ShowFatalError(state, std::format("PipeSegmentInfoFactory: Error getting inputs for segment named: {}", segmentName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -1758,8 +1757,7 @@ namespace PlantPipingSystemsManager { } } // If we didn't find it, fatal - ShowFatalError(state, - EnergyPlus::format("PipeCircuitInfoFactory: Error getting inputs for circuit named: {}", circuitName)); // LCOV_EXCL_LINE + ShowFatalError(state, std::format("PipeCircuitInfoFactory: Error getting inputs for circuit named: {}", circuitName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -1897,7 +1895,7 @@ namespace PlantPipingSystemsManager { //******* We'll first set up the domain ******** // the extents will be: zMax = axial length; yMax = burial depth*2; xMax = ( NumPipes+1 )*HorizontalPipeSpacing thisDomain.IsActuallyPartOfAHorizontalTrench = true; - thisDomain.Name = EnergyPlus::format("HorizontalTrenchDomain{:4}", HorizontalGHXCtr); + thisDomain.Name = std::format("HorizontalTrenchDomain{:4}", HorizontalGHXCtr); thisDomain.Extents.xMax = (double(NumPipeSegments) + 1.0) * thisInterPipeSpacing; thisDomain.Extents.yMax = 2.0 * thisBurialDepth; thisDomain.Extents.zMax = s_ipsc->rNumericArgs(2); @@ -1943,7 +1941,7 @@ namespace PlantPipingSystemsManager { //******* Then we'll do the segments *******! for (int ThisCircuitPipeSegmentCounter = 1; ThisCircuitPipeSegmentCounter <= NumPipeSegments; ++ThisCircuitPipeSegmentCounter) { Segment segment; - segment.Name = EnergyPlus::format("HorizontalTrenchCircuit{}Segment{}", HorizontalGHXCtr, ThisCircuitPipeSegmentCounter); + segment.Name = std::format("HorizontalTrenchCircuit{}Segment{}", HorizontalGHXCtr, ThisCircuitPipeSegmentCounter); segment.IsActuallyPartOfAHorizontalTrench = true; segment.PipeLocation = PointF(ThisCircuitPipeSegmentCounter * thisInterPipeSpacing, thisBurialDepth); @@ -2157,7 +2155,7 @@ namespace PlantPipingSystemsManager { bool errFlag = false; PlantUtilities::ScanPlantLoopsForObject(state, thisCircuit->Name, TypeToLookFor, thisCircuit->plantLoc, errFlag, _, _, _, _, _); if (errFlag) { - ShowFatalError(state, EnergyPlus::format("PipingSystems:{}: Program terminated due to previous condition(s).", RoutineName)); + ShowFatalError(state, std::format("PipingSystems:{}: Program terminated due to previous condition(s).", RoutineName)); } // Once we find ourselves on the plant loop, we can do other things @@ -2174,7 +2172,7 @@ namespace PlantPipingSystemsManager { for (auto const &thisDomainCircuit : this->circuits) { for (auto const &segment : thisDomainCircuit->pipeSegments) { if (!segment->PipeCellCoordinatesSet) { - ShowSevereError(state, EnergyPlus::format("PipingSystems:{}:Pipe segment index not set.", RoutineName)); + ShowSevereError(state, std::format("PipingSystems:{}:Pipe segment index not set.", RoutineName)); ShowContinueError(state, "...Possibly because pipe segment was placed outside of the domain."); ShowContinueError(state, "...Verify piping system domain inputs, circuits, and segments."); ShowFatalError(state, "Preceding error causes program termination"); @@ -2261,8 +2259,7 @@ namespace PlantPipingSystemsManager { ShowSevereError( state, - EnergyPlus::format( - "{}:{}=\"{}\", invalid {}=\"{}\", Condition: {}", RoutineName, ObjectName, InstanceName, FieldName, FieldEntry, Condition)); + std::format("{}:{}=\"{}\", invalid {}=\"{}\", Condition: {}", RoutineName, ObjectName, InstanceName, FieldName, FieldEntry, Condition)); ErrorsFound = true; } @@ -2284,8 +2281,8 @@ namespace PlantPipingSystemsManager { ShowSevereError( state, - EnergyPlus::format( - R"({}:{}="{}", invalid {}="{:.3T}", Condition: {})", RoutineName, ObjectName, InstanceName, FieldName, FieldEntry, Condition)); + std::format( + R"({}:{}="{}", invalid {}="{:.3f}", Condition: {})", RoutineName, ObjectName, InstanceName, FieldName, FieldEntry, Condition)); ErrorsFound = true; } @@ -3090,8 +3087,8 @@ namespace PlantPipingSystemsManager { // check to make sure this location is valid if (CellLeft < 0.0 || CellRight > DirExtentMax) { - ShowSevereError(state, EnergyPlus::format("PlantPipingSystems::{}: Invalid partition location in domain.", RoutineName)); - ShowContinueError(state, EnergyPlus::format("Occurs during mesh development for domain={}", this->Name)); + ShowSevereError(state, std::format("PlantPipingSystems::{}: Invalid partition location in domain.", RoutineName)); + ShowContinueError(state, std::format("Occurs during mesh development for domain={}", this->Name)); ShowContinueError(state, "A pipe or basement is located outside of the domain extents."); ShowFatalError(state, "Preceding error causes program termination."); } @@ -3104,8 +3101,8 @@ namespace PlantPipingSystemsManager { if (IsInRange_BasementModel(CellLeft, thisPartitionRegionSubIndex.Min, thisPartitionRegionSubIndex.Max) || IsInRangeReal(CellRight, thisPartitionRegionSubIndex.Min, thisPartitionRegionSubIndex.Max)) { - ShowSevereError(state, EnergyPlus::format("PlantPipingSystems::{}: Invalid partition location in domain.", RoutineName)); - ShowContinueError(state, EnergyPlus::format("Occurs during mesh development for domain={}", this->Name)); + ShowSevereError(state, std::format("PlantPipingSystems::{}: Invalid partition location in domain.", RoutineName)); + ShowContinueError(state, std::format("Occurs during mesh development for domain={}", this->Name)); ShowContinueError(state, "A mesh conflict was encountered where partitions were overlapping."); ShowContinueError(state, "Ensure that all pipes exactly line up or are separated to allow meshing in between them"); ShowContinueError(state, "Also verify the pipe and basement dimensions to avoid conflicts there."); @@ -3117,8 +3114,8 @@ namespace PlantPipingSystemsManager { if (IsInRangeReal(CellLeft, thisPartitionRegionSubIndex.Min, thisPartitionRegionSubIndex.Max) || IsInRangeReal(CellRight, thisPartitionRegionSubIndex.Min, thisPartitionRegionSubIndex.Max)) { - ShowSevereError(state, EnergyPlus::format("PlantPipingSystems::{}: Invalid partition location in domain.", RoutineName)); - ShowContinueError(state, EnergyPlus::format("Occurs during mesh development for domain={}", this->Name)); + ShowSevereError(state, std::format("PlantPipingSystems::{}: Invalid partition location in domain.", RoutineName)); + ShowContinueError(state, std::format("Occurs during mesh development for domain={}", this->Name)); ShowContinueError(state, "A mesh conflict was encountered where partitions were overlapping."); ShowContinueError(state, "Ensure that all pipes exactly line up or are separated to allow meshing in between them"); ShowContinueError(state, "Also verify the pipe and basement dimensions to avoid conflicts there."); @@ -5868,20 +5865,19 @@ namespace PlantPipingSystemsManager { bool OutOfRange = this->CheckForOutOfRangeTemps(); if (OutOfRange) { if (this->HasZoneCoupledSlab) { - ShowSevereError( - state, EnergyPlus::format("Site:GroundDomain:Slab{}: Out of range temperatures detected in the ground domain.", RoutineName)); + ShowSevereError(state, + std::format("Site:GroundDomain:Slab{}: Out of range temperatures detected in the ground domain.", RoutineName)); ShowContinueError(state, "This could be due to the size of the loads on the domain."); ShowContinueError(state, "Verify inputs are correct. If problem persists, notify EnergyPlus support."); ShowFatalError(state, "Preceding error(s) cause program termination"); } else if (this->HasZoneCoupledBasement) { - ShowSevereError( - state, EnergyPlus::format("Site:GroundDomain:Basement{}: Out of range temperatures detected in the ground domain.", RoutineName)); + ShowSevereError(state, + std::format("Site:GroundDomain:Basement{}: Out of range temperatures detected in the ground domain.", RoutineName)); ShowContinueError(state, "This could be due to the size of the loads on the domain."); ShowContinueError(state, "Verify inputs are correct. If problem persists, notify EnergyPlus support."); ShowFatalError(state, "Preceding error(s) cause program termination"); } else { - ShowSevereError(state, - EnergyPlus::format("PipingSystems:{}: Out of range temperatures detected in piping system simulation.", RoutineName)); + ShowSevereError(state, std::format("PipingSystems:{}: Out of range temperatures detected in piping system simulation.", RoutineName)); ShowContinueError(state, "This could be due to the size of the pipe circuit in relation to the loads being imposed."); ShowContinueError(state, "Try increasing the size of the pipe circuit and investigate sizing effects."); ShowFatalError(state, "Preceding error(s) cause program termination"); diff --git a/src/EnergyPlus/PlantUtilities.cc b/src/EnergyPlus/PlantUtilities.cc index e6fdefc881a..826c37840b0 100644 --- a/src/EnergyPlus/PlantUtilities.cc +++ b/src/EnergyPlus/PlantUtilities.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -1737,16 +1738,15 @@ void ScanPlantLoopsForObject(EnergyPlusData &state, } } if (present(SingleLoopSearch)) { - ShowContinueError( - state, EnergyPlus::format("Look at Operation Scheme=\"{}\".", state.dataPlnt->PlantLoop(SingleLoopSearch).OperationScheme)); + ShowContinueError(state, + std::format("Look at Operation Scheme=\"{}\".", state.dataPlnt->PlantLoop(SingleLoopSearch).OperationScheme)); ShowContinueError(state, "Look at Branches and Components on the Loop."); ShowBranchesOnLoop(state, SingleLoopSearch); } errFlag = true; } else { ShowSevereError(state, EnergyPlus::format("ScanPlantLoopsForObject: Invalid CompType passed [{}], Name={}", CompType, CompName)); - ShowContinueError(state, - EnergyPlus::format("Valid CompTypes are in the range [0 - {}].", static_cast(DataPlant::PlantEquipmentType::Num))); + ShowContinueError(state, std::format("Valid CompTypes are in the range [0 - {}].", static_cast(DataPlant::PlantEquipmentType::Num))); ShowFatalError(state, "Previous error causes program termination"); } } @@ -1828,14 +1828,14 @@ void ScanPlantLoopsForNodeNum(EnergyPlusData &state, if (!FoundNode && reportError) { ShowSevereError(state, "ScanPlantLoopsForNodeNum: Plant Node was not found as inlet node (for component) on any plant loops"); - ShowContinueError(state, EnergyPlus::format("Node Name=\"{}\"", state.dataLoopNodes->NodeID(NodeNum))); + ShowContinueError(state, std::format("Node Name=\"{}\"", state.dataLoopNodes->NodeID(NodeNum))); if (!state.dataGlobal->DoingSizing) { - ShowContinueError(state, EnergyPlus::format("called by {}", CallerName)); + ShowContinueError(state, std::format("called by {}", CallerName)); } else { - ShowContinueError(state, EnergyPlus::format("during sizing: called by {}", CallerName)); + ShowContinueError(state, std::format("during sizing: called by {}", CallerName)); } if (outFoundCount > 0) { - ShowContinueError(state, EnergyPlus::format("Node was found as outlet node (for component) {} time(s).", outFoundCount)); + ShowContinueError(state, std::format("Node was found as outlet node (for component) {} time(s).", outFoundCount)); } ShowContinueError(state, "Possible error in Branch inputs. For more information, look for other error messages related to this node name."); // fatal? @@ -1946,15 +1946,15 @@ void ShowBranchesOnLoop(EnergyPlusData &state, int const LoopNum) // Loop number int CpN; // Component (on branch) counter for (DataPlant::LoopSideLocation LSN : DataPlant::LoopSideKeys) { - ShowContinueError(state, EnergyPlus::format("{} Branches:", DataPlant::DemandSupplyNames[static_cast(LSN)])); + ShowContinueError(state, std::format("{} Branches:", DataPlant::DemandSupplyNames[static_cast(LSN)])); for (BrN = 1; BrN <= state.dataPlnt->PlantLoop(LoopNum).LoopSide(LSN).TotalBranches; ++BrN) { - ShowContinueError(state, EnergyPlus::format(" {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LSN).Branch(BrN).Name)); + ShowContinueError(state, std::format(" {}", state.dataPlnt->PlantLoop(LoopNum).LoopSide(LSN).Branch(BrN).Name)); ShowContinueError(state, " Components on Branch:"); for (CpN = 1; CpN <= state.dataPlnt->PlantLoop(LoopNum).LoopSide(LSN).Branch(BrN).TotalComponents; ++CpN) { ShowContinueError(state, - EnergyPlus::format(" {}:{}", - state.dataPlnt->PlantLoop(LoopNum).LoopSide(LSN).Branch(BrN).Comp(CpN).TypeOf, - state.dataPlnt->PlantLoop(LoopNum).LoopSide(LSN).Branch(BrN).Comp(CpN).Name)); + std::format(" {}:{}", + state.dataPlnt->PlantLoop(LoopNum).LoopSide(LSN).Branch(BrN).Comp(CpN).TypeOf, + state.dataPlnt->PlantLoop(LoopNum).LoopSide(LSN).Branch(BrN).Comp(CpN).Name)); } } } @@ -2011,16 +2011,16 @@ int MyPlantSizingIndex(EnergyPlusData &state, } if (MyPltSizNum == 0) { if (PrintErrorFlag) { - ShowSevereError(state, - EnergyPlus::format("MyPlantSizingIndex: Could not find {} in Sizing:Plant objects.", - state.dataPlnt->PlantLoop(MyPltLoopNum).Name)); - ShowContinueError(state, EnergyPlus::format("...reference Component Type=\"{}\", Name=\"{}\".", CompType, CompName)); + ShowSevereError( + state, + std::format("MyPlantSizingIndex: Could not find {} in Sizing:Plant objects.", state.dataPlnt->PlantLoop(MyPltLoopNum).Name)); + ShowContinueError(state, std::format("...reference Component Type=\"{}\", Name=\"{}\".", CompType, CompName)); } ErrorsFound = true; } } else { if (PrintErrorFlag) { - ShowWarningError(state, EnergyPlus::format("MyPlantSizingIndex: Could not find {} with name {} on any plant loop", CompType, CompName)); + ShowWarningError(state, std::format("MyPlantSizingIndex: Could not find {} with name {} on any plant loop", CompType, CompName)); } ErrorsFound = true; } diff --git a/src/EnergyPlus/PluginManager.cc b/src/EnergyPlus/PluginManager.cc index 8add0979ac3..e749209f01a 100644 --- a/src/EnergyPlus/PluginManager.cc +++ b/src/EnergyPlus/PluginManager.cc @@ -45,18 +45,11 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#include -#include -#include -#include -#include -#include -#include -#include - +// C++ Headers #include -#include +#include +// Third Party Headers #if LINK_WITH_PYTHON # ifdef _DEBUG @@ -101,6 +94,17 @@ template <> struct fmt::formatter } }; // namespace fmt #endif +#include + +// EnergyPlus Headers +#include +#include +#include +#include +#include +#include +#include +#include namespace EnergyPlus::PluginManagement { @@ -397,7 +401,7 @@ void initPython(EnergyPlusData &state, fs::path const &pathToPythonPackages) preConfig.utf8_mode = 1; status = Py_PreInitialize(&preConfig); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, fmt::format("Could not pre-initialize Python to speak UTF-8... {}", status)); + ShowFatalError(state, EnergyPlus::format("Could not pre-initialize Python to speak UTF-8... {}", status)); } PyConfig config; @@ -406,12 +410,12 @@ void initPython(EnergyPlusData &state, fs::path const &pathToPythonPackages) status = PyConfig_SetBytesString(&config, &config.program_name, PluginManagement::programName); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, fmt::format("Could not initialize program_name on PyConfig... {}", status)); + ShowFatalError(state, EnergyPlus::format("Could not initialize program_name on PyConfig... {}", status)); } status = PyConfig_Read(&config); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, fmt::format("Could not read back the PyConfig... {}", status)); + ShowFatalError(state, EnergyPlus::format("Could not read back the PyConfig... {}", status)); } // ReSharper disable once CppRedundantTypenameKeyword @@ -423,16 +427,16 @@ void initPython(EnergyPlusData &state, fs::path const &pathToPythonPackages) status = PyConfig_SetString(&config, &config.home, wcharPath); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, fmt::format("Could not set home to {:g} on PyConfig... {}", pathToPythonPackages, status)); + ShowFatalError(state, EnergyPlus::format("Could not set home to {:g} on PyConfig... {}", pathToPythonPackages, status)); } status = PyConfig_SetString(&config, &config.base_prefix, wcharPath); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, fmt::format("Could not set base_prefix to {:g} on PyConfig... {}", pathToPythonPackages, status)); + ShowFatalError(state, EnergyPlus::format("Could not set base_prefix to {:g} on PyConfig... {}", pathToPythonPackages, status)); } config.module_search_paths_set = 1; status = PyWideStringList_Append(&config.module_search_paths, wcharPath); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, fmt::format("Could not add {:g} to module_search_paths on PyConfig... {}", pathToPythonPackages, status)); + ShowFatalError(state, EnergyPlus::format("Could not add {:g} to module_search_paths on PyConfig... {}", pathToPythonPackages, status)); } } else { @@ -443,16 +447,16 @@ void initPython(EnergyPlusData &state, fs::path const &pathToPythonPackages) status = PyConfig_SetString(&config, &config.home, wcharPath); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, fmt::format("Could not set home to {:g} on PyConfig... {}", pathToPythonPackages, status)); + ShowFatalError(state, EnergyPlus::format("Could not set home to {:g} on PyConfig... {}", pathToPythonPackages, status)); } status = PyConfig_SetString(&config, &config.base_prefix, wcharPath); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, fmt::format("Could not set base_prefix to {:g} on PyConfig... {}", pathToPythonPackages, status)); + ShowFatalError(state, EnergyPlus::format("Could not set base_prefix to {:g} on PyConfig... {}", pathToPythonPackages, status)); } config.module_search_paths_set = 1; status = PyWideStringList_Append(&config.module_search_paths, wcharPath); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, fmt::format("Could not add {:g} to module_search_paths on PyConfig... {}", pathToPythonPackages, status)); + ShowFatalError(state, EnergyPlus::format("Could not add {:g} to module_search_paths on PyConfig... {}", pathToPythonPackages, status)); } PyMem_RawFree(wcharPath); @@ -917,18 +921,17 @@ void PluginInstance::setup([[maybe_unused]] EnergyPlusData &state) } else { ShowContinueError(state, "This is available on the base class and should not be overridden...strange."); } - ShowFatalError(state, EnergyPlus::format("Program terminates after call to _detect_overridden() on {} failed!", this->stringIdentifier)); + ShowFatalError(state, std::format("Program terminates after call to _detect_overridden() on {} failed!", this->stringIdentifier)); } if (!PyList_Check(pFunctionResponse)) { // NOLINT(hicpp-signed-bitwise) - ShowFatalError(state, EnergyPlus::format("Invalid return from _detect_overridden() on class \"{}\", this is weird", this->stringIdentifier)); + ShowFatalError(state, std::format("Invalid return from _detect_overridden() on class \"{}\", this is weird", this->stringIdentifier)); } Py_ssize_t numVals = PyList_Size(pFunctionResponse); // at this point we know which base class methods are being overridden by the derived class // we can loop over them and based on the name check the appropriate flag and assign the function pointer if (numVals == 0) { ShowFatalError( - state, - EnergyPlus::format("Python plugin \"{}\" did not override any base class methods; must override at least one", this->stringIdentifier)); + state, std::format("Python plugin \"{}\" did not override any base class methods; must override at least one", this->stringIdentifier)); } for (Py_ssize_t itemNum = 0; itemNum < numVals; itemNum++) { PyObject *item = PyList_GetItem(pFunctionResponse, itemNum); @@ -1172,30 +1175,28 @@ bool PluginInstance::run(EnergyPlusData &state, EMSManager::EMSCallFrom iCalledF Py_DECREF(pStateInstance); if (pFunctionResponse == nullptr) { std::string const functionNameAsString(functionName); // only convert to string if an error occurs - ShowSevereError(state, EnergyPlus::format("Call to {}() on {} failed!", functionNameAsString, this->stringIdentifier)); + ShowSevereError(state, std::format("Call to {}() on {} failed!", functionNameAsString, this->stringIdentifier)); if (PyErr_Occurred() != nullptr) { reportPythonError(state); } else { ShowContinueError(state, "This could happen for any number of reasons, check the plugin code."); } - ShowFatalError(state, - EnergyPlus::format("Program terminates after call to {}() on {} failed!", functionNameAsString, this->stringIdentifier)); + ShowFatalError(state, std::format("Program terminates after call to {}() on {} failed!", functionNameAsString, this->stringIdentifier)); } if (PyLong_Check(pFunctionResponse)) { // NOLINT(hicpp-signed-bitwise) long exitCode = PyLong_AsLong(pFunctionResponse); if (exitCode == 0) { // success } else if (exitCode == 1) { - ShowFatalError(state, EnergyPlus::format("Python Plugin \"{}\" returned 1 to indicate EnergyPlus should abort", this->stringIdentifier)); + ShowFatalError(state, std::format("Python Plugin \"{}\" returned 1 to indicate EnergyPlus should abort", this->stringIdentifier)); } } else { std::string const functionNameAsString(functionName); // only convert to string if an error occurs ShowFatalError( state, - EnergyPlus::format( - "Invalid return from {}() on class \"{}, make sure it returns an integer exit code, either zero (success) or one (failure)", - functionNameAsString, - this->stringIdentifier)); + std::format("Invalid return from {}() on class \"{}, make sure it returns an integer exit code, either zero (success) or one (failure)", + functionNameAsString, + this->stringIdentifier)); } Py_DECREF(pFunctionResponse); // PyObject_CallFunction returns new reference, decrement if (state.dataPluginManager->apiErrorFlag) { @@ -1302,9 +1303,9 @@ int PluginManager::getGlobalVariableHandle(EnergyPlusData &state, const std::str return -1; } ShowSevereError(state, "Tried to retrieve handle for a nonexistent plugin global variable"); - ShowContinueError(state, EnergyPlus::format("Name looked up: \"{}\", available names: ", varNameUC)); + ShowContinueError(state, std::format("Name looked up: \"{}\", available names: ", varNameUC)); for (auto const &gvName : gVarNames) { - ShowContinueError(state, EnergyPlus::format(" \"{}\"", gvName)); + ShowContinueError(state, std::format(" \"{}\"", gvName)); } ShowFatalError(state, "Plugin global variable problem causes program termination"); return -1; // hush the compiler warning @@ -1476,9 +1477,8 @@ Real64 PluginManager::getGlobalVariableValue(EnergyPlusData &state, int handle) try { return state.dataPluginManager->globalVariableValues[handle]; // TODO: This won't be caught as an exception I think } catch (...) { - ShowSevereError(state, EnergyPlus::format("Tried to access plugin global variable value at index {}", handle)); - ShowContinueError(state, - EnergyPlus::format("Available handles range from 0 to {}", state.dataPluginManager->globalVariableValues.size() - 1)); + ShowSevereError(state, std::format("Tried to access plugin global variable value at index {}", handle)); + ShowContinueError(state, std::format("Available handles range from 0 to {}", state.dataPluginManager->globalVariableValues.size() - 1)); ShowFatalError(state, "Plugin global variable problem causes program termination"); } return 0.0; @@ -1501,9 +1501,8 @@ void PluginManager::setGlobalVariableValue(EnergyPlusData &state, int handle, Re try { state.dataPluginManager->globalVariableValues[handle] = value; // TODO: This won't be caught as an exception I think } catch (...) { - ShowSevereError(state, EnergyPlus::format("Tried to set plugin global variable value at index {}", handle)); - ShowContinueError(state, - EnergyPlus::format("Available handles range from 0 to {}", state.dataPluginManager->globalVariableValues.size() - 1)); + ShowSevereError(state, std::format("Tried to set plugin global variable value at index {}", handle)); + ShowContinueError(state, std::format("Available handles range from 0 to {}", state.dataPluginManager->globalVariableValues.size() - 1)); ShowFatalError(state, "Plugin global variable problem causes program termination"); } } @@ -1571,7 +1570,7 @@ bool PluginManager::anyUnexpectedPluginObjects(EnergyPlusData &state) ShowSevereMessage(state, "Found PythonPlugin objects in an IDF that is running in an API/Library workflow...this is invalid"); } if (instances > 0) { - ShowContinueError(state, EnergyPlus::format("Invalid PythonPlugin object type: {}", objToFind)); + ShowContinueError(state, std::format("Invalid PythonPlugin object type: {}", objToFind)); } } return numTotalThings > 0; diff --git a/src/EnergyPlus/PollutionModule.cc b/src/EnergyPlus/PollutionModule.cc index 97bdfc970c6..76cb37c6a1a 100644 --- a/src/EnergyPlus/PollutionModule.cc +++ b/src/EnergyPlus/PollutionModule.cc @@ -45,8 +45,6 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -// ObjexxFCL Headers - // EnergyPlus Headers #include #include diff --git a/src/EnergyPlus/PoweredInductionUnits.cc b/src/EnergyPlus/PoweredInductionUnits.cc index 1fad65a2460..0834f39a98e 100644 --- a/src/EnergyPlus/PoweredInductionUnits.cc +++ b/src/EnergyPlus/PoweredInductionUnits.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -577,26 +578,25 @@ void GetPIUs(EnergyPlusData &state) if (!damperLeakageFractionCurveName.empty() && thisPIU.leakFracCurve == 0) { ShowSevereError(state, - EnergyPlus::format("The air leakage fraction curve for the {} {} is missing. No air leakage will be modeled.", - cCurrentModuleObject, - thisPIU.Name)); + std::format("The air leakage fraction curve for the {} {} is missing. No air leakage will be modeled.", + cCurrentModuleObject, + thisPIU.Name)); } else if (thisPIU.leakFracCurve > 0) { std::string damperLeakageZoneName = ip->getAlphaFieldValue(fields, objectSchemaProps, "backdraft_damper_leakage_zone_name"); if (damperLeakageFractionCurveName.empty()) { thisPIU.leakFracCurve = 0; ShowSevereError(state, - EnergyPlus::format("The air leakage zone name for the {} {} is missing. No air leakage will be modeled.", - cCurrentModuleObject, - thisPIU.Name)); + std::format("The air leakage zone name for the {} {} is missing. No air leakage will be modeled.", + cCurrentModuleObject, + thisPIU.Name)); } else { if (int zoneNum = Util::FindItemInList(damperLeakageZoneName, state.dataHeatBal->Zone); zoneNum == thisPIU.CtrlZoneNum) { thisPIU.leakFracCurve = 0; - ShowSevereError( - state, - EnergyPlus::format("Air leakage for the {} {} won't be simulated as both the control zone and leakage " - "zones are the same.", - cCurrentModuleObject, - thisPIU.Name)); + ShowSevereError(state, + std::format("Air leakage for the {} {} won't be simulated as both the control zone and leakage " + "zones are the same.", + cCurrentModuleObject, + thisPIU.Name)); } else { int leakToPlenumZoneNum = 0; ZonePlenum::GetZonePlenumInput(state); @@ -617,12 +617,12 @@ void GetPIUs(EnergyPlusData &state) if (leakToPlenumZoneNum > 0 && leakToPlenumZoneNum != zoneNum) { ShowWarningMessage( state, - EnergyPlus::format("Check backdraft damper leakage zone name assignment for the {}:{}. It is serving a " - "zone connected to a AirLoopHVAC:ReturnPlenum object, leakage " - "should probably be assigned to {}.", - cCurrentModuleObject, - thisPIU.Name, - state.dataHeatBal->Zone(leakToPlenumZoneNum).Name)); + std::format("Check backdraft damper leakage zone name assignment for the {}:{}. It is serving a " + "zone connected to a AirLoopHVAC:ReturnPlenum object, leakage " + "should probably be assigned to {}.", + cCurrentModuleObject, + thisPIU.Name, + state.dataHeatBal->Zone(leakToPlenumZoneNum).Name)); } state.dataHeatBal->Zone(zoneNum).leakageParallelPIUNums.push_back(PIUNum); thisPIU.damperLeakageZoneNum = zoneNum; @@ -635,7 +635,7 @@ void GetPIUs(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{} Errors found in getting input. Preceding conditions cause termination.", RoutineName)); + ShowFatalError(state, std::format("{} Errors found in getting input. Preceding conditions cause termination.", RoutineName)); } for (int PIURpt = 1; PIURpt <= state.dataPowerInductionUnits->NumPIUs; ++PIURpt) { @@ -796,12 +796,12 @@ void InitPIU(EnergyPlusData &state, continue; } ShowSevereError(state, - EnergyPlus::format("InitPIU: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", - state.dataDefineEquipment->AirDistUnit(state.dataPowerInductionUnits->PIU(Loop).ADUNum).Name)); + std::format("InitPIU: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", + state.dataDefineEquipment->AirDistUnit(state.dataPowerInductionUnits->PIU(Loop).ADUNum).Name)); ShowContinueError(state, - EnergyPlus::format("...PIU=[{},{}] will not be simulated.", - state.dataPowerInductionUnits->PIU(Loop).UnitType, - state.dataPowerInductionUnits->PIU(Loop).Name)); + std::format("...PIU=[{},{}] will not be simulated.", + state.dataPowerInductionUnits->PIU(Loop).UnitType, + state.dataPowerInductionUnits->PIU(Loop).Name)); } } @@ -1001,9 +1001,8 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxPriAirVolFlowDes - MaxPriAirVolFlowUser) / MaxPriAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); + ShowMessage(state, + std::format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Primary Air Flow Rate of {:.5R} [m3/s]", MaxPriAirVolFlowUser)); ShowContinueError( @@ -1052,9 +1051,8 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxTotAirVolFlowDes - MaxTotAirVolFlowUser) / MaxTotAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); + ShowMessage(state, + std::format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Maximum Air Flow Rate of {:.5R} [m3/s]", MaxTotAirVolFlowUser)); ShowContinueError( @@ -1122,9 +1120,8 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxSecAirVolFlowDes - MaxSecAirVolFlowUser) / MaxSecAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); + ShowMessage(state, + std::format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Secondary Air Flow Rate of {:.5R} [m3/s]", MaxSecAirVolFlowUser)); ShowContinueError( @@ -1171,14 +1168,13 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) MinPriAirFlowFracDes = 1.0; ShowWarningError( state, - EnergyPlus::format("SingleDuctSystem:SizeSys: Autosized maximum air flow rate for {} was increased to meet the zone " - "primary air flow determined according to the ASHRAE Standard 62.1 Simplified Procedure.", - thisPIU.Name)); + std::format("SingleDuctSystem:SizeSys: Autosized maximum air flow rate for {} was increased to meet the zone " + "primary air flow determined according to the ASHRAE Standard 62.1 Simplified Procedure.", + thisPIU.Name)); } else if (MinPriAirFlowFracDes > 1.0) { ShowWarningError( state, - EnergyPlus::format("SingleDuctSystem:SizeSys: Maximum primary air flow rate for {} is potentially too low.", - thisPIU.Name)); + std::format("SingleDuctSystem:SizeSys: Maximum primary air flow rate for {} is potentially too low.", thisPIU.Name)); ShowContinueError(state, "The flow is lower than the minimum primary air flow rate calculated following the ASHRAE Standard " "62.1 Simplified Procedure:"); @@ -1215,9 +1211,8 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MinPriAirFlowFracDes - MinPriAirFlowFracUser) / MinPriAirFlowFracUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); + ShowMessage(state, + std::format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Minimum Primary Air Flow Fraction of {:.1R}", MinPriAirFlowFracUser)); ShowContinueError( @@ -1270,9 +1265,8 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) FanOnFlowFracUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(FanOnFlowFracDes - FanOnFlowFracUser) / FanOnFlowFracUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); + ShowMessage(state, + std::format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Fan On Flow Fraction of {:.1R}", FanOnFlowFracUser)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Fan On Flow Fraction of {:.1R}", FanOnFlowFracDes)); ShowContinueError(state, "This may, or may not, indicate mismatched component sizes."); @@ -1327,7 +1321,7 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) } } else { ShowSevereError(state, "Autosizing of water flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in{} Object={}", thisPIU.UnitType, thisPIU.Name)); + ShowContinueError(state, std::format("Occurs in{} Object={}", thisPIU.UnitType, thisPIU.Name)); ErrorsFound = true; } thisPIU.MaxVolHotWaterFlow = MaxVolHotWaterFlowDes; @@ -1357,9 +1351,8 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxVolHotWaterFlowDes - MaxVolHotWaterFlowUser) / MaxVolHotWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); + ShowMessage(state, + std::format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Reheat Water Flow Rate of {:.5R} [m3/s]", MaxVolHotWaterFlowUser)); @@ -1421,7 +1414,7 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) } } else { ShowSevereError(state, "Autosizing of Steam flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in{} Object={}", thisPIU.UnitType, thisPIU.Name)); + ShowContinueError(state, std::format("Occurs in{} Object={}", thisPIU.UnitType, thisPIU.Name)); ErrorsFound = true; } thisPIU.MaxVolHotSteamFlow = MaxVolHotSteamFlowDes; @@ -1440,9 +1433,8 @@ void SizePIU(EnergyPlusData &state, int const PIUNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxVolHotSteamFlowDes - MaxVolHotSteamFlowUser) / MaxVolHotSteamFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); + ShowMessage(state, + std::format("SizePIU: Potential issue with equipment sizing for {} {}", thisPIU.UnitType, thisPIU.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Reheat Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowUser)); ShowContinueError( @@ -1738,7 +1730,7 @@ void CalcSeriesPIU(EnergyPlusData &state, } } else { ShowSevereError(state, "Incorrect series PIU heating operation."); - ShowFatalError(state, EnergyPlus::format("Series PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, std::format("Series PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); } if ((QCoilReq < SmallLoad) && (thisPIU.heatingOperatingMode != HeatOpModeType::StagedHeatFirstStage)) { // reheat is off during the first stage of heating @@ -2111,7 +2103,7 @@ void CalcParallelPIU(EnergyPlusData &state, } } else { ShowSevereError(state, "Incorrect parallel PIU heating operation."); - ShowFatalError(state, EnergyPlus::format("Parallel PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, std::format("Parallel PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); } if ((QCoilReq < SmallLoad) && (thisPIU.heatingOperatingMode != HeatOpModeType::StagedHeatFirstStage)) { // reheat is off during the first stage of heating @@ -2307,13 +2299,13 @@ void CalcVariableSpeedPIUCoolingBehavior(EnergyPlusData &state, if (SolFla == -1) { ShowSevereError(state, "Iteration limit exceeded in calculating variable speed fan powered box cooling signal"); ShowContinueErrorTimeStamp(state, ""); - ShowFatalError(state, EnergyPlus::format("Series PIU control failed for {}:{} ", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, std::format("Series PIU control failed for {}:{} ", thisPIU.UnitType, thisPIU.Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for in calculating variable speed fan powered box cooling signal"); ShowContinueError(state, EnergyPlus::format("Zone Load to Cooling Setpoint = {:.2R} [W]", zoneLoad)); ShowContinueError(state, EnergyPlus::format("Load Delivered to Zone at Minimum Fan Speed = {:.2R} [W]", qdotDelivMinPrim)); ShowContinueErrorTimeStamp(state, ""); - ShowFatalError(state, EnergyPlus::format("Series PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, std::format("Series PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); } else { thisPIU.PriAirMassFlow = coolSignal * (thisPIU.MaxPriAirMassFlow - thisPIU.MinPriAirMassFlow) + thisPIU.MinPriAirMassFlow; TotAirMassFlow = coolSignal * (thisPIU.MaxTotAirMassFlow - thisPIU.MinTotAirMassFlow) + thisPIU.MinTotAirMassFlow; @@ -2395,11 +2387,11 @@ void CalcVariableSpeedPIUStagedHeatingBehavior(EnergyPlusData &state, if (SolFla == -1) { ShowSevereError(state, "Iteration limit exceeded in calculating variable speed fan powered box 1st stage heating fan speed"); ShowContinueErrorTimeStamp(state, ""); - ShowFatalError(state, EnergyPlus::format("PIU control failed for {}:{} ", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, std::format("PIU control failed for {}:{} ", thisPIU.UnitType, thisPIU.Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values in calculating variable speed fan powered box 1st stage heating fan speed"); ShowContinueErrorTimeStamp(state, ""); - ShowFatalError(state, EnergyPlus::format("PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, std::format("PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); } else { if (thisPIU.UnitType == "AirTerminal:SingleDuct:SeriesPIU:Reheat") { thisPIU.SecAirMassFlow = max(0.0, fanSignal * thisPIU.MaxTotAirMassFlow - primaryAirMassFlow); @@ -2526,11 +2518,11 @@ void CalcVariableSpeedPIUModulatedHeatingBehavior(EnergyPlusData &state, if (SolFla == -1) { ShowSevereError(state, "Iteration limit exceeded in calculating variable speed fan powered box 2nd stage heating fan speed"); ShowContinueErrorTimeStamp(state, ""); - ShowFatalError(state, EnergyPlus::format("PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, std::format("PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); } else if (SolFla == -2) { ShowSevereError(state, "Bad starting values for in calculating variable speed fan powered box 2nd stage heating fan speed"); ShowContinueErrorTimeStamp(state, ""); - ShowFatalError(state, EnergyPlus::format("PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); + ShowFatalError(state, std::format("PIU control failed for {}:{}", thisPIU.UnitType, thisPIU.Name)); } else { if (thisPIU.UnitType == "AirTerminal:SingleDuct:SeriesPIU:Reheat") { thisPIU.SecAirMassFlow = max(0.0, fanSignal * thisPIU.MaxTotAirMassFlow - primaryAirMassFlow); diff --git a/src/EnergyPlus/Psychrometrics.cc b/src/EnergyPlus/Psychrometrics.cc index 7930f4a597c..131570cf1c1 100644 --- a/src/EnergyPlus/Psychrometrics.cc +++ b/src/EnergyPlus/Psychrometrics.cc @@ -47,9 +47,7 @@ // C++ Headers #include - -// ObjexxFCL Headers -// #include +#include // EnergyPlus Headers #include @@ -230,7 +228,7 @@ namespace Psychrometrics { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::RhFnTdbRhovLBnd0C)] == 0) { state.dataPsychrometrics->String = EnergyPlus::format( - " Dry-Bulb= {:.2T} Rhovapor= {:.3T} Calculated Relative Humidity [%]= {:.2T}", Tdb, Rhovapor, RHValue * 100.0); + " Dry-Bulb= {:.2f} Rhovapor= {:.3f} Calculated Relative Humidity [%]= {:.2f}", Tdb, Rhovapor, RHValue * 100.0); ShowWarningMessage(state, "Calculated Relative Humidity out of range (PsyRhFnTdbRhovLBnd0C) "); if (!CalledFrom.empty()) { ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); @@ -253,7 +251,7 @@ namespace Psychrometrics { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::RhFnTdbRhovLBnd0C)] == 0) { state.dataPsychrometrics->String = EnergyPlus::format( - " Dry-Bulb= {:.2T} Rhovapor= {:.3T} Calculated Relative Humidity [%]= {:.2T}", Tdb, Rhovapor, RHValue * 100.0); + " Dry-Bulb= {:.2f} Rhovapor= {:.3f} Calculated Relative Humidity [%]= {:.2f}", Tdb, Rhovapor, RHValue * 100.0); ShowWarningMessage(state, "Calculated Relative Humidity out of range (PsyRhFnTdbRhovLBnd0C) "); if (!CalledFrom.empty()) { ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); @@ -410,7 +408,7 @@ namespace Psychrometrics { } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } - ShowContinueError(state, EnergyPlus::format(" Input Temperature={:.2T}", TDB)); + ShowContinueError(state, EnergyPlus::format(" Input Temperature={:.2f}", TDB)); FlagError = true; } ShowRecurringWarningErrorAtEnd(state, @@ -432,7 +430,7 @@ namespace Psychrometrics { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::TwbFnTdbWPb2)] == 0) { state.dataPsychrometrics->String = - EnergyPlus::format(" Dry-Bulb= {:.2T} Humidity Ratio= {:.3T} Pressure= {:.2T}", TDB, W, Patm); + EnergyPlus::format(" Dry-Bulb= {:.2f} Humidity Ratio= {:.3e} Pressure= {:.2f}", TDB, W, Patm); ShowWarningMessage(state, "Entered Humidity Ratio invalid (PsyTwbFnTdbWPb)"); if (!CalledFrom.empty()) { ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); @@ -440,7 +438,7 @@ namespace Psychrometrics { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } ShowContinueError(state, state.dataPsychrometrics->String); - state.dataPsychrometrics->String = EnergyPlus::format("Humidity Ratio= {:.4T}", W); + state.dataPsychrometrics->String = EnergyPlus::format("Humidity Ratio= {:.4e}", W); ShowContinueError(state, EnergyPlus::format("{} ... Humidity Ratio set to .00001", state.dataPsychrometrics->String)); } ShowRecurringWarningErrorAtEnd(state, @@ -526,9 +524,9 @@ namespace Psychrometrics { } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } - ShowContinueError(state, EnergyPlus::format(" Input Temperature = {:.2T}", TDB)); - ShowContinueError(state, EnergyPlus::format(" Input Humidity Ratio= {:.6T}", W)); - ShowContinueError(state, EnergyPlus::format(" Input Pressure = {:.2T}", Patm)); + ShowContinueError(state, EnergyPlus::format(" Input Temperature = {:.2f}", TDB)); + ShowContinueError(state, EnergyPlus::format(" Input Humidity Ratio= {:.6e}", W)); + ShowContinueError(state, EnergyPlus::format(" Input Pressure = {:.2f}", Patm)); FlagError = true; } ShowRecurringWarningErrorAtEnd(state, @@ -543,7 +541,7 @@ namespace Psychrometrics { #ifdef EP_psych_errors if (FlagError) { - ShowContinueError(state, EnergyPlus::format(" Resultant Temperature= {:.2T}", WBT)); + ShowContinueError(state, EnergyPlus::format(" Resultant Temperature= {:.4f}", WBT)); } #endif @@ -571,17 +569,16 @@ namespace Psychrometrics { if (V <= -0.01) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::VFnTdbWPb)] == 0) { - state.dataPsychrometrics->String = EnergyPlus::format(" Dry-Bulb= {:.2T} Humidity Ratio= {:.3T} Pressure= {:.2T}", TDB, w, PB); + state.dataPsychrometrics->String = EnergyPlus::format(" Dry-Bulb= {:.2f} Humidity Ratio= {:.3e} Pressure= {:.2f}", TDB, w, PB); ShowWarningMessage(state, "Calculated Specific Volume out of range (PsyVFnTdbWPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } ShowContinueError(state, state.dataPsychrometrics->String); - state.dataPsychrometrics->String = EnergyPlus::format("Calculated Volume= {:.3T}", V); - ShowContinueError(state, - EnergyPlus::format("{} ... Since Calculated Volume < 0.0, it is set to .83", state.dataPsychrometrics->String)); + state.dataPsychrometrics->String = std::format("Calculated Volume= {:.3f}", V); + ShowContinueError(state, std::format("{} ... Since Calculated Volume < 0.0, it is set to .83", state.dataPsychrometrics->String)); } ShowRecurringWarningErrorAtEnd(state, "Calculated Specific Volume out of range (PsyVFnTdbWPb)", @@ -607,16 +604,16 @@ namespace Psychrometrics { if (W < -0.0001) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::WFnTdbH)] == 0) { - state.dataPsychrometrics->String = EnergyPlus::format(" Dry-Bulb= {:.2T} Enthalpy= {:.3T}", TDB, H); + state.dataPsychrometrics->String = std::format(" Dry-Bulb= {:.2f} Enthalpy= {:.3f}", TDB, H); ShowWarningMessage(state, "Calculated Humidity Ratio invalid (PsyWFnTdbH)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } ShowContinueError(state, state.dataPsychrometrics->String); - state.dataPsychrometrics->String = EnergyPlus::format("Calculated Humidity Ratio= {:.4T}", W); - ShowContinueError(state, EnergyPlus::format("{} ... Humidity Ratio set to .00001", state.dataPsychrometrics->String)); + state.dataPsychrometrics->String = std::format("Calculated Humidity Ratio= {:.4e}", W); + ShowContinueError(state, std::format("{} ... Humidity Ratio set to .00001", state.dataPsychrometrics->String)); } ShowRecurringWarningErrorAtEnd(state, "Calculated Humidity Ratio invalid (PsyWFnTdbH)", @@ -697,11 +694,11 @@ namespace Psychrometrics { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::PsatFnTemp)] == 0) { ShowWarningMessage(state, "Temperature out of range [-100. to 200.] (PsyPsatFnTemp)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={},", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={},", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } - ShowContinueError(state, EnergyPlus::format(" Input Temperature={:.2T}", T)); + ShowContinueError(state, std::format(" Input Temperature={:.2f}", T)); } ShowRecurringWarningErrorAtEnd(state, "Temperature out of range [-100. to 200.] (PsyPsatFnTemp)", @@ -787,17 +784,17 @@ namespace Psychrometrics { if (TWB > (TDB + 0.01)) { if (state.dataPsychrometrics->ReportErrors && !state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::WFnTdbTwbPb)] == 0) { - state.dataPsychrometrics->String = EnergyPlus::format(" Dry-Bulb= {:.2T} Pressure= {:.2T}", TDB, PB); + state.dataPsychrometrics->String = std::format(" Dry-Bulb= {:.2f} Pressure= {:.2f}", TDB, PB); ShowWarningMessage(state, "Given Wet Bulb Temperature invalid (PsyWFnTdbTwbPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } ShowContinueError(state, state.dataPsychrometrics->String); - state.dataPsychrometrics->String = EnergyPlus::format("Calculated Wet-Bulb= {:.2T}", TWB); - ShowContinueError( - state, EnergyPlus::format("{} ... Since Dry Bulb < Wet Bulb, Wet Bulb set = to Dry Bulb", state.dataPsychrometrics->String)); + state.dataPsychrometrics->String = std::format("Calculated Wet-Bulb= {:.2f}", TWB); + ShowContinueError(state, + std::format("{} ... Since Dry Bulb < Wet Bulb, Wet Bulb set = to Dry Bulb", state.dataPsychrometrics->String)); } ShowRecurringWarningErrorAtEnd(state, "Given Wet Bulb Temperature invalid (PsyWFnTdbTwbPb)", @@ -825,18 +822,17 @@ namespace Psychrometrics { if (W < 0.0) { if (state.dataPsychrometrics->ReportErrors && !state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::WFnTdbTwbPb2)] == 0) { - state.dataPsychrometrics->String = EnergyPlus::format(" Dry-Bulb= {:.2T} Wet-Bulb= {:.2T} Pressure= {:.2T}", TDB, TWB, PB); + state.dataPsychrometrics->String = std::format(" Dry-Bulb= {:.2f} Wet-Bulb= {:.2f} Pressure= {:.2f}", TDB, TWB, PB); ShowWarningMessage(state, "Calculated Humidity Ratio Invalid (PsyWFnTdbTwbPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } ShowContinueError(state, state.dataPsychrometrics->String); - state.dataPsychrometrics->String = EnergyPlus::format("Calculated Humidity Ratio= {:.4T}, will recalculate Humidity Ratio", W); + state.dataPsychrometrics->String = std::format("Calculated Humidity Ratio= {:.4e}, will recalculate Humidity Ratio", W); ShowContinueError( - state, - EnergyPlus::format("{} using Relative Humidity .01% (and Dry-Bulb and Pressure as shown)", state.dataPsychrometrics->String)); + state, std::format("{} using Relative Humidity .01% (and Dry-Bulb and Pressure as shown)", state.dataPsychrometrics->String)); } ShowRecurringWarningErrorAtEnd(state, "Calculated Humidity Ratio Invalid (PsyWFnTdbTwbPb)", @@ -866,15 +862,15 @@ namespace Psychrometrics { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::TdpFnTdbTwbPb)] == 0) { ShowWarningMessage(state, "Calculated Dew Point Temperature being reset (PsyTdpFnTdbTwbPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } state.dataPsychrometrics->String = - EnergyPlus::format(" Dry-bulb={:.2T} Wet-Bulb (WB)= {:.2T} Pressure= {:.2T} Humidity Ratio={:.3T}", TDB, TWB, PB, W); + std::format(" Dry-bulb={:.2f} Wet-Bulb (WB)= {:.2f} Pressure= {:.2f} Humidity Ratio={:.3e}", TDB, TWB, PB, W); ShowContinueError(state, state.dataPsychrometrics->String); state.dataPsychrometrics->String = - EnergyPlus::format(" Calculated Dew Point Temperature (DPT)= {:.2T}; Since DPT > WB, DPT will be set to WB", TDP); + std::format(" Calculated Dew Point Temperature (DPT)= {:.2f}; Since DPT > WB, DPT will be set to WB", TDP); ShowContinueError(state, state.dataPsychrometrics->String); } ShowRecurringWarningErrorAtEnd(state, @@ -953,11 +949,11 @@ namespace Psychrometrics { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::TsatFnHPb)] == 0) { ShowWarningMessage(state, "Enthalpy out of range (PsyTsatFnHPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={},", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={},", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } - state.dataPsychrometrics->String = EnergyPlus::format(" Enthalpy={:.5T} Pressure= {:.2T}", HH, PB); + state.dataPsychrometrics->String = std::format(" Enthalpy={:.5f} Pressure= {:.2f}", HH, PB); ShowContinueError(state, state.dataPsychrometrics->String); FlagError = true; } @@ -1021,7 +1017,7 @@ namespace Psychrometrics { #ifdef EP_psych_errors if (FlagError) { - ShowContinueError(state, EnergyPlus::format(" Initial Resultant Temperature= {:.2T}", T)); + ShowContinueError(state, std::format(" Initial Resultant Temperature= {:.4f}", T)); } #endif if (std::abs(PB - 1.0133e5) / 1.0133e5 > 0.01) { @@ -1051,12 +1047,12 @@ namespace Psychrometrics { if (FlagError && IterCount > 30) { ShowSevereError(state, "Temperature did not converge (PsyTsatFnHPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } - state.dataPsychrometrics->String = EnergyPlus::format(" Enthalpy={:.5T} Pressure= {:.2T}", HH, PB); - ShowContinueError(state, EnergyPlus::format("{} Last T={:.2T}", state.dataPsychrometrics->String, T)); + state.dataPsychrometrics->String = std::format(" Enthalpy={:.5f} Pressure= {:.2f}", HH, PB); + ShowContinueError(state, std::format("{} Last T={:.2f}", state.dataPsychrometrics->String, T)); } #endif } @@ -1076,11 +1072,11 @@ namespace Psychrometrics { if (RHValue > 1.01) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::RhFnTdbRhov)] == 0) { - state.dataPsychrometrics->String = EnergyPlus::format( - " Dry-Bulb= {:.2T} Rhovapor= {:.3T} Calculated Relative Humidity [%]= {:.2T}", Tdb, Rhovapor, RHValue * 100.0); + state.dataPsychrometrics->String = + std::format(" Dry-Bulb= {:.2f} Rhovapor= {:.3f} Calculated Relative Humidity [%]= {:.2f}", Tdb, Rhovapor, RHValue * 100.0); ShowWarningMessage(state, "Calculated Relative Humidity out of range (PsyRhFnTdbRhov) "); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } @@ -1099,11 +1095,11 @@ namespace Psychrometrics { } else if (RHValue < -0.05) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::RhFnTdbRhov)] == 0) { - state.dataPsychrometrics->String = EnergyPlus::format( - " Dry-Bulb= {:.2T} Rhovapor= {:.3T} Calculated Relative Humidity [%]= {:.2T}", Tdb, Rhovapor, RHValue * 100.0); + state.dataPsychrometrics->String = + std::format(" Dry-Bulb= {:.2f} Rhovapor= {:.3f} Calculated Relative Humidity [%]= {:.2f}", Tdb, Rhovapor, RHValue * 100.0); ShowWarningMessage(state, "Calculated Relative Humidity out of range (PsyRhFnTdbRhov) "); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } @@ -1134,11 +1130,11 @@ namespace Psychrometrics { if (RHValue > 1.01) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::RhFnTdbWPb)] == 0) { - state.dataPsychrometrics->String = EnergyPlus::format( - " Dry-Bulb= {:.2T} Humidity Ratio= {:.3T} Calculated Relative Humidity [%]= {:.2T}", TDB, W, RHValue * 100.0); + state.dataPsychrometrics->String = + std::format(" Dry-Bulb= {:.2f} Humidity Ratio= {:.3e} Calculated Relative Humidity [%]= {:.2f}", TDB, W, RHValue * 100.0); ShowWarningMessage(state, "Calculated Relative Humidity out of range (PsyRhFnTdbWPb) "); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } @@ -1157,11 +1153,11 @@ namespace Psychrometrics { } else if (RHValue < -0.05) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::RhFnTdbWPb)] == 0) { - state.dataPsychrometrics->String = EnergyPlus::format( - " Dry-Bulb= {:.2T} Humidity Ratio= {:.3T} Calculated Relative Humidity [%]= {:.2T}", TDB, W, RHValue * 100.0); + state.dataPsychrometrics->String = + std::format(" Dry-Bulb= {:.2f} Humidity Ratio= {:.3e} Calculated Relative Humidity [%]= {:.2f}", TDB, W, RHValue * 100.0); ShowWarningMessage(state, "Calculated Relative Humidity out of range (PsyRhFnTdbWPb) "); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } @@ -1192,19 +1188,19 @@ namespace Psychrometrics { { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::WFnTdpPb)] == 0) { - state.dataPsychrometrics->String = EnergyPlus::format(" Dew-Point= {:.2T} Barometric Pressure= {:.2T}", TDP, PB); + state.dataPsychrometrics->String = std::format(" Dew-Point= {:.2f} Barometric Pressure= {:.2f}", TDP, PB); ShowWarningMessage(state, "Calculated partial vapor pressure is greater than the barometric pressure, so that calculated humidity ratio is " "invalid (PsyWFnTdpPb)."); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={},", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={},", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } ShowContinueError(state, state.dataPsychrometrics->String); - state.dataPsychrometrics->String = EnergyPlus::format( - "Instead, calculated Humidity Ratio at {:.1T} ({} degree less) = {:.4T}", TDP - DeltaT, static_cast(DeltaT), W); - ShowContinueError(state, EnergyPlus::format("{} will be used. Simulation continues.", state.dataPsychrometrics->String)); + state.dataPsychrometrics->String = + std::format("Instead, calculated Humidity Ratio at {:.1f} ({} degree less) = {:.4f}", TDP - DeltaT, static_cast(DeltaT), W); + ShowContinueError(state, std::format("{} will be used. Simulation continues.", state.dataPsychrometrics->String)); } ShowRecurringWarningErrorAtEnd(state, "Entered Humidity Ratio invalid (PsyWFnTdpPb)", @@ -1231,16 +1227,16 @@ namespace Psychrometrics { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::WFnTdbRhPb)] == 0) { state.dataPsychrometrics->String = - EnergyPlus::format(" Dry-Bulb= {:.2T} Relative Humidity [%]= {:.2T} Pressure= {:.2T}", TDB, RH * 100.0, PB); + std::format(" Dry-Bulb= {:.2f} Relative Humidity [%]= {:.2f} Pressure= {:.2f}", TDB, RH * 100.0, PB); ShowWarningMessage(state, "Calculated Humidity Ratio is invalid (PsyWFnTdbRhPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } ShowContinueError(state, state.dataPsychrometrics->String); - state.dataPsychrometrics->String = EnergyPlus::format("Calculated Humidity Ratio= {:.4T}", W); - ShowContinueError(state, EnergyPlus::format("{} ... Humidity Ratio set to .00001", state.dataPsychrometrics->String)); + state.dataPsychrometrics->String = std::format("Calculated Humidity Ratio= {:.4e}", W); + ShowContinueError(state, std::format("{} ... Humidity Ratio set to .00001", state.dataPsychrometrics->String)); } ShowRecurringWarningErrorAtEnd(state, "Calculated Humidity Ratio Invalid (PsyWFnTdbTwbPb)", @@ -1320,11 +1316,11 @@ namespace Psychrometrics { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::TsatFnPb)] == 0) { ShowWarningMessage(state, "Pressure out of range (PsyTsatFnPb)"); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } - ShowContinueError(state, EnergyPlus::format(" Input Pressure= {:.2T}", Press)); + ShowContinueError(state, std::format(" Input Pressure= {:.2f}", Press)); FlagError = true; } ShowRecurringWarningErrorAtEnd(state, @@ -1409,13 +1405,13 @@ namespace Psychrometrics { if (iter > itmax) { if (!state.dataGlobal->WarmupFlag) { if (state.dataPsychrometrics->iPsyErrIndex[static_cast(PsychrometricFunction::TsatFnPb2)] == 0) { - ShowWarningMessage(state, EnergyPlus::format("Saturation Temperature not converged after {} iterations (PsyTsatFnPb)", iter)); + ShowWarningMessage(state, std::format("Saturation Temperature not converged after {} iterations (PsyTsatFnPb)", iter)); if (!CalledFrom.empty()) { - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" Routine={}", CalledFrom)); + ShowContinueErrorTimeStamp(state, std::format(" Routine={}", CalledFrom)); } else { ShowContinueErrorTimeStamp(state, " Routine=Unknown,"); } - ShowContinueError(state, EnergyPlus::format(" Input Pressure= {:.2T}", Press)); + ShowContinueError(state, std::format(" Input Pressure= {:.2f}", Press)); FlagError = true; } ShowRecurringWarningErrorAtEnd(state, @@ -1435,7 +1431,7 @@ namespace Psychrometrics { #ifdef EP_psych_errors if (FlagError) { - ShowContinueError(state, EnergyPlus::format(" Resultant Temperature= {:.2T}", Temp)); + ShowContinueError(state, std::format(" Resultant Temperature= {:.4f}", Temp)); } #endif diff --git a/src/EnergyPlus/Psychrometrics.hh b/src/EnergyPlus/Psychrometrics.hh index eefe39fc5dc..5e05e861f6c 100644 --- a/src/EnergyPlus/Psychrometrics.hh +++ b/src/EnergyPlus/Psychrometrics.hh @@ -54,7 +54,6 @@ // ObjexxFCL Headers #include -// #include // EnergyPlus Headers #include @@ -62,7 +61,6 @@ #include #include #include -#include namespace EnergyPlus { diff --git a/src/EnergyPlus/Pumps.cc b/src/EnergyPlus/Pumps.cc index b1a02554800..17a99a1fb25 100644 --- a/src/EnergyPlus/Pumps.cc +++ b/src/EnergyPlus/Pumps.cc @@ -48,10 +48,10 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include -// #include // EnergyPlus Headers #include @@ -354,7 +354,7 @@ void GetPumpInput(EnergyPlusData &state) state, EnergyPlus::format("{}{}=\"{}\", Invalid '{}'", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cNumericFieldNames(10))); ShowContinueError(state, - EnergyPlus::format("Entered Value=[{:.5T}] is above or too close (equal) to the {}=[{:.5T}].", + EnergyPlus::format("Entered Value=[{:.5f}] is above or too close (equal) to the {}=[{:.5f}].", thisPump.MinVolFlowRate, thisInput->cNumericFieldNames(1), thisPump.NomVolFlowRate)); @@ -871,21 +871,20 @@ void GetPumpInput(EnergyPlusData &state) state, EnergyPlus::format("{}{}=\"{}\", Invalid {}", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cAlphaFieldNames(4))); ShowContinueError(state, - EnergyPlus::format("Entered Value=[{}]. {} has been set to Sequential for this pump.", - thisInput->cAlphaArgs(4), - thisInput->cAlphaFieldNames(4))); + std::format("Entered Value=[{}]. {} has been set to Sequential for this pump.", + thisInput->cAlphaArgs(4), + thisInput->cAlphaFieldNames(4))); thisPump.SequencingScheme = PumpBankControlSeq::SequentialScheme; } thisPump.PumpControl = static_cast(getEnumValue(pumpCtrlTypeNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(5)))); if (thisPump.PumpControl == PumpControlType::Invalid) { ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\", Invalid {}", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cAlphaFieldNames(5))); + state, std::format("{}{}=\"{}\", Invalid {}", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cAlphaFieldNames(5))); ShowContinueError(state, - EnergyPlus::format("Entered Value=[{}]. {} has been set to Continuous for this pump.", - thisInput->cAlphaArgs(5), - thisInput->cAlphaFieldNames(5))); + std::format("Entered Value=[{}]. {} has been set to Continuous for this pump.", + thisInput->cAlphaArgs(5), + thisInput->cAlphaFieldNames(5))); thisPump.PumpControl = PumpControlType::Continuous; } @@ -924,11 +923,11 @@ void GetPumpInput(EnergyPlusData &state) } } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", - cCurrentModuleObject, - thisPump.Name, - thisInput->cAlphaFieldNames(7), - thisInput->cAlphaArgs(7))); + std::format("{}=\"{}\" invalid {}=\"{}\" not found.", + cCurrentModuleObject, + thisPump.Name, + thisInput->cAlphaFieldNames(7), + thisInput->cAlphaArgs(7))); ErrorsFound = true; } } @@ -938,10 +937,10 @@ void GetPumpInput(EnergyPlusData &state) static_cast(getEnumValue(powerSizingMethodNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(8)))); if (thisPump.powerSizingMethod == PowerSizingMethod::Invalid) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", sizing method type entered is invalid. Use one of the key choice entries.", - RoutineName, - cCurrentModuleObject, - thisPump.Name)); + std::format("{}{}=\"{}\", sizing method type entered is invalid. Use one of the key choice entries.", + RoutineName, + cCurrentModuleObject, + thisPump.Name)); ErrorsFound = true; } } @@ -1016,12 +1015,11 @@ void GetPumpInput(EnergyPlusData &state) thisPump.SequencingScheme = PumpBankControlSeq::SequentialScheme; } else { ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\", Invalid {}", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cAlphaFieldNames(4))); + state, std::format("{}{}=\"{}\", Invalid {}", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cAlphaFieldNames(4))); ShowContinueError(state, - EnergyPlus::format("Entered Value=[{}]. {} has been set to Sequential for this pump.", - thisInput->cAlphaArgs(4), - thisInput->cAlphaFieldNames(4))); + std::format("Entered Value=[{}]. {} has been set to Sequential for this pump.", + thisInput->cAlphaArgs(4), + thisInput->cAlphaFieldNames(4))); thisPump.SequencingScheme = PumpBankControlSeq::SequentialScheme; } @@ -1029,12 +1027,11 @@ void GetPumpInput(EnergyPlusData &state) if (thisPump.PumpControl == PumpControlType::Invalid) { ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\", Invalid {}", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cAlphaFieldNames(5))); + state, std::format("{}{}=\"{}\", Invalid {}", RoutineName, cCurrentModuleObject, thisPump.Name, thisInput->cAlphaFieldNames(5))); ShowContinueError(state, - EnergyPlus::format("Entered Value=[{}]. {} has been set to Continuous for this pump.", - thisInput->cAlphaArgs(5), - thisInput->cAlphaFieldNames(5))); + std::format("Entered Value=[{}]. {} has been set to Continuous for this pump.", + thisInput->cAlphaArgs(5), + thisInput->cAlphaFieldNames(5))); thisPump.PumpControl = PumpControlType::Continuous; } @@ -1071,11 +1068,11 @@ void GetPumpInput(EnergyPlusData &state) } } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", - cCurrentModuleObject, - thisPump.Name, - thisInput->cAlphaFieldNames(7), - thisInput->cAlphaArgs(7))); + std::format("{}=\"{}\" invalid {}=\"{}\" not found.", + cCurrentModuleObject, + thisPump.Name, + thisInput->cAlphaFieldNames(7), + thisInput->cAlphaArgs(7))); ErrorsFound = true; } } @@ -1084,10 +1081,10 @@ void GetPumpInput(EnergyPlusData &state) static_cast(getEnumValue(powerSizingMethodNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(8)))); if (thisPump.powerSizingMethod == PowerSizingMethod::Invalid) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", sizing method type entered is invalid. Use one of the key choice entries.", - RoutineName, - cCurrentModuleObject, - thisPump.Name)); + std::format("{}{}=\"{}\", sizing method type entered is invalid. Use one of the key choice entries.", + RoutineName, + cCurrentModuleObject, + thisPump.Name)); ErrorsFound = true; } } @@ -1390,21 +1387,20 @@ void InitializePumps(EnergyPlusData &state, int const PumpNum) thisPump.plantLoc.branchNum > 0 && thisPump.plantLoc.compNum > 0) { if (thisPump.plantLoc.comp->NodeNumIn != InletNode || thisPump.plantLoc.comp->NodeNumOut != OutletNode) { ShowSevereError(state, - EnergyPlus::format("InitializePumps: {}=\"{}\", non-matching nodes.", - pumpTypeIDFNames[static_cast(thisPump.pumpType)], - thisPump.Name)); - ShowContinueError(state, EnergyPlus::format("...in Branch={}, Component referenced with:", thisPump.plantLoc.branch->Name)); - ShowContinueError(state, EnergyPlus::format("...Inlet Node={}", state.dataLoopNodes->NodeID(thisPump.plantLoc.comp->NodeNumIn))); - ShowContinueError(state, EnergyPlus::format("...Outlet Node={}", state.dataLoopNodes->NodeID(thisPump.plantLoc.comp->NodeNumOut))); - ShowContinueError(state, EnergyPlus::format("...Pump Inlet Node={}", state.dataLoopNodes->NodeID(InletNode))); - ShowContinueError(state, EnergyPlus::format("...Pump Outlet Node={}", state.dataLoopNodes->NodeID(OutletNode))); + std::format("InitializePumps: {}=\"{}\", non-matching nodes.", + pumpTypeIDFNames[static_cast(thisPump.pumpType)], + thisPump.Name)); + ShowContinueError(state, std::format("...in Branch={}, Component referenced with:", thisPump.plantLoc.branch->Name)); + ShowContinueError(state, std::format("...Inlet Node={}", state.dataLoopNodes->NodeID(thisPump.plantLoc.comp->NodeNumIn))); + ShowContinueError(state, std::format("...Outlet Node={}", state.dataLoopNodes->NodeID(thisPump.plantLoc.comp->NodeNumOut))); + ShowContinueError(state, std::format("...Pump Inlet Node={}", state.dataLoopNodes->NodeID(InletNode))); + ShowContinueError(state, std::format("...Pump Outlet Node={}", state.dataLoopNodes->NodeID(OutletNode))); errFlag = true; } } else { // CR9292 - ShowSevereError(state, - EnergyPlus::format("InitializePumps: {}=\"{}\", component missing.", - pumpTypeIDFNames[static_cast(thisPump.pumpType)], - thisPump.Name)); + ShowSevereError( + state, + std::format("InitializePumps: {}=\"{}\", component missing.", pumpTypeIDFNames[static_cast(thisPump.pumpType)], thisPump.Name)); errFlag = true; // should have received warning/severe earlier, will reiterate } @@ -1472,12 +1468,11 @@ void InitializePumps(EnergyPlusData &state, int const PumpNum) ShowFatalError(state, "Errors found in Pump input"); } } else { - ShowWarningError(state, - EnergyPlus::format("Check input. Pump nominal power or motor efficiency is set to 0, for pump={}", thisPump.Name)); + ShowWarningError(state, std::format("Check input. Pump nominal power or motor efficiency is set to 0, for pump={}", thisPump.Name)); } if (thisPump.NomVolFlowRate <= SmallWaterVolFlow) { - ShowWarningError(state, EnergyPlus::format("Check input. Pump nominal flow rate is set or calculated = 0, for pump={}", thisPump.Name)); + ShowWarningError(state, std::format("Check input. Pump nominal flow rate is set or calculated = 0, for pump={}", thisPump.Name)); } if (thisPump.PumpControl == PumpControlType::Continuous) { @@ -1918,7 +1913,7 @@ void CalcPumps(EnergyPlusData &state, int const PumpNum, Real64 const FlowReques if (thisPump.PowerErrIndex1 == 0) { ShowWarningMessage( state, - EnergyPlus::format( + std::format( "{} Calculated Pump Power < 0, Type={}, Name={}", RoutineName, pumpTypeIDFNames[static_cast(pumpType)], thisPump.Name)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, @@ -1929,8 +1924,7 @@ void CalcPumps(EnergyPlusData &state, int const PumpNum, Real64 const FlowReques daPumps->Power = 0.0; ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( - "{} Calculated Pump Power < 0, {}, Name={}, PLR=", RoutineName, pumpTypeIDFNames[static_cast(pumpType)], thisPump.Name), + std::format("{} Calculated Pump Power < 0, {}, Name={}, PLR=", RoutineName, pumpTypeIDFNames[static_cast(pumpType)], thisPump.Name), thisPump.PowerErrIndex1, PartLoadRatio, PartLoadRatio); @@ -1948,9 +1942,8 @@ void CalcPumps(EnergyPlusData &state, int const PumpNum, Real64 const FlowReques TotalEffic = thisPump.PumpEffic * thisPump.MotorEffic; // Efficiency errors are caught previously, but it doesn't hurt to add another catch before dividing by zero!!! if (TotalEffic == 0.0) { - ShowSevereError( - state, - EnergyPlus::format("{} Plant pressure simulation encountered a pump with zero efficiency: {}", RoutineName, thisPump.Name)); + ShowSevereError(state, + std::format("{} Plant pressure simulation encountered a pump with zero efficiency: {}", RoutineName, thisPump.Name)); ShowContinueError(state, "Check efficiency inputs for this pump component."); ShowFatalError(state, "Errors in plant calculation would result in divide-by-zero cause program termination."); } @@ -1963,8 +1956,7 @@ void CalcPumps(EnergyPlusData &state, int const PumpNum, Real64 const FlowReques TotalEffic = thisPump.PumpEffic * thisPump.MotorEffic; // Efficiency errors are caught previously, but it doesn't hurt to add another catch before dividing by zero!!! if (TotalEffic == 0.0) { - ShowSevereError(state, - EnergyPlus::format("{} Plant pump simulation encountered a pump with zero efficiency: {}", RoutineName, thisPump.Name)); + ShowSevereError(state, std::format("{} Plant pump simulation encountered a pump with zero efficiency: {}", RoutineName, thisPump.Name)); ShowContinueError(state, "Check efficiency inputs for this pump component."); ShowFatalError(state, "Errors in plant calculation would result in divide-by-zero cause program termination."); } @@ -2099,7 +2091,7 @@ void SizePump(EnergyPlusData &state, int const PumpNum) ShowWarningError(state, EnergyPlus::format("SizePump: Calculated Pump Nominal Volume Flow Rate=[{:.2R}] is too small. Set to 0.0", thisPlantSize.DesVolFlowRate)); - ShowContinueError(state, EnergyPlus::format("..occurs for Pump={}", thisPump.Name)); + ShowContinueError(state, std::format("..occurs for Pump={}", thisPump.Name)); } } if (thisOkToReport) { @@ -2116,7 +2108,7 @@ void SizePump(EnergyPlusData &state, int const PumpNum) } else { if (thisOkToReport) { ShowSevereError(state, "Autosizing of plant loop pump flow rate requires a loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in plant pump object={}", thisPump.Name)); + ShowContinueError(state, std::format("Occurs in plant pump object={}", thisPump.Name)); ErrorsFound = true; } } diff --git a/src/EnergyPlus/PurchasedAirManager.cc b/src/EnergyPlus/PurchasedAirManager.cc index 72db8f69ef2..b2267793d31 100644 --- a/src/EnergyPlus/PurchasedAirManager.cc +++ b/src/EnergyPlus/PurchasedAirManager.cc @@ -47,10 +47,10 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include -// #include #include // EnergyPlus Headers @@ -1145,12 +1145,11 @@ void InitPurchasedAir(EnergyPlusData &state, int const PurchAirNum, int const Co state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).NumExhaustNodes); if (NodeIndex == 0) { ShowSevereError(state, EnergyPlus::format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); + ShowContinueError( + state, std::format("Zone Exhaust Air Node Name={} is not a zone exhaust node.", state.dataLoopNodes->NodeID(ExhaustNodeNum))); ShowContinueError( state, - EnergyPlus::format("Zone Exhaust Air Node Name={} is not a zone exhaust node.", state.dataLoopNodes->NodeID(ExhaustNodeNum))); - ShowContinueError(state, - EnergyPlus::format("Check ZoneHVAC:EquipmentConnections for zone={}", - state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).ZoneName)); + std::format("Check ZoneHVAC:EquipmentConnections for zone={}", state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).ZoneName)); ShowContinueError(state, "Zone return air node will be used for ideal loads recirculation air."); UseReturnNode = true; } else { @@ -1163,15 +1162,14 @@ void InitPurchasedAir(EnergyPlusData &state, int const PurchAirNum, int const Co if (state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).NumReturnNodes == 1) { PurchAir.ZoneRecircAirNodeNum = state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).ReturnNode(1); } else if (state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).NumReturnNodes > 1) { - ShowWarningError(state, EnergyPlus::format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); + ShowWarningError(state, std::format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); ShowContinueError(state, "No Zone Exhaust Air Node Name has been specified for this system and the zone has more than one Return Air Node."); - ShowContinueError( - state, - EnergyPlus::format("Using the first return air node ={}", - state.dataLoopNodes->NodeID(state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).ReturnNode(1)))); + ShowContinueError(state, + std::format("Using the first return air node ={}", + state.dataLoopNodes->NodeID(state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).ReturnNode(1)))); } else { - ShowFatalError(state, EnergyPlus::format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); + ShowFatalError(state, std::format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); ShowContinueError( state, " Invalid recirculation node. No exhaust or return node has been specified for this zone in ZoneHVAC:EquipmentConnections."); @@ -1181,7 +1179,7 @@ void InitPurchasedAir(EnergyPlusData &state, int const PurchAirNum, int const Co // If there is OA and economizer is active, then there must be a limit on cooling flow rate if (PurchAir.OutdoorAir && (PurchAir.EconomizerType != Econ::NoEconomizer)) { if ((PurchAir.CoolingLimit == LimitType::None) || (PurchAir.CoolingLimit == LimitType::Capacity)) { - ShowSevereError(state, EnergyPlus::format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); + ShowSevereError(state, std::format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); ShowContinueError(state, "There is outdoor air with economizer active but there is no limit on cooling air flow rate."); ShowContinueError(state, "Cooling Limit must be set to LimitFlowRate or LimitFlowRateAndCapacity, and Maximum Cooling Air Flow Rate " @@ -1240,10 +1238,10 @@ void InitPurchasedAir(EnergyPlusData &state, int const PurchAirNum, int const Co if (UnitOn && CoolOn) { if (PurchAir.CoolErrIndex == 0) { ShowSevereError(state, - EnergyPlus::format("InitPurchasedAir: For {} = {} serving Zone {}", - PurchAir.cObjectName, - PurchAir.Name, - state.dataHeatBal->Zone(ControlledZoneNum).Name)); + std::format("InitPurchasedAir: For {} = {} serving Zone {}", + PurchAir.cObjectName, + PurchAir.Name, + state.dataHeatBal->Zone(ControlledZoneNum).Name)); ShowContinueError( state, EnergyPlus::format("..the minimum supply air temperature for cooling [{:.2R}] is greater than the zone cooling mean air " @@ -1253,7 +1251,7 @@ void InitPurchasedAir(EnergyPlusData &state, int const PurchAirNum, int const Co ShowContinueError(state, "..For operative and comfort thermostat controls, the MAT setpoint is computed."); ShowContinueError(state, "..This error may indicate that the mean radiant temperature or another comfort factor is too warm."); ShowContinueError(state, "Unit availability is nominally ON and Cooling availability is nominally ON."); - ShowContinueError(state, EnergyPlus::format("Limit Cooling Capacity Type={}", limitTypeNames[(int)PurchAir.CoolingLimit])); + ShowContinueError(state, std::format("Limit Cooling Capacity Type={}", limitTypeNames[(int)PurchAir.CoolingLimit])); // could check for optemp control or comfort control here ShowContinueErrorTimeStamp(state, ""); } @@ -1289,10 +1287,10 @@ void InitPurchasedAir(EnergyPlusData &state, int const PurchAirNum, int const Co if (UnitOn && HeatOn) { if (PurchAir.HeatErrIndex == 0) { ShowSevereMessage(state, - EnergyPlus::format("InitPurchasedAir: For {} = {} serving Zone {}", - PurchAir.cObjectName, - PurchAir.Name, - state.dataHeatBal->Zone(ControlledZoneNum).Name)); + std::format("InitPurchasedAir: For {} = {} serving Zone {}", + PurchAir.cObjectName, + PurchAir.Name, + state.dataHeatBal->Zone(ControlledZoneNum).Name)); ShowContinueError( state, EnergyPlus::format("..the maximum supply air temperature for heating [{:.2R}] is less than the zone mean air temperature " @@ -1302,7 +1300,7 @@ void InitPurchasedAir(EnergyPlusData &state, int const PurchAirNum, int const Co ShowContinueError(state, "..For operative and comfort thermostat controls, the MAT setpoint is computed."); ShowContinueError(state, "..This error may indicate that the mean radiant temperature or another comfort factor is too cold."); ShowContinueError(state, "Unit availability is nominally ON and Heating availability is nominally ON."); - ShowContinueError(state, EnergyPlus::format("Limit Heating Capacity Type={}", limitTypeNames[(int)PurchAir.HeatingLimit])); + ShowContinueError(state, std::format("Limit Heating Capacity Type={}", limitTypeNames[(int)PurchAir.HeatingLimit])); // could check for optemp control or comfort control here ShowContinueErrorTimeStamp(state, ""); } @@ -1527,9 +1525,9 @@ void SizePurchasedAir(EnergyPlusData &state, int const PurchAirNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxHeatSensCapDes - MaxHeatSensCapUser) / MaxHeatSensCapUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizePurchasedAir: Potential issue with equipment sizing for {} {}", - PurchAir.cObjectName, - PurchAir.Name)); + std::format("SizePurchasedAir: Potential issue with equipment sizing for {} {}", + PurchAir.cObjectName, + PurchAir.Name)); ShowContinueError( state, EnergyPlus::format("...User-Specified Maximum Sensible Heating Capacity of {:.2R} [W]", MaxHeatSensCapUser)); ShowContinueError( @@ -1670,9 +1668,9 @@ void SizePurchasedAir(EnergyPlusData &state, int const PurchAirNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxCoolTotCapDes - MaxCoolTotCapUser) / MaxCoolTotCapUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizePurchasedAir: Potential issue with equipment sizing for {} {}", - PurchAir.cObjectName, - PurchAir.Name)); + std::format("SizePurchasedAir: Potential issue with equipment sizing for {} {}", + PurchAir.cObjectName, + PurchAir.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Maximum Total Cooling Capacity of {:.2R} [W]", MaxCoolTotCapUser)); ShowContinueError( @@ -1751,12 +1749,12 @@ void SizePurchasedAir(EnergyPlusData &state, int const PurchAirNum) state, PurchAir.cObjectName, PurchAir.Name, "Design Size Maximum Sensible Heating Capacity [W]", MaxHeatSensCapDes); // If there is OA, check if sizing calcs have OA>0, throw warning if not if ((PurchAir.OutdoorAir) && (state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum).MinOA == 0.0)) { - ShowWarningError(state, EnergyPlus::format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); + ShowWarningError(state, std::format("InitPurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); ShowContinueError(state, "There is outdoor air specified in this object, but the design outdoor air flow rate for this "); ShowContinueError(state, "zone is zero. The Maximum Sensible Heating Capacity will be autosized for zero outdoor air flow. "); ShowContinueError(state, - EnergyPlus::format("Check the outdoor air specifications in the Sizing:Zone object for zone {}.", - state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum).ZoneName)); + std::format("Check the outdoor air specifications in the Sizing:Zone object for zone {}.", + state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum).ZoneName)); } } else { if (PurchAir.MaxHeatSensCap > 0.0 && MaxHeatSensCapDes > 0.0) { @@ -1771,9 +1769,9 @@ void SizePurchasedAir(EnergyPlusData &state, int const PurchAirNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxHeatSensCapDes - MaxHeatSensCapUser) / MaxHeatSensCapUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizePurchasedAir: Potential issue with equipment sizing for {} {}", - PurchAir.cObjectName, - PurchAir.Name)); + std::format("SizePurchasedAir: Potential issue with equipment sizing for {} {}", + PurchAir.cObjectName, + PurchAir.Name)); ShowContinueError( state, EnergyPlus::format("...User-Specified Maximum Sensible Heating Capacity of {:.2R} [W]", MaxHeatSensCapUser)); ShowContinueError( @@ -1850,12 +1848,12 @@ void SizePurchasedAir(EnergyPlusData &state, int const PurchAirNum) state, PurchAir.cObjectName, PurchAir.Name, "Design Size Maximum Total Cooling Capacity [W]", MaxCoolTotCapDes); // If there is OA, check if sizing calcs have OA>0, throw warning if not if ((PurchAir.OutdoorAir) && (state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum).MinOA == 0.0)) { - ShowWarningError(state, EnergyPlus::format("SizePurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); + ShowWarningError(state, std::format("SizePurchasedAir: In {} = {}", PurchAir.cObjectName, PurchAir.Name)); ShowContinueError(state, "There is outdoor air specified in this object, but the design outdoor air flow rate for this "); ShowContinueError(state, "zone is zero. The Maximum Total Cooling Capacity will be autosized for zero outdoor air flow. "); ShowContinueError(state, - EnergyPlus::format("Check the outdoor air specifications in the Sizing:Zone object for zone {}.", - state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum).ZoneName)); + std::format("Check the outdoor air specifications in the Sizing:Zone object for zone {}.", + state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum).ZoneName)); } } else { if (PurchAir.MaxCoolTotCap > 0.0 && MaxCoolTotCapDes > 0.0) { @@ -1870,9 +1868,9 @@ void SizePurchasedAir(EnergyPlusData &state, int const PurchAirNum) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxCoolTotCapDes - MaxCoolTotCapUser) / MaxCoolTotCapUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizePurchasedAir: Potential issue with equipment sizing for {} {}", - PurchAir.cObjectName, - PurchAir.Name)); + std::format("SizePurchasedAir: Potential issue with equipment sizing for {} {}", + PurchAir.cObjectName, + PurchAir.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Maximum Total Cooling Capacity of {:.2R} [W]", MaxCoolTotCapUser)); ShowContinueError( @@ -2043,13 +2041,12 @@ void CalcPurchAirLoads(EnergyPlusData &state, if (PurchAir.OAFlowMaxCoolOutputError < 1) { ++PurchAir.OAFlowMaxCoolOutputError; ShowWarningError(state, - EnergyPlus::format("{} \"{}\" Requested outdoor air flow rate = {:.5T} [m3/s] exceeds limit.", - PurchAir.cObjectName, - PurchAir.Name, - OAVolFlowRate)); + std::format("{} \"{}\" Requested outdoor air flow rate = {:.5f} [m3/s] exceeds limit.", + PurchAir.cObjectName, + PurchAir.Name, + OAVolFlowRate)); ShowContinueError( - state, - EnergyPlus::format(" Will be reduced to the Maximum Cooling Air Flow Rate = {:.5T} [m3/s]", PurchAir.MaxCoolVolFlowRate)); + state, std::format(" Will be reduced to the Maximum Cooling Air Flow Rate = {:.5f} [m3/s]", PurchAir.MaxCoolVolFlowRate)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( @@ -2348,13 +2345,12 @@ void CalcPurchAirLoads(EnergyPlusData &state, if (PurchAir.OAFlowMaxHeatOutputError < 1) { ++PurchAir.OAFlowMaxHeatOutputError; ShowWarningError(state, - EnergyPlus::format("{} \"{}\" Requested outdoor air flow rate = {:.5T} [m3/s] exceeds limit.", - PurchAir.cObjectName, - PurchAir.Name, - OAVolFlowRate)); + std::format("{} \"{}\" Requested outdoor air flow rate = {:.5f} [m3/s] exceeds limit.", + PurchAir.cObjectName, + PurchAir.Name, + OAVolFlowRate)); ShowContinueError( - state, - EnergyPlus::format(" Will be reduced to the Maximum Heating Air Flow Rate = {:.5T} [m3/s]", PurchAir.MaxHeatVolFlowRate)); + state, std::format(" Will be reduced to the Maximum Heating Air Flow Rate = {:.5f} [m3/s]", PurchAir.MaxHeatVolFlowRate)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( @@ -2607,11 +2603,11 @@ void CalcPurchAirLoads(EnergyPlusData &state, if (PurchAir.SaturationOutputError < 1) { ++PurchAir.SaturationOutputError; ShowWarningError(state, - EnergyPlus::format("{} \"{}\" Supply humidity ratio = {:.5T} exceeds saturation limit {:.5T} [kgWater/kgDryAir]", - PurchAir.cObjectName, - PurchAir.Name, - SupplyHumRatOrig, - SupplyHumRatSat)); + std::format("{} \"{}\" Supply humidity ratio = {:.5f} exceeds saturation limit {:.5f} [kgWater/kgDryAir]", + PurchAir.cObjectName, + PurchAir.Name, + SupplyHumRatOrig, + SupplyHumRatSat)); ShowContinueError(state, " Simulation continuing . . . "); ShowContinueErrorTimeStamp(state, ""); } else { diff --git a/src/EnergyPlus/PythonEngine.cc b/src/EnergyPlus/PythonEngine.cc index f727c493bf2..1df6e1138a9 100644 --- a/src/EnergyPlus/PythonEngine.cc +++ b/src/EnergyPlus/PythonEngine.cc @@ -45,11 +45,10 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#include -#include -#include -#include +// C++ Headers +#include +// Third Party Headers #if LINK_WITH_PYTHON # ifdef _DEBUG // We don't want to try to import a debug build of Python here @@ -79,15 +78,15 @@ template <> struct formatter return ctx.out(); } if (PyStatus_IsExit(status) != 0) { - return fmt::format_to(ctx.out(), "Exited with code {}", status.exitcode); + return std::format_to(ctx.out(), "Exited with code {}", status.exitcode); } if (PyStatus_IsError(status) != 0) { auto it = ctx.out(); - it = fmt::format_to(it, "Fatal Python error: "); + it = std::format_to(it, "Fatal Python error: "); if (status.func != nullptr) { - it = fmt::format_to(it, "{}: ", status.func); + it = std::format_to(it, "{}: ", status.func); } - it = fmt::format_to(it, "{}", status.err_msg); + it = std::format_to(it, "{}", status.err_msg); return it; } return ctx.out(); @@ -97,6 +96,12 @@ template <> struct formatter #endif +// EnergyPlus Headers +#include +#include +#include +#include + namespace EnergyPlus { namespace Python { @@ -229,7 +234,7 @@ namespace Python { preConfig.utf8_mode = 1; status = Py_PreInitialize(&preConfig); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, fmt::format("Could not pre-initialize Python to speak UTF-8... {}", status)); + ShowFatalError(state, EnergyPlus::format("Could not pre-initialize Python to speak UTF-8... {}", status)); } PyConfig config; @@ -238,12 +243,12 @@ namespace Python { status = PyConfig_SetBytesString(&config, &config.program_name, PluginManagement::programName); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, fmt::format("Could not initialize program_name on PyConfig... {}", status)); + ShowFatalError(state, EnergyPlus::format("Could not initialize program_name on PyConfig... {}", status)); } status = PyConfig_Read(&config); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, fmt::format("Could not read back the PyConfig... {}", status)); + ShowFatalError(state, EnergyPlus::format("Could not read back the PyConfig... {}", status)); } if constexpr (std::is_same_v) { @@ -253,18 +258,20 @@ namespace Python { status = PyConfig_SetString(&config, &config.home, wcharPath); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, fmt::format("Could not set home to {} on PyConfig... {}", pathToPythonPackages.generic_string(), status)); + ShowFatalError(state, + EnergyPlus::format("Could not set home to {} on PyConfig... {}", pathToPythonPackages.generic_string(), status)); } status = PyConfig_SetString(&config, &config.base_prefix, wcharPath); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, - fmt::format("Could not set base_prefix to {} on PyConfig... {}", pathToPythonPackages.generic_string(), status)); + ShowFatalError( + state, EnergyPlus::format("Could not set base_prefix to {} on PyConfig... {}", pathToPythonPackages.generic_string(), status)); } config.module_search_paths_set = 1; status = PyWideStringList_Append(&config.module_search_paths, wcharPath); if (PyStatus_Exception(status) != 0) { ShowFatalError( - state, fmt::format("Could not add {} to module_search_paths on PyConfig... {}", pathToPythonPackages.generic_string(), status)); + state, + EnergyPlus::format("Could not add {} to module_search_paths on PyConfig... {}", pathToPythonPackages.generic_string(), status)); } } else { @@ -275,18 +282,20 @@ namespace Python { status = PyConfig_SetString(&config, &config.home, wcharPath); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, fmt::format("Could not set home to {} on PyConfig... {}", pathToPythonPackages.generic_string(), status)); + ShowFatalError(state, + EnergyPlus::format("Could not set home to {} on PyConfig... {}", pathToPythonPackages.generic_string(), status)); } status = PyConfig_SetString(&config, &config.base_prefix, wcharPath); if (PyStatus_Exception(status) != 0) { - ShowFatalError(state, - fmt::format("Could not set base_prefix to {} on PyConfig... {}", pathToPythonPackages.generic_string(), status)); + ShowFatalError( + state, EnergyPlus::format("Could not set base_prefix to {} on PyConfig... {}", pathToPythonPackages.generic_string(), status)); } config.module_search_paths_set = 1; status = PyWideStringList_Append(&config.module_search_paths, wcharPath); if (PyStatus_Exception(status) != 0) { ShowFatalError( - state, fmt::format("Could not add {} to module_search_paths on PyConfig... {}", pathToPythonPackages.generic_string(), status)); + state, + EnergyPlus::format("Could not add {} to module_search_paths on PyConfig... {}", pathToPythonPackages.generic_string(), status)); } PyMem_RawFree(wcharPath); @@ -372,7 +381,7 @@ sys.argv.append("energyplus") fs::path const pathToPythonPackages = programDir / "python_lib"; std::string sPathToPythonPackages = std::string(pathToPythonPackages.string()); std::replace(sPathToPythonPackages.begin(), sPathToPythonPackages.end(), '\\', '/'); - cmd += fmt::format("sys.path.insert(0, \"{}\")\n", sPathToPythonPackages); + cmd += EnergyPlus::format("sys.path.insert(0, \"{}\")\n", sPathToPythonPackages); return cmd; } @@ -383,13 +392,13 @@ sys.argv.clear() sys.argv.append("energyplus") )python"; for (const auto &arg : python_fwd_args) { - cmd += fmt::format("sys.argv.append(\"{}\")\n", arg); + cmd += EnergyPlus::format("sys.argv.append(\"{}\")\n", arg); } fs::path programDir = FileSystem::getParentDirectoryPath(FileSystem::getAbsolutePath(FileSystem::getProgramPath())); fs::path const pathToPythonPackages = programDir / "python_lib"; std::string sPathToPythonPackages = std::string(pathToPythonPackages.string()); std::replace(sPathToPythonPackages.begin(), sPathToPythonPackages.end(), '\\', '/'); - cmd += fmt::format("sys.path.insert(0, \"{}\")\n", sPathToPythonPackages); + cmd += EnergyPlus::format("sys.path.insert(0, \"{}\")\n", sPathToPythonPackages); std::string tclConfigDir; std::string tkConfigDir; for (auto &p : std::filesystem::directory_iterator(pathToPythonPackages)) { @@ -407,8 +416,8 @@ sys.argv.append("energyplus") } } cmd += "from os import environ\n"; - cmd += fmt::format("environ[\'TCL_LIBRARY\'] = \"{}/{}\"\n", sPathToPythonPackages, tclConfigDir); - cmd += fmt::format("environ[\'TK_LIBRARY\'] = \"{}/{}\"\n", sPathToPythonPackages, tkConfigDir); + cmd += EnergyPlus::format("environ[\'TCL_LIBRARY\'] = \"{}/{}\"\n", sPathToPythonPackages, tclConfigDir); + cmd += EnergyPlus::format("environ[\'TK_LIBRARY\'] = \"{}/{}\"\n", sPathToPythonPackages, tkConfigDir); return cmd; } diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index a59763486eb..0e890a84eee 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include #include // ObjexxFCL Headers @@ -1006,22 +1007,22 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).Height = Numbers(NumNum); if (Numbers(NumNum) < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be greater than or equal to 0 m", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be greater than or equal to 0 m", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } if (RefrigCase(CaseNum).Height <= 0.0 && RefrigCase(CaseNum).AntiSweatControlType == ASHtrCtrlType::HeatBalance) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be greater than 0 when {} is Heat Balance Method.", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum), - cAlphaFieldNames(7))); + std::format("{}{}=\"{}\", {} must be greater than 0 when {} is Heat Balance Method.", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum), + cAlphaFieldNames(7))); ShowContinueError(state, EnergyPlus::format("..given {} was: {:.3R}", cNumericFieldNames(NumNum), RefrigCase(CaseNum).Height)); ErrorsFound = true; } @@ -1042,14 +1043,14 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigCase(CaseNum).Rcase == 0.0) { ShowWarningError( state, - EnergyPlus::format("{}=\"{}\" A case thermal resistance of 0 was calculated for anti-sweat heater performance using the", - CurrentModuleObject, - RefrigCase(CaseNum).Name)); + std::format("{}=\"{}\" A case thermal resistance of 0 was calculated for anti-sweat heater performance using the", + CurrentModuleObject, + RefrigCase(CaseNum).Name)); ShowContinueError( state, - EnergyPlus::format(" Heat Balance Method control type. Anti-sweat heater performance cannot be calculated and {} will be " - "set to None and simulation continues.", - cAlphaFieldNames(7))); + std::format(" Heat Balance Method control type. Anti-sweat heater performance cannot be calculated and {} will be " + "set to None and simulation continues.", + cAlphaFieldNames(7))); ShowContinueError(state, " See Engineering Documentation for anti-sweat heater control of refrigerated cases."); } } @@ -1058,11 +1059,11 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).ASHeaterFractionToCase = Numbers(NumNum); if (Numbers(NumNum) < 0.0 || Numbers(NumNum) > 1.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be >= 0 and <= 1", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be >= 0 and <= 1", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } @@ -1085,22 +1086,22 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).DefrostPower = Numbers(NumNum); if (Numbers(NumNum) < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be greater than or equal to 0 W/m", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be greater than or equal to 0 W/m", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } // disregard defrost power for Off-Cycle or None defrost types if ((DefType == RefCaseDefrostType::OffCycle || DefType == RefCaseDefrostType::None) && (RefrigCase(CaseNum).DefrostPower > 0.0)) { RefrigCase(CaseNum).DefrostPower = 0.0; ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", {} for {} None or Off-Cycle will be set to 0 and simulation continues.", - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum), - cAlphaFieldNames(8))); + std::format("{}=\"{}\", {} for {} None or Off-Cycle will be set to 0 and simulation continues.", + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum), + cAlphaFieldNames(8))); } } else { RefrigCase(CaseNum).DefrostPower = 0.0; @@ -1111,13 +1112,13 @@ void GetRefrigerationInput(EnergyPlusData &state) DefType == RefCaseDefrostType::ElectricTerm) && RefrigCase(CaseNum).DefrostPower <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be greater than 0 W/m for {} {}", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum), - cAlphaFieldNames(8), - Alphas(8))); + std::format("{}{}=\"{}\", {} must be greater than 0 W/m for {} {}", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum), + cAlphaFieldNames(8), + Alphas(8))); ErrorsFound = true; } @@ -1202,11 +1203,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigCase(CaseNum).defrostType != RefCaseDefrostType::ElectricTerm && RefrigCase(CaseNum).defrostType != RefCaseDefrostType::HotFluidTerm) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", invalid {} is only applicable to Defrost Temperature Termination types.", - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cAlphaFieldNames(12))); - ShowContinueError(state, EnergyPlus::format("{} will be disregarded and simulation continues.", cAlphaFieldNames(12))); + std::format("{}=\"{}\", invalid {} is only applicable to Defrost Temperature Termination types.", + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cAlphaFieldNames(12))); + ShowContinueError(state, std::format("{} will be disregarded and simulation continues.", cAlphaFieldNames(12))); } } @@ -1214,11 +1215,11 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).RAFrac = Numbers(NumNum); if (Numbers(NumNum) < 0.0 || Numbers(NumNum) > 1.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be >= 0 or <= 1 ", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be >= 0 or <= 1 ", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } @@ -1237,24 +1238,24 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigCase(CaseNum).ActualZoneNum >= 0) { if (RefrigCase(CaseNum).ZoneNodeNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", System Node Number not found for {} = {}", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cAlphaFieldNames(3), - Alphas(3))); + std::format("{}{}=\"{}\", System Node Number not found for {} = {}", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cAlphaFieldNames(3), + Alphas(3))); ShowContinueError(state, "..Refrigerated cases must reference a controlled Zone (appear in a ZoneHVAC:EquipmentConnections object)."); ErrorsFound = true; } if ((RefrigCase(CaseNum).RAFrac > 0.0) && (RefrigCase(CaseNum).ZoneRANode == 0)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", Under Case HVAC Return Air Node number not found for {} = {}", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cAlphaFieldNames(3), - Alphas(3))); + std::format("{}{}=\"{}\", Under Case HVAC Return Air Node number not found for {} = {}", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cAlphaFieldNames(3), + Alphas(3))); ShowContinueError(state, "..Refrigerated cases must reference a controlled Zone (appear in a ZoneHVAC:EquipmentConnections object) " "with at least one return air node."); @@ -1270,11 +1271,11 @@ void GetRefrigerationInput(EnergyPlusData &state) // Make sure RA node exists for display cases with under case HVAC returns if (RefrigCase(CaseNum).ZoneRANode == 0 && RefrigCase(CaseNum).RAFrac > 0.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} not applicable to zones without return air systems.", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(19))); + std::format("{}{}=\"{}\", {} not applicable to zones without return air systems.", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(19))); ErrorsFound = true; } @@ -1307,7 +1308,7 @@ void GetRefrigerationInput(EnergyPlusData &state) if (DesignSensibleCap < CaseHeatGain) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", the sum of lighting, fan, and anti-sweat heater energy is greater than refrigerated case sensible capacity", RoutineName, CurrentModuleObject, @@ -1337,12 +1338,12 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).EvapTempDesign = Numbers(NumNum); if (RefrigCase(CaseNum).EvapTempDesign >= RefrigCase(CaseNum).Temperature) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be below {}", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum), - cNumericFieldNames(7))); + std::format("{}{}=\"{}\" {} must be below {}", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum), + cNumericFieldNames(7))); ErrorsFound = true; } } else { @@ -1356,11 +1357,11 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigCase(CaseNum).DesignRefrigInventory = RefrigCase(CaseNum).RefrigInventory * RefrigCase(CaseNum).Length; if (RefrigCase(CaseNum).RefrigInventory < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be a positive number.", - RoutineName, - CurrentModuleObject, - RefrigCase(CaseNum).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\" {} must be a positive number.", + RoutineName, + CurrentModuleObject, + RefrigCase(CaseNum).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } else { @@ -1406,7 +1407,7 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Numbers(1) <= 0.0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", {} must be greater than 0 W", RoutineName, CurrentModuleObject, WalkIn(WalkInID).Name, cNumericFieldNames(1))); ErrorsFound = true; } @@ -1447,11 +1448,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WalkIn(WalkInID).CoilFanPower = Numbers(5); } else { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was not input or was less than 0 and default of 375.0 W will be used ", - RoutineName, - CurrentModuleObject, - WalkIn(WalkInID).Name, - cNumericFieldNames(5))); + std::format("{}{}=\"{}\", {} was not input or was less than 0 and default of 375.0 W will be used ", + RoutineName, + CurrentModuleObject, + WalkIn(WalkInID).Name, + cNumericFieldNames(5))); WalkIn(WalkInID).CoilFanPower = 375.0; // default value = 1/2 hp } @@ -1461,11 +1462,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WalkIn(WalkInID).CircFanPower = Numbers(6); if (Numbers(7) < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be greater than >= 0 W", - RoutineName, - CurrentModuleObject, - WalkIn(WalkInID).Name, - cNumericFieldNames(6))); + std::format("{}{}=\"{}\", {} must be greater than >= 0 W", + RoutineName, + CurrentModuleObject, + WalkIn(WalkInID).Name, + cNumericFieldNames(6))); ErrorsFound = true; } } @@ -1540,13 +1541,13 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { // have electric or hot gas/brine defrost if ((lNumericBlanks(8)) || (Numbers(8) <= 0.0)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input and greater than or equal to 0 W for {} {}", - RoutineName, - CurrentModuleObject, - WalkIn(WalkInID).Name, - cNumericFieldNames(8), - cAlphaFieldNames(5), - Alphas(5))); + std::format("{}{}=\"{}\", {} must be input and greater than or equal to 0 W for {} {}", + RoutineName, + CurrentModuleObject, + WalkIn(WalkInID).Name, + cNumericFieldNames(8), + cAlphaFieldNames(5), + Alphas(5))); ErrorsFound = true; } else { WalkIn(WalkInID).DefrostCapacity = Numbers(8); @@ -1563,11 +1564,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if (!lNumericBlanks(9)) { if ((Numbers(9) > 1.0) || (Numbers(9) < 0.0)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be between 0 and 1, default values will be used.", - RoutineName, - CurrentModuleObject, - WalkIn(WalkInID).Name, - cNumericFieldNames(9))); + std::format("{}{}=\"{}\", {} must be between 0 and 1, default values will be used.", + RoutineName, + CurrentModuleObject, + WalkIn(WalkInID).Name, + cNumericFieldNames(9))); } else { WalkIn(WalkInID).DefEnergyFraction = Numbers(9); } // number out of range @@ -1592,8 +1593,7 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { ShowSevereError( state, - EnergyPlus::format( - "{}{}=\"{}\", {} must be input", RoutineName, CurrentModuleObject, WalkIn(WalkInID).Name, cNumericFieldNames(11))); + std::format("{}{}=\"{}\", {} must be input", RoutineName, CurrentModuleObject, WalkIn(WalkInID).Name, cNumericFieldNames(11))); ErrorsFound = true; } @@ -1604,8 +1604,7 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Numbers(12) <= 0.0) { ShowSevereError( state, - EnergyPlus::format( - "{}{}=\"{}\", {} must be > 0.", RoutineName, CurrentModuleObject, WalkIn(WalkInID).Name, cNumericFieldNames(12))); + std::format("{}{}=\"{}\", {} must be > 0.", RoutineName, CurrentModuleObject, WalkIn(WalkInID).Name, cNumericFieldNames(12))); ErrorsFound = true; } } @@ -1725,12 +1724,12 @@ void GetRefrigerationInput(EnergyPlusData &state) WalkIn(WalkInID).SurfaceArea(ZoneID) = Numbers(NStart); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input for Zone: {}", - RoutineName, - CurrentModuleObject, - WalkIn(WalkInID).Name, - cNumericFieldNames(NStart), - WalkIn(WalkInID).ZoneName(ZoneID))); + std::format("{}{}=\"{}\", {} must be input for Zone: {}", + RoutineName, + CurrentModuleObject, + WalkIn(WalkInID).Name, + cNumericFieldNames(NStart), + WalkIn(WalkInID).ZoneName(ZoneID))); ErrorsFound = true; } @@ -1740,12 +1739,12 @@ void GetRefrigerationInput(EnergyPlusData &state) WalkIn(WalkInID).UValue(ZoneID) = Numbers(NStart + 1); if (Numbers(NStart + 1) <= 0.0) { ShowSevereError(state, - EnergyPlus::format(R"({}{}="{}", Zone="{}", {} must be > 0.)", - RoutineName, - CurrentModuleObject, - WalkIn(WalkInID).Name, - WalkIn(WalkInID).ZoneName(ZoneID), - cNumericFieldNames(NStart + 1))); + std::format(R"({}{}="{}", Zone="{}", {} must be > 0.)", + RoutineName, + CurrentModuleObject, + WalkIn(WalkInID).Name, + WalkIn(WalkInID).ZoneName(ZoneID), + cNumericFieldNames(NStart + 1))); ErrorsFound = true; } } @@ -1888,11 +1887,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).UnitLoadFactorSens = Numbers(NumNum); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W/C", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be input and be greater than 0 W/C", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -1909,22 +1908,22 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { if (Numbers(NumNum) <= 0.0 || Numbers(NumNum) >= 100.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be greater than 0% and less than 100%", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be greater than 0% and less than 100%", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } WarehouseCoil(CoilID).RatedRH = Numbers(NumNum) / 100.0; } } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -1937,11 +1936,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 1; } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -1955,11 +1954,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 1; } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -1972,11 +1971,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 2; } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -1990,11 +1989,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 2; } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -2007,11 +2006,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 3; } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -2025,11 +2024,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 3; } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -2042,11 +2041,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 4; } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -2060,11 +2059,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 4; } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -2077,11 +2076,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 5; } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -2095,11 +2094,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SCIndex = 5; } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input and be greater than 0 W", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be input and be greater than 0 W", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } } break; @@ -2116,7 +2115,7 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", {} must be input", RoutineName, CurrentModuleObject, WarehouseCoil(CoilID).Name, cNumericFieldNames(NumNum))); ErrorsFound = true; } @@ -2128,7 +2127,7 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", {} must be input", RoutineName, CurrentModuleObject, WarehouseCoil(CoilID).Name, cNumericFieldNames(NumNum))); ErrorsFound = true; } @@ -2141,11 +2140,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { WarehouseCoil(CoilID).MaxTemperatureDif = 1.3 * WarehouseCoil(CoilID).RatedTemperatureDif; ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} not entered, default 1.3 times rated temperature difference will be used.", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} not entered, default 1.3 times rated temperature difference will be used.", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); } // Correction factor from manufacturer's rating for coil material, default 1.0 @@ -2187,18 +2186,18 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SHRCorrType = SHRCorrectionType::TabularRH_DT1_TRoom; if (!(Util::SameString(Alphas(AlphaNum), "TabularRHxDT1xTRoom"))) { ShowWarningError(state, - EnergyPlus::format(R"({}{}="{}", invalid {}="{}".)", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format(R"({}{}="{}", invalid {}="{}".)", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ShowContinueError(state, "The \"CapacityTotalSpecificConditions\" Capacity Rating Type has been specified for this air chiller. " "This rating type requires "); ShowContinueError( state, - EnergyPlus::format( + std::format( R"(the "TabularRHxDT1xTRoom" correction curve. Verify that a valid "TabularRHxDT1xTRoom" curve is specified in "{}".)", cAlphaFieldNames(AlphaNum + 1))); } @@ -2220,20 +2219,20 @@ void GetRefrigerationInput(EnergyPlusData &state) if (WarehouseCoil(CoilID).SHRCorrection60 > 1.67) { WarehouseCoil(CoilID).SHRCorrection60 = 1.67; ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be between 1 and 1.67, 1.67 will be used.", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be between 1 and 1.67, 1.67 will be used.", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); } if (WarehouseCoil(CoilID).SHRCorrection60 < 1.0) { WarehouseCoil(CoilID).SHRCorrection60 = 1.0; ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be between 1 and 1.67, 1.00 will be used.", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be between 1 and 1.67, 1.00 will be used.", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); } } break; case SHRCorrectionType::European: { @@ -2261,16 +2260,15 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).SHRCorrectionCurvePtr = Curve::GetCurveIndex(state, Alphas(AlphaNum)); // convert curve name to number if (lAlphaBlanks(AlphaNum)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid {} is blank, required.", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cAlphaFieldNames(AlphaNum))); + std::format("{}{}=\"{}\", invalid {} is blank, required.", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cAlphaFieldNames(AlphaNum))); ErrorsFound = true; } else if (WarehouseCoil(CoilID).SHRCorrectionCurvePtr == 0) { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid ", RoutineName, CurrentModuleObject, WarehouseCoil(CoilID).Name)); - ShowContinueError(state, EnergyPlus::format("...invalid curve {}=\"{}\".", cAlphaFieldNames(AlphaNum), Alphas(AlphaNum))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid ", RoutineName, CurrentModuleObject, WarehouseCoil(CoilID).Name)); + ShowContinueError(state, std::format("...invalid curve {}=\"{}\".", cAlphaFieldNames(AlphaNum), Alphas(AlphaNum))); ErrorsFound = true; } ErrorsFound |= Curve::CheckCurveDims(state, @@ -2324,11 +2322,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).RatedFanPower = Numbers(NumNum); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} was not input or was less than 0 ", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} was not input or was less than 0 ", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); ErrorsFound = true; } // coil fan power @@ -2337,11 +2335,11 @@ void GetRefrigerationInput(EnergyPlusData &state) WarehouseCoil(CoilID).RatedAirVolumeFlow = Numbers(NumNum); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} is required and was not input or was less than 0 ", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} is required and was not input or was less than 0 ", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); } // air volume flow ++NumNum; // N13 @@ -2402,13 +2400,13 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { // have electric or hot gas/brine defrost if ((lNumericBlanks(NumNum)) || (Numbers(NumNum) <= 0.0)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input and greater than or equal to 0 W for {} {}", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum), - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", {} must be input and greater than or equal to 0 W for {} {}", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum), + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else { WarehouseCoil(CoilID).DefrostCapacity = Numbers(NumNum); @@ -2427,11 +2425,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if (!lNumericBlanks(NumNum)) { if ((Numbers(NumNum) > 1.0) || (Numbers(NumNum) < 0.0)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be between 0 and 1, default values will be used.", - RoutineName, - CurrentModuleObject, - WarehouseCoil(CoilID).Name, - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} must be between 0 and 1, default values will be used.", + RoutineName, + CurrentModuleObject, + WarehouseCoil(CoilID).Name, + cNumericFieldNames(NumNum))); } else { WarehouseCoil(CoilID).DefEnergyFraction = Numbers(NumNum); } // number out of range @@ -2500,23 +2498,23 @@ void GetRefrigerationInput(EnergyPlusData &state) if (AirChillerSet(SetID).ZoneNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid {} not valid: {}", - RoutineName, - CurrentModuleObject, - AirChillerSet(SetID).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", invalid {} not valid: {}", + RoutineName, + CurrentModuleObject, + AirChillerSet(SetID).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } AirChillerSet(SetID).ZoneNodeNum = DataZoneEquipment::GetSystemNodeNumberForZone(state, AirChillerSet(SetID).ZoneNum); if (AirChillerSet(SetID).ZoneNodeNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" System Node Number not found for {} = {}", - RoutineName, - CurrentModuleObject, - AirChillerSet(SetID).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\" System Node Number not found for {} = {}", + RoutineName, + CurrentModuleObject, + AirChillerSet(SetID).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ShowContinueError(state, ".. Refrigeration chillers must reference a controlled Zone (appear in a ZoneHVAC:EquipmentConnections object."); ErrorsFound = true; @@ -2527,12 +2525,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (!lAlphaBlanks(AlphaNum)) { ShowMessage( state, - EnergyPlus::format("{}{}=\"{}\" {} is not used. This is not an error. Energy is exchanged directly with the zone independent of " - "any air system. ", - RoutineName, - CurrentModuleObject, - AirChillerSet(SetID).Name, - cAlphaFieldNames(AlphaNum))); + std::format("{}{}=\"{}\" {} is not used. This is not an error. Energy is exchanged directly with the zone independent of " + "any air system. ", + RoutineName, + CurrentModuleObject, + AirChillerSet(SetID).Name, + cAlphaFieldNames(AlphaNum))); // Node identification reserved for future use. Currently exchange energy directly with zone outside any air system // AirChillerSet(SetID)%NodeNumInlet = & // Node::GetOnlySingleNode(state, Alphas(AlphaNum),ErrorsFound,TRIM(CurrentModuleObject), & @@ -2543,12 +2541,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (!lAlphaBlanks(AlphaNum)) { ShowMessage( state, - EnergyPlus::format("{}{}=\"{}\" {} is not used. This is not an error. Energy is exchanged directly with the zone independent of " - "any air system. ", - RoutineName, - CurrentModuleObject, - AirChillerSet(SetID).Name, - cAlphaFieldNames(AlphaNum))); + std::format("{}{}=\"{}\" {} is not used. This is not an error. Energy is exchanged directly with the zone independent of " + "any air system. ", + RoutineName, + CurrentModuleObject, + AirChillerSet(SetID).Name, + cAlphaFieldNames(AlphaNum))); // Node identification reserved for future use. Currently exchange energy directly with zone outside any air system // AirChillerSet(SetID)%NodeNumOutlet = & // Node::GetOnlySingleNode(state, Alphas(AlphaNum),ErrorsFound,TRIM(CurrentModuleObject), & @@ -2569,12 +2567,12 @@ void GetRefrigerationInput(EnergyPlusData &state) int CoilNum = Util::FindItemInList(Alphas(AlphaListNum), WarehouseCoil); if (CoilNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has an invalid {} defined as {}", - RoutineName, - CurrentModuleObject, - AirChillerSet(SetID).Name, - cAlphaFieldNames(AlphaListNum), - Alphas(AlphaListNum))); + std::format("{}{}=\"{}\", has an invalid {} defined as {}", + RoutineName, + CurrentModuleObject, + AirChillerSet(SetID).Name, + cAlphaFieldNames(AlphaListNum), + Alphas(AlphaListNum))); ErrorsFound = true; } // == 0 AirChillerSet(SetID).CoilNum(ChillerIndex) = CoilNum; @@ -2641,19 +2639,19 @@ void GetRefrigerationInput(EnergyPlusData &state) } if ((LoadWalkInNum == 0) && (LoadCaseNum == 0) && (LoadCoilNum == 0)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has an invalid value of {}", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaListNum), - Alphas(AlphaListNum))); + std::format("{}{}=\"{}\", has an invalid value of {}", + RoutineName, + CurrentModuleObject, + cAlphaFieldNames(AlphaListNum), + Alphas(AlphaListNum))); ErrorsFound = true; } else if ((LoadWalkInNum != 0) && (LoadCaseNum != 0) && (LoadCoilNum != 0)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} Case and WalkIns and Refrigerated Coils cannot have the same name.", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaListNum), - Alphas(AlphaListNum))); + std::format("{}{}=\"{}\", {} Case and WalkIns and Refrigerated Coils cannot have the same name.", + RoutineName, + CurrentModuleObject, + cAlphaFieldNames(AlphaListNum), + Alphas(AlphaListNum))); ErrorsFound = true; } else if (LoadWalkInNum != 0) { ++NumWalkInsOnList; @@ -2670,7 +2668,7 @@ void GetRefrigerationInput(EnergyPlusData &state) if (LoadCount == 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}, \"{}\" : degenerate list All entries were blank.", RoutineName, CurrentModuleObject, CaseAndWalkInList(ListNum).Name)); ErrorsFound = true; } // loadcount == 0 @@ -2722,11 +2720,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigRack(RackNum).RatedCOP <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be greater than 0.0", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cNumericFieldNames(1))); + std::format("{}{}=\"{}\" {} must be greater than 0.0", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cNumericFieldNames(1))); ErrorsFound = true; } @@ -2747,23 +2745,23 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigRack(RackNum).CondenserFanPower = Numbers(2); if (Numbers(2) < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be greater than or equal to 0 Watts.", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cNumericFieldNames(2))); + std::format("{}{}=\"{}\" {} must be greater than or equal to 0 Watts.", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cNumericFieldNames(2))); ErrorsFound = true; } RefrigRack(RackNum).TotCondFTempPtr = Curve::GetCurveIndex(state, Alphas(4)); // convert curve name to number if ((!lAlphaBlanks(4)) && RefrigRack(RackNum).TotCondFTempPtr == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid {} not found:{}", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(4), - Alphas(4))); + std::format("{}{}=\"{}\", invalid {} not found:{}", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cAlphaFieldNames(4), + Alphas(4))); ErrorsFound = true; } @@ -2787,13 +2785,13 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserType::Water) { if (RefrigRack(RackNum).HeatRejectionLocation == HeatRejLocation::Zone) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\" {}=\"{}\" not available with {} = Zone.", - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(5), - Alphas(5), - cAlphaFieldNames(2))); - ShowContinueError(state, EnergyPlus::format("{} reset to Air Cooled and simulation continues.", cAlphaFieldNames(5))); + std::format("{}=\"{}\" {}=\"{}\" not available with {} = Zone.", + CurrentModuleObject, + RefrigRack(RackNum).Name, + cAlphaFieldNames(5), + Alphas(5), + cAlphaFieldNames(2))); + ShowContinueError(state, std::format("{} reset to Air Cooled and simulation continues.", cAlphaFieldNames(5))); RefrigRack(RackNum).CondenserType = DataHeatBalance::RefrigCondenserType::Air; } } else if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserType::Cascade || @@ -2849,12 +2847,12 @@ void GetRefrigerationInput(EnergyPlusData &state) // Check constant flow for max violation, if applicable if (RefrigRack(RackNum).FlowType == CndsrFlowType::Constant && RefrigRack(RackNum).VolFlowRate > Numbers(4)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} > {}.", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cNumericFieldNames(3), - cNumericFieldNames(4))); + std::format("{}{}=\"{}\" {} > {}.", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cNumericFieldNames(3), + cNumericFieldNames(4))); ShowContinueError(state, "Revise flow rates."); ErrorsFound = true; } @@ -2878,11 +2876,11 @@ void GetRefrigerationInput(EnergyPlusData &state) RefrigRack(RackNum).EvapEffect = Numbers(7); if (RefrigRack(RackNum).EvapEffect < 0.0 || RefrigRack(RackNum).EvapEffect > 1.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} cannot be less than zero or greater than 1.0.", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cNumericFieldNames(7))); + std::format("{}{}=\"{}\" {} cannot be less than zero or greater than 1.0.", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cNumericFieldNames(7))); ErrorsFound = true; } @@ -2890,11 +2888,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserType::Evap && RefrigRack(RackNum).CondenserAirFlowRate <= 0.0 && RefrigRack(RackNum).CondenserAirFlowRate != Constant::AutoCalculate) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} cannot be less than or equal to zero.", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cNumericFieldNames(8))); + std::format("{}{}=\"{}\", {} cannot be less than or equal to zero.", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cNumericFieldNames(8))); ErrorsFound = true; } @@ -2903,8 +2901,7 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserType::Evap && Numbers(9) < 0.0) { ShowSevereError( state, - EnergyPlus::format( - "{}{}=\"{}\", {} must be >= 0", RoutineName, CurrentModuleObject, RefrigRack(RackNum).Name, cNumericFieldNames(9))); + std::format("{}{}=\"{}\", {} must be >= 0", RoutineName, CurrentModuleObject, RefrigRack(RackNum).Name, cNumericFieldNames(9))); ErrorsFound = true; } @@ -2912,21 +2909,21 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserType::Evap && RefrigRack(RackNum).BasinHeaterSetPointTemp < 2.0) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", {} is less than 2 deg C. Freezing could occur.", - CurrentModuleObject, - RefrigRack(RackNum).Name, - cNumericFieldNames(10))); + std::format("{}=\"{}\", {} is less than 2 deg C. Freezing could occur.", + CurrentModuleObject, + RefrigRack(RackNum).Name, + cNumericFieldNames(10))); } RefrigRack(RackNum).EvapPumpPower = Numbers(11); if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserType::Evap && RefrigRack(RackNum).EvapPumpPower < 0.0 && RefrigRack(RackNum).EvapPumpPower != Constant::AutoCalculate) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} cannot be less than zero.", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cNumericFieldNames(11))); + std::format("{}{}=\"{}\", {} cannot be less than zero.", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cNumericFieldNames(11))); ErrorsFound = true; } @@ -2960,12 +2957,12 @@ void GetRefrigerationInput(EnergyPlusData &state) Node::ObjectIsParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, RefrigRack(RackNum).OutsideAirNodeNum)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} not found: {}", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(12), - Alphas(12))); + std::format("{}{}=\"{}\", {} not found: {}", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cAlphaFieldNames(12), + Alphas(12))); ShowContinueError(state, "...does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); ErrorsFound = true; } @@ -2989,11 +2986,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if (lAlphaBlanks(AlphaNum)) { // No cases or walkins or coils specified, ie, rack has no load ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" : has no loads, must have at least one of: {}", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(14))); + std::format("{}{}=\"{}\" : has no loads, must have at least one of: {}", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cAlphaFieldNames(14))); ErrorsFound = true; } else { // (.NOT. lAlphaBlanks(AlphaNum)) // Entry for Alphas(AlphaNum) can be either a Case, WalkIn, Coil, or CaseAndWalkInList name @@ -3031,20 +3028,20 @@ void GetRefrigerationInput(EnergyPlusData &state) ErrorsFound = true; if (NumNameMatches == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" : has an invalid {}: {}", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\" : has an invalid {}: {}", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } else if (NumNameMatches > 1) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" : has a non-unique name that could be either a {}: {}", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\" : has a non-unique name that could be either a {}: {}", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } // num matches = 0 or > 1 } else if (CaseAndWalkInListNum != 0) { // Name points to a CaseAndWalkInList NumCoils = CaseAndWalkInList(CaseAndWalkInListNum).NumCoils; @@ -3106,13 +3103,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigCase(RefrigRack(RackNum).CaseNum(caseIndex)).ActualZoneNum == ZoneNum) { continue; } - ShowSevereError( - state, - EnergyPlus::format(R"({}{}="{}" : All cases attached to a rack must be in the same zone when {} equals "Zone".)", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(2))); + ShowSevereError(state, + std::format(R"({}{}="{}" : All cases attached to a rack must be in the same zone when {} equals "Zone".)", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cAlphaFieldNames(2))); ErrorsFound = true; break; } @@ -3145,13 +3141,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (RefrigRack(RackNum).HeatRejectionLocation == HeatRejLocation::Zone) { if (lAlphaBlanks(15)) { ShowSevereError( - state, - EnergyPlus::format( - "{}{}=\"{}{} must be input if walkins or AirChillers connected to rack and heat rejection location = zone.", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(15))); + state, + std::format("{}{}=\"{}{} must be input if walkins or AirChillers connected to rack and heat rejection location = zone.", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cAlphaFieldNames(15))); ErrorsFound = true; } else { // alpha (15) not blank RefrigRack(RackNum).HeatRejectionZoneNum = Util::FindItemInList(Alphas(15), state.dataHeatBal->Zone); @@ -3159,12 +3154,12 @@ void GetRefrigerationInput(EnergyPlusData &state) DataZoneEquipment::GetSystemNodeNumberForZone(state, RefrigRack(RackNum).HeatRejectionZoneNum); if (RefrigRack(RackNum).HeatRejectionZoneNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid {} not valid: {}", - RoutineName, - CurrentModuleObject, - RefrigRack(RackNum).Name, - cAlphaFieldNames(15), - Alphas(15))); + std::format("{}{}=\"{}\", invalid {} not valid: {}", + RoutineName, + CurrentModuleObject, + RefrigRack(RackNum).Name, + cAlphaFieldNames(15), + Alphas(15))); ErrorsFound = true; } else { state.dataRefrigCase->RefrigPresentInZone(RefrigRack(RackNum).HeatRejectionZoneNum) = true; @@ -3240,12 +3235,12 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).CapCurvePtr = Curve::GetCurveIndex(state, Alphas(2)); // convert curve name to number if (Condenser(CondNum).CapCurvePtr == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid {} not found:{}", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cAlphaFieldNames(2), - Alphas(2))); + std::format("{}{}=\"{}\", invalid {} not found:{}", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cAlphaFieldNames(2), + Alphas(2))); ErrorsFound = true; } @@ -3275,13 +3270,12 @@ void GetRefrigerationInput(EnergyPlusData &state) (DelTempMax - DelTempMin) / ((Capmax - Capmin)); // * ( 1.0 - 7.17e-5 * Elevation ) ) //Mar 2011 bug fix Condenser(CondNum).MinCondLoad = Capmax - DelTempMax / Condenser(CondNum).TempSlope; } else { - ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\" Condenser capacity curve per ARI 460 must be input and must be greater than 0 Watts at " - "16.7C temperature difference.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name)); + ShowSevereError(state, + std::format("{}{}=\"{}\" Condenser capacity curve per ARI 460 must be input and must be greater than 0 Watts at " + "16.7C temperature difference.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name)); ErrorsFound = true; } @@ -3304,11 +3298,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } if ((lNumericBlanks(2)) || (Numbers(2) < 0.0)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be input greater than or equal to 0 Watts.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(2))); + std::format("{}{}=\"{}\" {} must be input greater than or equal to 0 Watts.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(2))); ErrorsFound = true; } @@ -3344,12 +3338,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (!OutAirNodeManager::CheckOutAirNodeNumber(state, Condenser(CondNum).InletAirNodeNum)) { // not outside and not a zone ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} not found: {}", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cAlphaFieldNames(4), - Alphas(4))); + std::format("{}{}=\"{}\", {} not found: {}", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cAlphaFieldNames(4), + Alphas(4))); ShowContinueError(state, "...does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node or as a Zone."); ErrorsFound = true; } // checkoutairnodenumber @@ -3417,11 +3411,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedCapacity = Numbers(1); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} per ARI 490 must be input and must be greater than 0 Watts.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(1))); + std::format("{}{}=\"{}\" {} per ARI 490 must be input and must be greater than 0 Watts.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(1))); ErrorsFound = true; } // Calculate capacity elevation derate factor per ARI 490 barometric pressure correction factor @@ -3444,11 +3438,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedFanPower = Numbers(3); if (Numbers(3) < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be greater than or equal to 0 Watts.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(3))); + std::format("{}{}=\"{}\" {} must be greater than or equal to 0 Watts.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(3))); ErrorsFound = true; } @@ -3472,10 +3466,10 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).EvapCoeff1 = Numbers(NumNum); } else { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", {} is less than 0 and was not used. Default was used.", - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(NumNum))); + std::format("{}=\"{}\", {} is less than 0 and was not used. Default was used.", + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(NumNum))); } } NumNum = 6; // EvapCoeff2 can't be equal to 0 because used in a denominator @@ -3484,10 +3478,10 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).EvapCoeff2 = Numbers(NumNum); } else { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", {} is less than or equal to 0 and was not used. Default was used.", - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(NumNum))); + std::format("{}=\"{}\", {} is less than or equal to 0 and was not used. Default was used.", + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(NumNum))); } } NumNum = 7; @@ -3496,10 +3490,10 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).EvapCoeff3 = Numbers(NumNum); } else { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", {} is less than 0 and was not used. Default was used.", - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(NumNum))); + std::format("{}=\"{}\", {} is less than 0 and was not used. Default was used.", + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(NumNum))); } } NumNum = 8; @@ -3508,10 +3502,10 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).EvapCoeff4 = Numbers(NumNum); } else { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", {} is less than -20 and was not used. Default was used.", - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(NumNum))); + std::format("{}=\"{}\", {} is less than -20 and was not used. Default was used.", + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(NumNum))); } } NumNum = 9; @@ -3520,10 +3514,10 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).MinCapFacEvap = Numbers(NumNum); } else { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", {} is less than 0 and was not used. Default was used.", - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(NumNum))); + std::format("{}=\"{}\", {} is less than 0 and was not used. Default was used.", + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(NumNum))); } } NumNum = 10; @@ -3532,10 +3526,10 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).MaxCapFacEvap = Numbers(NumNum); } else { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", {} is less than 0 and was not used. Default was used.", - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(NumNum))); + std::format("{}=\"{}\", {} is less than 0 and was not used. Default was used.", + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(NumNum))); } } @@ -3554,12 +3548,12 @@ void GetRefrigerationInput(EnergyPlusData &state) Node::ObjectIsParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, Condenser(CondNum).InletAirNodeNum)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} not found: {}", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cAlphaFieldNames(3), - Alphas(3))); + std::format("{}{}=\"{}\", {} not found: {}", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cAlphaFieldNames(3), + Alphas(3))); ShowContinueError(state, "...does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); ErrorsFound = true; } @@ -3576,7 +3570,7 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Numbers(NumNum) < 0.0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", {} must be >= 0", RoutineName, CurrentModuleObject, Condenser(CondNum).Name, cNumericFieldNames(NumNum))); ErrorsFound = true; } @@ -3588,10 +3582,10 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (Condenser(CondNum).BasinHeaterSetPointTemp < 2.0) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", {} is less than 2 deg C. Freezing could occur.", - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(NumNum))); + std::format("{}=\"{}\", {} is less than 2 deg C. Freezing could occur.", + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(NumNum))); } NumNum = 14; @@ -3686,11 +3680,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedCapacity = Numbers(1); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} per ARI 450 must be input and must be greater than 0 Watts.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(1))); + std::format("{}{}=\"{}\" {} per ARI 450 must be input and must be greater than 0 Watts.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(1))); ErrorsFound = true; } @@ -3698,11 +3692,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedTCondense = Numbers(2); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} per ARI 450 must be input and must be greater than 0 C.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(2))); + std::format("{}{}=\"{}\" {} per ARI 450 must be input and must be greater than 0 C.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(2))); ErrorsFound = true; } @@ -3711,11 +3705,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedSubcool = Numbers(3); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be greater than or equal to zero.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(3))); + std::format("{}{}=\"{}\" {} must be greater than or equal to zero.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(3))); ErrorsFound = true; } } else { @@ -3727,11 +3721,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedApproachT = Condenser(CondNum).RatedTCondense - Numbers(4); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be input and greater than zero.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(4))); + std::format("{}{}=\"{}\" {} must be input and greater than zero.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(4))); ErrorsFound = true; } @@ -3779,11 +3773,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).VolFlowRate = Numbers(5); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be greater than zero.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(5))); + std::format("{}{}=\"{}\" {} must be greater than zero.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(5))); ShowContinueError(state, "Revise flow rates."); ErrorsFound = true; } @@ -3796,22 +3790,22 @@ void GetRefrigerationInput(EnergyPlusData &state) // Check constant flow for max violation, if applicable if (Condenser(CondNum).FlowType == CndsrFlowType::Constant && Condenser(CondNum).VolFlowRate > Numbers(6)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} > {} .", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(5), - cNumericFieldNames(6))); + std::format("{}{}=\"{}\" {} > {} .", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(5), + cNumericFieldNames(6))); ShowContinueError(state, "Revise flow rates."); ErrorsFound = true; } // Error check on max flow rate } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be greater than zero.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(6))); + std::format("{}{}=\"{}\" {} must be greater than zero.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(6))); ErrorsFound = true; } @@ -3882,7 +3876,7 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\" {} must be input.", RoutineName, CurrentModuleObject, Condenser(CondNum).Name, cNumericFieldNames(1))); ErrorsFound = true; } @@ -3892,11 +3886,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedApproachT = Numbers(2); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be greater than or equal to zero.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(2))); + std::format("{}{}=\"{}\" {} must be greater than or equal to zero.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(2))); ErrorsFound = true; } } else { @@ -3907,11 +3901,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedCapacity = Numbers(3); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be in put and must be greater than or equal to zero.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name, - cNumericFieldNames(3))); + std::format("{}{}=\"{}\" {} must be in put and must be greater than or equal to zero.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name, + cNumericFieldNames(3))); ErrorsFound = true; } @@ -3993,7 +3987,7 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\" Gas Cooler capacity curve must be input and must be greater than 0 Watts at 3C temperature difference.", RoutineName, CurrentModuleObject, @@ -4017,11 +4011,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (Numbers(1) < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be input greater than or equal to 0 Watts.", - RoutineName, - CurrentModuleObject, - GasCooler(GCNum).Name, - cNumericFieldNames(1))); + std::format("{}{}=\"{}\" {} must be input greater than or equal to 0 Watts.", + RoutineName, + CurrentModuleObject, + GasCooler(GCNum).Name, + cNumericFieldNames(1))); ErrorsFound = true; } @@ -4032,11 +4026,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } if ((GasCooler(GCNum).FanMinAirFlowRatio < 0.0) || (GasCooler(GCNum).FanMinAirFlowRatio > 1.0)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be a value between zero and one. The default value (0.2) will be used.", - RoutineName, - CurrentModuleObject, - GasCooler(GCNum).Name, - cNumericFieldNames(2))); + std::format("{}{}=\"{}\" {} must be a value between zero and one. The default value (0.2) will be used.", + RoutineName, + CurrentModuleObject, + GasCooler(GCNum).Name, + cNumericFieldNames(2))); GasCooler(GCNum).FanMinAirFlowRatio = 0.2; } @@ -4046,19 +4040,18 @@ void GetRefrigerationInput(EnergyPlusData &state) GasCooler(GCNum).TransitionTemperature = Numbers(3); } if (GasCooler(GCNum).TransitionTemperature < 2.5e1) { - ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\" {} is low (less than 25C). Consider raising the transition temperature to operate for " - "longer periods of time in the subcritical region.", - RoutineName, - CurrentModuleObject, - GasCooler(GCNum).Name, - cNumericFieldNames(3))); + ShowWarningError(state, + std::format("{}{}=\"{}\" {} is low (less than 25C). Consider raising the transition temperature to operate for " + "longer periods of time in the subcritical region.", + RoutineName, + CurrentModuleObject, + GasCooler(GCNum).Name, + cNumericFieldNames(3))); } if (GasCooler(GCNum).TransitionTemperature > 30.978) { ShowWarningError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\" {} is greater than the critical temperature of carbon dioxide. The default value (27C) will be used.", RoutineName, CurrentModuleObject, @@ -4074,11 +4067,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (GasCooler(GCNum).GasCoolerApproachT < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be greater than 0C.", - RoutineName, - CurrentModuleObject, - GasCooler(GCNum).Name, - cNumericFieldNames(4))); + std::format("{}{}=\"{}\" {} must be greater than 0C.", + RoutineName, + CurrentModuleObject, + GasCooler(GCNum).Name, + cNumericFieldNames(4))); ErrorsFound = true; } @@ -4089,11 +4082,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (GasCooler(GCNum).SubcriticalTempDiff < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be greater than 0C.", - RoutineName, - CurrentModuleObject, - GasCooler(GCNum).Name, - cNumericFieldNames(5))); + std::format("{}{}=\"{}\" {} must be greater than 0C.", + RoutineName, + CurrentModuleObject, + GasCooler(GCNum).Name, + cNumericFieldNames(5))); ErrorsFound = true; } @@ -4104,11 +4097,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (GasCooler(GCNum).MinCondTemp > 30.9) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be less than the critical temperature of carbon dioxide (31C).", - RoutineName, - CurrentModuleObject, - GasCooler(GCNum).Name, - cNumericFieldNames(6))); + std::format("{}{}=\"{}\" {} must be less than the critical temperature of carbon dioxide (31C).", + RoutineName, + CurrentModuleObject, + GasCooler(GCNum).Name, + cNumericFieldNames(6))); ErrorsFound = true; } @@ -4202,11 +4195,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if (lAlphaBlanks(AlphaNum)) { // No cases or walkins specified, ie, secondary has no load ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has no loads, must have at least one of: {}", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum))); + std::format("{}{}=\"{}\", has no loads, must have at least one of: {}", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum))); ErrorsFound = true; } else { // (.NOT. lAlphaBlanks(AlphaNum)) @@ -4245,20 +4238,20 @@ void GetRefrigerationInput(EnergyPlusData &state) ErrorsFound = true; if (NumNameMatches == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has an invalid {}: {}", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", has an invalid {}: {}", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } else if (NumNameMatches > 1) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has a non-unique name that could be either a {}: {}", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", has a non-unique name that could be either a {}: {}", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } // num matches = 0 or > 1 } else if (CaseAndWalkInListNum != 0) { // Name points to a CaseAndWalkInList NumCoils = CaseAndWalkInList(CaseAndWalkInListNum).NumCoils; @@ -4386,11 +4379,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Secondary(SecondaryNum).TEvapDesign = Numbers(3); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be specified.", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cNumericFieldNames(3))); + std::format("{}{}=\"{}\" {} must be specified.", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cNumericFieldNames(3))); ErrorsFound = true; } // blank on N3 @@ -4398,11 +4391,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Secondary(SecondaryNum).TApproachDifRated = Numbers(4); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be specified.", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cNumericFieldNames(4))); + std::format("{}{}=\"{}\" {} must be specified.", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cNumericFieldNames(4))); ErrorsFound = true; } // blank on N4 @@ -4410,10 +4403,10 @@ void GetRefrigerationInput(EnergyPlusData &state) // Ensure that required input data is not missing prior to performing the following once-only calculations if (ErrorsFound) { ShowFatalError(state, - EnergyPlus::format("{}{}=\"{}\", Program terminated due to previous condition(s).", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name)); + std::format("{}{}=\"{}\", Program terminated due to previous condition(s).", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name)); } // ErrorsFound Real64 CpBrineRated = 0.0; @@ -4427,12 +4420,12 @@ void GetRefrigerationInput(EnergyPlusData &state) Secondary(SecondaryNum).TRangeDifRated = Numbers(5); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be specified.", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cNumericFieldNames(5))); - ShowContinueError(state, EnergyPlus::format("...when {}=\"FluidAlwaysLiquid\".", cAlphaFieldNames(3))); + std::format("{}{}=\"{}\", {} must be specified.", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cNumericFieldNames(5))); + ShowContinueError(state, std::format("...when {}=\"FluidAlwaysLiquid\".", cAlphaFieldNames(3))); ErrorsFound = true; } // blank on N5 @@ -4480,12 +4473,12 @@ void GetRefrigerationInput(EnergyPlusData &state) Secondary(SecondaryNum).CoolingLoadRated = FlowMassRated * CpBrineRated * Secondary(SecondaryNum).TRangeDifRated; } else { ShowSevereError(state, - EnergyPlus::format(R"({}{}="{}", Either "{}" OR "{}" must be input.)", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cNumericFieldNames(1), - cNumericFieldNames(2))); + std::format(R"({}{}="{}", Either "{}" OR "{}" must be input.)", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cNumericFieldNames(1), + cNumericFieldNames(2))); ErrorsFound = true; } // Capacity Input via either or both options @@ -4579,14 +4572,14 @@ void GetRefrigerationInput(EnergyPlusData &state) PumpTotRatedFlowVol * PumpTotRatedHead / (PumpImpellerEfficiency * PumpMotorEfficiency)) / Secondary(SecondaryNum).PumpTotRatedPower; if (std::abs(ErrSecondPumpPower) > 0.35) { - ShowWarningError(state, - EnergyPlus::format( - "{}=\"{} Input value for {} not consistent with input value for {}. {} will be used", - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cNumericFieldNames(9), - cNumericFieldNames(8), - cNumericFieldNames(8))); // generous diff allowed because comparing to my assumed impeller and motor effs + ShowWarningError( + state, + std::format("{}=\"{} Input value for {} not consistent with input value for {}. {} will be used", + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cNumericFieldNames(9), + cNumericFieldNames(8), + cNumericFieldNames(8))); // generous diff allowed because comparing to my assumed impeller and motor effs } } else if (!lNumericBlanks(8)) { Secondary(SecondaryNum).PumpTotRatedPower = Numbers(8); @@ -4596,12 +4589,12 @@ void GetRefrigerationInput(EnergyPlusData &state) PumpTotRatedFlowVol * PumpTotRatedHead / (PumpImpellerEfficiency * PumpMotorEfficiency); } else { ShowSevereError(state, - EnergyPlus::format(R"({}{}="{}", Either "{}" OR "{}" must be input.)", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cNumericFieldNames(8), - cNumericFieldNames(9))); + std::format(R"({}{}="{}", Either "{}" OR "{}" must be input.)", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cNumericFieldNames(8), + cNumericFieldNames(9))); ErrorsFound = true; } // Either or pump power Input variations (head or power) @@ -4618,15 +4611,15 @@ void GetRefrigerationInput(EnergyPlusData &state) // Print warning if Pump Control = Constant and Variable Speed Curve is specified. if ((Secondary(SecondaryNum).PumpControlType == SecPumpCtrl::Constant) && (!lAlphaBlanks(AlphaNum + 1))) { ShowWarningError(state, - EnergyPlus::format(R"({}{}="{}", A {} is specified even though {} is "CONSTANT".)", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum + 1), - cAlphaFieldNames(AlphaNum))); + std::format(R"({}{}="{}", A {} is specified even though {} is "CONSTANT".)", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum + 1), + cAlphaFieldNames(AlphaNum))); ShowContinueError(state, - EnergyPlus::format("The secondary loop pump(s) will be modeled as constant speed and the {} will be ignored.", - cAlphaFieldNames(AlphaNum + 1))); + std::format("The secondary loop pump(s) will be modeled as constant speed and the {} will be ignored.", + cAlphaFieldNames(AlphaNum + 1))); } if (Secondary(SecondaryNum).PumpControlType == SecPumpCtrl::Constant) { @@ -4683,12 +4676,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Secondary(SecondaryNum).DistPipeZoneNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid {} not valid: {}", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", invalid {} not valid: {}", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else { state.dataRefrigCase->RefrigPresentInZone(Secondary(SecondaryNum).DistPipeZoneNum) = true; @@ -4697,38 +4690,36 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Secondary(SecondaryNum).DistPipeZoneNodeNum == 0) { ShowSevereError( state, - EnergyPlus::format( - "{}{}=\"{}\" System Node Number not found for {} = {} even though {} is greater than zero. Distribution " - "piping heat gain cannot be calculated unless a controlled Zone (appear in a ZoneHVAC:EquipmentConnections " - "object.) is defined to determine the environmental temperature surrounding the piping.", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum), - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\" System Node Number not found for {} = {} even though {} is greater than zero. Distribution " + "piping heat gain cannot be calculated unless a controlled Zone (appear in a ZoneHVAC:EquipmentConnections " + "object.) is defined to determine the environmental temperature surrounding the piping.", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum), + cNumericFieldNames(NumNum))); ErrorsFound = true; } } else if (!lNumericBlanks(NumNum) && lAlphaBlanks(AlphaNum)) { ShowWarningError( state, - EnergyPlus::format("{}{}=\"{}\", {} not found even though {} is greater than zero. Distribution piping heat gain will not be " - "calculated unless a Zone is defined to determine the environmental temperature surrounding the piping.", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum), - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} not found even though {} is greater than zero. Distribution piping heat gain will not be " + "calculated unless a Zone is defined to determine the environmental temperature surrounding the piping.", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum), + cNumericFieldNames(NumNum))); } else if (lNumericBlanks(NumNum) && !lAlphaBlanks(AlphaNum)) { ShowWarningError( state, - EnergyPlus::format( - "{}{}=\"{}\", {} will not be used and distribution piping heat gain will not be calculated because {} was blank.", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum), - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} will not be used and distribution piping heat gain will not be calculated because {} was blank.", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum), + cNumericFieldNames(NumNum))); } // distribution piping // Separator/receiver heat gain - optional @@ -4747,12 +4738,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Secondary(SecondaryNum).ReceiverZoneNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid {} not valid: {}", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", invalid {} not valid: {}", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else { state.dataRefrigCase->RefrigPresentInZone(Secondary(SecondaryNum).ReceiverZoneNum) = true; @@ -4760,7 +4751,7 @@ void GetRefrigerationInput(EnergyPlusData &state) if (Secondary(SecondaryNum).ReceiverZoneNodeNum == 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\" System Node Number not found for {} = {} even though {} is greater than zero. Receiver heat gain " "cannot be calculated unless a controlled Zone (appear in a ZoneHVAC:EquipmentConnections object.) is defined " "to determine the environmental temperature surrounding the Receiver.", @@ -4775,23 +4766,22 @@ void GetRefrigerationInput(EnergyPlusData &state) } else if (!lNumericBlanks(NumNum) && lAlphaBlanks(AlphaNum)) { ShowWarningError( state, - EnergyPlus::format( - "{}{}=\"{}\", {} not found even though {} is greater than zero. Receiver heat gain will not be calculated unless " - "a Zone is defined to determine the environmental temperature surrounding the Receiver.", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum), - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} not found even though {} is greater than zero. Receiver heat gain will not be calculated unless " + "a Zone is defined to determine the environmental temperature surrounding the Receiver.", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum), + cNumericFieldNames(NumNum))); } else if (lNumericBlanks(NumNum) && !lAlphaBlanks(AlphaNum)) { ShowWarningError( state, - EnergyPlus::format("{}{}=\"{}\", {} will not be used and Receiver heat gain will not be calculated because {} was blank.", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cAlphaFieldNames(AlphaNum), - cNumericFieldNames(NumNum))); + std::format("{}{}=\"{}\", {} will not be used and Receiver heat gain will not be calculated because {} was blank.", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cAlphaFieldNames(AlphaNum), + cNumericFieldNames(NumNum))); } // Receiver NumNum = 14; @@ -4801,13 +4791,12 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (Secondary(SecondaryNum).ChillerRefInventory < 0.0) { Secondary(SecondaryNum).ChillerRefInventory = 0.0; - ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\", The value specified for {} is less than zero. The default value of zero will be used.", - RoutineName, - CurrentModuleObject, - Secondary(SecondaryNum).Name, - cNumericFieldNames(NumNum))); + ShowWarningError(state, + std::format("{}{}=\"{}\", The value specified for {} is less than zero. The default value of zero will be used.", + RoutineName, + CurrentModuleObject, + Secondary(SecondaryNum).Name, + cNumericFieldNames(NumNum))); } AlphaNum = 9; @@ -4939,12 +4928,12 @@ void GetRefrigerationInput(EnergyPlusData &state) // Get superheat rating type (Either N1 or N2 Must be input) if (((!lNumericBlanks(1)) && (!lNumericBlanks(2))) || (lNumericBlanks(1) && lNumericBlanks(2))) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\"One, and Only One of {} or {}", - RoutineName, - CurrentModuleObject, - Compressor(CompNum).Name, - cNumericFieldNames(1), - cNumericFieldNames(2))); + std::format("{}{}=\"{}\"One, and Only One of {} or {}", + RoutineName, + CurrentModuleObject, + Compressor(CompNum).Name, + cNumericFieldNames(1), + cNumericFieldNames(2))); ShowContinueError(state, "Must Be Entered. Check input value choices."); ErrorsFound = true; } else if (!lNumericBlanks(1)) { @@ -4958,12 +4947,12 @@ void GetRefrigerationInput(EnergyPlusData &state) // Get subcool rating type (Either N3 or N4 Must be input) if (((!lNumericBlanks(3)) && (!lNumericBlanks(4))) || (lNumericBlanks(3) && lNumericBlanks(4))) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" One, and Only One of {} or {}", - RoutineName, - CurrentModuleObject, - Compressor(CompNum).Name, - cNumericFieldNames(3), - cNumericFieldNames(4))); + std::format("{}{}=\"{}\" One, and Only One of {} or {}", + RoutineName, + CurrentModuleObject, + Compressor(CompNum).Name, + cNumericFieldNames(3), + cNumericFieldNames(4))); ShowContinueError(state, "Must Be Entered. Check input value choices."); ErrorsFound = true; } else if (!lNumericBlanks(3)) { @@ -5057,11 +5046,11 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (Subcooler(SubcoolerNum).LiqSuctDesignDelT < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} cannot be less than zero.", - RoutineName, - CurrentModuleObject, - Subcooler(SubcoolerNum).Name, - cNumericFieldNames(1))); + std::format("{}{}=\"{}\" {} cannot be less than zero.", + RoutineName, + CurrentModuleObject, + Subcooler(SubcoolerNum).Name, + cNumericFieldNames(1))); ErrorsFound = true; } @@ -5069,11 +5058,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Subcooler(SubcoolerNum).LiqSuctDesignTliqIn = Numbers(2); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be specified.", - RoutineName, - CurrentModuleObject, - Subcooler(SubcoolerNum).Name, - cNumericFieldNames(2))); + std::format("{}{}=\"{}\" {} must be specified.", + RoutineName, + CurrentModuleObject, + Subcooler(SubcoolerNum).Name, + cNumericFieldNames(2))); ErrorsFound = true; } @@ -5081,21 +5070,21 @@ void GetRefrigerationInput(EnergyPlusData &state) Subcooler(SubcoolerNum).LiqSuctDesignTvapIn = Numbers(3); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be specified.", - RoutineName, - CurrentModuleObject, - Subcooler(SubcoolerNum).Name, - cNumericFieldNames(3))); + std::format("{}{}=\"{}\" {} must be specified.", + RoutineName, + CurrentModuleObject, + Subcooler(SubcoolerNum).Name, + cNumericFieldNames(3))); ErrorsFound = true; } if (Subcooler(SubcoolerNum).LiqSuctDesignTvapIn > Subcooler(SubcoolerNum).LiqSuctDesignTliqIn) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} cannot be greater than {}.", - RoutineName, - CurrentModuleObject, - Subcooler(SubcoolerNum).Name, - cNumericFieldNames(3), - cNumericFieldNames(2))); + std::format("{}{}=\"{}\" {} cannot be greater than {}.", + RoutineName, + CurrentModuleObject, + Subcooler(SubcoolerNum).Name, + cNumericFieldNames(3), + cNumericFieldNames(2))); ErrorsFound = true; } // error check } break; @@ -5107,11 +5096,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Subcooler(SubcoolerNum).MechControlTliqOut = Numbers(4); } else { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" {} must be specified.", - RoutineName, - CurrentModuleObject, - Subcooler(SubcoolerNum).Name, - cNumericFieldNames(4))); + std::format("{}{}=\"{}\" {} must be specified.", + RoutineName, + CurrentModuleObject, + Subcooler(SubcoolerNum).Name, + cNumericFieldNames(4))); ErrorsFound = true; } // error check } break; @@ -5166,29 +5155,28 @@ void GetRefrigerationInput(EnergyPlusData &state) } if ((LoadCascadeNum == 0) && (LoadSecondaryNum == 0)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" : has an invalid value of {}", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaListNum), - Alphas(AlphaListNum))); + std::format("{}{}=\"{}\" : has an invalid value of {}", + RoutineName, + CurrentModuleObject, + cAlphaFieldNames(AlphaListNum), + Alphas(AlphaListNum))); ErrorsFound = true; } else if ((LoadCascadeNum != 0) && (LoadSecondaryNum != 0)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" : has a non-unique name : {}", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaListNum), - Alphas(AlphaListNum))); + std::format("{}{}=\"{}\" : has a non-unique name : {}", + RoutineName, + CurrentModuleObject, + cAlphaFieldNames(AlphaListNum), + Alphas(AlphaListNum))); ErrorsFound = true; } else if (LoadCascadeNum != 0) { if (Condenser(LoadCascadeNum).CondenserType != DataHeatBalance::RefrigCondenserType::Cascade) { - ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\" : has a condenser listed as a transfer load that is not a cascade condenser: {}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - Alphas(AlphaListNum))); + ShowSevereError(state, + std::format("{}{}=\"{}\" : has a condenser listed as a transfer load that is not a cascade condenser: {}", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + Alphas(AlphaListNum))); ErrorsFound = true; } else { ++NumCascadeLoadsOnList; @@ -5234,12 +5222,12 @@ void GetRefrigerationInput(EnergyPlusData &state) CompressorLists(ListNum).CompItemNum(CompIndex) = Util::FindItemInList(Alphas(AlphaListNum), Compressor); if (CompressorLists(ListNum).CompItemNum(CompIndex) == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has an invalid {} defined as {}", - RoutineName, - CurrentModuleObject, - CompressorLists(ListNum).Name, - cAlphaFieldNames(AlphaListNum), - Alphas(AlphaListNum))); + std::format("{}{}=\"{}\", has an invalid {} defined as {}", + RoutineName, + CurrentModuleObject, + CompressorLists(ListNum).Name, + cAlphaFieldNames(AlphaListNum), + Alphas(AlphaListNum))); ErrorsFound = true; } } @@ -5273,12 +5261,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (lAlphaBlanks(2) && lAlphaBlanks(3)) { // No cases, walkins, cascade loads, or secondary loops specified, ie, System has no load ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has no loads, must have at least one of: {} or {} objects attached.", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(2), - cAlphaFieldNames(3))); + std::format("{}{}=\"{}\", has no loads, must have at least one of: {} or {} objects attached.", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(2), + cAlphaFieldNames(3))); ErrorsFound = true; } NumCases = 0; @@ -5337,20 +5325,20 @@ void GetRefrigerationInput(EnergyPlusData &state) ErrorsFound = true; if (NumNameMatches == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has an invalid {}: {}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", has an invalid {}: {}", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } else if (NumNameMatches > 1) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has a non-unique name that could be either a {}: {}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", has a non-unique name that could be either a {}: {}", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } // num matches = 0 or > 1 } else if (CaseAndWalkInListNum != 0) { // Name points to a CaseAndWalkInList NumCases = CaseAndWalkInList(CaseAndWalkInListNum).NumCases; @@ -5451,10 +5439,10 @@ void GetRefrigerationInput(EnergyPlusData &state) if (WalkIn(WalkInID).DefrostCapacity <= -98.0) { // - 99 used as a flag for blank input error message for detailed systems ShowSevereError(state, - EnergyPlus::format("{}Refrigeration:WalkIn=\"{}\", Defrost capacity must be greater than or equal to 0 W for " - "electric and hotfluid defrost types", - RoutineName, - WalkIn(WalkInID).Name)); + std::format("{}Refrigeration:WalkIn=\"{}\", Defrost capacity must be greater than or equal to 0 W for " + "electric and hotfluid defrost types", + RoutineName, + WalkIn(WalkInID).Name)); ErrorsFound = true; } // Find design evaporating temperature for system by getting min design evap for ALL loads @@ -5504,20 +5492,20 @@ void GetRefrigerationInput(EnergyPlusData &state) ErrorsFound = true; if (NumNameMatches == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has an invalid {}: {}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", has an invalid {}: {}", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } else if (NumNameMatches > 1) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has a non-unique name that could be either a {}: {}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", has a non-unique name that could be either a {}: {}", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } // num matches = 0 or > 1 } else if (TransferLoadListNum != 0) { // Name points to a transferLoad list NumSecondary = TransferLoadList(TransferLoadListNum).NumSecondarys; @@ -5559,15 +5547,14 @@ void GetRefrigerationInput(EnergyPlusData &state) System(RefrigSysNum).CoilFlag = true; } } else if (Secondary(SecondaryID).CoilFlag != System(RefrigSysNum).CoilFlag) { - ShowSevereError( - state, - EnergyPlus::format( - "{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different time " - "step than case or walkin loads. Compare loads on system served by secondary loop \"{}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - Secondary(SecondaryID).Name)); + ShowSevereError( + state, + std::format("{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different time " + "step than case or walkin loads. Compare loads on system served by secondary loop \"{}", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + Secondary(SecondaryID).Name)); ErrorsFound = true; } // check for consistency of loads (coils calc on sys time step, all others on zone time step) // mark all Secondarys on system as used by this system (checking for unused or non-unique Secondarys) @@ -5595,12 +5582,12 @@ void GetRefrigerationInput(EnergyPlusData &state) int CondID = System(RefrigSysNum).CascadeLoadNum(cascadeLoadIndex); if (Condenser(CondID).CondenserType != DataHeatBalance::RefrigCondenserType::Cascade) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has a {}: {} cascade load that is not a cascade condenser.", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", has a {}: {} cascade load that is not a cascade condenser.", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } // For a cascade condenser, need to identify the system absorbing the heat @@ -5630,24 +5617,23 @@ void GetRefrigerationInput(EnergyPlusData &state) if ((System(RefrigSysNum).NumCases > 0) || (System(RefrigSysNum).NumWalkIns > 0)) { ShowSevereError( state, - EnergyPlus::format("{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different time " - "step than case or walkin loads.", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name)); + std::format("{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different time " + "step than case or walkin loads.", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name)); ErrorsFound = true; } } else { // no coils on secondary or no secondary if (System(RefrigSysNum).NumCoils > 0) { //(note, coilflag set to .FALSE. for all systems as default above System(RefrigSysNum).CoilFlag = true; if ((System(RefrigSysNum).NumCases > 0) || (System(RefrigSysNum).NumWalkIns > 0)) { - ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different " - "time step than case or walkin loads.", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name)); + ShowSevereError(state, + std::format("{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different " + "time step than case or walkin loads.", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name)); ErrorsFound = true; } } // NumCoils > 0 @@ -5667,12 +5653,12 @@ void GetRefrigerationInput(EnergyPlusData &state) int CondNum = Util::FindItemInList(Alphas(AlphaNum), Condenser); if (CondNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has an invalid {} defined as {}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", has an invalid {} defined as {}", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else { System(RefrigSysNum).CondenserNum(NumCondensers) = CondNum; @@ -5696,12 +5682,11 @@ void GetRefrigerationInput(EnergyPlusData &state) Condenser(CondNum).RatedAirFlowRate = AirVolRateEvapCond * Condenser(CondNum).RatedCapacity; } if (Condenser(CondNum).RatedAirFlowRate <= 0.0) { - ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\", Evaporative Condenser Air Volume Flow Rate cannot be less than or equal to zero.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name)); + ShowSevereError(state, + std::format("{}{}=\"{}\", Evaporative Condenser Air Volume Flow Rate cannot be less than or equal to zero.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name)); ErrorsFound = true; } if (Condenser(CondNum).EvapPumpPower == Constant::AutoCalculate) { @@ -5709,10 +5694,10 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (Condenser(CondNum).EvapPumpPower < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", Design Evaporative Condenser Water Pump Power cannot be less than zero.", - RoutineName, - CurrentModuleObject, - Condenser(CondNum).Name)); + std::format("{}{}=\"{}\", Design Evaporative Condenser Water Pump Power cannot be less than zero.", + RoutineName, + CurrentModuleObject, + Condenser(CondNum).Name)); ErrorsFound = true; } } @@ -5723,8 +5708,7 @@ void GetRefrigerationInput(EnergyPlusData &state) int NumCompressorsSys = 0; if (lAlphaBlanks(AlphaNum)) { // blank input where must have compressor or compressor list input. - ShowSevereError(state, - EnergyPlus::format("{}{} {}\" : must be input.", RoutineName, CurrentModuleObject, cAlphaFieldNames(AlphaNum))); + ShowSevereError(state, std::format("{}{} {}\" : must be input.", RoutineName, CurrentModuleObject, cAlphaFieldNames(AlphaNum))); ErrorsFound = true; } else { // Entry for Alphas(AlphaNum) can be either a compressor name or a compressorlist name int ListNum; @@ -5741,19 +5725,19 @@ void GetRefrigerationInput(EnergyPlusData &state) } if ((ListNum == 0) && (CompNum == 0)) { // name doesn't match either a compressor or a compressor list ShowSevereError(state, - EnergyPlus::format("{}{} {}, has an invalid or undefined value=\"{}\".", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{} {}, has an invalid or undefined value=\"{}\".", + RoutineName, + CurrentModuleObject, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else if ((ListNum != 0) && (CompNum != 0)) { // have compressor list and compressor with same name ShowSevereError(state, - EnergyPlus::format("{}{} {}, has a non-unique name used for both Compressor and CompressorList name: \"{}\".", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{} {}, has a non-unique name used for both Compressor and CompressorList name: \"{}\".", + RoutineName, + CurrentModuleObject, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else if (ListNum != 0) { NumCompressorsSys = CompressorLists(ListNum).NumCompressors; @@ -5787,18 +5771,17 @@ void GetRefrigerationInput(EnergyPlusData &state) } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", {} must be defined.", RoutineName, CurrentModuleObject, System(RefrigSysNum).Name, cNumericFieldNames(1))); ErrorsFound = true; } if ((Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserType::Cascade) && (System(RefrigSysNum).TCondenseMin > Condenser(CondNum).RatedTCondense)) { - ShowWarningError( - state, - EnergyPlus::format("{}=\"{}\", The system specified minimum condensing temperature is greater than the rated condensing " - "temperature for the cascade condenser. ", - CurrentModuleObject, - System(RefrigSysNum).Name)); + ShowWarningError(state, + std::format("{}=\"{}\", The system specified minimum condensing temperature is greater than the rated condensing " + "temperature for the cascade condenser. ", + CurrentModuleObject, + System(RefrigSysNum).Name)); } AlphaNum = 6; @@ -5822,10 +5805,10 @@ void GetRefrigerationInput(EnergyPlusData &state) } else if (System(RefrigSysNum).CompSuctControl == CompressorSuctionPressureCtrl::FloatSuctionTemperature && System(RefrigSysNum).CoilFlag) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", The system specified a FloatSuctionTemperature, but that is not available with air " - "chiller loads so ConstantSuctionTemperature will be used. ", - CurrentModuleObject, - System(RefrigSysNum).Name)); + std::format("{}=\"{}\", The system specified a FloatSuctionTemperature, but that is not available with air " + "chiller loads so ConstantSuctionTemperature will be used. ", + CurrentModuleObject, + System(RefrigSysNum).Name)); } // Count subcoolers on system and allocate @@ -5848,12 +5831,12 @@ void GetRefrigerationInput(EnergyPlusData &state) state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Refrigeration:Subcooler", Alphas(AlphaNum)); if (System(RefrigSysNum).SubcoolerNum(NumSubcooler) <= 0) { ShowSevereError(state, - EnergyPlus::format(R"({}{}="{}", has an invalid {} defined as "{}".)", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format(R"({}{}="{}", has an invalid {} defined as "{}".)", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else { Subcooler(System(RefrigSysNum).SubcoolerNum(NumSubcooler)).CoilFlag = System(RefrigSysNum).CoilFlag; @@ -5865,12 +5848,12 @@ void GetRefrigerationInput(EnergyPlusData &state) state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Refrigeration:Subcooler", Alphas(AlphaNum + 1)); if (System(RefrigSysNum).SubcoolerNum(NumSubcooler) <= 0) { ShowSevereError(state, - EnergyPlus::format(R"({}{}="{}", has an invalid {} defined as "{}".)", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum + 1), - Alphas(AlphaNum + 1))); + std::format(R"({}{}="{}", has an invalid {} defined as "{}".)", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum + 1), + Alphas(AlphaNum + 1))); ErrorsFound = true; } else { Subcooler(System(RefrigSysNum).SubcoolerNum(NumSubcooler)).CoilFlag = System(RefrigSysNum).CoilFlag; @@ -5894,7 +5877,7 @@ void GetRefrigerationInput(EnergyPlusData &state) if (System(RefrigSysNum).SuctionPipeZoneNodeNum == 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}{}=\"{}\", System Node Number not found for {} = {} even though {} is greater than zero. Suction piping heat gain " "cannot be calculated unless a Zone is defined to determine the environmental temperature surrounding the piping.", RoutineName, @@ -5908,24 +5891,23 @@ void GetRefrigerationInput(EnergyPlusData &state) state.dataRefrigCase->RefrigPresentInZone(System(RefrigSysNum).SuctionPipeActualZoneNum) = true; } } else if (!lNumericBlanks(2) && lAlphaBlanks(AlphaNum)) { - ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\" {} not found even though {} is greater than zero. Suction piping heat gain will not be " - "calculated unless a Zone is defined to determine the environmental temperature surrounding the piping.", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - cNumericFieldNames(2))); + ShowWarningError(state, + std::format("{}{}=\"{}\" {} not found even though {} is greater than zero. Suction piping heat gain will not be " + "calculated unless a Zone is defined to determine the environmental temperature surrounding the piping.", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + cNumericFieldNames(2))); } else if (lNumericBlanks(2) && !lAlphaBlanks(AlphaNum)) { ShowWarningError( state, - EnergyPlus::format("{}{}=\"{}\" {} will not be used and suction piping heat gain will not be calculated because {} was blank.", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - cNumericFieldNames(2))); + std::format("{}{}=\"{}\" {} will not be used and suction piping heat gain will not be calculated because {} was blank.", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + cNumericFieldNames(2))); } // suction piping heat gains AlphaNum = 11; @@ -5938,12 +5920,12 @@ void GetRefrigerationInput(EnergyPlusData &state) System(RefrigSysNum).NumStages = Numbers(3); if (System(RefrigSysNum).NumStages < 1 || System(RefrigSysNum).NumStages > 2) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {}{}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cNumericFieldNames(3), - R"( has an invalid value. Only \"1\" or \"2\" compressor stages are allowed.)")); + std::format("{}{}=\"{}\", {}{}", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cNumericFieldNames(3), + R"( has an invalid value. Only \"1\" or \"2\" compressor stages are allowed.)")); ErrorsFound = true; } } else { @@ -5964,16 +5946,15 @@ void GetRefrigerationInput(EnergyPlusData &state) if (System(RefrigSysNum).NumStages == 1 && (System(RefrigSysNum).intercoolerType == IntercoolerType::Flash || System(RefrigSysNum).intercoolerType == IntercoolerType::ShellAndCoil)) { - ShowSevereError(state, - EnergyPlus::format( - "{}{}=\"{}\", A single-stage compression system", RoutineName, CurrentModuleObject, System(RefrigSysNum).Name)); + ShowSevereError( + state, + std::format("{}{}=\"{}\", A single-stage compression system", RoutineName, CurrentModuleObject, System(RefrigSysNum).Name)); ShowContinueError(state, "has been specified with an intercooler. Verify that the number of compressor stages"); ShowContinueError(state, "and the intercooler type are consistent."); ErrorsFound = true; } else if (System(RefrigSysNum).NumStages == 2 && System(RefrigSysNum).intercoolerType == IntercoolerType::None) { ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\", A two-stage compression system", RoutineName, CurrentModuleObject, System(RefrigSysNum).Name)); + state, std::format("{}{}=\"{}\", A two-stage compression system", RoutineName, CurrentModuleObject, System(RefrigSysNum).Name)); ShowContinueError(state, "has been specified without an intercooler. Verify that the number of compressor stages"); ShowContinueError(state, "and the intercooler type are consistent."); ErrorsFound = true; @@ -5984,8 +5965,7 @@ void GetRefrigerationInput(EnergyPlusData &state) System(RefrigSysNum).IntercoolerEffectiveness = Numbers(4); if (System(RefrigSysNum).IntercoolerEffectiveness < 0.0 || System(RefrigSysNum).IntercoolerEffectiveness > 1.0) { ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\", The specified value for the", RoutineName, CurrentModuleObject, System(RefrigSysNum).Name)); + state, std::format("{}{}=\"{}\", The specified value for the", RoutineName, CurrentModuleObject, System(RefrigSysNum).Name)); ShowContinueError(state, EnergyPlus::format("{} = {:.2R} is invalid. This value must be", cNumericFieldNames(4), @@ -6004,33 +5984,32 @@ void GetRefrigerationInput(EnergyPlusData &state) if (lAlphaBlanks(AlphaNum)) { // blank input where must have high-stage compressor or compressor list input. ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", {} must be input for two-stage compression systems.", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum))); + std::format("{}{}=\"{}\", {} must be input for two-stage compression systems.", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum))); ErrorsFound = true; } else { // Entry for Alphas(AlphaNum) can be either a compressor name or a compressorlist name int ListNum = Util::FindItemInList(Alphas(AlphaNum), CompressorLists); int CompNum = Util::FindItemInList(Alphas(AlphaNum), Compressor); if ((ListNum == 0) && (CompNum == 0)) { // name doesn't match either a compressor or a compressor list ShowSevereError(state, - EnergyPlus::format(R"({}{}="{}", {} has an invalid or undefined value="{}".)", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format(R"({}{}="{}", {} has an invalid or undefined value="{}".)", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else if ((ListNum != 0) && (CompNum != 0)) { // have compressor list and compressor with same name - ShowSevereError( - state, - EnergyPlus::format(R"({}{}="{}", {} has a non-unique name used for both Compressor and CompressorList name: "{}".)", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + ShowSevereError(state, + std::format(R"({}{}="{}", {} has a non-unique name used for both Compressor and CompressorList name: "{}".)", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else if (ListNum != 0) { NumHiStageCompressorsSys = CompressorLists(ListNum).NumCompressors; @@ -6081,9 +6060,9 @@ void GetRefrigerationInput(EnergyPlusData &state) } // NumStages } else { // Transcritical compressor attached to subcritical refrigeration cycle ShowSevereError(state, - EnergyPlus::format("{}{}. A transcritical compressor is attached to a subcritical refrigeration system.", - RoutineName, - CurrentModuleObject)); + std::format("{}{}. A transcritical compressor is attached to a subcritical refrigeration system.", + RoutineName, + CurrentModuleObject)); ShowContinueError(state, "Check input to ensure that subcritical compressors are connected only to subcritical systems and " "transcritical compressors are connected only to transcritical systems."); @@ -6106,9 +6085,9 @@ void GetRefrigerationInput(EnergyPlusData &state) ++Compressor(CompNum).NumSysAttach; } else { // Transcritical compressor attached to subcritical refrigeration cycle ShowSevereError(state, - EnergyPlus::format("{}{}. A transcritical compressor is attached to a subcritical refrigeration system.", - RoutineName, - CurrentModuleObject)); + std::format("{}{}. A transcritical compressor is attached to a subcritical refrigeration system.", + RoutineName, + CurrentModuleObject)); ShowContinueError(state, "Check input to ensure that subcritical compressors are connected only to subcritical systems and " "transcritical compressors are connected only to transcritical systems."); @@ -6183,14 +6162,13 @@ void GetRefrigerationInput(EnergyPlusData &state) } if (!Condenser(CondID).CoilFlag) { // would mean system already serving coil loads and this condenser cooling system with case-type loads - ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different " - "time step than case or walkin loads. Compare loads on system served by cascade condenser \"{}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - Condenser(CondID).Name)); + ShowSevereError(state, + std::format("{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different " + "time step than case or walkin loads. Compare loads on system served by cascade condenser \"{}", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + Condenser(CondID).Name)); ErrorsFound = true; } } // CondID @@ -6223,13 +6201,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (System(RefrigSysNum).CoilFlag != Condenser(CondID).CoilFlag) { ShowSevereError( state, - EnergyPlus::format( - "{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different time " - "step than case or walkin loads. Compare loads on system served by cascade condenser \"{}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - Condenser(CondID).Name)); + std::format("{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different time " + "step than case or walkin loads. Compare loads on system served by cascade condenser \"{}", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + Condenser(CondID).Name)); ErrorsFound = true; } } // numcascadeloadschecked > 1 @@ -6250,22 +6227,22 @@ void GetRefrigerationInput(EnergyPlusData &state) state.dataInputProcessing->inputProcessor->getObjectItemNum(state, "Refrigeration:System", Subcooler(SubcoolerNum).MechSourceSys); if (Subcooler(SubcoolerNum).MechSourceSysID == 0) { ShowSevereError(state, - EnergyPlus::format(R"({}{}="{}", Mechanical Subcooler has an invalid Source Refrigeration:System="{}".)", - RoutineName, - CurrentModuleObject, - Subcooler(SubcoolerNum).Name, - Subcooler(SubcoolerNum).MechSourceSys)); + std::format(R"({}{}="{}", Mechanical Subcooler has an invalid Source Refrigeration:System="{}".)", + RoutineName, + CurrentModuleObject, + Subcooler(SubcoolerNum).Name, + Subcooler(SubcoolerNum).MechSourceSys)); ErrorsFound = true; } else { if (System(Subcooler(SubcoolerNum).MechSourceSysID).CoilFlag != Subcooler(SubcoolerNum).CoilFlag) { ShowSevereError( state, - EnergyPlus::format("{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different time " - "step than case or walkin loads. Compare loads on system served by mechanical subcooler \"{}", - RoutineName, - CurrentModuleObject, - System(RefrigSysNum).Name, - Subcooler(SubcoolerNum).Name)); + std::format("{}{}=\"{}\", Serves an inconsistent mixture of loads. Coil-type loads are served on a different time " + "step than case or walkin loads. Compare loads on system served by mechanical subcooler \"{}", + RoutineName, + CurrentModuleObject, + System(RefrigSysNum).Name, + Subcooler(SubcoolerNum).Name)); ErrorsFound = true; } } // error check @@ -6387,20 +6364,20 @@ void GetRefrigerationInput(EnergyPlusData &state) ErrorsFound = true; if (NumNameMatches == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has an invalid {}: {}", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", has an invalid {}: {}", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } else if (NumNameMatches > 1) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has a non-unique name that could be either a {}: {}", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", has a non-unique name that could be either a {}: {}", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } // num matches = 0 or > 1 } else if (CaseAndWalkInListNum != 0) { // Name points to a CaseAndWalkInList NumCasesMT = CaseAndWalkInList(CaseAndWalkInListNum).NumCases; @@ -6470,10 +6447,10 @@ void GetRefrigerationInput(EnergyPlusData &state) if (WalkIn(WalkInID).DefrostCapacity <= -98.0) { // - 99 used as a flag for blank input error message for detailed systems ShowSevereError(state, - EnergyPlus::format("{}Refrigeration:WalkIn=\"{}\", Defrost capacity must be greater than or equal to 0 W for " - "electric and hotfluid defrost types", - RoutineName, - WalkIn(WalkInID).Name)); + std::format("{}Refrigeration:WalkIn=\"{}\", Defrost capacity must be greater than or equal to 0 W for " + "electric and hotfluid defrost types", + RoutineName, + WalkIn(WalkInID).Name)); ErrorsFound = true; } // Find design evaporating temperature for system by getting min design evap for ALL loads @@ -6520,20 +6497,20 @@ void GetRefrigerationInput(EnergyPlusData &state) ErrorsFound = true; if (NumNameMatches == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has an invalid {}: {}", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", has an invalid {}: {}", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } else if (NumNameMatches > 1) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", has a non-unique name that could be either a {}: {}", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{}=\"{}\", has a non-unique name that could be either a {}: {}", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); } // num matches = 0 or > 1 } else if (CaseAndWalkInListNum != 0) { // Name points to a CaseAndWalkInList NumCasesLT = CaseAndWalkInList(CaseAndWalkInListNum).NumCases; @@ -6603,10 +6580,10 @@ void GetRefrigerationInput(EnergyPlusData &state) if (WalkIn(WalkInID).DefrostCapacity <= -98.0) { // - 99 used as a flag for blank input error message for detailed systems ShowSevereError(state, - EnergyPlus::format("{}Refrigeration:WalkIn=\"{}\", Defrost capacity must be greater than or equal to 0 W for " - "electric and hotfluid defrost types", - RoutineName, - WalkIn(WalkInID).Name)); + std::format("{}Refrigeration:WalkIn=\"{}\", Defrost capacity must be greater than or equal to 0 W for " + "electric and hotfluid defrost types", + RoutineName, + WalkIn(WalkInID).Name)); ErrorsFound = true; } // Find design evaporating temperature for system by getting min design evap for ALL loads @@ -6636,12 +6613,12 @@ void GetRefrigerationInput(EnergyPlusData &state) if (GCNum == 0) { // Invalid Gas Cooler attached to Transcritical Refrigeration System ShowSevereError(state, - EnergyPlus::format(R"({}{}="{}", has an invalid {} defined as "{}".)", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format(R"({}{}="{}", has an invalid {} defined as "{}".)", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else if (GCNum != 0) { // Gas Cooler attached to Transcritical Refrigeration System TransSystem(TransRefrigSysNum).GasCoolerNum(NumGasCoolers) = GCNum; @@ -6661,27 +6638,26 @@ void GetRefrigerationInput(EnergyPlusData &state) int NumCompressorsSys = 0; if (lAlphaBlanks(AlphaNum)) { // blank input where must have compressor or compressor list input. - ShowSevereError(state, - EnergyPlus::format("{}{} {}\" : must be input.", RoutineName, CurrentModuleObject, cAlphaFieldNames(AlphaNum))); + ShowSevereError(state, std::format("{}{} {}\" : must be input.", RoutineName, CurrentModuleObject, cAlphaFieldNames(AlphaNum))); ErrorsFound = true; } else { // Entry for Alphas(AlphaNum) can be either a compressor name or a compressorlist name int ListNum = Util::FindItemInList(Alphas(AlphaNum), CompressorLists); int CompNum = Util::FindItemInList(Alphas(AlphaNum), Compressor); if ((ListNum == 0) && (CompNum == 0)) { // name doesn't match either a compressor or a compressor list ShowSevereError(state, - EnergyPlus::format(R"({}{}, "{}", has an invalid or undefined value="{}".)", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format(R"({}{}, "{}", has an invalid or undefined value="{}".)", + RoutineName, + CurrentModuleObject, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else if ((ListNum != 0) && (CompNum != 0)) { // have compressor list and compressor with same name ShowSevereError(state, - EnergyPlus::format("{}{} {}, has a non-unique name used for both Compressor and CompressorList name: \"{}\".", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{} {}, has a non-unique name used for both Compressor and CompressorList name: \"{}\".", + RoutineName, + CurrentModuleObject, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else if (ListNum != 0) { NumCompressorsSys = CompressorLists(ListNum).NumCompressors; @@ -6715,12 +6691,12 @@ void GetRefrigerationInput(EnergyPlusData &state) NominalTotalCompCapHP += Compressor(CompNum).NomCap; ++Compressor(CompNum).NumSysAttach; } else { // Subcritical compressor attached to transcritical system - show error - ShowSevereError(state, - EnergyPlus::format( - "{}{}, No transcritical CO2 compressors are attached to the transcritical refrigeration system, \"{}\".", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name)); + ShowSevereError( + state, + std::format("{}{}, No transcritical CO2 compressors are attached to the transcritical refrigeration system, \"{}\".", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name)); ErrorsFound = true; } } @@ -6733,42 +6709,41 @@ void GetRefrigerationInput(EnergyPlusData &state) if ((lAlphaBlanks(AlphaNum)) && (TransSystem(TransRefrigSysNum).transSysType == TransSysType::TwoStage)) { // TwoStage system type is specified but low pressure compressor input is blank ShowSevereError(state, - EnergyPlus::format("{}{}, The transcritical refrigeration system, \"{}\", is specified to be \"TwoStage\", " - "however, the \"{}\" is not given.", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum))); + std::format("{}{}, The transcritical refrigeration system, \"{}\", is specified to be \"TwoStage\", " + "however, the \"{}\" is not given.", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + cAlphaFieldNames(AlphaNum))); ErrorsFound = true; } else if ((!(lAlphaBlanks(AlphaNum))) && (TransSystem(TransRefrigSysNum).transSysType == TransSysType::SingleStage)) { // SingleStage system type with low pressure compressors specified. Ignore low pressure compressors - ShowWarningError( - state, - EnergyPlus::format("{}{}, The transcritical refrigeration system, \"{}\", is specified to be \"SingleStage\", " - "however, a \"{}\" was found. The low pressure compressors will be ignored and will not simulated.", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum))); + ShowWarningError(state, + std::format("{}{}, The transcritical refrigeration system, \"{}\", is specified to be \"SingleStage\", " + "however, a \"{}\" was found. The low pressure compressors will be ignored and will not simulated.", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + cAlphaFieldNames(AlphaNum))); } else if ((!(lAlphaBlanks(AlphaNum))) && (TransSystem(TransRefrigSysNum).transSysType == TransSysType::TwoStage)) { // TwoStage system with low pressure compressors specified int ListNum = Util::FindItemInList(Alphas(AlphaNum), CompressorLists); int CompNum = Util::FindItemInList(Alphas(AlphaNum), Compressor); if ((ListNum == 0) && (CompNum == 0)) { // name doesn't match either a compressor or a compressor list ShowSevereError(state, - EnergyPlus::format(R"({}{}, "{}", has an invalid or undefined value="{}".)", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format(R"({}{}, "{}", has an invalid or undefined value="{}".)", + RoutineName, + CurrentModuleObject, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else if ((ListNum != 0) && (CompNum != 0)) { // have compressor list and compressor with same name ShowSevereError(state, - EnergyPlus::format("{}{} {}, has a non-unique name used for both Compressor and CompressorList name: \"{}\".", - RoutineName, - CurrentModuleObject, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum))); + std::format("{}{} {}, has a non-unique name used for both Compressor and CompressorList name: \"{}\".", + RoutineName, + CurrentModuleObject, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum))); ErrorsFound = true; } else if (ListNum != 0) { NumCompressorsSys = CompressorLists(ListNum).NumCompressors; @@ -6873,11 +6848,11 @@ void GetRefrigerationInput(EnergyPlusData &state) if ((TransSystem(TransRefrigSysNum).SCEffectiveness < 0) || (TransSystem(TransRefrigSysNum).SCEffectiveness > 1)) { ShowSevereError( state, - EnergyPlus::format("{}{}=\"{}: The value for subcooler effectiveness is invalid. The subcooler effectiveness must be a value " - "greater than or equal to zero and less than or equal to one.", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name)); + std::format("{}{}=\"{}: The value for subcooler effectiveness is invalid. The subcooler effectiveness must be a value " + "greater than or equal to zero and less than or equal to one.", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name)); ErrorsFound = true; } @@ -6895,15 +6870,14 @@ void GetRefrigerationInput(EnergyPlusData &state) TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumMT = DataZoneEquipment::GetSystemNodeNumberForZone(state, TransSystem(TransRefrigSysNum).SuctionPipeActualZoneNumMT); if (TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumMT == 0) { - ShowSevereError( - state, - EnergyPlus::format(R"({}{}="{}", System Node Number not found for {} = "{}" even though {} is greater than zero.)", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum), - cNumericFieldNames(3))); + ShowSevereError(state, + std::format(R"({}{}="{}", System Node Number not found for {} = "{}" even though {} is greater than zero.)", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum), + cNumericFieldNames(3))); ShowContinueError(state, " The medium temperature suction piping heat gain cannot be calculated unless a Zone is defined to " "determine the environmental temperature surrounding the piping."); @@ -6913,24 +6887,24 @@ void GetRefrigerationInput(EnergyPlusData &state) } } else if (!lNumericBlanks(3) && lAlphaBlanks(AlphaNum)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\" {} not found even though {} is greater than zero.", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - cNumericFieldNames(3))); + std::format("{}{}=\"{}\" {} not found even though {} is greater than zero.", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + cNumericFieldNames(3))); ShowContinueError(state, " The medium temperature suction piping heat gain will not be calculated unless a Zone is defined to " "determine the environmental temperature surrounding the piping."); } else if (lNumericBlanks(3) && !lAlphaBlanks(AlphaNum)) { ShowWarningError( state, - EnergyPlus::format("{}{}=\"{}\" {} will not be used and suction piping heat gain will not be calculated because {} was blank.", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - cNumericFieldNames(3))); + std::format("{}{}=\"{}\" {} will not be used and suction piping heat gain will not be calculated because {} was blank.", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + cNumericFieldNames(3))); } // Medium temperature suction piping heat gains AlphaNum = 10; // Low temperature suction piping @@ -6941,15 +6915,14 @@ void GetRefrigerationInput(EnergyPlusData &state) TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumLT = DataZoneEquipment::GetSystemNodeNumberForZone(state, TransSystem(TransRefrigSysNum).SuctionPipeActualZoneNumLT); if (TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumLT == 0) { - ShowSevereError( - state, - EnergyPlus::format(R"({}{}="{}", System Node Number not found for {} = "{}" even though {} is greater than zero.)", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - Alphas(AlphaNum), - cNumericFieldNames(4))); + ShowSevereError(state, + std::format(R"({}{}="{}", System Node Number not found for {} = "{}" even though {} is greater than zero.)", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + Alphas(AlphaNum), + cNumericFieldNames(4))); ShowContinueError(state, " The low temperature suction piping heat gain cannot be calculated unless a Zone is defined to " "determine the environmental temperature surrounding the piping."); @@ -6959,24 +6932,24 @@ void GetRefrigerationInput(EnergyPlusData &state) } } else if (!lNumericBlanks(4) && lAlphaBlanks(AlphaNum)) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\" {} not found even though {} is greater than zero.", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - cNumericFieldNames(4))); + std::format("{}{}=\"{}\" {} not found even though {} is greater than zero.", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + cNumericFieldNames(4))); ShowContinueError(state, " The low temperature suction piping heat gain will not be calculated unless a Zone is defined to determine " "the environmental temperature surrounding the piping."); } else if (lNumericBlanks(4) && !lAlphaBlanks(AlphaNum)) { ShowWarningError( state, - EnergyPlus::format("{}{}=\"{}\" {} will not be used and suction piping heat gain will not be calculated because {} was blank.", - RoutineName, - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name, - cAlphaFieldNames(AlphaNum), - cNumericFieldNames(4))); + std::format("{}{}=\"{}\" {} will not be used and suction piping heat gain will not be calculated because {} was blank.", + RoutineName, + CurrentModuleObject, + TransSystem(TransRefrigSysNum).Name, + cAlphaFieldNames(AlphaNum), + cNumericFieldNames(4))); } // Low temperature suction piping heat gains AlphaNum = 11; @@ -6989,10 +6962,9 @@ void GetRefrigerationInput(EnergyPlusData &state) Real64 NominalCondCap = GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(1)).RatedCapacity; Real64 NominalTotalCompCap = NominalTotalCompCapHP + NominalTotalCompCapLP; if ((NominalTotalCompCap < (0.7 * NominalTotalCoolingCap)) || (NominalCondCap < (1.3 * NominalTotalCoolingCap))) { - ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", You may wish to check the system sizing.", - CurrentModuleObject, - TransSystem(TransRefrigSysNum).Name)); + ShowWarningError( + state, + std::format("{}=\"{}\", You may wish to check the system sizing.", CurrentModuleObject, TransSystem(TransRefrigSysNum).Name)); ShowContinueError( state, EnergyPlus::format( @@ -7028,11 +7000,11 @@ void GetRefrigerationInput(EnergyPlusData &state) TempRAFraction -= RefrigCase(CaseNum).RAFrac; } // NumSimulationCases if (TempRAFraction > 1.0) { - ShowSevereError(state, - EnergyPlus::format( - "{}: Refrigeration:Case, Refrigerated case return air fraction for all cases in zone=\"{}\" is greater than 1.0.", - RoutineName, - CaseRAFraction(ZoneIndex).ZoneName)); + ShowSevereError( + state, + std::format("{}: Refrigeration:Case, Refrigerated case return air fraction for all cases in zone=\"{}\" is greater than 1.0.", + RoutineName, + CaseRAFraction(ZoneIndex).ZoneName)); // check in comment, can't use "currentModuleObject" because not in get input subroutine where that is known ErrorsFound = true; } @@ -7051,14 +7023,14 @@ void GetRefrigerationInput(EnergyPlusData &state) ++state.dataRefrigCase->NumUnusedRefrigCases; if (state.dataGlobal->DisplayExtraWarnings) { // individual case names listed if DataGlobals::DisplayExtraWarnings option selected - ShowWarningError(state, EnergyPlus::format("{}: Refrigeration:Case=\"{}\" unused. ", RoutineName, RefrigCase(CaseNum).Name)); + ShowWarningError(state, std::format("{}: Refrigeration:Case=\"{}\" unused. ", RoutineName, RefrigCase(CaseNum).Name)); } // display extra warnings - give a list of unused cases } // unused case if (RefrigCase(CaseNum).NumSysAttach > 1) { ErrorsFound = true; - ShowSevereError(state, - EnergyPlus::format( - "{}: Refrigeration:Case=\"{}\", Same refrigerated case name referenced ", RoutineName, RefrigCase(CaseNum).Name)); + ShowSevereError( + state, + std::format("{}: Refrigeration:Case=\"{}\", Same refrigerated case name referenced ", RoutineName, RefrigCase(CaseNum).Name)); ShowContinueError(state, " by more than one refrigeration system and/or compressor rack."); } // if looking for same case attached to multiple systems/racks } // NumSimulationCases @@ -7067,8 +7039,8 @@ void GetRefrigerationInput(EnergyPlusData &state) // write to error file, // summary number of unused cases given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(state, - EnergyPlus::format("Refrigeration:Case -> {} unused refrigerated case(s) found during input processing.", - state.dataRefrigCase->NumUnusedRefrigCases)); + std::format("Refrigeration:Case -> {} unused refrigerated case(s) found during input processing.", + state.dataRefrigCase->NumUnusedRefrigCases)); ShowContinueError(state, " These refrigerated cases are in the input file but are not connected to a "); ShowContinueError(state, " Refrigeration:CompressorRack, Refrigeration:System, or Refrigeration:SecondarySystem object."); ShowContinueError(state, " These unused refrigeration cases will not be simulated."); @@ -7088,16 +7060,15 @@ void GetRefrigerationInput(EnergyPlusData &state) ++state.dataRefrigCase->NumUnusedCompressors; if (state.dataGlobal->DisplayExtraWarnings) { // individual compressor names listed if DataGlobals::DisplayExtraWarnings option selected - ShowWarningError(state, - EnergyPlus::format("{}: Refrigeration:Compressor=\"{}\" unused. ", RoutineName, Compressor(CompNum).Name)); + ShowWarningError(state, std::format("{}: Refrigeration:Compressor=\"{}\" unused. ", RoutineName, Compressor(CompNum).Name)); } // display extra warnings - give a list of unused compressors } // unused compressor if (Compressor(CompNum).NumSysAttach > 1) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}: Refrigeration:Compressor=\"{}\", Same refrigeration compressor name referenced", - RoutineName, - Compressor(CompNum).Name)); + std::format("{}: Refrigeration:Compressor=\"{}\", Same refrigeration compressor name referenced", + RoutineName, + Compressor(CompNum).Name)); ShowContinueError(state, " by more than one refrigeration system."); } // looking for same compressor attached to multiple systems/racks } // NumSimulationCompressors @@ -7106,8 +7077,8 @@ void GetRefrigerationInput(EnergyPlusData &state) // write to error file, // summary number of unused compressors given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(state, - EnergyPlus::format("Refrigeration:Compressor -> {} unused refrigeration compressor(s) found during input processing.", - state.dataRefrigCase->NumUnusedCompressors)); + std::format("Refrigeration:Compressor -> {} unused refrigeration compressor(s) found during input processing.", + state.dataRefrigCase->NumUnusedCompressors)); ShowContinueError(state, " Those refrigeration compressors are in the input file but are not connected to a Refrigeration:System object."); ShowContinueError(state, " These unused refrigeration compressors will not be simulated."); @@ -7127,15 +7098,14 @@ void GetRefrigerationInput(EnergyPlusData &state) ++NumUnusedWalkIns; if (state.dataGlobal->DisplayExtraWarnings) { // individual walkin names listed if DataGlobals::DisplayExtraWarnings option selected - ShowWarningError(state, EnergyPlus::format("{}: Refrigeration:WalkIn=\"{}\" unused. ", RoutineName, WalkIn(WalkInNum).Name)); + ShowWarningError(state, std::format("{}: Refrigeration:WalkIn=\"{}\" unused. ", RoutineName, WalkIn(WalkInNum).Name)); } // display extra warnings - give a list of unused WalkIns } // unused walkin if (WalkIn(WalkInNum).NumSysAttach > 1) { ErrorsFound = true; - ShowSevereError(state, - EnergyPlus::format("{}: Refrigeration:WalkIn=\"{}\", Same Refrigeration WalkIn name referenced", - RoutineName, - WalkIn(WalkInNum).Name)); + ShowSevereError( + state, + std::format("{}: Refrigeration:WalkIn=\"{}\", Same Refrigeration WalkIn name referenced", RoutineName, WalkIn(WalkInNum).Name)); ShowContinueError(state, " by more than one refrigeration system and/or compressor rack."); } // if looking for same walk in attached to multiple systems/racks } // NumSimulationWalkIns @@ -7144,9 +7114,9 @@ void GetRefrigerationInput(EnergyPlusData &state) // write to error file, // summary number of unused walkins given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(state, - EnergyPlus::format("{}Refrigeration:WalkIn -> {} unused refrigeration WalkIns found during input processing.", - RoutineName, - NumUnusedWalkIns)); + std::format("{}Refrigeration:WalkIn -> {} unused refrigeration WalkIns found during input processing.", + RoutineName, + NumUnusedWalkIns)); ShowContinueError(state, " Those refrigeration WalkIns are in the input file but are not connected to a "); ShowContinueError(state, " Refrigeration:CompressorRack, Refrigeration:System or Refrigeration:SecondarySystem object."); ShowContinueError(state, " These unused refrigeration WalkIns will not be simulated."); @@ -7166,16 +7136,15 @@ void GetRefrigerationInput(EnergyPlusData &state) ++NumUnusedWalkIns; if (state.dataGlobal->DisplayExtraWarnings) { // individual walkin names listed if DataGlobals::DisplayExtraWarnings option selected - ShowWarningError(state, - EnergyPlus::format("{}: Refrigeration:AirChiller=\"{}\" unused. ", RoutineName, WarehouseCoil(CoilNum).Name)); + ShowWarningError(state, std::format("{}: Refrigeration:AirChiller=\"{}\" unused. ", RoutineName, WarehouseCoil(CoilNum).Name)); } // display extra warnings - give a list of unused chillers } // unused chiller if (WarehouseCoil(CoilNum).NumSysAttach > 1) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}: Refrigeration:AirChiller=\"{}\", Same Refrigeration Air Chiller name referenced", - RoutineName, - WarehouseCoil(CoilNum).Name)); + std::format("{}: Refrigeration:AirChiller=\"{}\", Same Refrigeration Air Chiller name referenced", + RoutineName, + WarehouseCoil(CoilNum).Name)); ShowContinueError(state, " by more than one refrigeration system and/or compressor rack."); } // if looking for same walk in attached to multiple systems/racks } // NumSimulationRefrigAirchillers @@ -7184,9 +7153,9 @@ void GetRefrigerationInput(EnergyPlusData &state) // write to error file, // summary number of unused air chillers given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(state, - EnergyPlus::format("{}Refrigeration:AirChiller -> {} unused refrigeration air chillers found during input processing.", - RoutineName, - state.dataRefrigCase->NumUnusedCoils)); + std::format("{}Refrigeration:AirChiller -> {} unused refrigeration air chillers found during input processing.", + RoutineName, + state.dataRefrigCase->NumUnusedCoils)); ShowContinueError(state, " Those refrigeration air chillers are in the input file but are not connected to a "); ShowContinueError(state, " Refrigeration:CompressorRack, Refrigeration:System or Refrigeration:SecondarySystem object."); ShowContinueError(state, " These unused refrigeration air chillers will not be simulated."); @@ -7206,16 +7175,15 @@ void GetRefrigerationInput(EnergyPlusData &state) ++state.dataRefrigCase->NumUnusedSecondarys; if (state.dataGlobal->DisplayExtraWarnings) { // individual secondary names listed if DataGlobals::DisplayExtraWarnings option selected - ShowWarningError(state, - EnergyPlus::format("{}: Refrigeration:Secondary=\"{}\" unused. ", RoutineName, Secondary(SecondaryNum).Name)); + ShowWarningError(state, std::format("{}: Refrigeration:Secondary=\"{}\" unused. ", RoutineName, Secondary(SecondaryNum).Name)); } // display extra warnings - give a list of unused Secondaries } // unused secondary if (Secondary(SecondaryNum).NumSysAttach > 1) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}: Refrigeration:Secondary=\"{}\", Same Refrigeration Secondary name referenced", - RoutineName, - Secondary(SecondaryNum).Name)); + std::format("{}: Refrigeration:Secondary=\"{}\", Same Refrigeration Secondary name referenced", + RoutineName, + Secondary(SecondaryNum).Name)); ShowContinueError(state, " by more than one refrigeration system"); } // looking for same secondary loop attached to multiple systems/racks } // NumSimulationSecondarys @@ -7224,9 +7192,9 @@ void GetRefrigerationInput(EnergyPlusData &state) // write to error file, // summary number of unused secondaries given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(state, - EnergyPlus::format("{}Refrigeration:Secondary -> {} unused refrigeration Secondary Loops found during input processing.", - RoutineName, - state.dataRefrigCase->NumUnusedSecondarys)); + std::format("{}Refrigeration:Secondary -> {} unused refrigeration Secondary Loops found during input processing.", + RoutineName, + state.dataRefrigCase->NumUnusedSecondarys)); ShowContinueError(state, " Those refrigeration Secondary Loops are in the input file but are not connected to a refrigeration system."); ShowContinueError(state, " These unused refrigeration secondaries will not be simulated."); ShowContinueError(state, " Use Output:Diagnostics,DisplayUnusedObjects; to see them. "); @@ -7247,7 +7215,7 @@ void GetRefrigerationInput(EnergyPlusData &state) ++state.dataRefrigCase->NumUnusedCondensers; if (state.dataGlobal->DisplayExtraWarnings) { // individual condenser names listed if DataGlobals::DisplayExtraWarnings option selected - ShowWarningError(state, EnergyPlus::format("{}: Refrigeration:Condenser=\"{}\" unused. ", RoutineName, Condenser(CondNum).Name)); + ShowWarningError(state, std::format("{}: Refrigeration:Condenser=\"{}\" unused. ", RoutineName, Condenser(CondNum).Name)); } // display extra warnings - give a list of unused condensers } // unused condenser if (Condenser(CondNum).NumSysAttach > 1) { @@ -7259,9 +7227,9 @@ void GetRefrigerationInput(EnergyPlusData &state) // write to error file, // summary number of unused condensers given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(state, - EnergyPlus::format("{}Refrigeration condenser -> {} unused refrigeration condensers found during input processing.", - RoutineName, - state.dataRefrigCase->NumUnusedCondensers)); + std::format("{}Refrigeration condenser -> {} unused refrigeration condensers found during input processing.", + RoutineName, + state.dataRefrigCase->NumUnusedCondensers)); ShowContinueError(state, " Those refrigeration condensers are in the input file but are not connected to a refrigeration system."); ShowContinueError(state, " These unused refrigeration condensers will not be simulated."); ShowContinueError(state, " Use Output:Diagnostics,DisplayUnusedObjects; to see them. "); @@ -7280,7 +7248,7 @@ void GetRefrigerationInput(EnergyPlusData &state) ++state.dataRefrigCase->NumUnusedGasCoolers; if (state.dataGlobal->DisplayExtraWarnings) { // individual gas cooler names listed if DataGlobals::DisplayExtraWarnings option selected - ShowWarningError(state, EnergyPlus::format("{}: Refrigeration:GasCooler=\"{}\" unused. ", RoutineName, GasCooler(GCNum).Name)); + ShowWarningError(state, std::format("{}: Refrigeration:GasCooler=\"{}\" unused. ", RoutineName, GasCooler(GCNum).Name)); } // display extra warnings - give a list of unused gas coolers } // unused gas cooler if (GasCooler(GCNum).NumSysAttach > 1) { @@ -7292,9 +7260,9 @@ void GetRefrigerationInput(EnergyPlusData &state) // write to error file, // summary number of unused gas coolers given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(state, - EnergyPlus::format("{}Refrigeration gas cooler -> {} unused refrigeration gas cooler(s) found during input processing.", - RoutineName, - state.dataRefrigCase->NumUnusedGasCoolers)); + std::format("{}Refrigeration gas cooler -> {} unused refrigeration gas cooler(s) found during input processing.", + RoutineName, + state.dataRefrigCase->NumUnusedGasCoolers)); ShowContinueError(state, " These refrigeration gas coolers are in the input file but are not connected to a refrigeration system."); ShowContinueError(state, " These unused refrigeration gas coolers will not be simulated."); ShowContinueError(state, " Use Output:Diagnostics,DisplayUnusedObjects; to see them. "); @@ -7305,7 +7273,7 @@ void GetRefrigerationInput(EnergyPlusData &state) ReportRefrigerationComponents(state); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{} Previous errors cause program termination", RoutineName)); + ShowFatalError(state, std::format("{} Previous errors cause program termination", RoutineName)); } } @@ -10819,7 +10787,7 @@ void RefrigRackData::CalcRackSystem(EnergyPlusData &state) EffectTemp = state.dataLoopNodes->Node(this->InletNode).Temp + 5.0; // includes approach temp if (this->InletTemp < this->InletTempMin) { if (this->LowTempWarnIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("Refrigeration:CompressorRack: {}", this->Name)); + ShowWarningMessage(state, std::format("Refrigeration:CompressorRack: {}", this->Name)); ShowContinueError(state, "Water-cooled condenser inlet temp lower than minimum allowed temp. Check returning water temperature " "and/or minimum temperature setpoints."); @@ -10842,7 +10810,7 @@ void RefrigRackData::CalcRackSystem(EnergyPlusData &state) state.dataRefrigCase->TotalCondenserHeat = state.dataRefrigCase->TotalCompressorPower + state.dataRefrigCase->TotalRackDeliveredCapacity; } else { if (this->ShowCOPWarning) { - ShowWarningError(state, EnergyPlus::format("Refrigeration:CompressorRack: {}", this->Name)); + ShowWarningError(state, std::format("Refrigeration:CompressorRack: {}", this->Name)); ShowContinueError(state, " The calculated COP has a value of zero or is negative. Refer to Engineering Documentation for"); ShowContinueError(state, " further explanation of Compressor Rack COP as a Function of Temperature Curve."); this->ShowCOPWarning = false; @@ -10887,8 +10855,7 @@ void RefrigRackData::CalcRackSystem(EnergyPlusData &state) if (this->EvapFreezeWarnIndex == 0) { ShowWarningMessage( state, - EnergyPlus::format("Refrigeration Compressor Rack {} - Evap cooling of condenser underway with no basin heater power", - this->Name)); + std::format("Refrigeration Compressor Rack {} - Evap cooling of condenser underway with no basin heater power", this->Name)); ShowContinueError(state, "and condenser inlet air dry-bulb temp at or below the basin heater setpoint temperature."); ShowContinueErrorTimeStamp(state, "Continuing simulation."); } // EvapFreezeWarnIndex == 0 @@ -11410,7 +11377,7 @@ void RefrigCaseData::CalculateCase(EnergyPlusData &state) // Absolute pointer to if (this->StoredEnergy > MyLargeNumber) { this->StoredEnergy = MyLargeNumber; if (this->ShowStoreEnergyWarning) { - ShowWarningError(state, EnergyPlus::format("Refrigeration:Case: {}", this->Name)); + ShowWarningError(state, std::format("Refrigeration:Case: {}", this->Name)); if (this->StockingEnergy >= this->DefrostEnergy) { if (this->StockingEnergy >= this->WarmEnvEnergy) { ShowContinueError(state, " This case has insufficient capacity to meet excess energy associated with stocking."); @@ -11443,7 +11410,7 @@ void RefrigCaseData::CalculateCase(EnergyPlusData &state) // Absolute pointer to if (this->KgFrost > MyLargeNumber) { this->KgFrost = MyLargeNumber; if (this->ShowFrostWarning) { - ShowWarningError(state, EnergyPlus::format("Refrigeration:Case: {}", this->Name)); + ShowWarningError(state, std::format("Refrigeration:Case: {}", this->Name)); ShowContinueError(state, " This case has insufficient defrost capacity to remove the excess frost accumulation."); ShowContinueError(state, " Refer to documentation for further explanation of product stocking requirements and"); ShowContinueError(state, " recommendations regarding Total Cooling Capacity, Sensible Heat Ratio, and Latent Heat Ratio."); @@ -11466,7 +11433,7 @@ PlantComponent *RefrigCondenserData::factory(EnergyPlusData &state, std::string } } // If we didn't find it, fatal - ShowFatalError(state, EnergyPlus::format("LocalRefrigCondenserFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, std::format("LocalRefrigCondenserFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -11535,10 +11502,9 @@ void RefrigCondenserData::simulate(EnergyPlusData &state, if (this->OutletTemp == this->InletTemp) { if (this->HighInletWarnIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("{}, \"{}\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. ", - ErrIntro, - this->Name)); + ShowSevereError( + state, + std::format("{}, \"{}\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. ", ErrIntro, this->Name)); ShowContinueError(state, "cooling water is not cold enough to reach desired outlet temperature"); } ShowRecurringWarningErrorAtEnd(state, @@ -11552,7 +11518,7 @@ void RefrigCondenserData::simulate(EnergyPlusData &state, // Check for maximum flow in the component if (this->MassFlowRate > this->MassFlowRateMax) { if (this->HighFlowWarnIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{}{}", TypeName, this->Name)); + ShowWarningMessage(state, std::format("{}{}", TypeName, this->Name)); ShowContinueError(state, "Requested condenser water mass flow rate greater than maximum allowed value. "); ShowContinueError(state, "Flow reset to maximum value."); } // HighFlowWarnIndex @@ -11593,7 +11559,7 @@ void RefrigCondenserData::simulate(EnergyPlusData &state, // Check outlet water temp for max value if (this->OutletTemp > this->OutletTempMax) { if (this->HighTempWarnIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{}{}", TypeName, this->Name)); + ShowWarningMessage(state, std::format("{}{}", TypeName, this->Name)); ShowContinueError(state, "Water-cooled condenser outlet temp higher than maximum allowed temp. Check flow rates and/or temperature setpoints."); } @@ -11618,7 +11584,7 @@ PlantComponent *RefrigRackData::factory(EnergyPlusData &state, std::string const } } // If we didn't find it, fatal - ShowFatalError(state, EnergyPlus::format("LocalRefrigRackFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE + ShowFatalError(state, std::format("LocalRefrigRackFactory: Error getting inputs for object named: {}", objectName)); // LCOV_EXCL_LINE // Shut up the compiler return nullptr; // LCOV_EXCL_LINE } @@ -11687,10 +11653,9 @@ void RefrigRackData::simulate(EnergyPlusData &state, if (this->OutletTemp == this->InletTemp) { if (this->HighInletWarnIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("{}, \"{}\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. ", - ErrIntro, - this->Name)); + ShowSevereError( + state, + std::format("{}, \"{}\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. ", ErrIntro, this->Name)); ShowContinueError(state, "cooling water is not cold enough to reach desired outlet temperature"); } ShowRecurringWarningErrorAtEnd(state, @@ -11704,7 +11669,7 @@ void RefrigRackData::simulate(EnergyPlusData &state, // Check for maximum flow in the component if (this->MassFlowRate > this->MassFlowRateMax) { if (this->HighFlowWarnIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{}{}", TypeName, this->Name)); + ShowWarningMessage(state, std::format("{}{}", TypeName, this->Name)); ShowContinueError(state, "Requested condenser water mass flow rate greater than maximum allowed value. "); ShowContinueError(state, "Flow reset to maximum value."); } // HighFlowWarnIndex @@ -11745,7 +11710,7 @@ void RefrigRackData::simulate(EnergyPlusData &state, // Check outlet water temp for max value if (this->OutletTemp > this->OutletTempMax) { if (this->HighTempWarnIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{}{}", TypeName, this->Name)); + ShowWarningMessage(state, std::format("{}{}", TypeName, this->Name)); ShowContinueError(state, "Water-cooled condenser outlet temp higher than maximum allowed temp. Check flow rates and/or temperature setpoints."); } @@ -12015,9 +11980,9 @@ void SimulateDetailedRefrigerationSystems(EnergyPlusData &state) // subcooler should not drive Tevap for supplying system, // but check to see if T controlled can be met or if Tevap is at a higher temperature if (Subcooler(SubcoolID).MechControlTliqOut < thisSys.TEvapNeeded) { - ShowWarningError(state, EnergyPlus::format("Refrigeration:System: {}", thisSys.Name)); + ShowWarningError(state, std::format("Refrigeration:System: {}", thisSys.Name)); ShowContinueError(state, " Evaporating temperature greater than the controlled "); - ShowContinueError(state, EnergyPlus::format(" liquid outlet temperature for SUBCOOLER:{}", Subcooler(SubcoolID).Name)); + ShowContinueError(state, std::format(" liquid outlet temperature for SUBCOOLER:{}", Subcooler(SubcoolID).Name)); } } // SubcoolId @@ -12117,7 +12082,7 @@ void SimulateDetailedRefrigerationSystems(EnergyPlusData &state) thisSys.TEvapNeeded = thisSys.TEvapDesign; } else { // calculate floating T evap thisSys.TEvapNeeded = thisSys.TEvapDesign; - ShowWarningError(state, EnergyPlus::format("Refrigeration:System: {}", thisSys.Name)); + ShowWarningError(state, std::format("Refrigeration:System: {}", thisSys.Name)); ShowContinueError(state, " Floating evaporator temperature model not yet available for warehouse coil systems. "); } // floating or constant evap temperature // increment TotalCoolingLoad for Compressors/condenser on each system @@ -12170,7 +12135,7 @@ void SimulateDetailedRefrigerationSystems(EnergyPlusData &state) if (thisSys.UnmetEnergy > MyLargeNumber) { thisSys.UnmetEnergy = MyLargeNumber; if (state.dataRefrigCase->ShowUnmetEnergyWarning(SysNum)) { - ShowWarningError(state, EnergyPlus::format("Refrigeration:System: {}", thisSys.Name)); + ShowWarningError(state, std::format("Refrigeration:System: {}", thisSys.Name)); ShowContinueError(state, " The specified compressors for this system are unable to meet "); ShowContinueError(state, " the sum of the refrigerated case loads and subcooler loads (if any) for this system."); state.dataRefrigCase->ShowUnmetEnergyWarning(SysNum) = false; @@ -12179,7 +12144,7 @@ void SimulateDetailedRefrigerationSystems(EnergyPlusData &state) if (thisSys.UnmetHiStageEnergy > MyLargeNumber) { thisSys.UnmetHiStageEnergy = MyLargeNumber; if (state.dataRefrigCase->ShowHiStageUnmetEnergyWarning(SysNum)) { - ShowWarningError(state, EnergyPlus::format("Refrigeration:System: {}", thisSys.Name)); + ShowWarningError(state, std::format("Refrigeration:System: {}", thisSys.Name)); ShowContinueError(state, " The specified high-stage compressors for this system are unable to meet "); ShowContinueError(state, " the sum of the refrigerated case loads, subcooler loads (if any) and "); ShowContinueError(state, " low-stage compressor loads for this system."); @@ -12423,7 +12388,7 @@ void SimulateDetailedTransRefrigSystems(EnergyPlusData &state) if (sys.UnmetEnergy > MyLargeNumber) { sys.UnmetEnergy = MyLargeNumber; if (state.dataRefrigCase->ShowUnmetEnergyWarningTrans(SysNum)) { - ShowWarningError(state, EnergyPlus::format("Refrigeration:TranscriticalSystem: {}", sys.Name)); + ShowWarningError(state, std::format("Refrigeration:TranscriticalSystem: {}", sys.Name)); ShowContinueError(state, " The specified compressors for this system are unable to meet "); ShowContinueError(state, " the sum of the refrigerated case loads and subcooler loads (if any) for this system."); state.dataRefrigCase->ShowUnmetEnergyWarningTrans(SysNum) = false; @@ -12515,7 +12480,7 @@ void RefrigSystemData::CalcDetailedSystem(EnergyPlusData &state, int const SysNu } // Previously did error check on calculated Tcondense, but not sensitive enough if ((this->RefMassFlowtoLoads == 0.0) || (MassFlowCompsStart == 0.0)) { //.OR. (MassFlowCasesStart == 0.0) - ShowWarningError(state, EnergyPlus::format("Refrigeration:System: {} showing zero refrigeration flow.", this->Name)); + ShowWarningError(state, std::format("Refrigeration:System: {} showing zero refrigeration flow.", this->Name)); } else { ErrorMassFlowComps = std::abs(MassFlowCompsStart - this->RefMassFlowComps) / MassFlowCompsStart; if (this->NumStages == 2) { // Two-stage systems @@ -12573,9 +12538,8 @@ void TransRefrigSystemData::CalcDetailedTransSystem(EnergyPlusData &state, int c continue; } if ((this->RefMassFlowReceiverBypass == 0.0) || (MassFlowStart == 0.0)) { - ShowSevereError( - state, - EnergyPlus::format("Refrigeration:TranscriticalSystem: {} showing zero refrigerant flow through receiver bypass.", this->Name)); + ShowSevereError(state, + std::format("Refrigeration:TranscriticalSystem: {} showing zero refrigerant flow through receiver bypass.", this->Name)); ShowContinueError(state, EnergyPlus::format("Receiver Bypass Flow = {:.6R}", this->RefMassFlowReceiverBypass)); ShowContinueError(state, "Check input file to ensure that refrigeration loads on this system are not zero."); } else { @@ -12769,7 +12733,7 @@ void RefrigSystemData::CalculateCondensers(EnergyPlusData &state, int const SysN this->TCondense = this->TCondenseMin; // condenser.LowTempWarn += 1; if (condenser.LowTempWarnIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("Refrigeration:Condenser:WaterCooled {}", condenser.Name)); + ShowWarningMessage(state, std::format("Refrigeration:Condenser:WaterCooled {}", condenser.Name)); ShowContinueError(state, "Water-cooled condenser inlet temp lower than minimum allowed temp. Check returning water temperature and/or " "minimum temperature setpoints relative to minimum allowed condensing temperature."); @@ -12952,10 +12916,9 @@ void RefrigSystemData::CalculateCondensers(EnergyPlusData &state, int const SysN if (state.dataRefrigCase->TotalBasinHeatPower == 0.0) { // condenser.EvapFreezeWarn = condenser.EvapFreezeWarn + 1; if (condenser.EvapFreezeWarnIndex == 0) { - ShowWarningMessage( - state, - EnergyPlus::format("Refrigeration Condenser {} - Evap cooling of condenser underway with no basin heater power", - condenser.Name)); + ShowWarningMessage(state, + std::format("Refrigeration Condenser {} - Evap cooling of condenser underway with no basin heater power", + condenser.Name)); ShowContinueError(state, "and condenser inlet air dry-bulb temp at or below the basin heater setpoint temperature."); ShowContinueErrorTimeStamp(state, "Continuing simulation."); } @@ -15184,13 +15147,13 @@ void WalkInData::CalculateWalkIn(EnergyPlusData &state) // Absolute pointer to if (this->StoredEnergy > MyLargeNumber) { this->StoredEnergy = MyLargeNumber; if (this->ShowUnmetWIEnergyWarning) { - ShowWarningError(state, EnergyPlus::format("Refrigeration:WalkIn: {}", this->Name)); + ShowWarningError(state, std::format("Refrigeration:WalkIn: {}", this->Name)); ShowContinueError(state, " This walk-in cooler has insufficient capacity to meet the loads"); ShowContinueError(state, - EnergyPlus::format("... Occurrence info = {}, {} {}", - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state))); + std::format("... Occurrence info = {}, {} {}", + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state))); ShowContinueError(state, " Refer to documentation for further explanation of Total Cooling Capacity."); this->ShowUnmetWIEnergyWarning = false; } // ShowStoreEnergyWarning @@ -15198,14 +15161,14 @@ void WalkInData::CalculateWalkIn(EnergyPlusData &state) // Absolute pointer to if (this->KgFrost > MyLargeNumber) { this->KgFrost = MyLargeNumber; if (this->ShowWIFrostWarning) { - ShowWarningError(state, EnergyPlus::format("Refrigeration:WalkIn: {}", this->Name)); + ShowWarningError(state, std::format("Refrigeration:WalkIn: {}", this->Name)); ShowContinueError(state, " This walkin cooler has insufficient defrost capacity to remove the excess frost accumulation."); ShowContinueError(state, " Check the defrost schedule or defrost capacity. "); ShowContinueError(state, - EnergyPlus::format("... Occurrence info = {}, {} {}", - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state))); + std::format("... Occurrence info = {}, {} {}", + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state))); this->ShowWIFrostWarning = false; } } @@ -15454,7 +15417,7 @@ void SecondaryLoopData::CalculateSecondary(EnergyPlusData &state, int const Seco if (this->UnmetEnergy > MyLargeNumber) { this->UnmetEnergy = MyLargeNumber; if (state.dataRefrigCase->ShowUnmetSecondEnergyWarning(SecondaryNum)) { - ShowWarningError(state, EnergyPlus::format("Secondary Refrigeration Loop: {}", this->Name)); + ShowWarningError(state, std::format("Secondary Refrigeration Loop: {}", this->Name)); ShowContinueError(state, " This secondary system has insufficient capacity to meet the refrigeration loads."); state.dataRefrigCase->ShowUnmetSecondEnergyWarning(SecondaryNum) = false; } @@ -15622,26 +15585,25 @@ void SimAirChillerSet(EnergyPlusData &state, if (AirChillerSetPtr == 0) { ChillerSetID = Util::FindItemInList(AirChillerSetName, AirChillerSet); if (ChillerSetID == 0) { - ShowFatalError(state, EnergyPlus::format("SimAirChillerSet: Unit not found={}", AirChillerSetName)); + ShowFatalError(state, std::format("SimAirChillerSet: Unit not found={}", AirChillerSetName)); } // chillersetid ==0 because not in list AirChillerSetPtr = ChillerSetID; } else { // airchllersetpointer passed in call to subroutine not ==0 ChillerSetID = AirChillerSetPtr; if (ChillerSetID > state.dataRefrigCase->NumRefrigChillerSets || ChillerSetID < 1) { ShowFatalError(state, - EnergyPlus::format("SimAirChillerSet: Invalid AirChillerSetPtr passed={}, Number of Units={}, Entered Unit name={}", - ChillerSetID, - state.dataRefrigCase->NumRefrigChillerSets, - AirChillerSetName)); + std::format("SimAirChillerSet: Invalid AirChillerSetPtr passed={}, Number of Units={}, Entered Unit name={}", + ChillerSetID, + state.dataRefrigCase->NumRefrigChillerSets, + AirChillerSetName)); } // ChillerSetID makes no sense if (state.dataRefrigCase->CheckChillerSetName(ChillerSetID)) { if (AirChillerSetName != AirChillerSet(ChillerSetID).Name) { - ShowFatalError( - state, - EnergyPlus::format("SimAirChillerSet: Invalid AirChillerSetPtr passed={}, Unit name={}, stored Unit Name for that index={}", - ChillerSetID, - AirChillerSetName, - AirChillerSet(ChillerSetID).Name)); + ShowFatalError(state, + std::format("SimAirChillerSet: Invalid AirChillerSetPtr passed={}, Unit name={}, stored Unit Name for that index={}", + ChillerSetID, + AirChillerSetName, + AirChillerSet(ChillerSetID).Name)); } // name not equal correct name state.dataRefrigCase->CheckChillerSetName(ChillerSetID) = false; } // CheckChillerSetName logical test @@ -15959,7 +15921,7 @@ void WarehouseCoilData::CalculateCoil(EnergyPlusData &state, Real64 const QZnReq Real64 ExitTemperatureEstimate = CoilInletTemp - (SensibleCapacityMax / (DryAirMassFlowMax * CoilInletDryAirCp)); // Estimated Air temperature leaving the coil (C) if (ExitTemperatureEstimate <= TEvap) { - ShowWarningError(state, EnergyPlus::format("{}Refrigeration:AirCoil: {}", TrackMessage, this->Name)); + ShowWarningError(state, std::format("{}Refrigeration:AirCoil: {}", TrackMessage, this->Name)); ShowContinueError(state, " The estimated air outlet temperature is less than the evaporating temperature."); } Real64 ExitEnthalpyEstimate = Psychrometrics::PsyHFnTdbRhPb(state, @@ -16251,7 +16213,7 @@ void WarehouseCoilData::CalculateCoil(EnergyPlusData &state, Real64 const QZnReq if (this->KgFrost > MyLargeNumber) { this->KgFrost = MyLargeNumber; if (this->ShowCoilFrostWarning) { - ShowWarningError(state, EnergyPlus::format("Refrigeration:AirCoil: {}", this->Name)); + ShowWarningError(state, std::format("Refrigeration:AirCoil: {}", this->Name)); ShowContinueError(state, " This refrigerated air coil has insufficient defrost capacity to remove the excess frost accumulation."); ShowContinueError(state, " Check the defrost schedule or defrost capacity. "); ShowContinueErrorTimeStamp(state, "... Occurrence info"); diff --git a/src/EnergyPlus/ReportCoilSelection.cc b/src/EnergyPlus/ReportCoilSelection.cc index 56430465188..895cccadb95 100644 --- a/src/EnergyPlus/ReportCoilSelection.cc +++ b/src/EnergyPlus/ReportCoilSelection.cc @@ -1175,10 +1175,10 @@ namespace ReportCoilSelection { std::string PeakHrMinString(EnergyPlusData &state, const int designDay, const int timeStepAtPeak) { - return fmt::format("{}/{} {}", - state.dataWeather->DesDayInput(designDay).Month, - state.dataWeather->DesDayInput(designDay).DayOfMonth, - getTimeText(state, timeStepAtPeak)); + return EnergyPlus::format("{}/{} {}", + state.dataWeather->DesDayInput(designDay).Month, + state.dataWeather->DesDayInput(designDay).DayOfMonth, + getTimeText(state, timeStepAtPeak)); } void setCoilCoolingCapacity(EnergyPlusData &state, @@ -2005,7 +2005,7 @@ namespace ReportCoilSelection { hourPrint = hourCounter - 1; } if (timeStepIndex == timeStepAtPeak) { - returnString = format(DataSizing::PeakHrMinFmt, hourPrint, minutes); + returnString = EnergyPlus::format(DataSizing::PeakHrMinFmt, hourPrint, minutes); } } } diff --git a/src/EnergyPlus/ResultsFramework.cc b/src/EnergyPlus/ResultsFramework.cc index 86cec3461e8..3bca7f5c089 100644 --- a/src/EnergyPlus/ResultsFramework.cc +++ b/src/EnergyPlus/ResultsFramework.cc @@ -54,15 +54,16 @@ #include #include -#include -#include - // ObjexxFCL Headers #include #include #include #include +// Third Party Headers +#include +#include + // EnergyPlus Headers #include #include @@ -375,9 +376,9 @@ namespace ResultsFramework { // fmt::format("YYYY-{:02d}/{:02d}T{:02d}:{:02d}:00", month, dayOfMonth, hourOfDay, curMin); // fmt::format("{:02d}/{:02d} {:02d}:{:02d}:00", month, dayOfMonth, hourOfDay, curMin); if (iso8601) { - TS.emplace_back(fmt::format("{:04d}-{:02d}-{:02d}T{:02d}:{:02d}:00", calendarYear, month, dayOfMonth, hourOfDay, curMin)); + TS.emplace_back(EnergyPlus::format("{:04d}-{:02d}-{:02d}T{:02d}:{:02d}:00", calendarYear, month, dayOfMonth, hourOfDay, curMin)); } else { - TS.emplace_back(fmt::format("{:02d}/{:02d} {:02d}:{:02d}:00", month, dayOfMonth, hourOfDay, curMin)); + TS.emplace_back(EnergyPlus::format("{:02d}/{:02d} {:02d}:{:02d}:00", month, dayOfMonth, hourOfDay, curMin)); } } @@ -728,16 +729,16 @@ namespace ResultsFramework { } auto const &columns = data.at("Cols"); for (auto const &column : columns) { - std::string search_string = - fmt::format("{0} [{1}]({2})", column.at("Variable").get(), column.at("Units").get(), reportFrequency); + std::string search_string = EnergyPlus::format( + "{0} [{1}]({2})", column.at("Variable").get(), column.at("Units").get(), reportFrequency); auto found = std::find(outputVariables.begin(), outputVariables.end(), search_string); if (found == outputVariables.end()) { - search_string = - fmt::format("{0} [{1}]({2})", column.at("Variable").get(), column.at("Units").get(), "Each Call"); + search_string = EnergyPlus::format( + "{0} [{1}]({2})", column.at("Variable").get(), column.at("Units").get(), "Each Call"); found = std::find(outputVariables.begin(), outputVariables.end(), search_string); } if (found == outputVariables.end()) { - ShowFatalError(state, fmt::format("Output variable ({0}) not found output variable list", search_string)); + ShowFatalError(state, EnergyPlus::format("Output variable ({0}) not found output variable list", search_string)); } outputVariableIndices[std::distance(outputVariables.begin(), found)] = true; indices.emplace_back(std::distance(outputVariables.begin(), found)); @@ -1181,12 +1182,12 @@ namespace ResultsFramework { std::string_view const units, OutputProcessor::ReportFreq const freq) { - outputVariables.emplace_back(fmt::format("{0}:{1} [{2}]({3})", keyedValue, variableName, units, reportFreqNames[(int)freq])); + outputVariables.emplace_back(EnergyPlus::format("{0}:{1} [{2}]({3})", keyedValue, variableName, units, reportFreqNames[(int)freq])); } void ResultsFramework::addReportMeter(std::string const &meter, std::string_view units, OutputProcessor::ReportFreq const freq) { - outputVariables.emplace_back(fmt::format("{0} [{1}]({2})", meter, units, reportFreqNames[(int)freq])); + outputVariables.emplace_back(EnergyPlus::format("{0} [{1}]({2})", meter, units, reportFreqNames[(int)freq])); } } // namespace ResultsFramework diff --git a/src/EnergyPlus/ReturnAirPathManager.cc b/src/EnergyPlus/ReturnAirPathManager.cc index 76da87e0c7e..0d6d89c69ef 100644 --- a/src/EnergyPlus/ReturnAirPathManager.cc +++ b/src/EnergyPlus/ReturnAirPathManager.cc @@ -49,8 +49,10 @@ #include #include -// EnergyPlus Headers +// Local Headers #include + +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/RoomAirModelAirflowNetwork.cc b/src/EnergyPlus/RoomAirModelAirflowNetwork.cc index 94303691921..3b441cd26d4 100644 --- a/src/EnergyPlus/RoomAirModelAirflowNetwork.cc +++ b/src/EnergyPlus/RoomAirModelAirflowNetwork.cc @@ -48,10 +48,11 @@ // ObjexxFCL Headers #include #include -// #include -// EnergyPlus Headers +// Local Headers #include + +// EnergyPlus Headers #include #include #include @@ -64,15 +65,12 @@ #include #include #include -#include #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/EnergyPlus/RoomAirModelManager.cc b/src/EnergyPlus/RoomAirModelManager.cc index 35a9f0688b5..5e49886c302 100644 --- a/src/EnergyPlus/RoomAirModelManager.cc +++ b/src/EnergyPlus/RoomAirModelManager.cc @@ -48,22 +48,23 @@ // C++ Headers #include #include +#include #include // ObjexxFCL Headers #include #include #include -// #include -// EnergyPlus Headers +// Local Headers #include + +// EnergyPlus Headers #include #include #include #include #include -#include #include #include #include @@ -73,7 +74,6 @@ #include #include #include -#include #include #include #include @@ -789,10 +789,9 @@ namespace RoomAir { // report warning error since surface names are specified correctly if ((NumSurfsInvolved) != SurfCount) { - ShowWarningError(state, - EnergyPlus::format("GetAirNodeData: Mundt Room Air Model: Some surface names specified for {} are not in {}", - airNode.Name, - zone.Name)); + ShowWarningError( + state, + std::format("GetAirNodeData: Mundt Room Air Model: Some surface names specified for {} are not in {}", airNode.Name, zone.Name)); } } // for (AirNodeNum) @@ -847,15 +846,14 @@ namespace RoomAir { cCurrentModuleObject = "RoomAirSettings:OneNodeDisplacementVentilation"; NumOfMundtContrl = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject); if (NumOfMundtContrl > state.dataGlobal->NumOfZones) { - ShowSevereError(state, EnergyPlus::format("Too many {} objects in input file", cCurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("There cannot be more {} objects than number of zones.", cCurrentModuleObject)); + ShowSevereError(state, std::format("Too many {} objects in input file", cCurrentModuleObject)); + ShowContinueError(state, std::format("There cannot be more {} objects than number of zones.", cCurrentModuleObject)); ErrorsFound = true; } if (NumOfMundtContrl == 0) { ShowWarningError( - state, - EnergyPlus::format("No {} objects found, program assumes no convection or infiltration gains near floors", cCurrentModuleObject)); + state, std::format("No {} objects found, program assumes no convection or infiltration gains near floors", cCurrentModuleObject)); return; } @@ -883,10 +881,10 @@ namespace RoomAir { continue; } if (state.dataRoomAir->AirModel(ZoneNum).AirModel != RoomAirModel::DispVent1Node) { - ShowSevereError( - state, EnergyPlus::format("Zone specified=\"{}\", Air Model type is not OneNodeDisplacementVentilation.", ipsc->cAlphaArgs(1))); - ShowContinueError( - state, EnergyPlus::format("Air Model Type for zone={}", roomAirModelNamesUC[(int)state.dataRoomAir->AirModel(ZoneNum).AirModel])); + ShowSevereError(state, + std::format("Zone specified=\"{}\", Air Model type is not OneNodeDisplacementVentilation.", ipsc->cAlphaArgs(1))); + ShowContinueError(state, + std::format("Air Model Type for zone={}", roomAirModelNamesUC[(int)state.dataRoomAir->AirModel(ZoneNum).AirModel])); ErrorsFound = true; continue; } @@ -1065,7 +1063,7 @@ namespace RoomAir { if (Util::FindItemInList( state.dataHeatBal->Zone(zoneCV.ZonePtr).Name, state.afn->MultizoneZoneData, &AirflowNetwork::MultizoneZoneProp::ZoneName) == 0) { - ShowSevereError(state, EnergyPlus::format("Problem with {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("Problem with {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, "AirflowNetwork airflow model must be active in this zone"); ErrorsFound = true; } @@ -1085,8 +1083,8 @@ namespace RoomAir { if (state.afn->AirflowNetworkCompData(compNum).CompTypeNum == AirflowNetwork::iComponentTypeNum::SCR) { if (state.afn->MultizoneSurfaceCrackData(typeNum).exponent != 0.50) { state.dataRoomAir->AirModel(zoneCV.ZonePtr).AirModel = RoomAirModel::Mixing; - ShowWarningError(state, EnergyPlus::format("Problem with {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowWarningError(state, EnergyPlus::format("Roomair model will not be applied for Zone={}.", ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("Problem with {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("Roomair model will not be applied for Zone={}.", ipsc->cAlphaArgs(1))); ShowContinueError( state, EnergyPlus::format( @@ -1296,8 +1294,8 @@ namespace RoomAir { return; } if (state.dataRoomAir->NumOfRoomAFNControl > state.dataGlobal->NumOfZones) { - ShowSevereError(state, EnergyPlus::format("Too many {} objects in input file", ipsc->cCurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("There cannot be more {} objects than number of zones.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("Too many {} objects in input file", ipsc->cCurrentModuleObject)); + ShowContinueError(state, std::format("There cannot be more {} objects than number of zones.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -1328,11 +1326,9 @@ namespace RoomAir { } if (state.dataRoomAir->AirModel(ZoneNum).AirModel != RoomAirModel::AirflowNetwork) { ShowSevereError( - state, - EnergyPlus::format("GetRoomAirflowNetworkData: Zone specified='{}', Air Model type is not AirflowNetwork.", ipsc->cAlphaArgs(1))); + state, std::format("GetRoomAirflowNetworkData: Zone specified='{}', Air Model type is not AirflowNetwork.", ipsc->cAlphaArgs(1))); ShowContinueError( - state, - EnergyPlus::format("Air Model Type for zone ={}", roomAirModelNamesUC[(int)state.dataRoomAir->AirModel(ZoneNum).AirModel])); + state, std::format("Air Model Type for zone ={}", roomAirModelNamesUC[(int)state.dataRoomAir->AirModel(ZoneNum).AirModel])); ErrorsFound = true; continue; } @@ -1349,8 +1345,7 @@ namespace RoomAir { roomAFNZoneInfo.Node.allocate(roomAFNZoneInfo.NumOfAirNodes); } else { ShowSevereError( - state, - EnergyPlus::format("GetRoomAirflowNetworkData: Incomplete input in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + state, std::format("GetRoomAirflowNetworkData: Incomplete input in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ErrorsFound = true; } @@ -1467,9 +1462,8 @@ namespace RoomAir { auto &roomAFNZoneNode = roomAFNZoneInfo.Node(RAFNNodeNum); if (allocated(roomAFNZoneNode.SurfMask)) { // throw error found twice - ShowSevereError(state, - EnergyPlus::format("GetRoomAirflowNetworkData: Invalid {} = {}", ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("GetRoomAirflowNetworkData: Invalid {} = {}", ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, "Duplicate RoomAir:Node:AirflowNetwork:AdjacentSurfaceList name."); ErrorsFound = true; continue; @@ -1498,18 +1492,16 @@ namespace RoomAir { } } if (NumSurfsThisNode != SurfCount) { - ShowSevereError(state, - EnergyPlus::format("GetRoomAirflowNetworkData: Invalid {} = {}", ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("GetRoomAirflowNetworkData: Invalid {} = {}", ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, "Some surface names were not found in the zone"); ErrorsFound = true; } } // for (iZone) if (!foundList) { // throw error - ShowSevereError(state, - EnergyPlus::format("GetRoomAirflowNetworkData: Invalid {} = {}", ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("GetRoomAirflowNetworkData: Invalid {} = {}", ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, "Did not find a RoomAir:Node:AirflowNetwork object that references this object"); ErrorsFound = true; } @@ -1534,10 +1526,10 @@ namespace RoomAir { ErrorObjectHeader eoh{routineName, ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1)}; if (mod((NumAlphas + NumNumbers - 1), 3) != 0) { - ShowSevereError(state, EnergyPlus::format("GetRoomAirflowNetworkData: For {}: {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("Extensible field set are not evenly divisible by 3. Number of data entries = {}", - NumAlphas + NumNumbers - 1)); + ShowSevereError(state, std::format("GetRoomAirflowNetworkData: For {}: {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError( + state, + std::format("Extensible field set are not evenly divisible by 3. Number of data entries = {}", NumAlphas + NumNumbers - 1)); ErrorsFound = true; break; } @@ -1560,10 +1552,9 @@ namespace RoomAir { int maxNumGains = numInputGains * numSpacesInZone; auto &roomAFNZoneNode = roomAFNZoneInfo.Node(RAFNNodeNum); if (allocated(roomAFNZoneNode.IntGain)) { - ShowSevereError(state, - EnergyPlus::format("GetRoomAirflowNetworkData: Invalid {} = {}", ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Duplicate {} name.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("GetRoomAirflowNetworkData: Invalid {} = {}", ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Duplicate {} name.", ipsc->cCurrentModuleObject)); ErrorsFound = true; continue; } @@ -1603,10 +1594,10 @@ namespace RoomAir { roomAFNZoneNode.NumIntGains = numGainsFound; } else { ShowSevereError(state, - EnergyPlus::format("GetRoomAirflowNetworkData: Invalid {} = {}", - ipsc->cAlphaFieldNames(gainsLoop * 2 + 1), - ipsc->cAlphaArgs(gainsLoop * 2 + 1))); - ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); + std::format("GetRoomAirflowNetworkData: Invalid {} = {}", + ipsc->cAlphaFieldNames(gainsLoop * 2 + 1), + ipsc->cAlphaArgs(gainsLoop * 2 + 1))); + ShowContinueError(state, std::format("Entered in {} = {}", ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, "Internal gain did not match correctly"); ErrorsFound = true; } @@ -1634,10 +1625,10 @@ namespace RoomAir { ErrorObjectHeader eoh{routineName, cCurrentModuleObject, ipsc->cAlphaArgs(1)}; if (mod((NumAlphas + NumNumbers - 1), 4) != 0) { - ShowSevereError(state, EnergyPlus::format("GetRoomAirflowNetworkData: For {}: {}", cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("GetRoomAirflowNetworkData: For {}: {}", cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, - EnergyPlus::format("Extensible field set are not evenly divisible by 4. Number of data entries = {}", - fmt::to_string(NumAlphas + NumNumbers - 1))); + std::format("Extensible field set are not evenly divisible by 4. Number of data entries = {}", + fmt::to_string(NumAlphas + NumNumbers - 1))); ErrorsFound = true; break; } @@ -1658,10 +1649,9 @@ namespace RoomAir { // found it auto &roomAFNNode = roomAFNZoneInfo.Node(RAFNNodeNum); if (allocated(roomAFNNode.HVAC)) { - ShowSevereError(state, - EnergyPlus::format("GetRoomAirflowNetworkData: Invalid {} = {}", ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Duplicate {} name.", cCurrentModuleObject)); + ShowSevereError(state, std::format("GetRoomAirflowNetworkData: Invalid {} = {}", ipsc->cAlphaFieldNames(1), ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Entered in {} = {}", cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Duplicate {} name.", cCurrentModuleObject)); ErrorsFound = true; continue; } @@ -1702,10 +1692,10 @@ namespace RoomAir { if (!IntEquipFound) { ShowSevereError(state, - EnergyPlus::format("GetRoomAirflowNetworkData: Invalid {} = {}", - ipsc->cAlphaFieldNames(3 + (iEquip - 1) * 2), - ipsc->cAlphaArgs(2 + (iEquip - 1) * 2))); - ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", cCurrentModuleObject, ipsc->cAlphaArgs(1))); + std::format("GetRoomAirflowNetworkData: Invalid {} = {}", + ipsc->cAlphaFieldNames(3 + (iEquip - 1) * 2), + ipsc->cAlphaArgs(2 + (iEquip - 1) * 2))); + ShowContinueError(state, std::format("Entered in {} = {}", cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, "Internal gain did not match correctly"); ErrorsFound = true; } @@ -1730,8 +1720,8 @@ namespace RoomAir { } if (std::abs(SumFraction - 1.0) > 0.001) { ShowSevereError(state, "GetRoomAirflowNetworkData: Invalid, zone volume fractions do not sum to 1.0"); - ShowContinueError( - state, EnergyPlus::format("Entered in RoomAir:Node:AirflowNetwork with Zone Name = {}", state.dataHeatBal->Zone(iZone).Name)); + ShowContinueError(state, + std::format("Entered in RoomAir:Node:AirflowNetwork with Zone Name = {}", state.dataHeatBal->Zone(iZone).Name)); ShowContinueError(state, "The Fraction of Zone Air Volume values across all the nodes needs to sum to 1.0."); ShowContinueError(state, EnergyPlus::format("The sum of fractions entered = {:.3R}", SumFraction)); ErrorsFound = true; @@ -1764,9 +1754,9 @@ namespace RoomAir { if (std::abs(SumFraction - 1.0) > 0.001) { ShowSevereError(state, "GetRoomAirflowNetworkData: Invalid, internal gain fractions do not sum to 1.0"); ShowContinueError(state, - EnergyPlus::format("Entered in RoomAir:Node:AirflowNetwork with Zone Name = {}, Intrnal gain name = {}", - state.dataHeatBal->Zone(iZone).Name, - intGain.Name)); + std::format("Entered in RoomAir:Node:AirflowNetwork with Zone Name = {}, Intrnal gain name = {}", + state.dataHeatBal->Zone(iZone).Name, + intGain.Name)); ShowContinueError(state, "The Fraction of internal gain across all the nodes needs to sum to 1.0."); ShowContinueError(state, EnergyPlus::format("The sum of fractions entered = {:.3R}", SumFraction)); ErrorsFound = true; @@ -1970,8 +1960,8 @@ namespace RoomAir { constexpr Real64 CeilingHeightDiffMaximum = 0.1; if (std::abs((Z2ofZone - Z1ofZone) - state.dataHeatBal->Zone(ZNum).CeilingHeight) > CeilingHeightDiffMaximum) { - ShowWarningError( - state, EnergyPlus::format("RoomAirManager: Inconsistent ceiling heights in Zone: {}", state.dataHeatBal->Zone(ZNum).Name)); + ShowWarningError(state, + std::format("RoomAirManager: Inconsistent ceiling heights in Zone: {}", state.dataHeatBal->Zone(ZNum).Name)); ShowContinueError(state, EnergyPlus::format("Lowest height=[{:.3R}].", Z1ofZone)); ShowContinueError(state, EnergyPlus::format("Highest height=[{:.3R}].", Z2ofZone)); ShowContinueError(state, EnergyPlus::format("Ceiling height=[{:.3R}].", state.dataHeatBal->Zone(ZNum).CeilingHeight)); @@ -2518,11 +2508,10 @@ namespace RoomAir { if (state.dataZoneEquip->ZoneEquipConfig(ZoneEquipConfigNum).IsControlled) { state.dataRoomAir->IsZoneCrossVent(iZone) = false; state.dataRoomAir->AirModel(iZone).SimAirModel = false; - ShowSevereError(state, EnergyPlus::format("Unmixed Flow: Cross Ventilation cannot be applied for Zone={}", zone.Name)); + ShowSevereError(state, std::format("Unmixed Flow: Cross Ventilation cannot be applied for Zone={}", zone.Name)); ShowContinueError( state, - EnergyPlus::format("An HVAC system is present in the zone. Fully mixed airflow model will be used for Zone={}", - zone.Name)); + std::format("An HVAC system is present in the zone. Fully mixed airflow model will be used for Zone={}", zone.Name)); continue; } // CurrentModuleObject='RoomAirSettings:CrossVentilation' @@ -2744,8 +2733,7 @@ namespace RoomAir { if (RAFNNodeNum == 0) { Errorfound = true; ShowSevereError( - state, - EnergyPlus::format("Could not find RoomAir:Node:AirflowNetwork number with AirflowNetwork:IntraZone:Node Name='{}", RAFNNodeName)); + state, std::format("Could not find RoomAir:Node:AirflowNetwork number with AirflowNetwork:IntraZone:Node Name='{}", RAFNNodeName)); } } diff --git a/src/EnergyPlus/RoomAirModelUserTempPattern.cc b/src/EnergyPlus/RoomAirModelUserTempPattern.cc index 4dfc5e08b6b..0940efdbc5a 100644 --- a/src/EnergyPlus/RoomAirModelUserTempPattern.cc +++ b/src/EnergyPlus/RoomAirModelUserTempPattern.cc @@ -49,7 +49,6 @@ #include #include #include -// #include #include // EnergyPlus Headers diff --git a/src/EnergyPlus/RootFinder.cc b/src/EnergyPlus/RootFinder.cc index 7df8a426fcc..101e320897c 100644 --- a/src/EnergyPlus/RootFinder.cc +++ b/src/EnergyPlus/RootFinder.cc @@ -48,9 +48,6 @@ // C++ Headers #include -// ObjexxFCL Headers -// #include - // EnergyPlus Headers #include #include @@ -319,7 +316,7 @@ void InitializeRootFinder(EnergyPlusData &state, XMinReset = XMax; } else { ShowFatalError( - state, EnergyPlus::format("InitializeRootFinder: Invalid min/max bounds XMin={:.6T} must be smaller than XMax={:.6T}", XMin, XMax)); + state, EnergyPlus::format("InitializeRootFinder: Invalid min/max bounds XMin={:.6f} must be smaller than XMax={:.6f}", XMin, XMax)); } } @@ -1127,10 +1124,10 @@ void UpdateBracket(EnergyPlusData &state, } else { // Should never happen if CheckLowerUpperBracket() is called before ShowSevereError(state, "UpdateBracket: Current iterate is smaller than the lower bracket."); - ShowContinueError(state, EnergyPlus::format("UpdateBracket: X={:.15T}, Y={:.15T}", X, Y)); + ShowContinueError(state, EnergyPlus::format("UpdateBracket: X={:.15f}, Y={:.15f}", X, Y)); ShowContinueError(state, EnergyPlus::format( - "UpdateBracket: XLower={:.15T}, YLower={:.15T}", RootFinderData.LowerPoint.X, RootFinderData.LowerPoint.Y)); + "UpdateBracket: XLower={:.15f}, YLower={:.15f}", RootFinderData.LowerPoint.X, RootFinderData.LowerPoint.Y)); ShowFatalError(state, "UpdateBracket: Preceding error causes program termination."); } } @@ -1154,10 +1151,10 @@ void UpdateBracket(EnergyPlusData &state, } else { // Should never happen if CheckLowerUpperBracket() is called before ShowSevereError(state, "UpdateBracket: Current iterate is greater than the upper bracket."); - ShowContinueError(state, EnergyPlus::format("UpdateBracket: X={:.15T}, Y={:.15T}", X, Y)); + ShowContinueError(state, EnergyPlus::format("UpdateBracket: X={:.15f}, Y={:.15f}", X, Y)); ShowContinueError(state, EnergyPlus::format( - "UpdateBracket: XUpper={:.15T}, YUpper={:.15T}", RootFinderData.UpperPoint.X, RootFinderData.UpperPoint.Y)); + "UpdateBracket: XUpper={:.15f}, YUpper={:.15f}", RootFinderData.UpperPoint.X, RootFinderData.UpperPoint.Y)); ShowFatalError(state, "UpdateBracket: Preceding error causes program termination."); } } @@ -1184,10 +1181,10 @@ void UpdateBracket(EnergyPlusData &state, } else { // Should never happen if CheckLowerUpperBracket() is called before ShowSevereError(state, "UpdateBracket: Current iterate is smaller than the lower bracket."); - ShowContinueError(state, EnergyPlus::format("UpdateBracket: X={:.15T}, Y={:.15T}", X, Y)); + ShowContinueError(state, EnergyPlus::format("UpdateBracket: X={:.15f}, Y={:.15f}", X, Y)); ShowContinueError(state, EnergyPlus::format( - "UpdateBracket: XLower={:.15T}, YLower={:.15T}", RootFinderData.LowerPoint.X, RootFinderData.LowerPoint.Y)); + "UpdateBracket: XLower={:.15f}, YLower={:.15f}", RootFinderData.LowerPoint.X, RootFinderData.LowerPoint.Y)); ShowFatalError(state, "UpdateBracket: Preceding error causes program termination."); } } @@ -1211,10 +1208,10 @@ void UpdateBracket(EnergyPlusData &state, } else { // Should never happen if CheckLowerUpperBracket() is called before ShowSevereError(state, "UpdateBracket: Current iterate is greater than the upper bracket."); - ShowContinueError(state, EnergyPlus::format("UpdateBracket: X={:.15T}, Y={:.15T}", X, Y)); + ShowContinueError(state, EnergyPlus::format("UpdateBracket: X={:.15f}, Y={:.15f}", X, Y)); ShowContinueError(state, EnergyPlus::format( - "UpdateBracket: XUpper={:.15T}, YUpper={:.15T}", RootFinderData.UpperPoint.X, RootFinderData.UpperPoint.Y)); + "UpdateBracket: XUpper={:.15f}, YUpper={:.15f}", RootFinderData.UpperPoint.X, RootFinderData.UpperPoint.Y)); ShowFatalError(state, "UpdateBracket: Preceding error causes program termination."); } } diff --git a/src/EnergyPlus/RuntimeLanguageProcessor.cc b/src/EnergyPlus/RuntimeLanguageProcessor.cc index 44a4c51ef9d..05c9edfedc9 100644 --- a/src/EnergyPlus/RuntimeLanguageProcessor.cc +++ b/src/EnergyPlus/RuntimeLanguageProcessor.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -1214,7 +1215,7 @@ void ParseExpression(EnergyPlusData &state, ShowSevereError(state, EnergyPlus::format("EMS Parse Expression, for \"{}\".", state.dataRuntimeLang->ErlStack(StackNum).Name)); ShowContinueError(state, EnergyPlus::format("...Line=\"{}\".", Line)); ShowContinueError(state, EnergyPlus::format("...Bad String=\"{}\".", String)); - ShowContinueError(state, EnergyPlus::format("Invalid numeric=\"{}\".", StringToken)); + ShowContinueError(state, std::format("Invalid numeric=\"{}\".", StringToken)); ++NumErrors; } } @@ -1253,15 +1254,15 @@ void ParseExpression(EnergyPlusData &state, if (NextChar == '-') { StringToken = "-"; if (MultFound) { - ShowSevereError(state, EnergyPlus::format("EMS Parse Expression, for \"{}\".", state.dataRuntimeLang->ErlStack(StackNum).Name)); - ShowContinueError(state, EnergyPlus::format("...Line = \"{}\".", Line)); + ShowSevereError(state, std::format("EMS Parse Expression, for \"{}\".", state.dataRuntimeLang->ErlStack(StackNum).Name)); + ShowContinueError(state, std::format("...Line = \"{}\".", Line)); ShowContinueError(state, "...Minus sign used on the right side of multiplication sign."); ShowContinueError(state, "...Use parenthesis to wrap appropriate variables. For example, X * ( -Y )."); ++NumErrors; MultFound = false; } else if (DivFound) { - ShowSevereError(state, EnergyPlus::format("EMS Parse Expression, for \"{}\".", state.dataRuntimeLang->ErlStack(StackNum).Name)); - ShowContinueError(state, EnergyPlus::format("...Line = \"{}\".", Line)); + ShowSevereError(state, std::format("EMS Parse Expression, for \"{}\".", state.dataRuntimeLang->ErlStack(StackNum).Name)); + ShowContinueError(state, std::format("...Line = \"{}\".", Line)); ShowContinueError(state, "...Minus sign used on the right side of division sign."); ShowContinueError(state, "...Use parenthesis to wrap appropriate variables. For example, X / ( -Y )."); ++NumErrors; @@ -1357,7 +1358,7 @@ void ParseExpression(EnergyPlusData &state, if (state.dataSysVars->DeveloperFlag) { print(state.files.debug, "ERROR \"{}\"\n", String); } - ShowFatalError(state, EnergyPlus::format("EMS Runtime Language: did not find valid input for built-in function ={}", String)); + ShowFatalError(state, std::format("EMS Runtime Language: did not find valid input for built-in function ={}", String)); } } else { // Check for remaining single character operators @@ -1411,7 +1412,7 @@ void ParseExpression(EnergyPlusData &state, if (state.dataSysVars->DeveloperFlag) { print(state.files.debug, "ERROR \"{}\"\n", StringToken); } - ShowFatalError(state, EnergyPlus::format("EMS, caught unexpected token = \"{}\" ; while parsing string={}", StringToken, String)); + ShowFatalError(state, std::format("EMS, caught unexpected token = \"{}\" ; while parsing string={}", StringToken, String)); } } @@ -1557,7 +1558,7 @@ int ProcessTokens( if (ParenthWhileCounter == 50) { // symptom of mismatched parenthesis ShowSevereError(state, "EMS error parsing parentheses, check that parentheses are balanced"); - ShowContinueError(state, EnergyPlus::format("String being parsed=\"{}\".", ParsingString)); + ShowContinueError(state, std::format("String being parsed=\"{}\".", ParsingString)); ShowFatalError(state, "Program terminates due to preceding error."); } @@ -1636,13 +1637,13 @@ int ProcessTokens( } break; } - ShowSevereError(state, EnergyPlus::format("The operator \"{}\" is missing the left-hand operand!", ErlFuncNamesUC[OperatorNum])); - ShowContinueError(state, EnergyPlus::format("String being parsed=\"{}\".", ParsingString)); + ShowSevereError(state, std::format("The operator \"{}\" is missing the left-hand operand!", ErlFuncNamesUC[OperatorNum])); + ShowContinueError(state, std::format("String being parsed=\"{}\".", ParsingString)); break; } if (Pos == NumTokens) { - ShowSevereError(state, EnergyPlus::format("The operator \"{}\" is missing the right-hand operand!", ErlFuncNamesUC[OperatorNum])); - ShowContinueError(state, EnergyPlus::format("String being parsed=\"{}\".", ParsingString)); + ShowSevereError(state, std::format("The operator \"{}\" is missing the right-hand operand!", ErlFuncNamesUC[OperatorNum])); + ShowContinueError(state, std::format("String being parsed=\"{}\".", ParsingString)); break; } ExpressionNum = NewExpression(state); @@ -1950,9 +1951,9 @@ ErlValueType EvaluateExpression(EnergyPlusData &state, int const ExpressionNum, // throw Error ReturnValue.Type = Value::Error; ReturnValue.Error = - EnergyPlus::format("EvaluateExpression: Attempted to raise to power with incompatible numbers: {:.6T} raised to {:.6T}", - Operand(1).Number, - Operand(2).Number); + std::format("EvaluateExpression: Attempted to raise to power with incompatible numbers: {:.6f} raised to {:.6f}", + Operand(1).Number, + Operand(2).Number); if (!state.dataGlobal->DoingSizing && !state.dataGlobal->KickOffSimulation && !state.dataEMSMgr->FinishProcessingUserInput) { seriousErrorFound = true; } @@ -2021,8 +2022,8 @@ ErlValueType EvaluateExpression(EnergyPlusData &state, int const ExpressionNum, ReturnValue = SetErlValueNumber(0.0); } else { // throw Error - ReturnValue.Error = EnergyPlus::format( - "EvaluateExpression: Attempted to calculate exponential value of too large a number: {:.4T}", Operand(1).Number); + ReturnValue.Error = + std::format("EvaluateExpression: Attempted to calculate exponential value of too large a number: {:.4f}", Operand(1).Number); ReturnValue.Type = Value::Error; if (!state.dataGlobal->DoingSizing && !state.dataGlobal->KickOffSimulation && !state.dataEMSMgr->FinishProcessingUserInput) { seriousErrorFound = true; @@ -2036,8 +2037,7 @@ ErlValueType EvaluateExpression(EnergyPlusData &state, int const ExpressionNum, } else { // throw error, ReturnValue.Type = Value::Error; - ReturnValue.Error = - EnergyPlus::format("EvaluateExpression: Natural Log of zero or less! ln of value = {:.4T}", Operand(1).Number); + ReturnValue.Error = std::format("EvaluateExpression: Natural Log of zero or less! ln of value = {:.4f}", Operand(1).Number); if (!state.dataGlobal->DoingSizing && !state.dataGlobal->KickOffSimulation && !state.dataEMSMgr->FinishProcessingUserInput) { seriousErrorFound = true; } @@ -2305,18 +2305,18 @@ ErlValueType EvaluateExpression(EnergyPlusData &state, int const ExpressionNum, case ErlFunc::FatalHaltEp: ShowSevereError(state, "EMS user program found serious problem and is halting simulation"); ShowContinueErrorTimeStamp(state, ""); - ShowFatalError(state, EnergyPlus::format("EMS user program halted simulation with error code = {:.2T}", Operand(1).Number)); + ShowFatalError(state, std::format("EMS user program halted simulation with error code = {:.2f}", Operand(1).Number)); ReturnValue = SetErlValueNumber(Operand(1).Number); // returns back the error code break; case ErlFunc::SevereWarnEp: - ShowSevereError(state, EnergyPlus::format("EMS user program issued severe warning with error code = {:.2T}", Operand(1).Number)); + ShowSevereError(state, std::format("EMS user program issued severe warning with error code = {:.2f}", Operand(1).Number)); ShowContinueErrorTimeStamp(state, ""); ReturnValue = SetErlValueNumber(Operand(1).Number); // returns back the error code break; case ErlFunc::WarnEp: - ShowWarningError(state, EnergyPlus::format("EMS user program issued warning with error code = {:.2T}", Operand(1).Number)); + ShowWarningError(state, std::format("EMS user program issued warning with error code = {:.2f}", Operand(1).Number)); ShowContinueErrorTimeStamp(state, ""); ReturnValue = SetErlValueNumber(Operand(1).Number); // returns back the error code break; @@ -2972,16 +2972,16 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) state, cCurrentModuleObject, cAlphaArgs(ErlVarLoop), cAlphaFieldNames(ErlVarLoop), errFlag, ErrorsFound); } if (lAlphaFieldBlanks(ErlVarLoop)) { - ShowWarningError(state, EnergyPlus::format("{}{}", RoutineName, cCurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("Blank {}", cAlphaFieldNames(1))); + ShowWarningError(state, std::format("{}{}", RoutineName, cCurrentModuleObject)); + ShowContinueError(state, std::format("Blank {}", cAlphaFieldNames(1))); ShowContinueError(state, "Blank entry will be skipped, and the simulation continues"); } else if (!errFlag) { VariableNum = FindEMSVariable(state, cAlphaArgs(ErlVarLoop), 0); // Still need to check for conflicts with program and function names too if (VariableNum > 0) { - ShowSevereError(state, EnergyPlus::format("{}{}, invalid entry.", RoutineName, cCurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(ErlVarLoop), cAlphaArgs(ErlVarLoop))); + ShowSevereError(state, std::format("{}{}, invalid entry.", RoutineName, cCurrentModuleObject)); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(ErlVarLoop), cAlphaArgs(ErlVarLoop))); ShowContinueError(state, "Name conflicts with an existing global variable name"); ErrorsFound = true; } else { @@ -3020,15 +3020,15 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) // check if variable name is unique and well formed ValidateEMSVariableName(state, cCurrentModuleObject, cAlphaArgs(1), cAlphaFieldNames(1), errFlag, ErrorsFound); if (lAlphaFieldBlanks(1)) { - ShowSevereError(state, EnergyPlus::format("{}{}", RoutineName, cCurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("Blank {}", cAlphaFieldNames(1))); + ShowSevereError(state, std::format("{}{}", RoutineName, cCurrentModuleObject)); + ShowContinueError(state, std::format("Blank {}", cAlphaFieldNames(1))); ShowContinueError(state, "Blank entry for Erl variable name is not allowed"); ErrorsFound = true; } else if (!errFlag) { VariableNum = FindEMSVariable(state, cAlphaArgs(1), 0); if (VariableNum > 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}", cAlphaFieldNames(1))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}", cAlphaFieldNames(1))); ShowContinueError(state, "Name conflicts with an existing variable name"); ErrorsFound = true; } else { @@ -3042,12 +3042,12 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) int CurveIndexNum = GetCurveIndex(state, cAlphaArgs(2)); // curve name if (CurveIndexNum == 0) { if (lAlphaFieldBlanks(2)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" blank field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Blank {}", cAlphaFieldNames(2))); + ShowSevereError(state, std::format("{}{}=\"{}\" blank field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Blank {}", cAlphaFieldNames(2))); ShowContinueError(state, "Blank entry for curve or table name is not allowed"); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); ShowContinueError(state, "Curve or table was not found."); } ErrorsFound = true; @@ -3080,15 +3080,15 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) // check if variable name is unique and well formed ValidateEMSVariableName(state, cCurrentModuleObject, cAlphaArgs(1), cAlphaFieldNames(1), errFlag, ErrorsFound); if (lAlphaFieldBlanks(1)) { - ShowSevereError(state, EnergyPlus::format("{}{}", RoutineName, cCurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("Blank {}", cAlphaFieldNames(1))); + ShowSevereError(state, std::format("{}{}", RoutineName, cCurrentModuleObject)); + ShowContinueError(state, std::format("Blank {}", cAlphaFieldNames(1))); ShowContinueError(state, "Blank entry for Erl variable name is not allowed"); ErrorsFound = true; } else if (!errFlag) { VariableNum = FindEMSVariable(state, cAlphaArgs(1), 0); if (VariableNum > 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}", cAlphaFieldNames(1))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}", cAlphaFieldNames(1))); ShowContinueError(state, "Name conflicts with an existing variable name"); ErrorsFound = true; } else { @@ -3105,12 +3105,12 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) if (ConstructNum == 0) { if (lAlphaFieldBlanks(2)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" blank field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Blank {}", cAlphaFieldNames(2))); + ShowSevereError(state, std::format("{}{}=\"{}\" blank field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Blank {}", cAlphaFieldNames(2))); ShowContinueError(state, "Blank entry for construction name is not allowed"); } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); ShowContinueError(state, "Construction was not found."); } ErrorsFound = true; @@ -3223,8 +3223,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) VariableNum = FindEMSVariable(state, cAlphaArgs(2), 0); // Still need to check for conflicts with program and function names too if (VariableNum == 0) { // did not find it - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); ShowContinueError(state, "Did not find a match with an EMS variable name"); ErrorsFound = true; } else { // found it. @@ -3257,8 +3257,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) state.dataRuntimeLang->TrendVariable(TrendNum).TimeARR(loop - 1) - state.dataGlobal->TimeStepZone; // fractional hours } } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={:.2T}", cNumericFieldNames(1), rNumericArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={:.2f}", cNumericFieldNames(1), rNumericArgs(1))); ShowContinueError(state, "must be greater than zero"); ErrorsFound = true; } @@ -3276,8 +3276,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) if (state.dataRuntimeLang->ErlStack(StackNum).NumErrors > 0) { ShowSevereError(state, - EnergyPlus::format("Errors found parsing EMS Runtime Language program or subroutine = {}", - state.dataRuntimeLang->ErlStack(StackNum).Name)); + std::format("Errors found parsing EMS Runtime Language program or subroutine = {}", + state.dataRuntimeLang->ErlStack(StackNum).Name)); for (int ErrorNum = 1; ErrorNum <= state.dataRuntimeLang->ErlStack(StackNum).NumErrors; ++ErrorNum) { ShowContinueError(state, state.dataRuntimeLang->ErlStack(StackNum).Error(ErrorNum)); } @@ -3353,18 +3353,15 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } if (!UnitsA.empty() && !UnitsB.empty()) { if (UnitsA != UnitsB) { - ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\" mismatched units.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("...Units entered in {} (deprecated use)=\"{}\"", cAlphaFieldNames(1), UnitsA)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\" (will be used)", cAlphaFieldNames(6), UnitsB)); + ShowWarningError(state, std::format("{}{}=\"{}\" mismatched units.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("...Units entered in {} (deprecated use)=\"{}\"", cAlphaFieldNames(1), UnitsA)); + ShowContinueError(state, std::format("...{}=\"{}\" (will be used)", cAlphaFieldNames(6), UnitsB)); } } else if (UnitsB.empty() && !UnitsA.empty()) { UnitsB = UnitsA; ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\" using deprecated units designation.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("...Units entered in {} (deprecated use)=\"{}\"", cAlphaFieldNames(1), UnitsA)); + state, std::format("{}{}=\"{}\" using deprecated units designation.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("...Units entered in {} (deprecated use)=\"{}\"", cAlphaFieldNames(1), UnitsA)); } } curUnit = static_cast(getEnumValue(Constant::unitNamesUC, Util::makeUPPER(UnitsB))); @@ -3382,8 +3379,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } if (!Found) { StackNum = 0; - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(5), cAlphaArgs(5))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(5), cAlphaArgs(5))); ShowContinueError(state, "EMS program or subroutine not found."); ErrorsFound = true; } @@ -3395,13 +3392,13 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) if (VariableNum == 0) { if (lAlphaFieldBlanks(5)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); ShowContinueError(state, "EMS variable not found among global variables."); } else if (StackNum != 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, EnergyPlus::format("EMS variable not found among local variables in {}", cAlphaArgs(5))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowContinueError(state, std::format("EMS variable not found among local variables in {}", cAlphaArgs(5))); } ErrorsFound = true; // ELSEIF (INDEX('0123456789',cAlphaArgs(2)(1:1)) > 0) THEN @@ -3418,8 +3415,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } else if (cAlphaArgs(3) == "SUMMED") { sovStoreType = OutputProcessor::StoreType::Sum; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); ShowContinueError(state, "...valid values are Averaged or Summed."); ErrorsFound = true; } @@ -3429,8 +3426,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } else if (cAlphaArgs(4) == "SYSTEMTIMESTEP") { sovTimeStepType = OutputProcessor::TimeStepType::System; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); ShowContinueError(state, "...valid values are ZoneTimestep or SystemTimestep."); ErrorsFound = true; } @@ -3528,18 +3525,15 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } if (!UnitsA.empty() && !UnitsB.empty()) { if (UnitsA != UnitsB) { - ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\" mismatched units.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("...Units entered in {} (deprecated use)=\"{}\"", cAlphaFieldNames(1), UnitsA)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\" (will be used)", cAlphaFieldNames(9), UnitsB)); + ShowWarningError(state, std::format("{}{}=\"{}\" mismatched units.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("...Units entered in {} (deprecated use)=\"{}\"", cAlphaFieldNames(1), UnitsA)); + ShowContinueError(state, std::format("...{}=\"{}\" (will be used)", cAlphaFieldNames(9), UnitsB)); } } else if (UnitsB.empty() && !UnitsA.empty()) { UnitsB = UnitsA; ShowWarningError( - state, - EnergyPlus::format("{}{}=\"{}\" using deprecated units designation.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("...Units entered in {} (deprecated use)=\"{}\"", cAlphaFieldNames(1), UnitsA)); + state, std::format("{}{}=\"{}\" using deprecated units designation.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("...Units entered in {} (deprecated use)=\"{}\"", cAlphaFieldNames(1), UnitsA)); } } curUnit = static_cast(getEnumValue(Constant::unitNamesUC, Util::makeUPPER(UnitsB))); @@ -3557,8 +3551,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } if (!Found) { StackNum = 0; - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); ShowContinueError(state, "EMS program or subroutine not found."); ErrorsFound = true; } @@ -3569,13 +3563,13 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) VariableNum = FindEMSVariable(state, cAlphaArgs(2), StackNum); if (VariableNum == 0) { if (lAlphaFieldBlanks(4)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); ShowContinueError(state, "EMS variable not found among global variables."); } else if (StackNum != 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, EnergyPlus::format("EMS variable not found among local variables in {}", cAlphaArgs(5))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowContinueError(state, std::format("EMS variable not found among local variables in {}", cAlphaArgs(5))); } ErrorsFound = true; // ELSEIF (INDEX('0123456789',cAlphaArgs(2)(1:1)) > 0) THEN @@ -3594,8 +3588,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } else if (cAlphaArgs(3) == "SYSTEMTIMESTEP") { sovTimeStepType = OutputProcessor::TimeStepType::System; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(4), cAlphaArgs(4))); ShowContinueError(state, "...valid values are ZoneTimestep or SystemTimestep."); ErrorsFound = true; } @@ -3605,8 +3599,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) static_cast(getEnumValue(Constant::eResourceNamesUC, Util::makeUPPER(cAlphaArgs(5)))); if (resource == Constant::eResource::Invalid) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(5), cAlphaArgs(5))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(5), cAlphaArgs(5))); ErrorsFound = true; } @@ -3622,8 +3616,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } else if (cAlphaArgs(6) == "SYSTEM") { sovGroup = OutputProcessor::Group::HVAC; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(6), cAlphaArgs(6))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(6), cAlphaArgs(6))); ErrorsFound = true; } @@ -3673,8 +3667,8 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) } else if (cAlphaArgs(7) == "HEATRECOVERYFORHEATING") { sovEndUseCat = OutputProcessor::EndUseCat::HeatRecoveryForHeating; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(7), cAlphaArgs(7))); + ShowSevereError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, std::format("Invalid {}={}", cAlphaFieldNames(7), cAlphaArgs(7))); ErrorsFound = true; } @@ -3684,10 +3678,10 @@ void GetRuntimeLanguageUserInput(EnergyPlusData &state) sovEndUseCat == OutputProcessor::EndUseCat::Chillers || sovEndUseCat == OutputProcessor::EndUseCat::Boilers || sovEndUseCat == OutputProcessor::EndUseCat::Baseboard || sovEndUseCat == OutputProcessor::EndUseCat::HeatRecoveryForCooling || sovEndUseCat == OutputProcessor::EndUseCat::HeatRecoveryForHeating)) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); - ShowContinueError( - state, EnergyPlus::format("Invalid {}={} for {}={}", cAlphaFieldNames(5), cAlphaArgs(5), cAlphaFieldNames(7), cAlphaArgs(7))); - ShowContinueError(state, EnergyPlus::format("Field {} is reset from {} to EnergyTransfer", cAlphaFieldNames(5), cAlphaArgs(5))); + ShowWarningError(state, std::format("{}{}=\"{}\" invalid field.", RoutineName, cCurrentModuleObject, cAlphaArgs(1))); + ShowContinueError(state, + std::format("Invalid {}={} for {}={}", cAlphaFieldNames(5), cAlphaArgs(5), cAlphaFieldNames(7), cAlphaArgs(7))); + ShowContinueError(state, std::format("Field {} is reset from {} to EnergyTransfer", cAlphaFieldNames(5), cAlphaArgs(5))); resource = Constant::eResource::EnergyTransfer; } @@ -3853,14 +3847,18 @@ std::string ValueToString(ErlValueType const &Value) // Locals // FUNCTION ARGUMENT DEFINITIONS: + Real64 constexpr floatToSciCutoff = 0.01; + String = ""; switch (Value.Type) { case Value::Number: if (Value.Number == 0.0) { String = "0.0"; + } else if (std::abs(Value.Number) > floatToSciCutoff) { + String = std::format("{:.6f}", Value.Number); // floating point representation } else { - String = EnergyPlus::format("{:.6T}", Value.Number); //(String) + String = std::format("{:.6e}", Value.Number); // scientific notation representation for small numbers } break; diff --git a/src/EnergyPlus/SQLiteProcedures.cc b/src/EnergyPlus/SQLiteProcedures.cc index 9a6bea129fe..b2e6973b865 100644 --- a/src/EnergyPlus/SQLiteProcedures.cc +++ b/src/EnergyPlus/SQLiteProcedures.cc @@ -45,7 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -// C++ headers +// C++ Headers #include #include #include @@ -1246,12 +1246,12 @@ void SQLite::initializeTabularDataTable() sqliteExecuteCommand(sql); - sqliteExecuteCommand(format("INSERT INTO StringTypes VALUES({},'ReportName');", ReportNameId)); - sqliteExecuteCommand(format("INSERT INTO StringTypes VALUES({},'ReportForString');", ReportForStringId)); - sqliteExecuteCommand(format("INSERT INTO StringTypes VALUES({},'TableName');", TableNameId)); - sqliteExecuteCommand(format("INSERT INTO StringTypes VALUES({},'RowName');", RowNameId)); - sqliteExecuteCommand(format("INSERT INTO StringTypes VALUES({},'ColumnName');", ColumnNameId)); - sqliteExecuteCommand(format("INSERT INTO StringTypes VALUES({},'Units');", UnitsId)); + sqliteExecuteCommand(EnergyPlus::format("INSERT INTO StringTypes VALUES({},'ReportName');", ReportNameId)); + sqliteExecuteCommand(EnergyPlus::format("INSERT INTO StringTypes VALUES({},'ReportForString');", ReportForStringId)); + sqliteExecuteCommand(EnergyPlus::format("INSERT INTO StringTypes VALUES({},'TableName');", TableNameId)); + sqliteExecuteCommand(EnergyPlus::format("INSERT INTO StringTypes VALUES({},'RowName');", RowNameId)); + sqliteExecuteCommand(EnergyPlus::format("INSERT INTO StringTypes VALUES({},'ColumnName');", ColumnNameId)); + sqliteExecuteCommand(EnergyPlus::format("INSERT INTO StringTypes VALUES({},'Units');", UnitsId)); constexpr std::string_view sql2 = "CREATE TABLE Strings ( " "StringIndex INTEGER PRIMARY KEY, " diff --git a/src/EnergyPlus/SZVAVModel.cc b/src/EnergyPlus/SZVAVModel.cc index 1222e303314..507f1d9a489 100644 --- a/src/EnergyPlus/SZVAVModel.cc +++ b/src/EnergyPlus/SZVAVModel.cc @@ -535,7 +535,7 @@ namespace SZVAVModel { ShowContinueErrorTimeStamp( state, EnergyPlus::format( - "Sensible load to be met = {:.2T} (watts), sensible output = {:.2T} (watts), and the simulation continues.", + "Sensible load to be met = {:.2f} (watts), sensible output = {:.2f} (watts), and the simulation continues.", ZoneLoad, TempSensOutput)); } @@ -553,7 +553,7 @@ namespace SZVAVModel { EnergyPlus::format("{}Coil control failed for {}:{}", MessagePrefix, SZVAVModel.UnitType, SZVAVModel.Name)); ShowContinueError(state, " sensible part-load ratio determined to be outside the range of 0-1."); ShowContinueErrorTimeStamp( - state, EnergyPlus::format("Sensible load to be met = {:.2T} (watts), and the simulation continues.", ZoneLoad)); + state, EnergyPlus::format("Sensible load to be met = {:.2f} (watts), and the simulation continues.", ZoneLoad)); } ShowRecurringWarningErrorAtEnd(state, SZVAVModel.UnitType + " \"" + SZVAVModel.Name + @@ -1064,7 +1064,7 @@ namespace SZVAVModel { ShowContinueErrorTimeStamp( state, EnergyPlus::format( - "Sensible load to be met = {:.2T} (watts), sensible output = {:.2T} (watts), and the simulation continues.", + "Sensible load to be met = {:.2f} (watts), sensible output = {:.2f} (watts), and the simulation continues.", ZoneLoad, TempSensOutput)); } @@ -1082,7 +1082,7 @@ namespace SZVAVModel { EnergyPlus::format("{}Coil control failed for {}:{}", MessagePrefix, SZVAVModel.UnitType, SZVAVModel.Name)); ShowContinueError(state, " sensible part-load ratio determined to be outside the range of 0-1."); ShowContinueErrorTimeStamp( - state, EnergyPlus::format("Sensible load to be met = {:.2T} (watts), and the simulation continues.", ZoneLoad)); + state, EnergyPlus::format("Sensible load to be met = {:.2f} (watts), and the simulation continues.", ZoneLoad)); } ShowRecurringWarningErrorAtEnd(state, SZVAVModel.UnitType + " \"" + SZVAVModel.Name + diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index c26ff8bf351..45a03796585 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -46,14 +46,13 @@ // POSSIBILITY OF SUCH DAMAGE. // C++ Headers -#include +#include #include // ObjexxFCL Headers #include // EnergyPlus Headers -#include #include #include #include @@ -61,7 +60,6 @@ #include #include #include -// #include #include #include #include @@ -368,7 +366,6 @@ namespace Sched { int StartPointer; int EndPointer; bool ErrorsFound(false); - bool NumErrorFlag; std::array minuteVals; std::array setMinuteVals; @@ -606,7 +603,7 @@ namespace Sched { ShowSevereError(state, error); } } - ShowContinueError(state, fmt::format("Error Occurred in {}", state.files.TempFullFilePath.filePath)); + ShowContinueError(state, EnergyPlus::format("Error Occurred in {}", state.files.TempFullFilePath.filePath.string())); ShowFatalError(state, "Program terminates due to previous condition."); } for (const auto &[warning, isContinued] : csvParser.warnings()) { @@ -635,8 +632,8 @@ namespace Sched { if (!csvParser.hasErrors()) { isCSV = true; ShowWarningMessage(state, - fmt::format("Extension of file {} is unrecognized, but parsed as CSV successfully", - state.files.TempFullFilePath.filePath)); + EnergyPlus::format("Extension of file {} is unrecognized, but parsed as CSV successfully", + state.files.TempFullFilePath.filePath.string())); schedule_file_shading_result = it.first; } } catch (...) { @@ -650,21 +647,22 @@ namespace Sched { s_sched->UniqueProcessedExternalFiles.emplace(state.files.TempFullFilePath.filePath, std::move(schedule_data)); schedule_file_shading_result = it.first; ShowWarningMessage(state, - fmt::format("Extension of file {} is unrecognized, but parsed as JSON successfully", - state.files.TempFullFilePath.filePath)); + EnergyPlus::format("Extension of file {} is unrecognized, but parsed as JSON successfully", + state.files.TempFullFilePath.filePath.string())); isJSON = true; } catch (...) { // We're testing to see if this is json, if any exception exists, then throw the standard error about an unknown extension isJSON = false; } if (!isCSV && !isJSON) { - ShowSevereError(state, - fmt::format(R"({}: {}="{}", {}="{}" has an unknown file extension and cannot be read by this program.)", - routineName, - CurrentModuleObject, - Alphas(1), - cAlphaFields(3), - Alphas(3))); + ShowSevereError( + state, + EnergyPlus::format(R"({}: {}="{}", {}="{}" has an unknown file extension and cannot be read by this program.)", + routineName, + CurrentModuleObject, + Alphas(1), + cAlphaFields(3), + Alphas(3))); ShowFatalError(state, "Program terminates due to previous condition."); } } @@ -1007,7 +1005,7 @@ namespace Sched { } if (mod(Constant::iMinutesInHour, MinutesPerItem) != 0) { - ShowSevereCustom(state, eoh, EnergyPlus::format("{}={} not evenly divisible into 60", cNumericFields(1), MinutesPerItem)); + ShowSevereCustom(state, eoh, std::format("{}={} not evenly divisible into 60", cNumericFields(1), MinutesPerItem)); ErrorsFound = true; continue; } @@ -1033,11 +1031,11 @@ namespace Sched { daySched->populateFromMinuteVals(state, minuteVals); if (daySched->checkValsForLimitViolations(state)) { - ShowWarningCustom(state, eoh, EnergyPlus::format("Values are outside of range for {}={}", cAlphaFields(2), Alphas(2))); + ShowWarningCustom(state, eoh, std::format("Values are outside of range for {}={}", cAlphaFields(2), Alphas(2))); } if (daySched->checkValsForBadIntegers(state)) { - ShowWarningCustom(state, eoh, EnergyPlus::format("One or more values are not integer for {}={}", cAlphaFields(2), Alphas(2))); + ShowWarningCustom(state, eoh, std::format("One or more values are not integer for {}={}", cAlphaFields(2), Alphas(2))); } } @@ -1110,14 +1108,14 @@ namespace Sched { auto *daySched = GetDaySchedule(state, Alphas(idx + 1)); if (daySched == nullptr) { ShowSevereItemNotFoundAudit(state, eoh, cAlphaFields(idx + 1), Alphas(idx + 1)); - ShowContinueError(state, EnergyPlus::format("ref: {} \"{}\"", cAlphaFields(idx), Alphas(idx))); + ShowContinueError(state, std::format("ref: {} \"{}\"", cAlphaFields(idx), Alphas(idx))); ErrorsFound = true; } else { std::fill(theseDays.begin(), theseDays.end(), false); ErrorHere = false; ProcessForDayTypes(state, Alphas(idx), theseDays, allDays, ErrorHere); if (ErrorHere) { - ShowContinueError(state, EnergyPlus::format("{}: {}=\"{}", routineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("{}: {}=\"{}", routineName, CurrentModuleObject, Alphas(1))); ErrorsFound = true; } else { for (int iDayType = 1; iDayType < (int)DayType::Num; ++iDayType) { @@ -1134,8 +1132,7 @@ namespace Sched { if (allDays[iDayType] == true) { continue; } - ShowSevereError(state, - EnergyPlus::format("{}: {}=\"{}\", Missing some day assignments", routineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}: {}=\"{}\", Missing some day assignments", routineName, CurrentModuleObject, Alphas(1))); ErrorsFound = true; break; } @@ -1316,7 +1313,7 @@ namespace Sched { while (NumField < NumAlphas) { // Process "Through" if (!has_prefix(Alphas(NumField), "THROUGH:") && !has_prefix(Alphas(NumField), "THROUGH")) { - ShowSevereCustom(state, eoh, EnergyPlus::format("Expecting \"Through:\" date, instead found entry={}", Alphas(NumField))); + ShowSevereCustom(state, eoh, std::format("Expecting \"Through:\" date, instead found entry={}", Alphas(NumField))); ErrorsFound = true; goto Through_exit; } @@ -1329,7 +1326,7 @@ namespace Sched { ErrorHere = false; ProcessDateString(state, Alphas(NumField), EndMonth, EndDay, PWeekDay, PDateType, ErrorHere); if (PDateType == Weather::DateType::NthDayInMonth || PDateType == Weather::DateType::LastDayInMonth) { - ShowSevereCustom(state, eoh, EnergyPlus::format("Invalid \"Through:\" date, found entry={}", Alphas(NumField))); + ShowSevereCustom(state, eoh, std::format("Invalid \"Through:\" date, found entry={}", Alphas(NumField))); ErrorsFound = true; goto Through_exit; } @@ -1344,9 +1341,7 @@ namespace Sched { if (EndPointer == 366) { if (FullYearSet) { ShowSevereCustom( - state, - eoh, - EnergyPlus::format("New \"Through\" entry when \"full year\" already set \"Through\" field={}", CurrentThrough)); + state, eoh, std::format("New \"Through\" entry when \"full year\" already set \"Through\" field={}", CurrentThrough)); ErrorsFound = true; } FullYearSet = true; @@ -1354,7 +1349,7 @@ namespace Sched { ++WkCount; - auto *weekSched = AddWeekSchedule(state, EnergyPlus::format("{}_wk_{}", Alphas(1), WkCount)); + auto *weekSched = AddWeekSchedule(state, std::format("{}_wk_{}", Alphas(1), WkCount)); weekSched->isUsed = true; for (int iDay = StartPointer; iDay <= EndPointer; ++iDay) { @@ -1373,14 +1368,14 @@ namespace Sched { } // "For" must be next, adds to "# Day Schedules" if (!has_prefix(Alphas(NumField), "FOR")) { - ShowSevereCustom(state, eoh, EnergyPlus::format("Looking for \"For\" field, found={}", Alphas(NumField))); + ShowSevereCustom(state, eoh, std::format("Looking for \"For\" field, found={}", Alphas(NumField))); ErrorsFound = true; goto Through_exit; } ++DyCount; - auto *daySched = AddDaySchedule(state, EnergyPlus::format("{}_dy_{}", Alphas(1), DyCount)); + auto *daySched = AddDaySchedule(state, std::format("{}_dy_{}", Alphas(1), DyCount)); daySched->schedTypeNum = sched->schedTypeNum; daySched->isUsed = true; @@ -1390,8 +1385,8 @@ namespace Sched { LastFor = Alphas(NumField); ProcessForDayTypes(state, Alphas(NumField), theseDays, allDays, ErrorHere); if (ErrorHere) { - ShowContinueError(state, EnergyPlus::format("ref {}=\"{}\"", CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("ref Through field={}", Alphas(ThruField))); + ShowContinueError(state, std::format("ref {}=\"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("ref Through field={}", Alphas(ThruField))); ErrorsFound = true; } else { for (int iDayType = 1; iDayType < (int)DayType::Num; ++iDayType) { @@ -1437,13 +1432,13 @@ namespace Sched { ShowSevereCustom( state, eoh, - EnergyPlus::format("Until field=[{}] has illegal value field=[{}].", Alphas(NumField - 1), Alphas(NumField))); + std::format("Until field=[{}] has illegal value field=[{}].", Alphas(NumField - 1), Alphas(NumField))); ErrorsFound = true; } ++NumField; Alphas(UntilFld + xxcount) = Alphas(NumField); // In case next is "until" } else { - ShowSevereCustom(state, eoh, EnergyPlus::format("Looking for \"Until\" field, found={}", Alphas(NumField))); + ShowSevereCustom(state, eoh, std::format("Looking for \"Until\" field, found={}", Alphas(NumField))); ErrorsFound = true; goto Through_exit; } @@ -1469,7 +1464,7 @@ namespace Sched { daySched->interpolation); // Depending on value of "Interpolate" field, the value for each time step in each hour gets processed: if (ErrorHere) { - ShowContinueError(state, EnergyPlus::format("ref {}=\"{}\"", CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("ref {}=\"{}\"", CurrentModuleObject, Alphas(1))); ErrorsFound = true; } @@ -1483,15 +1478,15 @@ namespace Sched { continue; } - ShowWarningCustom(state, eoh, EnergyPlus::format("has missing day types in Through={}", CurrentThrough)); - ShowContinueError(state, EnergyPlus::format("Last \"For\" field={}", LastFor)); + ShowWarningCustom(state, eoh, std::format("has missing day types in Through={}", CurrentThrough)); + ShowContinueError(state, std::format("Last \"For\" field={}", LastFor)); std::string errmsg = "Missing day types=,"; for (int kDayType = iDayType_Sun; kDayType < (int)DayType::Num; ++kDayType) { if (allDays[kDayType]) { continue; } errmsg.erase(errmsg.length() - 1); - errmsg = EnergyPlus::format("{} \"{}\",-", errmsg, dayTypeNames[kDayType]); + errmsg = std::format("{} \"{}\",-", errmsg, dayTypeNames[kDayType]); } errmsg.erase(errmsg.length() - 2); ShowContinueError(state, errmsg); @@ -1613,11 +1608,10 @@ namespace Sched { Numbers(3) = 8760.0; } if (Numbers(3) != 8760 && Numbers(3) != 8784) { - ShowSevereCustom(state, - eoh, - EnergyPlus::format("{} must = 8760 or 8784 (for a leap year). Value = {:.0T}, Schedule not processed.", - cNumericFields(3), - Numbers(3))); + ShowSevereCustom( + state, + eoh, + std::format("{} must = 8760 or 8784 (for a leap year). Value = {:.0f}, Schedule not processed.", cNumericFields(3), Numbers(3))); ErrorsFound = true; continue; } @@ -1661,9 +1655,7 @@ namespace Sched { // int NumExpectedItems = 1440 / MinutesPerItem; if (mod(Constant::iMinutesInHour, minutesPerItem) != 0) { ShowSevereCustom( - state, - eoh, - EnergyPlus::format("Requested {} field value ({}) not evenly divisible into 60", cNumericFields(4), minutesPerItem)); + state, eoh, std::format("Requested {} field value ({}) not evenly divisible into 60", cNumericFields(4), minutesPerItem)); ErrorsFound = true; continue; } @@ -1673,7 +1665,7 @@ namespace Sched { int rowLimitCnt = (Numbers(3) * Constant::rMinutesInHour) / minutesPerItem; int hrLimitCount = Constant::iMinutesInHour / minutesPerItem; - std::string contextString = EnergyPlus::format("{}=\"{}\", {}: ", CurrentModuleObject, Alphas(1), cAlphaFields(3)); + std::string contextString = std::format("{}=\"{}\", {}: ", CurrentModuleObject, Alphas(1), cAlphaFields(3)); state.files.TempFullFilePath.filePath = CheckForActualFilePath(state, Alphas(3), contextString); // Setup file reading parameters @@ -1696,7 +1688,7 @@ namespace Sched { ShowSevereCustom(state, eoh, error); } } - ShowContinueError(state, fmt::format("Error Occurred in {}", state.files.TempFullFilePath.filePath)); + ShowContinueError(state, std::format("Error Occurred in {}", state.files.TempFullFilePath.filePath.string())); ShowFatalError(state, "Program terminates due to previous condition."); } for (const auto &[warning, isContinued] : csvParser.warnings()) { @@ -1723,8 +1715,8 @@ namespace Sched { result = it.first; isCSV = true; ShowWarningMessage(state, - fmt::format("Extension of file {} is unrecognized, but parsed as CSV successfully", - state.files.TempFullFilePath.filePath)); + std::format("Extension of file {} is unrecognized, but parsed as CSV successfully", + state.files.TempFullFilePath.filePath.string())); } } catch (...) { // We're testing to see if this is a csv, if any exception exists, then throw the standard error about an unknown @@ -1737,8 +1729,8 @@ namespace Sched { FileSystem::readJSON(state.files.TempFullFilePath.filePath)); result = it.first; ShowWarningMessage(state, - fmt::format("Extension of file {} is unrecognized, but parsed as JSON successfully", - state.files.TempFullFilePath.filePath)); + std::format("Extension of file {} is unrecognized, but parsed as JSON successfully", + state.files.TempFullFilePath.filePath.string())); isJSON = true; } catch (...) { // We're testing to see if this is json, if any exception exists, then throw the standard error about an unknown @@ -1747,11 +1739,10 @@ namespace Sched { } } if (!isCSV && !isJSON) { - ShowSevereCustom(state, - eoh, - EnergyPlus::format("{} = {} has an unknown file extension and cannot be read by this program.", - cAlphaFields(3), - Alphas(3))); + ShowSevereCustom( + state, + eoh, + std::format("{} = {} has an unknown file extension and cannot be read by this program.", cAlphaFields(3), Alphas(3))); ShowFatalError(state, "Program terminates due to previous condition."); } } @@ -1762,8 +1753,8 @@ namespace Sched { ShowSevereCustom( state, eoh, - EnergyPlus::format("Requested column number {}, but found only {} columns.", curcolCount, result->second["values"].size())); - ShowContinueError(state, fmt::format("Error Occurred in {}", state.files.TempFullFilePath.filePath)); + std::format("Requested column number {}, but found only {} columns.", curcolCount, result->second["values"].size())); + ShowContinueError(state, std::format("Error Occurred in {}", state.files.TempFullFilePath.filePath.string())); ShowFatalError(state, "Program terminates due to previous condition."); } auto const &column_json = result->second["values"][curcolCount - 1]; @@ -1773,9 +1764,9 @@ namespace Sched { try { column_values = column_json.get>(); } catch (nlohmann::json::type_error &e) { - ShowSevereCustom(state, eoh, EnergyPlus::format("Column number {} has non-numeric data.", curcolCount)); + ShowSevereCustom(state, eoh, std::format("Column number {} has non-numeric data.", curcolCount)); ShowContinueError(state, e.what()); - ShowContinueError(state, fmt::format("Error Occurred in {}", state.files.TempFullFilePath.filePath)); + ShowContinueError(state, std::format("Error Occurred in {}", state.files.TempFullFilePath.filePath.string())); ShowFatalError(state, "Program terminates due to previous condition."); } @@ -1784,18 +1775,18 @@ namespace Sched { if (numerrors > 0) { ShowWarningCustom(state, eoh, - EnergyPlus::format("{} records had errors - these values are set to 0." - "Use Output:Diagnostics,DisplayExtraWarnings; to see individual records in error.", - numerrors)); + std::format("{} records had errors - these values are set to 0." + "Use Output:Diagnostics,DisplayExtraWarnings; to see individual records in error.", + numerrors)); } if (rowCnt < rowLimitCnt) { ShowWarningCustom(state, eoh, - EnergyPlus::format("less than {} hourly values read from file." - "..Number read={}.", - numHourlyValues, - (rowCnt * Constant::iMinutesInHour) / minutesPerItem)); + std::format("less than {} hourly values read from file." + "..Number read={}.", + numHourlyValues, + (rowCnt * Constant::iMinutesInHour) / minutesPerItem)); } // process the data into the normal schedule data structures @@ -1814,11 +1805,11 @@ namespace Sched { // no matter what the day type that is used in a design day. // define day schedule - auto *daySched = AddDaySchedule(state, EnergyPlus::format("{}_dy_{}", Alphas(1), iDay)); + auto *daySched = AddDaySchedule(state, std::format("{}_dy_{}", Alphas(1), iDay)); daySched->schedTypeNum = sched->schedTypeNum; // define week schedule - auto *weekSched = AddWeekSchedule(state, EnergyPlus::format("{}_wk_{}", Alphas(1), iDay)); + auto *weekSched = AddWeekSchedule(state, std::format("{}_wk_{}", Alphas(1), iDay)); // for all day types point the week schedule to the newly defined day schedule for (int kDayType = 1; kDayType < (int)DayType::Num; ++kDayType) { @@ -1890,9 +1881,9 @@ namespace Sched { ShowSevereCustom( state, eoh, - fmt::format( + std::format( "For header '{}', Requested column number {}, but found only {} columns.", header, column + 1, values_json.size())); - ShowContinueError(state, fmt::format("Error Occurred in {}", schedule_file_shading_result->first)); + ShowContinueError(state, std::format("Error Occurred in {}", schedule_file_shading_result->first.string())); ShowFatalError(state, "Program terminates due to previous condition."); } @@ -1900,17 +1891,17 @@ namespace Sched { try { column_values = values_json.at(column).get>(); } catch (nlohmann::json::type_error &e) { - ShowSevereCustom(state, eoh, fmt::format("Column number {} has non-numeric data.", column + 1)); + ShowSevereCustom(state, eoh, std::format("Column number {} has non-numeric data.", column + 1)); ShowContinueError(state, e.what()); - ShowContinueError(state, fmt::format("Error Occurred in {}", schedule_file_shading_result->first)); + ShowContinueError(state, std::format("Error Occurred in {}", schedule_file_shading_result->first.string())); ShowFatalError(state, "Program terminates due to previous condition."); } - std::string curName = EnergyPlus::format("{}_shading", header); + std::string curName = std::format("{}_shading", header); std::string curNameUC = Util::makeUPPER(curName); if (s_sched->scheduleMap.find(curNameUC) != s_sched->scheduleMap.end()) { - ShowSevereError(state, EnergyPlus::format("Duplicate schedule name {}", curName)); + ShowSevereError(state, std::format("Duplicate schedule name {}", curName)); ErrorsFound = true; continue; } @@ -1928,11 +1919,11 @@ namespace Sched { } // day schedule - auto *daySched = AddDaySchedule(state, EnergyPlus::format("{}_dy_{}", curName, iDay)); + auto *daySched = AddDaySchedule(state, std::format("{}_dy_{}", curName, iDay)); daySched->schedTypeNum = schedShading->schedTypeNum; // define week schedule - auto *weekSched = AddWeekSchedule(state, EnergyPlus::format("{}_wk_{}", curName, iDay)); + auto *weekSched = AddWeekSchedule(state, std::format("{}_wk_{}", curName, iDay)); // for all day types point the week schedule to the newly defined day schedule for (int kDayType = 1; kDayType < (int)DayType::Num; ++kDayType) { @@ -2038,7 +2029,7 @@ namespace Sched { // TODO: I'm not sure this Jazz is necessary // Add day schedule - auto *daySched = AddDaySchedule(state, EnergyPlus::format("{}_xi_dy_", Alphas(1))); + auto *daySched = AddDaySchedule(state, std::format("{}_xi_dy_", Alphas(1))); daySched->isUsed = true; daySched->schedTypeNum = sched->schedTypeNum; @@ -2046,11 +2037,10 @@ namespace Sched { // It will be overwritten during run time stepping after the warm up period if (NumNumbers < 1) { ShowWarningCustom(state, eoh, "Initial value is not numeric or is missing. Fix idf file."); - NumErrorFlag = true; } ExternalInterfaceSetSchedule(state, daySched->Num, Numbers(1)); - auto *weekSched = AddWeekSchedule(state, EnergyPlus::format("{}_xi_wk_", Alphas(1))); + auto *weekSched = AddWeekSchedule(state, std::format("{}_xi_wk_", Alphas(1))); weekSched->isUsed = true; for (int iDayType = 1; iDayType < (int)DayType::Num; ++iDayType) { weekSched->dayScheds[iDayType] = daySched; @@ -2084,9 +2074,9 @@ namespace Sched { if (NumExternalInterfaceSchedules >= 1) { ShowContinueError( state, - EnergyPlus::format("{} defined as an ExternalInterface:Schedule and ExternalInterface:FunctionalMockupUnitImport:To:Schedule." - "This will cause the schedule to be overwritten by PtolemyServer and FunctionalMockUpUnitImport)", - cAlphaFields(1))); + std::format("{} defined as an ExternalInterface:Schedule and ExternalInterface:FunctionalMockupUnitImport:To:Schedule." + "This will cause the schedule to be overwritten by PtolemyServer and FunctionalMockUpUnitImport)", + cAlphaFields(1))); } ErrorsFound = true; continue; @@ -2106,7 +2096,7 @@ namespace Sched { // TODO: I'm not sure this Jazz is necessary // Add day schedule - auto *daySched = AddDaySchedule(state, EnergyPlus::format("{}_xi_dy_", Alphas(1))); + auto *daySched = AddDaySchedule(state, std::format("{}_xi_dy_", Alphas(1))); daySched->isUsed = true; daySched->schedTypeNum = sched->schedTypeNum; @@ -2114,11 +2104,10 @@ namespace Sched { // It will be overwritten during run time stepping after the warm up period if (NumNumbers < 1) { ShowWarningCustom(state, eoh, "Initial value is not numeric or is missing. Fix idf file."); - NumErrorFlag = true; } ExternalInterfaceSetSchedule(state, daySched->Num, Numbers(1)); - auto *weekSched = AddWeekSchedule(state, EnergyPlus::format("{}_xi_wk_", Alphas(1))); + auto *weekSched = AddWeekSchedule(state, std::format("{}_xi_wk_", Alphas(1))); weekSched->isUsed = true; for (int iDayType = 1; iDayType < (int)DayType::Num; ++iDayType) { weekSched->dayScheds[iDayType] = daySched; @@ -2152,9 +2141,9 @@ namespace Sched { if (NumExternalInterfaceSchedules >= 1) { ShowContinueError( state, - EnergyPlus::format("{} defined as an ExternalInterface:Schedule and ExternalInterface:FunctionalMockupUnitImport:To:Schedule." - "This will cause the schedule to be overwritten by PtolemyServer and FunctionalMockUpUnitImport)", - cAlphaFields(1))); + std::format("{} defined as an ExternalInterface:Schedule and ExternalInterface:FunctionalMockupUnitImport:To:Schedule." + "This will cause the schedule to be overwritten by PtolemyServer and FunctionalMockUpUnitImport)", + cAlphaFields(1))); } ErrorsFound = true; continue; @@ -2174,7 +2163,7 @@ namespace Sched { // TODO: I'm not sure this Jazz is necessary // Add day schedule - auto *daySched = AddDaySchedule(state, EnergyPlus::format("{}_xi_dy_", Alphas(1))); + auto *daySched = AddDaySchedule(state, std::format("{}_xi_dy_", Alphas(1))); daySched->isUsed = true; daySched->schedTypeNum = sched->schedTypeNum; @@ -2182,11 +2171,10 @@ namespace Sched { // It will be overwritten during run time stepping after the warm up period if (NumNumbers < 1) { ShowWarningCustom(state, eoh, "Initial value is not numeric or is missing. Fix idf file."); - NumErrorFlag = true; } ExternalInterfaceSetSchedule(state, daySched->Num, Numbers(1)); - auto *weekSched = AddWeekSchedule(state, EnergyPlus::format("{}_xi_wk_", Alphas(1))); + auto *weekSched = AddWeekSchedule(state, std::format("{}_xi_wk_", Alphas(1))); weekSched->isUsed = true; for (int iDayType = 1; iDayType < (int)DayType::Num; ++iDayType) { weekSched->dayScheds[iDayType] = daySched; @@ -2215,7 +2203,7 @@ namespace Sched { } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}: Preceding Errors cause termination.", routineName)); + ShowFatalError(state, std::format("{}: Preceding Errors cause termination.", routineName)); } if (s_sched->scheduleTypes.size() + s_sched->daySchedules.size() + s_sched->weekSchedules.size() + s_sched->schedules.size() > 0) { @@ -2246,8 +2234,8 @@ namespace Sched { } else { ShowWarningCustom(state, eoh, - EnergyPlus::format("Report level {} has already been processed. This report level will not be processed again.", - reportLevelNames[(int)reportLevel])); + std::format("Report level {} has already been processed. This report level will not be processed again.", + reportLevelNames[(int)reportLevel])); continue; } } @@ -2341,17 +2329,17 @@ namespace Sched { for (int hr = 0; hr < Constant::iHoursInDay; ++hr) { if (LevelOfDetail == ReportLevel::TimeStep) { for (int ts = 0; ts < s_glob->TimeStepsInHour - 1; ++ts) { - times.emplace_back(fmt::format("{}:{:02}", HrField[hr], ((ts + 1)) * s_glob->MinutesInTimeStep)); + times.emplace_back(std::format("{}:{:02}", HrField[hr], ((ts + 1)) * s_glob->MinutesInTimeStep)); } } - times.emplace_back(fmt::format("{}:00", HrField[hr + 1])); + times.emplace_back(std::format("{}:00", HrField[hr + 1])); } assert(static_cast(times.size()) == NumTimesInDay); std::string_view const &reportLevelName = reportLevelNames[(int)LevelOfDetail]; - std::string const dayScheduleTableName = EnergyPlus::format("DaySchedule - {}", reportLevelName); - std::string const weekScheduleTableName = EnergyPlus::format("WeekSchedule - {}", reportLevelName); // TODO: "Schedule:Week:Daily" ? - std::string const scheduleTableName = EnergyPlus::format("Schedule - {}", reportLevelName); // TODO: "Detailed Schedule" maybe? + std::string const dayScheduleTableName = std::format("DaySchedule - {}", reportLevelName); + std::string const weekScheduleTableName = std::format("WeekSchedule - {}", reportLevelName); // TODO: "Schedule:Week:Daily" ? + std::string const scheduleTableName = std::format("Schedule - {}", reportLevelName); // TODO: "Detailed Schedule" maybe? // Schedule Types Header { @@ -2508,7 +2496,7 @@ namespace Sched { // Hourly Value if (hr > Constant::iHoursInDay) { - ShowFatalError(state, EnergyPlus::format("LookUpScheduleValue called with thisHour={}", hr)); + ShowFatalError(state, std::format("LookUpScheduleValue called with thisHour={}", hr)); } int thisHr = hr + state.dataEnvrn->DSTIndicator * static_cast(this->UseDaylightSaving); @@ -2776,9 +2764,9 @@ namespace Sched { if (NumUntils != NumNumbers) { ShowSevereError( state, - EnergyPlus::format("ProcessScheduleInput: ProcessIntervalFields, number of Time fields does not match number of value fields, {}={}", - ErrContext, - DayScheduleName)); + std::format("ProcessScheduleInput: ProcessIntervalFields, number of Time fields does not match number of value fields, {}={}", + ErrContext, + DayScheduleName)); ErrorsFound = true; return; } @@ -2796,24 +2784,22 @@ namespace Sched { } else if (Pos == (int)std::string::npos) { DecodeHHMMField(state, until, HHField, MMField, ErrorsFound, DayScheduleName, until, interpolation); } else { // Until found but wasn't first field - ShowSevereError(state, - EnergyPlus::format("ProcessScheduleInput: ProcessIntervalFields, Invalid \"Until\" field encountered={}", until)); - ShowContinueError(state, EnergyPlus::format("Occurred in Day Schedule={}", DayScheduleName)); + ShowSevereError(state, std::format("ProcessScheduleInput: ProcessIntervalFields, Invalid \"Until\" field encountered={}", until)); + ShowContinueError(state, std::format("Occurred in Day Schedule={}", DayScheduleName)); ErrorsFound = true; continue; } // Field decoded if (HHField < 0 || HHField > Constant::iHoursInDay || MMField < 0 || MMField > Constant::iMinutesInHour) { - ShowSevereError(state, - EnergyPlus::format("ProcessScheduleInput: ProcessIntervalFields, Invalid \"Until\" field encountered={}", until)); - ShowContinueError(state, EnergyPlus::format("Occurred in Day Schedule={}", DayScheduleName)); + ShowSevereError(state, std::format("ProcessScheduleInput: ProcessIntervalFields, Invalid \"Until\" field encountered={}", until)); + ShowContinueError(state, std::format("Occurred in Day Schedule={}", DayScheduleName)); ErrorsFound = true; continue; } if (HHField == Constant::iHoursInDay && MMField > 0 && MMField < Constant::iMinutesInHour) { - ShowWarningError( - state, EnergyPlus::format("ProcessScheduleInput: ProcessIntervalFields, Invalid \"Until\" field encountered={}", Untils(Count))); - ShowContinueError(state, EnergyPlus::format("Occurred in Day Schedule={}", DayScheduleName)); + ShowWarningError(state, + std::format("ProcessScheduleInput: ProcessIntervalFields, Invalid \"Until\" field encountered={}", Untils(Count))); + ShowContinueError(state, std::format("Occurred in Day Schedule={}", DayScheduleName)); ShowContinueError(state, "Terminating the field at 24:00"); MMField = 0; } @@ -2847,26 +2833,26 @@ namespace Sched { if (begHr == endHr + 1 && begMin == 0 && endMin == Constant::iMinutesInHour - 1) { ShowWarningError( state, - EnergyPlus::format("ProcessScheduleInput: ProcessIntervalFields, Processing time fields, zero time interval detected, {}={}", - ErrContext, - DayScheduleName)); + std::format("ProcessScheduleInput: ProcessIntervalFields, Processing time fields, zero time interval detected, {}={}", + ErrContext, + DayScheduleName)); } else { ShowSevereError( state, - EnergyPlus::format("ProcessScheduleInput: ProcessIntervalFields, Processing time fields, overlapping times detected, {}={}", - ErrContext, - DayScheduleName)); + std::format("ProcessScheduleInput: ProcessIntervalFields, Processing time fields, overlapping times detected, {}={}", + ErrContext, + DayScheduleName)); ErrorsFound = true; } } else if (begHr == endHr) { for (int iMin = begMin; iMin <= endMin; ++iMin) { if (setMinuteVals[begHr * Constant::iMinutesInHour + iMin] == true) { - ShowSevereError(state, - EnergyPlus::format( - "ProcessScheduleInput: ProcessIntervalFields, Processing time fields, overlapping times detected, {}={}", - ErrContext, - DayScheduleName)); + ShowSevereError( + state, + std::format("ProcessScheduleInput: ProcessIntervalFields, Processing time fields, overlapping times detected, {}={}", + ErrContext, + DayScheduleName)); ErrorsFound = true; goto UntilLoop_exit; } @@ -2950,11 +2936,10 @@ namespace Sched { for (int iMin = 0; iMin < Constant::iMinutesInDay; ++iMin) { if (setMinuteVals[iMin] == false) { - ShowSevereError( - state, - EnergyPlus::format("ProcessScheduleInput: ProcessIntervalFields, Processing time fields, incomplete day detected, {}={}", - ErrContext, - DayScheduleName)); + ShowSevereError(state, + std::format("ProcessScheduleInput: ProcessIntervalFields, Processing time fields, incomplete day detected, {}={}", + ErrContext, + DayScheduleName)); ErrorsFound = true; } } @@ -2986,11 +2971,10 @@ namespace Sched { auto const &s_glob = state.dataGlobal; if (Pos == std::string::npos) { - ShowSevereError( - state, - EnergyPlus::format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (no : separator in hh:mm)={}", - stripped(FullFieldValue))); - ShowContinueError(state, EnergyPlus::format("Occurred in Day Schedule={}", DayScheduleName)); + ShowSevereError(state, + std::format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (no : separator in hh:mm)={}", + stripped(FullFieldValue))); + ShowContinueError(state, std::format("Occurred in Day Schedule={}", DayScheduleName)); ErrorsFound = true; return; } @@ -3004,18 +2988,16 @@ namespace Sched { if (double(RetHH) != rRetHH && rRetHH >= 0.0) { ShowWarningError( state, - EnergyPlus::format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (non-integer numeric in HH)={}", - stripped(FullFieldValue))); - ShowContinueError(state, EnergyPlus::format("Other errors may result. Occurred in Day Schedule={}", DayScheduleName)); + std::format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (non-integer numeric in HH)={}", + stripped(FullFieldValue))); + ShowContinueError(state, std::format("Other errors may result. Occurred in Day Schedule={}", DayScheduleName)); nonIntegral = true; } else { - ShowSevereError( - state, - EnergyPlus::format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (invalid numeric in HH)={}", - stripped(FullFieldValue))); + ShowSevereError(state, + std::format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (invalid numeric in HH)={}", + stripped(FullFieldValue))); ShowContinueError( - state, - EnergyPlus::format("Field values must be integer and represent hours:minutes. Occurred in Day Schedule={}", DayScheduleName)); + state, std::format("Field values must be integer and represent hours:minutes. Occurred in Day Schedule={}", DayScheduleName)); ErrorsFound = true; return; } @@ -3030,18 +3012,16 @@ namespace Sched { if (double(RetMM) != rRetMM && rRetMM >= 0.0) { ShowWarningError( state, - EnergyPlus::format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (non-integer numeric in MM)={}", - stripped(FullFieldValue))); - ShowContinueError(state, EnergyPlus::format("Other errors may result. Occurred in Day Schedule={}", DayScheduleName)); + std::format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (non-integer numeric in MM)={}", + stripped(FullFieldValue))); + ShowContinueError(state, std::format("Other errors may result. Occurred in Day Schedule={}", DayScheduleName)); nonIntegral = true; } else { - ShowSevereError( - state, - EnergyPlus::format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (invalid numeric in MM)={}", - stripped(FullFieldValue))); + ShowSevereError(state, + std::format("ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field submitted (invalid numeric in MM)={}", + stripped(FullFieldValue))); ShowContinueError( - state, - EnergyPlus::format("Field values must be integer and represent hours:minutes. Occurred in Day Schedule={}", DayScheduleName)); + state, std::format("Field values must be integer and represent hours:minutes. Occurred in Day Schedule={}", DayScheduleName)); ErrorsFound = true; return; } @@ -3056,10 +3036,10 @@ namespace Sched { if (!isMinuteMultipleOfTimestep(RetMM, s_glob->MinutesInTimeStep)) { ShowWarningError( state, - EnergyPlus::format( + std::format( "ProcessScheduleInput: DecodeHHMMField, Invalid \"until\" field value is not a multiple of the minutes for each timestep: {}", stripped(FullFieldValue))); - ShowContinueError(state, EnergyPlus::format("Other errors may result. Occurred in Day Schedule={}", DayScheduleName)); + ShowContinueError(state, std::format("Other errors may result. Occurred in Day Schedule={}", DayScheduleName)); } } } @@ -3239,11 +3219,11 @@ namespace Sched { } if (DupAssignment) { - ShowSevereError(state, EnergyPlus::format("ProcessForDayTypes: Duplicate assignment attempted in \"for\" days field={}", ForDayField)); + ShowSevereError(state, std::format("ProcessForDayTypes: Duplicate assignment attempted in \"for\" days field={}", ForDayField)); ErrorsFound = true; } if (!OneValid) { - ShowSevereError(state, EnergyPlus::format("ProcessForDayTypes: No valid day assignments found in \"for\" days field={}", ForDayField)); + ShowSevereError(state, std::format("ProcessForDayTypes: No valid day assignments found in \"for\" days field={}", ForDayField)); ErrorsFound = true; } } // ProcessScheduleInput() @@ -3668,14 +3648,14 @@ namespace Sched { NeedOrphanMessage = false; } if (s_glob->DisplayUnusedSchedules) { - ShowMessage(state, EnergyPlus::format("Schedule:Year or Schedule:Compact or Schedule:File or Schedule:Constant={}", sched->Name)); + ShowMessage(state, std::format("Schedule:Year or Schedule:Compact or Schedule:File or Schedule:Constant={}", sched->Name)); } else { ++NumCount; } } if (NumCount > 0) { - ShowMessage(state, EnergyPlus::format("There are {} unused schedules in input.", NumCount)); + ShowMessage(state, std::format("There are {} unused schedules in input.", NumCount)); NeedUseMessage = true; } @@ -3695,14 +3675,14 @@ namespace Sched { NeedOrphanMessage = false; } if (s_glob->DisplayUnusedSchedules) { - ShowMessage(state, EnergyPlus::format("Schedule:Week:Daily or Schedule:Week:Compact={}", weekSched->Name)); + ShowMessage(state, std::format("Schedule:Week:Daily or Schedule:Week:Compact={}", weekSched->Name)); } else { ++NumCount; } } if (NumCount > 0) { - ShowMessage(state, fmt::format("There are {} unused week schedules in input.", NumCount)); + ShowMessage(state, std::format("There are {} unused week schedules in input.", NumCount)); NeedUseMessage = true; } @@ -3723,14 +3703,14 @@ namespace Sched { } if (s_glob->DisplayUnusedSchedules) { - ShowMessage(state, EnergyPlus::format("Schedule:Day:Hourly or Schedule:Day:Interval or Schedule:Day:List={}", daySched->Name)); + ShowMessage(state, std::format("Schedule:Day:Hourly or Schedule:Day:Interval or Schedule:Day:List={}", daySched->Name)); } else { ++NumCount; } } if (NumCount > 0) { - ShowMessage(state, EnergyPlus::format("There are {} unused day schedules in input.", NumCount)); + ShowMessage(state, std::format("There are {} unused day schedules in input.", NumCount)); NeedUseMessage = true; } @@ -3942,12 +3922,11 @@ namespace Sched { Real64 minVal, std::string_view msg) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowSevereError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError( - state, - EnergyPlus::format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMin == Clusive::In ? "<" : "<=", minVal)); + state, std::format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMin == Clusive::In ? "<" : "<=", minVal)); if (!msg.empty()) { - ShowContinueError(state, EnergyPlus::format("{}", msg)); + ShowContinueError(state, std::format("{}", msg)); } } @@ -3959,12 +3938,11 @@ namespace Sched { Real64 maxVal, std::string_view msg) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowSevereError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError( - state, - EnergyPlus::format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMax == Clusive::In ? ">" : ">=", maxVal)); + state, std::format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMax == Clusive::In ? ">" : ">=", maxVal)); if (!msg.empty()) { - ShowContinueError(state, EnergyPlus::format("{}", msg)); + ShowContinueError(state, std::format("{}", msg)); } } @@ -3978,17 +3956,17 @@ namespace Sched { Real64 maxVal, std::string_view msg) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowSevereError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError(state, - EnergyPlus::format("{} = {}, schedule contains values that are {} {} and/or {} {}", - fieldName, - fieldVal, - cluMin == Clusive::In ? "<" : "<=", - minVal, - cluMax == Clusive::In ? ">" : ">=", - maxVal)); + std::format("{} = {}, schedule contains values that are {} {} and/or {} {}", + fieldName, + fieldVal, + cluMin == Clusive::In ? "<" : "<=", + minVal, + cluMax == Clusive::In ? ">" : ">=", + maxVal)); if (!msg.empty()) { - ShowContinueError(state, EnergyPlus::format("{}", msg)); + ShowContinueError(state, std::format("{}", msg)); } } @@ -4000,12 +3978,11 @@ namespace Sched { Real64 minVal, std::string_view msg) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowWarningError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError( - state, - EnergyPlus::format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMin == Clusive::In ? "<" : "<=", minVal)); + state, std::format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMin == Clusive::In ? "<" : "<=", minVal)); if (!msg.empty()) { - ShowContinueError(state, EnergyPlus::format("{}", msg)); + ShowContinueError(state, std::format("{}", msg)); } } @@ -4017,12 +3994,11 @@ namespace Sched { Real64 maxVal, std::string_view msg) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowWarningError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError( - state, - EnergyPlus::format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMax == Clusive::In ? ">" : ">=", maxVal)); + state, std::format("{} = {}, schedule contains values that are {} {}", fieldName, fieldVal, cluMax == Clusive::In ? ">" : ">=", maxVal)); if (!msg.empty()) { - ShowContinueError(state, EnergyPlus::format("{}", msg)); + ShowContinueError(state, std::format("{}", msg)); } } @@ -4036,17 +4012,17 @@ namespace Sched { Real64 maxVal, std::string_view msg) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowWarningError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError(state, - EnergyPlus::format("{} = {}, schedule contains values that are {} {} and/or {} {}", - fieldName, - fieldVal, - cluMin == Clusive::In ? "<" : "<=", - minVal, - cluMax == Clusive::In ? ">" : ">=", - maxVal)); + std::format("{} = {}, schedule contains values that are {} {} and/or {} {}", + fieldName, + fieldVal, + cluMin == Clusive::In ? "<" : "<=", + minVal, + cluMax == Clusive::In ? ">" : ">=", + maxVal)); if (!msg.empty()) { - ShowContinueError(state, EnergyPlus::format("{}", msg)); + ShowContinueError(state, std::format("{}", msg)); } } diff --git a/src/EnergyPlus/SetPointManager.cc b/src/EnergyPlus/SetPointManager.cc index db871abea2c..895c73b146f 100644 --- a/src/EnergyPlus/SetPointManager.cc +++ b/src/EnergyPlus/SetPointManager.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -1265,9 +1266,8 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) spmSZOSH->zoneNodeNum = GetSystemNodeNumberForZone(state, spmSZOSH->ctrlZoneNum); if (allocated(state.dataZoneCtrls->StageZoneLogic)) { if (!state.dataZoneCtrls->StageZoneLogic(spmSZOSH->ctrlZoneNum)) { - ShowSevereError(state, - EnergyPlus::format("{}: {}=\"{}\", invalid field.", routineName, cCurrentModuleObject, spmSZOSH->Name)); - ShowContinueError(state, EnergyPlus::format("..invalid control_zone_name=\"{}\".", ctrlZoneName)); + ShowSevereError(state, std::format("{}: {}=\"{}\", invalid field.", routineName, cCurrentModuleObject, spmSZOSH->Name)); + ShowContinueError(state, std::format("..invalid control_zone_name=\"{}\".", ctrlZoneName)); ShowContinueError(state, "Zone thermostat must use ZoneControl:Thermostat:StagedDualSetpoint."); ErrorsFound = true; } @@ -1450,13 +1450,13 @@ void GetSetPointManagerInputData(EnergyPlusData &state, bool &ErrorsFound) // Also, do this check now that we have both RefNodeNum and ctrlNodeNums if (std::find(spmMA->ctrlNodeNums.begin(), spmMA->ctrlNodeNums.end(), spmMA->refNodeNum) != spmMA->ctrlNodeNums.end()) { - ShowSevereError(state, EnergyPlus::format("{}: {}=\"{}\", reference node.", routineName, cCurrentModuleObject, spmMA->Name)); + ShowSevereError(state, std::format("{}: {}=\"{}\", reference node.", routineName, cCurrentModuleObject, spmMA->Name)); if (spmMA->ctrlNodeNums.size() > 1) { ShowContinueError(state, "..Reference Node is the same as one of the nodes in SetPoint NodeList"); } else { ShowContinueError(state, "..Reference Node is the same as the SetPoint Node"); } - ShowContinueError(state, EnergyPlus::format("Reference Node Name=\"{}\".", state.dataLoopNodes->NodeID(spmMA->refNodeNum))); + ShowContinueError(state, std::format("Reference Node Name=\"{}\".", state.dataLoopNodes->NodeID(spmMA->refNodeNum))); ErrorsFound = true; } } break; @@ -1577,10 +1577,9 @@ void VerifySetPointManagers(EnergyPlusData &state, [[maybe_unused]] bool &Errors if (spm->ctrlNodeNums[iNode] != spm->ctrlNodeNums[jNode]) { continue; } - ShowWarningError(state, EnergyPlus::format("{} =\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); - ShowContinueError(state, - EnergyPlus::format("...duplicate node specified = {}", state.dataLoopNodes->NodeID(spm->ctrlNodeNums[iNode]))); - ShowContinueError(state, EnergyPlus::format("...control type variable = {}", ctrlVarTypeNamesUC[(int)spm->ctrlVar])); + ShowWarningError(state, std::format("{} =\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); + ShowContinueError(state, std::format("...duplicate node specified = {}", state.dataLoopNodes->NodeID(spm->ctrlNodeNums[iNode]))); + ShowContinueError(state, std::format("...control type variable = {}", ctrlVarTypeNamesUC[(int)spm->ctrlVar])); } } @@ -1596,11 +1595,10 @@ void VerifySetPointManagers(EnergyPlusData &state, [[maybe_unused]] bool &Errors // check the air loop name for duplicates in this SP manager type if (spm->airLoopNum == spm2->airLoopNum) { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); + ShowWarningError(state, std::format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); ShowContinueError(state, "...air loop name conflicts with another setpoint manager."); - ShowContinueError(state, - EnergyPlus::format("...conflicting setpoint manager = {} \"{}\"", spmTypeNames[(int)spm2->type], spm2->Name)); - ShowContinueError(state, EnergyPlus::format("...conflicting air loop name = {}", spm->airLoopName)); + ShowContinueError(state, std::format("...conflicting setpoint manager = {} \"{}\"", spmTypeNames[(int)spm2->type], spm2->Name)); + ShowContinueError(state, std::format("...conflicting air loop name = {}", spm->airLoopName)); // ErrorsFound=.TRUE. } @@ -1612,13 +1610,13 @@ void VerifySetPointManagers(EnergyPlusData &state, [[maybe_unused]] bool &Errors for (int iNode = 0; iNode < (int)spm->ctrlNodeNums.size(); ++iNode) { for (int jNode = 0; jNode < (int)spm2->ctrlNodeNums.size(); ++jNode) { if ((spm->ctrlNodeNums[iNode] == spm2->ctrlNodeNums[jNode]) && spm->ctrlNodeNums[iNode] != 0) { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); + ShowWarningError(state, std::format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); ShowContinueError(state, "...setpoint node conflicts with another setpoint manager."); - ShowContinueError( - state, EnergyPlus::format("...conflicting setpoint manager = {} \"{}\"", spmTypeNames[(int)spm2->type], spm2->Name)); - ShowContinueError( - state, EnergyPlus::format("...conflicting node name = {}", state.dataLoopNodes->NodeID(spm->ctrlNodeNums[iNode]))); - ShowContinueError(state, EnergyPlus::format("...control type variable = {}", ctrlVarTypeNames[(int)spm->ctrlVar])); + ShowContinueError(state, + std::format("...conflicting setpoint manager = {} \"{}\"", spmTypeNames[(int)spm2->type], spm2->Name)); + ShowContinueError(state, + std::format("...conflicting node name = {}", state.dataLoopNodes->NodeID(spm->ctrlNodeNums[iNode]))); + ShowContinueError(state, std::format("...control type variable = {}", ctrlVarTypeNames[(int)spm->ctrlVar])); // ErrorsFound=.TRUE. } } @@ -1640,23 +1638,23 @@ void VerifySetPointManagers(EnergyPlusData &state, [[maybe_unused]] bool &Errors // only warn if scheduled setpoint manager is setting mass flow rate on the same node used by RAB if (spm->type == SPMType::ReturnAirBypass || spm2->type == SPMType::ReturnAirBypass) { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); + ShowWarningError(state, std::format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); ShowContinueError(state, "...setpoint node conflicts with another setpoint manager."); - ShowContinueError( - state, EnergyPlus::format("...conflicting setpoint manager ={}:\"{}\"", spmTypeNames[(int)spm2->type], spm2->Name)); - ShowContinueError( - state, EnergyPlus::format("...conflicting node name = {}", state.dataLoopNodes->NodeID(spm->ctrlNodeNums[iNode]))); - ShowContinueError(state, EnergyPlus::format("...control type variable = {}", ctrlVarTypeNames[(int)spm->ctrlVar])); + ShowContinueError(state, + std::format("...conflicting setpoint manager ={}:\"{}\"", spmTypeNames[(int)spm2->type], spm2->Name)); + ShowContinueError(state, + std::format("...conflicting node name = {}", state.dataLoopNodes->NodeID(spm->ctrlNodeNums[iNode]))); + ShowContinueError(state, std::format("...control type variable = {}", ctrlVarTypeNames[(int)spm->ctrlVar])); ShowContinueError(state, "...return air bypass flow setpoint manager will have priority setting mass flow rate on this node."); } else { // severe error for other SP manager types - ShowWarningError(state, EnergyPlus::format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); + ShowWarningError(state, std::format("{}=\"{}\"", spmTypeNames[(int)spm->type], spm->Name)); ShowContinueError(state, "...setpoint node conflicts with another setpoint manager."); - ShowContinueError( - state, EnergyPlus::format("...conflicting setpoint manager = {}:\"{}\"", spmTypeNames[(int)spm2->type], spm2->Name)); - ShowContinueError( - state, EnergyPlus::format("...conflicting node name = {}", state.dataLoopNodes->NodeID(spm->ctrlNodeNums[iNode]))); - ShowContinueError(state, EnergyPlus::format("...control type variable = {}", ctrlVarTypeNames[(int)spm->ctrlVar])); + ShowContinueError(state, + std::format("...conflicting setpoint manager = {}:\"{}\"", spmTypeNames[(int)spm2->type], spm2->Name)); + ShowContinueError(state, + std::format("...conflicting node name = {}", state.dataLoopNodes->NodeID(spm->ctrlNodeNums[iNode]))); + ShowContinueError(state, std::format("...control type variable = {}", ctrlVarTypeNames[(int)spm->ctrlVar])); // ErrorsFound=.TRUE. } } @@ -1745,10 +1743,9 @@ void InitSetPointManagers(EnergyPlusData &state) } } if (ConZoneNum == 0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Zone Node not found:", spmTypeName, spmName)); + ShowSevereError(state, std::format("{}=\"{}\", Zone Node not found:", spmTypeName, spmName)); ShowContinueError( - state, - EnergyPlus::format("Node=\"{}\", not found in any controlled Zone", state.dataLoopNodes->NodeID(spmSZT->zoneNodeNum))); + state, std::format("Node=\"{}\", not found in any controlled Zone", state.dataLoopNodes->NodeID(spmSZT->zoneNodeNum))); ErrorsFound = true; } else { auto &zoneEquip = state.dataZoneEquip->ZoneEquipConfig(ConZoneNum); @@ -1760,11 +1757,11 @@ void InitSetPointManagers(EnergyPlusData &state) } if (!found) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", The zone inlet node of {}", - spmTypeName, - spmName, - state.dataLoopNodes->NodeID(spmSZT->zoneInletNodeNum))); - ShowContinueError(state, EnergyPlus::format("is not found in Zone = {}. Please check inputs.", zoneEquip.ZoneName)); + std::format("{}=\"{}\", The zone inlet node of {}", + spmTypeName, + spmName, + state.dataLoopNodes->NodeID(spmSZT->zoneInletNodeNum))); + ShowContinueError(state, std::format("is not found in Zone = {}. Please check inputs.", zoneEquip.ZoneName)); ErrorsFound = true; } } @@ -1785,7 +1782,7 @@ void InitSetPointManagers(EnergyPlusData &state) // still need to validate... if (spmSZH->ctrlZoneNum == 0) { // didn't find ShowSevereCustom( - state, eoh, EnergyPlus::format("could not find Controlled Zone={}", state.dataHeatBal->Zone(spmSZH->ctrlZoneNum).Name)); + state, eoh, std::format("could not find Controlled Zone={}", state.dataHeatBal->Zone(spmSZH->ctrlZoneNum).Name)); ErrorsFound = true; } else { // make sure humidity controlled zone @@ -1797,10 +1794,9 @@ void InitSetPointManagers(EnergyPlusData &state) } } if (!HstatZoneFound) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid humidistat specification", spmTypeName, spmName)); + ShowSevereError(state, std::format("{}=\"{}\", invalid humidistat specification", spmTypeName, spmName)); ShowContinueError( - state, - EnergyPlus::format("could not locate Humidistat in Zone={}", state.dataHeatBal->Zone(spmSZH->ctrlZoneNum).Name)); + state, std::format("could not locate Humidistat in Zone={}", state.dataHeatBal->Zone(spmSZH->ctrlZoneNum).Name)); ErrorsFound = true; } } @@ -1825,10 +1821,9 @@ void InitSetPointManagers(EnergyPlusData &state) } if (ConZoneNum == 0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", Zone Node not found:", spmTypeName, spmName)); + ShowSevereError(state, std::format("{}=\"{}\", Zone Node not found:", spmTypeName, spmName)); ShowContinueError( - state, - EnergyPlus::format("Node=\"{}\", not found in any controlled Zone", state.dataLoopNodes->NodeID(spmSZR->zoneNodeNum))); + state, std::format("Node=\"{}\", not found in any controlled Zone", state.dataLoopNodes->NodeID(spmSZR->zoneNodeNum))); ErrorsFound = true; } else { bool found = false; @@ -1841,16 +1836,16 @@ void InitSetPointManagers(EnergyPlusData &state) } if (!found) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", The zone inlet node of {}", - spmTypeName, - spmName, - state.dataLoopNodes->NodeID(spmSZR->zoneInletNodeNum))); - ShowContinueError(state, EnergyPlus::format("is not found in Zone = {}. Please check inputs.", zoneEquip.ZoneName)); + std::format("{}=\"{}\", The zone inlet node of {}", + spmTypeName, + spmName, + state.dataLoopNodes->NodeID(spmSZR->zoneInletNodeNum))); + ShowContinueError(state, std::format("is not found in Zone = {}. Please check inputs.", zoneEquip.ZoneName)); ErrorsFound = true; } if (spmSZR->airLoopNum == 0) { - ShowSevereError( - state, EnergyPlus::format("{}=\"{}\", The zone inlet node is not connected to an air loop.", spmTypeName, spmName)); + ShowSevereError(state, + std::format("{}=\"{}\", The zone inlet node is not connected to an air loop.", spmTypeName, spmName)); ErrorsFound = true; continue; } @@ -1916,12 +1911,12 @@ void InitSetPointManagers(EnergyPlusData &state) ShowSevereItemNotFound(state, eoh, "hvac_air_loop_name", spmT->airLoopName); ErrorsFound = true; } else if (state.dataAirLoop->AirToZoneNodeInfo(spmT->airLoopNum).NumZonesCooled == 0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no zones with cooling found:", spmTypeName, spmName)); - ShowContinueError(state, EnergyPlus::format("Air Loop provides no cooling, Air Loop=\"{}\".", spmT->airLoopName)); + ShowSevereError(state, std::format("{}=\"{}\", no zones with cooling found:", spmTypeName, spmName)); + ShowContinueError(state, std::format("Air Loop provides no cooling, Air Loop=\"{}\".", spmT->airLoopName)); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); + ShowSevereError(state, std::format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); ShowContinueError(state, "Setpoint Manager needs an AirLoopHVAC to operate."); ErrorsFound = true; } @@ -1941,12 +1936,12 @@ void InitSetPointManagers(EnergyPlusData &state) spmWTF->simReady = true; } if (state.dataAirLoop->AirToZoneNodeInfo(spmWTF->airLoopNum).NumZonesCooled == 0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no zones with cooling found:", spmTypeName, spmName)); - ShowContinueError(state, EnergyPlus::format("Air Loop provides no cooling, Air Loop=\"{}\".", spmWTF->airLoopName)); + ShowSevereError(state, std::format("{}=\"{}\", no zones with cooling found:", spmTypeName, spmName)); + ShowContinueError(state, std::format("Air Loop provides no cooling, Air Loop=\"{}\".", spmWTF->airLoopName)); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); + ShowSevereError(state, std::format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); ShowContinueError(state, "Setpoint Manager needs an AirLoopHVAC to operate."); ErrorsFound = true; } @@ -1973,12 +1968,12 @@ void InitSetPointManagers(EnergyPlusData &state) spmRAB->sysOutNodeNum = state.dataAirLoop->AirToZoneNodeInfo(spmRAB->airLoopNum).AirLoopSupplyNodeNum(1); spmRAB->ctrlNodeNums.push_back(spmRAB->rabSplitOutNodeNum); } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no RAB in air loop found:", spmTypeName, spmName)); - ShowContinueError(state, EnergyPlus::format("Air Loop=\"{}\".", spmRAB->airLoopName)); + ShowSevereError(state, std::format("{}=\"{}\", no RAB in air loop found:", spmTypeName, spmName)); + ShowContinueError(state, std::format("Air Loop=\"{}\".", spmRAB->airLoopName)); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); + ShowSevereError(state, std::format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); ShowContinueError(state, "Setpoint Manager needs an AirLoopHVAC to operate."); ErrorsFound = true; } @@ -1998,12 +1993,12 @@ void InitSetPointManagers(EnergyPlusData &state) } if (state.dataAirLoop->AirToZoneNodeInfo(spmMZTemp->airLoopNum).NumZonesCooled == 0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no zones with cooling found:", spmTypeName, spmName)); - ShowContinueError(state, EnergyPlus::format("Air Loop provides no cooling, Air Loop=\"{}\".", spmMZTemp->airLoopName)); + ShowSevereError(state, std::format("{}=\"{}\", no zones with cooling found:", spmTypeName, spmName)); + ShowContinueError(state, std::format("Air Loop provides no cooling, Air Loop=\"{}\".", spmMZTemp->airLoopName)); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); + ShowSevereError(state, std::format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); ShowContinueError(state, "Setpoint Manager needs an AirLoopHVAC to operate."); ErrorsFound = true; } @@ -2037,15 +2032,15 @@ void InitSetPointManagers(EnergyPlusData &state) } if (!HstatZoneFound) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid humidistat specification", spmTypeName, spmName)); - ShowContinueError(state, - EnergyPlus::format("could not locate Humidistat in any of the zones served by the Air loop={}", - primaryAirSystem.Name)); + ShowSevereError(state, std::format("{}=\"{}\", invalid humidistat specification", spmTypeName, spmName)); + ShowContinueError( + state, + std::format("could not locate Humidistat in any of the zones served by the Air loop={}", primaryAirSystem.Name)); ErrorsFound = true; } } } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); + ShowSevereError(state, std::format("{}=\"{}\", no AirLoopHVAC objects found:", spmTypeName, spmName)); ShowContinueError(state, "Setpoint Manager needs an AirLoopHVAC to operate."); ErrorsFound = true; } @@ -2067,8 +2062,8 @@ void InitSetPointManagers(EnergyPlusData &state) for (auto const &branch : plantLoop.LoopSide(LoopSideLocation::Supply).Branch) { for (auto const &comp : branch.Comp) { if (comp.Type == PlantEquipmentType::CoolingTower_SingleSpd) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid tower found", spmTypeName, spmName)); - ShowContinueError(state, EnergyPlus::format("Found SingleSpeed Cooling Tower, Cooling Tower={}", comp.Name)); + ShowSevereError(state, std::format("{}=\"{}\", invalid tower found", spmTypeName, spmName)); + ShowContinueError(state, std::format("Found SingleSpeed Cooling Tower, Cooling Tower={}", comp.Name)); ShowContinueError(state, "SingleSpeed cooling towers cannot be used with this setpoint manager."); ErrorsFound = true; } @@ -2149,8 +2144,8 @@ void InitSetPointManagers(EnergyPlusData &state) // Check if cooling tower is single speed and generate and error InitType = comp.Type; if (InitType == PlantEquipmentType::CoolingTower_SingleSpd) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid cooling tower found", spmTypeName, spmName)); - ShowContinueError(state, EnergyPlus::format("Found Single Speed Cooling Tower, Cooling Tower={}", comp.Name)); + ShowSevereError(state, std::format("{}=\"{}\", invalid cooling tower found", spmTypeName, spmName)); + ShowContinueError(state, std::format("Found Single Speed Cooling Tower, Cooling Tower={}", comp.Name)); ShowContinueError(state, "SingleSpeed cooling towers cannot be used with this setpoint manager on each loop"); ErrorsFound = true; } else if (InitType == PlantEquipmentType::CoolingTower_TwoSpd || @@ -2220,9 +2215,9 @@ void InitSetPointManagers(EnergyPlusData &state) } } if (NumChiller > 1) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", too many chillers found", spmTypeName, spmName)); + ShowSevereError(state, std::format("{}=\"{}\", too many chillers found", spmTypeName, spmName)); ShowContinueError(state, "only one chiller can be used with this setpoint manager on each loop"); - ShowContinueError(state, EnergyPlus::format("Found more than one chiller, chiller ={}", comp.Name)); + ShowContinueError(state, std::format("Found more than one chiller, chiller ={}", comp.Name)); ErrorsFound = true; } spmIdealCET->chillerType = ChillerType; @@ -2791,14 +2786,13 @@ void SPMOutsideAir::calculate(EnergyPlusData &state) ++this->setPtErrorCount; if (this->setPtErrorCount <= 10) { ShowSevereError( - state, - EnergyPlus::format("Schedule Values for the Outside Air Setpoint Manager = {} are something other than 1 or 2.", this->Name)); - ShowContinueError(state, EnergyPlus::format("...the value for the schedule currently is {}", SchedVal)); + state, std::format("Schedule Values for the Outside Air Setpoint Manager = {} are something other than 1 or 2.", this->Name)); + ShowContinueError(state, std::format("...the value for the schedule currently is {}", SchedVal)); ShowContinueError(state, "...the value is being interpreted as 1 for this run but should be fixed."); } else { ShowRecurringSevereErrorAtEnd( state, - EnergyPlus::format("Schedule Values for the Outside Air Setpoint Manager = {} are something other than 1 or 2.", this->Name), + std::format("Schedule Values for the Outside Air Setpoint Manager = {} are something other than 1 or 2.", this->Name), this->invalidSchedValErrorIndex); } } @@ -3020,9 +3014,8 @@ void SPMMixedAir::calculate(EnergyPlusData &state) if (refNode.TempSetPoint == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { ShowSevereError( - state, - EnergyPlus::format("CalcMixedAirSetPoint: Missing reference temperature setpoint for Mixed Air Setpoint Manager {}", this->Name)); - ShowContinueError(state, EnergyPlus::format("Node Referenced ={}", state.dataLoopNodes->NodeID(this->refNodeNum))); + state, std::format("CalcMixedAirSetPoint: Missing reference temperature setpoint for Mixed Air Setpoint Manager {}", this->Name)); + ShowContinueError(state, std::format("Node Referenced ={}", state.dataLoopNodes->NodeID(this->refNodeNum))); ShowContinueError( state, " use an additional Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at this node."); state.dataHVACGlobal->SetPointErrorFlag = true; @@ -3032,9 +3025,8 @@ void SPMMixedAir::calculate(EnergyPlusData &state) if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError( state, - EnergyPlus::format("CalcMixedAirSetPoint: Missing reference temperature setpoint for Mixed Air Setpoint Manager {}", - this->Name)); - ShowContinueError(state, EnergyPlus::format("Node Referenced ={}", state.dataLoopNodes->NodeID(this->refNodeNum))); + std::format("CalcMixedAirSetPoint: Missing reference temperature setpoint for Mixed Air Setpoint Manager {}", this->Name)); + ShowContinueError(state, std::format("Node Referenced ={}", state.dataLoopNodes->NodeID(this->refNodeNum))); ShowContinueError( state, " use an additional Setpoint Manager with Control Variable = \"Temperature\" to establish a setpoint at this node."); ShowContinueError(state, "Or add EMS Actuator to provide temperature setpoint at this node"); @@ -3131,10 +3123,10 @@ void SPMOutsideAirPretreat::calculate(EnergyPlusData &state) this->mySetPointCheckFlag = false; if (RefNodeSetPoint == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError(state, - EnergyPlus::format("CalcOAPretreatSetPoint: Missing reference setpoint for Outdoor Air Pretreat Setpoint Manager {}", - this->Name)); - ShowContinueError(state, EnergyPlus::format("Node Referenced ={}", state.dataLoopNodes->NodeID(this->refNodeNum))); + ShowSevereError( + state, + std::format("CalcOAPretreatSetPoint: Missing reference setpoint for Outdoor Air Pretreat Setpoint Manager {}", this->Name)); + ShowContinueError(state, std::format("Node Referenced ={}", state.dataLoopNodes->NodeID(this->refNodeNum))); ShowContinueError(state, "use a Setpoint Manager to establish a setpoint at this node."); ShowFatalError(state, "Missing reference setpoint."); } else { @@ -3152,9 +3144,8 @@ void SPMOutsideAirPretreat::calculate(EnergyPlusData &state) if (LocalSetPointCheckFailed) { ShowSevereError( state, - EnergyPlus::format("CalcOAPretreatSetPoint: Missing reference setpoint for Outdoor Air Pretreat Setpoint Manager {}", - this->Name)); - ShowContinueError(state, EnergyPlus::format("Node Referenced ={}", state.dataLoopNodes->NodeID(this->refNodeNum))); + std::format("CalcOAPretreatSetPoint: Missing reference setpoint for Outdoor Air Pretreat Setpoint Manager {}", this->Name)); + ShowContinueError(state, std::format("Node Referenced ={}", state.dataLoopNodes->NodeID(this->refNodeNum))); ShowContinueError(state, "use a Setpoint Manager to establish a setpoint at this node."); ShowContinueError(state, "Or use an EMS actuator to control a setpoint at this node."); ShowFatalError(state, "Missing reference setpoint."); @@ -4019,10 +4010,9 @@ void SPMReturnWaterTemp::calculate(EnergyPlusData &state) ShowContinueError(state, "The manager is specified to look to the return node setpoint to find a target return temperature, but the node " "setpoint was invalid"); - ShowContinueError( - state, - EnergyPlus::format("Verify that a separate setpoint manager is specified to set the setpoint on the return node named \"{}\"", - state.dataLoopNodes->NodeID(this->returnNodeNum))); + ShowContinueError(state, + std::format("Verify that a separate setpoint manager is specified to set the setpoint on the return node named \"{}\"", + state.dataLoopNodes->NodeID(this->returnNodeNum))); ShowContinueError(state, "Or change the target return temperature input type to constant or scheduled"); ShowFatalError(state, "Missing reference setpoint"); } @@ -4530,7 +4520,7 @@ void ResetHumidityRatioCtrlVarType(EnergyPlusData &state, int const NodeNum) } spm->ctrlVar = HVAC::CtrlVarType::MaxHumRat; - ShowWarningError(state, EnergyPlus::format("ResetHumidityRatioCtrlVarType: {}=\"{}\". ", spmTypeNames[(int)spm->type], spm->Name)); + ShowWarningError(state, std::format("ResetHumidityRatioCtrlVarType: {}=\"{}\". ", spmTypeNames[(int)spm->type], spm->Name)); ShowContinueError(state, " ..Humidity ratio control variable type specified is = HumidityRatio"); ShowContinueError(state, " ..Humidity ratio control variable type allowed with water coils is = MaximumHumidityRatio"); ShowContinueError(state, " ..Setpointmanager control variable type is reset to = MaximumHumidityRatio"); @@ -4623,7 +4613,7 @@ void SetUpNewScheduledTESSetPtMgr(EnergyPlusData &state, auto *spm = new SPMTESScheduled; // Set up the scheduled TES setpoint manager information - spm->Name = EnergyPlus::format("TES Scheduled {}", state.dataSetPointManager->spms.size()); + spm->Name = std::format("TES Scheduled {}", state.dataSetPointManager->spms.size()); state.dataSetPointManager->spms.push_back(spm); state.dataSetPointManager->spmMap.insert_or_assign(spm->Name, state.dataSetPointManager->spms.size()); diff --git a/src/EnergyPlus/SimAirServingZones.cc b/src/EnergyPlus/SimAirServingZones.cc index 7c1b9ac4245..a4fee09a452 100644 --- a/src/EnergyPlus/SimAirServingZones.cc +++ b/src/EnergyPlus/SimAirServingZones.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include #include // ObjexxFCL Headers @@ -55,8 +56,10 @@ #include #include -// EnergyPlus Headers +// Local Headers #include + +// EnergyPlus Headers #include #include #include @@ -616,7 +619,7 @@ void GetAirPathData(EnergyPlusData &state) ErrorsFound = true; } if (NumNodes == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", too few nodes.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", too few nodes.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); ShowContinueError(state, "There must be at least 1 supply node in the system."); ErrorsFound = true; } @@ -653,11 +656,11 @@ void GetAirPathData(EnergyPlusData &state) ErrorsFound = true; } if (NumNodes != airLoopZoneInfo.NumSupplyNodes) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", node mismatch.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowSevereError(state, std::format("{}{}=\"{}\", node mismatch.", RoutineName, CurrentModuleObject, Alphas(1))); ShowContinueError(state, - EnergyPlus::format("...number of air system exit nodes [{}] must match number of zone equip inlet nodes [{}].", - NumNodes, - airLoopZoneInfo.NumSupplyNodes)); + std::format("...number of air system exit nodes [{}] must match number of zone equip inlet nodes [{}].", + NumNodes, + airLoopZoneInfo.NumSupplyNodes)); ErrorsFound = true; } for (I = 1; I <= airLoopZoneInfo.NumSupplyNodes; ++I) { @@ -672,8 +675,7 @@ void GetAirPathData(EnergyPlusData &state) ConnectorListName = Alphas(5); primaryAirSystems.NumBranches = NumBranchesInBranchList(state, BranchListName); if (primaryAirSystems.NumBranches == 0) { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", insufficient information.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", insufficient information.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); ShowContinueError(state, "...there must be at least 1 branch specified."); ErrorsFound = true; } @@ -687,9 +689,9 @@ void GetAirPathData(EnergyPlusData &state) primaryAirSystems.Branch(BranchNum).Name = BranchNames(BranchNum); NumCompsOnBranch = NumCompsInBranch(state, BranchNames(BranchNum)); if (NumCompsOnBranch <= 0) { - ShowSevereError( - state, EnergyPlus::format("{}{}=\"{}\", insufficient information.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); - ShowContinueError(state, EnergyPlus::format("...Branch=\"{}\", no components on branch.", BranchNames(BranchNum))); + ShowSevereError(state, + std::format("{}{}=\"{}\", insufficient information.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowContinueError(state, std::format("...Branch=\"{}\", no components on branch.", BranchNames(BranchNum))); ErrorsFound = true; continue; } @@ -746,9 +748,9 @@ void GetAirPathData(EnergyPlusData &state) // Check for Outside Air system; if there, store its connection node numbers to primary air system if (Util::SameString(CompTypes(CompNum), "AirLoopHVAC:OutdoorAirSystem")) { if (primaryAirSystems.OASysExists) { - ShowSevereError(state, - EnergyPlus::format( - "{}{}=\"{}\", too many outdoor air systems.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowSevereError( + state, + std::format("{}{}=\"{}\", too many outdoor air systems.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); ShowContinueError(state, "Only one AirLoopHVAC:OutdoorAirSystem allowed."); ErrorsFound = true; continue; @@ -770,17 +772,16 @@ void GetAirPathData(EnergyPlusData &state) if (OAMixNum > 0) { primaryAirSystems.OAMixOAInNodeNum = GetOAMixerInletNodeNumber(state, OAMixNum); } else { - ShowSevereError( - state, EnergyPlus::format("{}{}=\"{}\", item not found.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); - ShowContinueError( - state, EnergyPlus::format("OutdoorAir:Mixer for AirLoopHVAC:OutdoorAirSystem=\"{}\" not found.", CompNames(CompNum))); + ShowSevereError(state, + std::format("{}{}=\"{}\", item not found.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowContinueError(state, + std::format("OutdoorAir:Mixer for AirLoopHVAC:OutdoorAirSystem=\"{}\" not found.", CompNames(CompNum))); ErrorsFound = true; } } else { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", item not found.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); - ShowContinueError(state, EnergyPlus::format("AirLoopHVAC:OutdoorAirSystem=\"{}\" not found.", CompNames(CompNum))); - ShowContinueError(state, EnergyPlus::format(" referenced in Branch=\"{}\".", primaryAirSystems.Branch(BranchNum).Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", item not found.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowContinueError(state, std::format("AirLoopHVAC:OutdoorAirSystem=\"{}\" not found.", CompNames(CompNum))); + ShowContinueError(state, std::format(" referenced in Branch=\"{}\".", primaryAirSystems.Branch(BranchNum).Name)); ErrorsFound = true; } } @@ -849,12 +850,12 @@ void GetAirPathData(EnergyPlusData &state) if (primaryAirSystems.OutletBranchNum[OutBranchNum - 1] != 0) { continue; } - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", branch in error.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", branch in error.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); ShowContinueError(state, "Probable missing or misspelled node referenced in the branch(es):"); for (BranchNum = 1; BranchNum <= primaryAirSystems.NumBranches; ++BranchNum) { - ShowContinueError(state, EnergyPlus::format("Possible Error in Branch Object=\"{}\".", primaryAirSystems.Branch(BranchNum).Name)); + ShowContinueError(state, std::format("Possible Error in Branch Object=\"{}\".", primaryAirSystems.Branch(BranchNum).Name)); } - ShowContinueError(state, EnergyPlus::format("...looking to match to Node=\"{}\".", MatchNodeName(OutBranchNum))); + ShowContinueError(state, std::format("...looking to match to Node=\"{}\".", MatchNodeName(OutBranchNum))); ErrorsFound = true; } @@ -868,12 +869,11 @@ void GetAirPathData(EnergyPlusData &state) } } if (primaryAirSystems.InletBranchNum[InBranchNum - 1] == 0) { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", connection to zone.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", connection to zone.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); ShowContinueError(state, "No Connection found for Return Air from Zone"); - ShowContinueError(state, - EnergyPlus::format("Expected node name =\"{}\".", - state.dataLoopNodes->NodeID(airLoopZoneInfo.AirLoopReturnNodeNum(InBranchNum)))); + ShowContinueError( + state, + std::format("Expected node name =\"{}\".", state.dataLoopNodes->NodeID(airLoopZoneInfo.AirLoopReturnNodeNum(InBranchNum)))); ErrorsFound = true; } } @@ -894,9 +894,8 @@ void GetAirPathData(EnergyPlusData &state) MixerExists = true; } } else { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", connector list object.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); - ShowContinueError(state, EnergyPlus::format("ConnectorList object=\"{}\" not found in input.", ConnectorListName)); + ShowSevereError(state, std::format("{}{}=\"{}\", connector list object.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowContinueError(state, std::format("ConnectorList object=\"{}\" not found in input.", ConnectorListName)); } errFlag = false; GetNumSplitterMixerInConntrList( @@ -1053,20 +1052,19 @@ void GetAirPathData(EnergyPlusData &state) ValidateComponent(state, ControllerType, ControllerName, IsNotOK, CurrentModuleObject); if (IsNotOK) { ShowContinueError(state, - EnergyPlus::format("{}{}=\"{}\", for ControllerList=\"{}\".", - RoutineName, - CurrentModuleObject, - primaryAirSystems.Name, - ControllerListName)); + std::format("{}{}=\"{}\", for ControllerList=\"{}\".", + RoutineName, + CurrentModuleObject, + primaryAirSystems.Name, + ControllerListName)); ErrorsFound = true; } primaryAirSystems.ControlConverged(ControllerNum) = false; primaryAirSystems.CanBeLockedOutByEcono(ControllerNum) = false; } // End of ControllerListNum Loop } else { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", controller list object.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); - ShowContinueError(state, EnergyPlus::format("ControllerList object=\"{}\" not found in input.", ControllerListName)); + ShowSevereError(state, std::format("{}{}=\"{}\", controller list object.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowContinueError(state, std::format("ControllerList object=\"{}\" not found in input.", ControllerListName)); ErrorsFound = true; } } @@ -1145,8 +1143,7 @@ void GetAirPathData(EnergyPlusData &state) } if (NumControllers + NumOASysSimpControllers == 0) { if (!PackagedUnit(AirSysNum)) { - ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\" has no Controllers.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); + ShowWarningError(state, std::format("{}{}=\"{}\" has no Controllers.", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); } primaryAirSystems.NumControllers = 0; primaryAirSystems.ControllerName.allocate(0); @@ -1159,7 +1156,7 @@ void GetAirPathData(EnergyPlusData &state) Avail::GetAirLoopAvailabilityManager(state, AvailManagerListName, AirSysNum, NumPrimaryAirSys, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, primaryAirSystems.Name)); + ShowContinueError(state, std::format("Occurs in {} = {}", CurrentModuleObject, primaryAirSystems.Name)); ErrorsFound = true; } @@ -1197,7 +1194,7 @@ void GetAirPathData(EnergyPlusData &state) if (comp.CompIndex == 0) { comp.CompIndex = Fans::GetFanIndex(state, comp.Name); // TODO: get rid of this if (comp.CompIndex == 0) { - ShowSevereError(state, EnergyPlus::format("Component {} of type {} not found.", comp.Name, comp.TypeOf)); + ShowSevereError(state, std::format("Component {} of type {} not found.", comp.Name, comp.TypeOf)); } } @@ -1308,26 +1305,26 @@ void GetAirPathData(EnergyPlusData &state) } else if (componentType == "FAN:ONOFF" || componentType == "COIL:COOLING:DX:SINGLESPEED" || componentType == "COIL:HEATING:DX:SINGLESPEED" || componentType == "COIL:COOLING:DX:TWOSTAGEWITHHUMIDITYCONTROLMODE" || componentType == "COIL:COOLING:DX:MULTISPEED" || componentType == "COIL:HEATING:DX:MULTISPEED") { - ShowSevereError(state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); - ShowContinueError(state, - EnergyPlus::format("..Invalid Air Loop Component Type = \"{}\".", - primaryAirSystems.Branch(BranchNum).Comp(CompNum).TypeOf)); + ShowSevereError(state, std::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); ShowContinueError( - state, EnergyPlus::format("..Air Loop Component Name = \"{}\".", primaryAirSystems.Branch(BranchNum).Comp(CompNum).Name)); - ShowContinueError(state, EnergyPlus::format("..reference Branch = \"{}\".", primaryAirSystems.Branch(BranchNum).Name)); + state, + std::format("..Invalid Air Loop Component Type = \"{}\".", primaryAirSystems.Branch(BranchNum).Comp(CompNum).TypeOf)); + ShowContinueError(state, + std::format("..Air Loop Component Name = \"{}\".", primaryAirSystems.Branch(BranchNum).Comp(CompNum).Name)); + ShowContinueError(state, std::format("..reference Branch = \"{}\".", primaryAirSystems.Branch(BranchNum).Name)); ShowContinueError(state, "...This component may only be referenced by a parent component such as " "AirLoopHVAC:Unitary:Furnace:HeatCool or similar."); ErrorsFound = true; } else { - ShowSevereError(state, EnergyPlus::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); - ShowContinueError(state, - EnergyPlus::format("..Invalid Air Loop Component Type = \"{}\".", - primaryAirSystems.Branch(BranchNum).Comp(CompNum).TypeOf)); + ShowSevereError(state, std::format("{}{} = \"{}\".", RoutineName, CurrentModuleObject, primaryAirSystems.Name)); ShowContinueError( - state, EnergyPlus::format("..Air Loop Component Name = \"{}\".", primaryAirSystems.Branch(BranchNum).Comp(CompNum).Name)); - ShowContinueError(state, EnergyPlus::format("..reference Branch = \"{}\".", primaryAirSystems.Branch(BranchNum).Name)); + state, + std::format("..Invalid Air Loop Component Type = \"{}\".", primaryAirSystems.Branch(BranchNum).Comp(CompNum).TypeOf)); + ShowContinueError(state, + std::format("..Air Loop Component Name = \"{}\".", primaryAirSystems.Branch(BranchNum).Comp(CompNum).Name)); + ShowContinueError(state, std::format("..reference Branch = \"{}\".", primaryAirSystems.Branch(BranchNum).Name)); ErrorsFound = true; } } @@ -1352,10 +1349,10 @@ void GetAirPathData(EnergyPlusData &state) if (NodeNotFound) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", invalid actuator.", - RoutineName, - CurrentModuleObject, - primaryAirSystems.Branch(BranchNum).Comp(CompNum).Name)); + std::format("{}{}=\"{}\", invalid actuator.", + RoutineName, + CurrentModuleObject, + primaryAirSystems.Branch(BranchNum).Comp(CompNum).Name)); ShowContinueError(state, "...this coil requires a water coil controller and the inlet node of a water coil must also be an " "actuator node of a water coil controller."); @@ -1380,8 +1377,7 @@ void GetAirPathData(EnergyPlusData &state) ErrorsFound = true; ShowSevereError( state, - EnergyPlus::format( - "{}{}=\"{}\", invalid actuator.", RoutineName, CurrentModuleObject, GetOACompName(state, OASysNum, OACompNum))); + std::format("{}{}=\"{}\", invalid actuator.", RoutineName, CurrentModuleObject, GetOACompName(state, OASysNum, OACompNum))); ShowContinueError(state, "...this coil requires a water coil controller and the inlet node of a water coil must also be an actuator " "node of a water coil controller."); @@ -1391,7 +1387,7 @@ void GetAirPathData(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found retrieving input for {}.", RoutineName, CurrentModuleObject)); + ShowFatalError(state, std::format("{}Errors found retrieving input for {}.", RoutineName, CurrentModuleObject)); } for (AirSysNum = 1; AirSysNum <= NumPrimaryAirSys; ++AirSysNum) { @@ -1483,10 +1479,10 @@ void InitAirLoops(EnergyPlusData &state, bool const FirstHVACIteration) // TRUE &SplitterComponent::SplitterConditions::SplitterName); if (SplitterNum == 0) { ShowSevereError(state, - EnergyPlus::format("AirLoopHVAC:ZoneSplitter not found={}", - state.dataZoneEquip->SupplyAirPath(SupAirPath).ComponentName(CompNum))); - ShowContinueError( - state, EnergyPlus::format("Occurs in AirLoopHVAC:SupplyPath={}", state.dataZoneEquip->SupplyAirPath(SupAirPath).Name)); + std::format("AirLoopHVAC:ZoneSplitter not found={}", + state.dataZoneEquip->SupplyAirPath(SupAirPath).ComponentName(CompNum))); + ShowContinueError(state, + std::format("Occurs in AirLoopHVAC:SupplyPath={}", state.dataZoneEquip->SupplyAirPath(SupAirPath).Name)); ErrorsFound = true; } state.dataZoneEquip->SupplyAirPath(SupAirPath).SplitterIndex(CompNum) = SplitterNum; @@ -1497,10 +1493,10 @@ void InitAirLoops(EnergyPlusData &state, bool const FirstHVACIteration) // TRUE &ZonePlenum::ZoneSupplyPlenumConditions::ZonePlenumName); if (PlenumNum == 0) { ShowSevereError(state, - EnergyPlus::format("AirLoopHVAC:SupplyPlenum not found={}", - state.dataZoneEquip->SupplyAirPath(SupAirPath).ComponentName(CompNum))); - ShowContinueError( - state, EnergyPlus::format("Occurs in AirLoopHVAC:SupplyPath={}", state.dataZoneEquip->SupplyAirPath(SupAirPath).Name)); + std::format("AirLoopHVAC:SupplyPlenum not found={}", + state.dataZoneEquip->SupplyAirPath(SupAirPath).ComponentName(CompNum))); + ShowContinueError(state, + std::format("Occurs in AirLoopHVAC:SupplyPath={}", state.dataZoneEquip->SupplyAirPath(SupAirPath).Name)); ErrorsFound = true; } state.dataZoneEquip->SupplyAirPath(SupAirPath).PlenumIndex(CompNum) = PlenumNum; @@ -1747,11 +1743,10 @@ void InitAirLoops(EnergyPlusData &state, bool const FirstHVACIteration) // TRUE // unit...we have a problem! if (!FoundSupPathZoneConnect) { ShowSevereError(state, - EnergyPlus::format("Node {} connects to no component", - state.dataLoopNodes->NodeID( - state.dataZoneEquip->SupplyAirPath(SupAirPathNum).OutletNode(SupAirPathOutNodeNum)))); - ShowContinueError(state, - EnergyPlus::format("Occurs in Supply Air Path={}", state.dataZoneEquip->SupplyAirPath(SupAirPathNum).Name)); + std::format("Node {} connects to no component", + state.dataLoopNodes->NodeID( + state.dataZoneEquip->SupplyAirPath(SupAirPathNum).OutletNode(SupAirPathOutNodeNum)))); + ShowContinueError(state, std::format("Occurs in Supply Air Path={}", state.dataZoneEquip->SupplyAirPath(SupAirPathNum).Name)); ShowContinueError(state, "Check the connection to a ZoneHVAC:EquipmentConnections object"); ShowContinueError(state, "Check if this component is missing from the Supply Air Path"); ErrorsFound = true; @@ -1815,11 +1810,10 @@ void InitAirLoops(EnergyPlusData &state, bool const FirstHVACIteration) // TRUE ControlledZoneLoop2_exit:; } // End of no supply air path case if ((NumZonesCool + NumZonesHeat) == 0) { - ShowSevereError(state, - EnergyPlus::format("An outlet node in AirLoopHVAC=\"{}\" is not connected to any zone", thisPrimaryAirSys.Name)); + ShowSevereError(state, std::format("An outlet node in AirLoopHVAC=\"{}\" is not connected to any zone", thisPrimaryAirSys.Name)); ShowContinueError(state, - EnergyPlus::format("Could not match ZoneEquipGroup Inlet Node=\"{}\" to any Supply Air Path or controlled zone", - state.dataLoopNodes->NodeID(ZoneSideNodeNum))); + std::format("Could not match ZoneEquipGroup Inlet Node=\"{}\" to any Supply Air Path or controlled zone", + state.dataLoopNodes->NodeID(ZoneSideNodeNum))); ErrorsFound = true; } } @@ -2275,7 +2269,7 @@ void InitAirLoops(EnergyPlusData &state, bool const FirstHVACIteration) // TRUE for (int InNum = 1; InNum <= thisPrimaryAirSys.NumInletBranches; ++InNum) { int InBranchNum = thisPrimaryAirSys.InletBranchNum[InNum - 1]; if (InBranchNum == 0) { - ShowFatalError(state, EnergyPlus::format("Missing Inlet Branch on Primary Air System={}", thisPrimaryAirSys.Name)); + ShowFatalError(state, std::format("Missing Inlet Branch on Primary Air System={}", thisPrimaryAirSys.Name)); } int NodeNumIn = thisPrimaryAirSys.Branch(InBranchNum).NodeNumIn; @@ -2990,13 +2984,13 @@ void SolveAirLoopControllers( state.dataSimAirServingZones->ErrEnvironmentName = state.dataEnvrn->EnvironmentName; const std::string CharErrOut = fmt::to_string(MaxIter); ShowWarningError(state, - EnergyPlus::format("SolveAirLoopControllers: Maximum iterations ({}) exceeded for {}, {}, at {}, {} {}", - CharErrOut, - PrimaryAirSystems(AirLoopNum).Name, - PrimaryAirSystems(AirLoopNum).ControllerName(AirLoopControlNum), - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state))); + std::format("SolveAirLoopControllers: Maximum iterations ({}) exceeded for {}, {}, at {}, {} {}", + CharErrOut, + PrimaryAirSystems(AirLoopNum).Name, + PrimaryAirSystems(AirLoopNum).ControllerName(AirLoopControlNum), + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state))); } else { if (state.dataEnvrn->EnvironmentName != state.dataSimAirServingZones->ErrEnvironmentName) { state.dataSimAirServingZones->MaxErrCountSALC = 0; @@ -3218,13 +3212,13 @@ void SolveWaterCoilController(EnergyPlusData &state, state.dataSimAirServingZones->ErrEnvironmentNameSolveWaterCoilController = state.dataEnvrn->EnvironmentName; const std::string CharErrOut = fmt::to_string(MaxIter); ShowWarningError(state, - EnergyPlus::format("SolveAirLoopControllers: Maximum iterations ({}) exceeded for {}:{}, at {}, {} {}", - CharErrOut, - PrimaryAirSystems(AirLoopNum).Name, - ControllerName, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - CreateSysTimeIntervalString(state))); + std::format("SolveAirLoopControllers: Maximum iterations ({}) exceeded for {}:{}, at {}, {} {}", + CharErrOut, + PrimaryAirSystems(AirLoopNum).Name, + ControllerName, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + CreateSysTimeIntervalString(state))); } else { if (state.dataEnvrn->EnvironmentName != state.dataSimAirServingZones->ErrEnvironmentNameSolveWaterCoilController) { state.dataSimAirServingZones->MaxErrCountSWCC = 0; @@ -4213,7 +4207,7 @@ void SetUpSysSizingArrays(EnergyPlusData &state) auto &sysSizInput = state.dataSize->SysSizInput(SysSizIndex); sysSizInput.AirLoopNum = Util::FindItemInList(sysSizInput.AirPriLoopName, state.dataAirSystemsData->PrimaryAirSystems); if (sysSizInput.AirLoopNum == 0) { - ShowSevereError(state, EnergyPlus::format("Sizing:System: {} references unknown AirLoopHVAC", sysSizInput.AirPriLoopName)); + ShowSevereError(state, std::format("Sizing:System: {} references unknown AirLoopHVAC", sysSizInput.AirPriLoopName)); ErrorsFound = true; } } @@ -4233,7 +4227,7 @@ void SetUpSysSizingArrays(EnergyPlusData &state) SysSizNum = 1; ShowWarningError( state, - EnergyPlus::format( + std::format( "SetUpSysSizingArrays: Sizing for System (HVACAirLoop)=\" {}\" will use Sizing:System specifications listed for System=\" {}\".", primaryAirSystems.Name, state.dataSize->SysSizInput(1).AirPriLoopName)); @@ -4630,9 +4624,9 @@ void SizeSysOutdoorAir(EnergyPlusData &state) int TermUnitSizingIndex = airToZoneNodeInfo.TermUnitCoolSizingIndex(ZonesCooledNum); if (TermUnitSizingIndex == 0) { ShowSevereError(state, - EnergyPlus::format("SetUpSysSizingArray: TermUnitSizingIndex = 0 for AirLoop={}, Zone ={}", - airToZoneNodeInfo.AirLoopName, - state.dataHeatBal->Zone(airToZoneNodeInfo.CoolCtrlZoneNums(ZonesCooledNum)).Name)); + std::format("SetUpSysSizingArray: TermUnitSizingIndex = 0 for AirLoop={}, Zone ={}", + airToZoneNodeInfo.AirLoopName, + state.dataHeatBal->Zone(airToZoneNodeInfo.CoolCtrlZoneNums(ZonesCooledNum)).Name)); ShowFatalError(state, "This is a defect. Please report this issue."); } auto &termUnitSizing = state.dataSize->TermUnitSizing(TermUnitSizingIndex); @@ -4672,12 +4666,12 @@ void SizeSysOutdoorAir(EnergyPlusData &state) state.dataSize->SysSizInput(SysSizNum).SystemOAMethod == SysOAMethod::SP) { // Ventilation Rate Procedure // CR 8872 - check to see if uncorrected OA is calculated to be greater than 0 if (!(ZoneOAUnc > 0.0)) { - ShowSevereError(state, - EnergyPlus::format("Sizing:System - The system outdoor air method is set to VRP in {}", - finalSysSizing.AirPriLoopName)); - ShowContinueError(state, - EnergyPlus::format("But zone \"{}\" associated with system does not have OA flow/person", - termUnitFinalZoneSizing.ZoneName)); + ShowSevereError( + state, + std::format("Sizing:System - The system outdoor air method is set to VRP in {}", finalSysSizing.AirPriLoopName)); + ShowContinueError( + state, + std::format("But zone \"{}\" associated with system does not have OA flow/person", termUnitFinalZoneSizing.ZoneName)); ShowContinueError(state, "or flow/area values specified in DesignSpecification:OutdoorAir object associated with the zone"); } @@ -4804,9 +4798,9 @@ void SizeSysOutdoorAir(EnergyPlusData &state) int TermUnitSizingIndex = airToZoneNodeInfo.TermUnitHeatSizingIndex(ZonesHeatedNum); if (TermUnitSizingIndex == 0) { ShowSevereError(state, - EnergyPlus::format("SetUpSysSizingArray: TermUnitSizingIndex = 0 for AirLoop={}, Zone ={}", - airToZoneNodeInfo.AirLoopName, - state.dataHeatBal->Zone(airToZoneNodeInfo.HeatCtrlZoneNums(ZonesHeatedNum)).Name)); + std::format("SetUpSysSizingArray: TermUnitSizingIndex = 0 for AirLoop={}, Zone ={}", + airToZoneNodeInfo.AirLoopName, + state.dataHeatBal->Zone(airToZoneNodeInfo.HeatCtrlZoneNums(ZonesHeatedNum)).Name)); ShowFatalError(state, "This is a defect. Please report this issue."); } auto &termUnitSizing = state.dataSize->TermUnitSizing(TermUnitSizingIndex); @@ -4852,11 +4846,11 @@ void SizeSysOutdoorAir(EnergyPlusData &state) // CR 8872 - check to see if uncorrected OA is calculated to be greater than 0 if (!(ZoneOAUnc > 0.0)) { ShowSevereError(state, - EnergyPlus::format("Sizing:System - The system outdoor air method is set to VRP in {}", - finalSysSizing.AirPriLoopName)); + std::format("Sizing:System - The system outdoor air method is set to VRP in {}", + finalSysSizing.AirPriLoopName)); ShowContinueError(state, - EnergyPlus::format("But zone \"{}\" associated with system does not have OA flow/person", - termUnitFinalZoneSizing.ZoneName)); + std::format("But zone \"{}\" associated with system does not have OA flow/person", + termUnitFinalZoneSizing.ZoneName)); ShowContinueError(state, "or flow/area values specified in DesignSpecification:OutdoorAir object associated " "with the zone"); @@ -4971,9 +4965,9 @@ void SizeSysOutdoorAir(EnergyPlusData &state) int TermUnitSizingIndex = airToZoneNodeInfo.TermUnitCoolSizingIndex(ZonesHeatedNum); if (TermUnitSizingIndex == 0) { ShowSevereError(state, - EnergyPlus::format("SetUpSysSizingArray: TermUnitSizingIndex = 0 for AirLoop={}, Zone ={}", - airToZoneNodeInfo.AirLoopName, - state.dataHeatBal->Zone(airToZoneNodeInfo.CoolCtrlZoneNums(ZonesHeatedNum)).Name)); + std::format("SetUpSysSizingArray: TermUnitSizingIndex = 0 for AirLoop={}, Zone ={}", + airToZoneNodeInfo.AirLoopName, + state.dataHeatBal->Zone(airToZoneNodeInfo.CoolCtrlZoneNums(ZonesHeatedNum)).Name)); ShowFatalError(state, "This is a defect. Please report this issue."); } auto &termUnitSizing = state.dataSize->TermUnitSizing(TermUnitSizingIndex); @@ -5222,19 +5216,18 @@ void UpdateSysSizing(EnergyPlusData &state, Constant::CallIndicator const CallIn if (state.dataSize->SysSizing(state.dataSize->CurOverallSimDay, AirLoopNum).loadSizingType == DataSizing::LoadSizing::Latent && !state.dataSize->FinalZoneSizing.empty()) { if (!state.dataSize->FinalZoneSizing(CtrlZoneNum).zoneLatentSizing && state.dataSize->CurOverallSimDay == 1) { - ShowWarningError( - state, - EnergyPlus::format("Latent Sizing for AirLoop = {} requires latent sizing in Sizing:Zone object for Zone = {}", - airToZoneNodeInfo.AirLoopName, - state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneName)); + ShowWarningError(state, + std::format("Latent Sizing for AirLoop = {} requires latent sizing in Sizing:Zone object for Zone = {}", + airToZoneNodeInfo.AirLoopName, + state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneName)); } } else if (!state.dataSize->FinalZoneSizing.empty()) { // not latent sizing for air loop if (state.dataSize->FinalZoneSizing(CtrlZoneNum).zoneLatentSizing && state.dataSize->CurOverallSimDay == 1 && state.dataSize->FinalZoneSizing(CtrlZoneNum).heatCoilSizingMethod == DataSizing::HeatCoilSizMethod::None) { ShowWarningError(state, - EnergyPlus::format("Sizing for AirLoop = {} includes latent sizing in Sizing:Zone object for Zone = {}", - airToZoneNodeInfo.AirLoopName, - state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneName)); + std::format("Sizing for AirLoop = {} includes latent sizing in Sizing:Zone object for Zone = {}", + airToZoneNodeInfo.AirLoopName, + state.dataSize->FinalZoneSizing(CtrlZoneNum).ZoneName)); } } } // end of loop over cooled zones @@ -7034,10 +7027,9 @@ void UpdateSysSizing(EnergyPlusData &state, Constant::CallIndicator const CallIn if ((SysHeatSizingRat != 1.0) && (finalSysSizing.loadSizingType == DataSizing::LoadSizing::Ventilation) && (termUnitFinalZoneSizing.MinOA <= 0.0)) { ShowWarningError(state, - EnergyPlus::format("FinalSystemSizing: AirLoop=\"{}\", Requested sizing on Ventilation,", - state.dataAirLoop->AirToZoneNodeInfo(AirLoopNum).AirLoopName)); - ShowContinueError(state, - EnergyPlus::format("but Zone has no design OA Flow. Zone=\"{}\".", termUnitFinalZoneSizing.ZoneName)); + std::format("FinalSystemSizing: AirLoop=\"{}\", Requested sizing on Ventilation,", + state.dataAirLoop->AirToZoneNodeInfo(AirLoopNum).AirLoopName)); + ShowContinueError(state, std::format("but Zone has no design OA Flow. Zone=\"{}\".", termUnitFinalZoneSizing.ZoneName)); } if ((SysHeatSizingRat != 1.0) && (finalSysSizing.loadSizingType == DataSizing::LoadSizing::Ventilation) && (termUnitFinalZoneSizing.MinOA > 0.0)) { @@ -7622,7 +7614,7 @@ void CheckWaterCoilIsOnAirLoop(EnergyPlusData &state, CheckWaterCoilIsOnAirLoop = CheckWaterCoilSystemOnAirLoopOrOASystem(state, CompTypeNum, CompName); } if (!CheckWaterCoilIsOnAirLoop) { - ShowSevereError(state, EnergyPlus::format("CheckWaterCoilIsOnAirLoop: = {} = {}.", CompType, CompName)); + ShowSevereError(state, std::format("CheckWaterCoilIsOnAirLoop: = {} = {}.", CompType, CompName)); ShowContinueError(state, "The water coil or coil system is neither on primary air branch nor on outdoor air system hence does not require " "'Controller:WaterCoil' object."); diff --git a/src/EnergyPlus/SimulationManager.cc b/src/EnergyPlus/SimulationManager.cc index 69e61049cc9..ffc1db90b13 100644 --- a/src/EnergyPlus/SimulationManager.cc +++ b/src/EnergyPlus/SimulationManager.cc @@ -45,12 +45,8 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -// FMI-Related Headers -extern "C" { -#include -} - // C++ Headers +#include #include #include @@ -60,6 +56,11 @@ extern "C" { #include #include +// Third Party Headers +extern "C" { +#include +} + // EnergyPlus Headers #include #include @@ -132,6 +133,85 @@ extern "C" { #include #include +extern "C" { +} + +// C++ Headers +#include +#include + +// ObjexxFCL Headers +#include + +// EnergyPlus Headers +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace EnergyPlus { namespace SimulationManager { @@ -683,15 +763,14 @@ namespace SimulationManager { Which = static_cast(index(Alphas(1), MatchVersion)); } if (Which != 0) { - ShowWarningError( - state, EnergyPlus::format("{}: in IDF=\"{}\" not the same as expected=\"{}\"", CurrentModuleObject, Alphas(1), MatchVersion)); + ShowWarningError(state, + std::format("{}: in IDF=\"{}\" not the same as expected=\"{}\"", CurrentModuleObject, Alphas(1), MatchVersion)); } VersionID = Alphas(1); } else if (Num == 0) { - ShowWarningError(state, - EnergyPlus::format("{}: missing in IDF, processing for EnergyPlus version=\"{}\"", CurrentModuleObject, MatchVersion)); + ShowWarningError(state, std::format("{}: missing in IDF, processing for EnergyPlus version=\"{}\"", CurrentModuleObject, MatchVersion)); } else { - ShowSevereError(state, EnergyPlus::format("Too many {} Objects found.", CurrentModuleObject)); + ShowSevereError(state, std::format("Too many {} Objects found.", CurrentModuleObject)); ErrorsFound = true; } @@ -822,7 +901,7 @@ namespace SimulationManager { } if (state.dataGlobal->TimeStepsInHour <= 0 || state.dataGlobal->TimeStepsInHour > 60) { Alphas(1) = fmt::to_string(state.dataGlobal->TimeStepsInHour); - ShowWarningError(state, EnergyPlus::format("{}: Requested number ({}) invalid, Defaulted to 4", CurrentModuleObject, Alphas(1))); + ShowWarningError(state, std::format("{}: Requested number ({}) invalid, Defaulted to 4", CurrentModuleObject, Alphas(1))); state.dataGlobal->TimeStepsInHour = 4; } else if (mod(60, state.dataGlobal->TimeStepsInHour) != 0) { MinInt = 9999; @@ -834,43 +913,41 @@ namespace SimulationManager { Which = Num; } ShowWarningError(state, - EnergyPlus::format("{}: Requested number ({}) not evenly divisible into 60, defaulted to nearest ({}).", - CurrentModuleObject, - state.dataGlobal->TimeStepsInHour, - Div60[Which - 1])); + std::format("{}: Requested number ({}) not evenly divisible into 60, defaulted to nearest ({}).", + CurrentModuleObject, + state.dataGlobal->TimeStepsInHour, + Div60[Which - 1])); state.dataGlobal->TimeStepsInHour = Div60[Which - 1]; } if (CondFDAlgo && state.dataGlobal->TimeStepsInHour < 20) { - ShowWarningError( - state, - EnergyPlus::format("{}: Requested number ({}) cannot be used when Conduction Finite Difference algorithm is selected.", - CurrentModuleObject, - state.dataGlobal->TimeStepsInHour)); - ShowContinueError(state, EnergyPlus::format("...{} is set to 20.", CurrentModuleObject)); + ShowWarningError(state, + std::format("{}: Requested number ({}) cannot be used when Conduction Finite Difference algorithm is selected.", + CurrentModuleObject, + state.dataGlobal->TimeStepsInHour)); + ShowContinueError(state, std::format("...{} is set to 20.", CurrentModuleObject)); state.dataGlobal->TimeStepsInHour = 20; } if (state.dataGlobal->TimeStepsInHour < 4 && state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "Zone") > 0) { ShowWarningError(state, - EnergyPlus::format("{}: Requested number ({}) is less than the suggested minimum of 4.", - CurrentModuleObject, - state.dataGlobal->TimeStepsInHour)); + std::format("{}: Requested number ({}) is less than the suggested minimum of 4.", + CurrentModuleObject, + state.dataGlobal->TimeStepsInHour)); ShowContinueError( - state, - EnergyPlus::format("Please see entry for {} in Input/Output Reference for discussion of considerations.", CurrentModuleObject)); + state, std::format("Please see entry for {} in Input/Output Reference for discussion of considerations.", CurrentModuleObject)); } } else if (Num == 0 && state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "Zone") > 0 && !CondFDAlgo) { - ShowWarningError(state, EnergyPlus::format("No {} object found. Number of TimeSteps in Hour defaulted to 4.", CurrentModuleObject)); + ShowWarningError(state, std::format("No {} object found. Number of TimeSteps in Hour defaulted to 4.", CurrentModuleObject)); state.dataGlobal->TimeStepsInHour = 4; } else if (Num == 0 && !CondFDAlgo) { state.dataGlobal->TimeStepsInHour = 4; } else if (Num == 0 && state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "Zone") > 0 && CondFDAlgo) { - ShowWarningError(state, EnergyPlus::format("No {} object found. Number of TimeSteps in Hour defaulted to 20.", CurrentModuleObject)); + ShowWarningError(state, std::format("No {} object found. Number of TimeSteps in Hour defaulted to 20.", CurrentModuleObject)); ShowContinueError(state, "...Due to presence of Conduction Finite Difference Algorithm selection."); state.dataGlobal->TimeStepsInHour = 20; } else if (Num == 0 && CondFDAlgo) { state.dataGlobal->TimeStepsInHour = 20; } else { - ShowSevereError(state, EnergyPlus::format("Too many {} Objects found.", CurrentModuleObject)); + ShowSevereError(state, std::format("Too many {} Objects found.", CurrentModuleObject)); ErrorsFound = true; } @@ -900,7 +977,7 @@ namespace SimulationManager { if (MinInt < 0 || MinInt > 60) { ShowWarningError( state, - EnergyPlus::format( + std::format( "{}: Requested {} ({}) invalid. Set to 1 minute.", CurrentModuleObject, state.dataIPShortCut->cNumericFieldNames(1), MinInt)); state.dataConvergeParams->MinTimeStepSys = 1.0 / 60.0; } else if (MinInt == 0) { // Set to TimeStepZone @@ -935,7 +1012,7 @@ namespace SimulationManager { state.dataConvergeParams->MinPlantSubIterations = 2; state.dataConvergeParams->MaxPlantSubIterations = 8; } else { - ShowSevereError(state, EnergyPlus::format("Too many {} Objects found.", CurrentModuleObject)); + ShowSevereError(state, std::format("Too many {} Objects found.", CurrentModuleObject)); ErrorsFound = true; } @@ -946,8 +1023,7 @@ namespace SimulationManager { CurrentModuleObject = "Output:DebuggingData"; NumDebugOut = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, CurrentModuleObject); if (NumDebugOut > 1) { - ShowWarningError(state, - EnergyPlus::format("{}: More than 1 occurrence of this object found, only first will be used.", CurrentModuleObject)); + ShowWarningError(state, std::format("{}: More than 1 occurrence of this object found, only first will be used.", CurrentModuleObject)); } if (NumDebugOut > 0) { state.dataInputProcessing->inputProcessor->getObjectItem(state, CurrentModuleObject, 1, Alphas, NumAlpha, Number, NumNumber, IOStat); @@ -965,8 +1041,8 @@ namespace SimulationManager { if (Num > 1) { // Let it slide, but warn // ErrorsFound = true; - ShowWarningError( - state, EnergyPlus::format("{}: More than 1 occurrence of this object found, only first will be used.", CurrentModuleObject)); + ShowWarningError(state, + std::format("{}: More than 1 occurrence of this object found, only first will be used.", CurrentModuleObject)); } auto const instances = state.dataInputProcessing->inputProcessor->epJSON.find(CurrentModuleObject); @@ -986,8 +1062,7 @@ namespace SimulationManager { auto it = diagnosticsExtensible.find("key"); if (it == diagnosticsExtensible.end()) { ShowWarningError( - state, - EnergyPlus::format("{}: empty key found, consider removing it to avoid this warning.", CurrentModuleObject)); + state, std::format("{}: empty key found, consider removing it to avoid this warning.", CurrentModuleObject)); continue; } std::string diagnosticName = it->get(); @@ -1041,9 +1116,9 @@ namespace SimulationManager { // CreateMinimalSurfaceVariables=.FALSE. } else if (!diagnosticName.empty()) { ShowWarningError(state, - EnergyPlus::format("GetProjectData: {}=\"{}\", Invalid value for field, entered value ignored.", - CurrentModuleObject, - diagnosticName)); + std::format("GetProjectData: {}=\"{}\", Invalid value for field, entered value ignored.", + CurrentModuleObject, + diagnosticName)); } } } @@ -1159,14 +1234,12 @@ namespace SimulationManager { if (NumPltSizInput == 0 && state.dataGlobal->DoHVACSizingSimulation && state.dataGlobal->DoPlantSizing) { ShowSevereError( state, - EnergyPlus::format( + std::format( "GetProjectData: No {} object entered when the Do HVAC Sizing Simulation and Do Plant Sizing are both YES in the " "SimulationControl object.", spObject)); - ShowContinueError(state, - EnergyPlus::format("...When these input flags are both yes, a {} object is required.", spObject)); - ShowContinueError(state, - EnergyPlus::format("...Either add one or more appropriate {} objects to the input file", spObject)); + ShowContinueError(state, std::format("...When these input flags are both yes, a {} object is required.", spObject)); + ShowContinueError(state, std::format("...Either add one or more appropriate {} objects to the input file", spObject)); ShowContinueError(state, "...or change both the Do HVAC Sizing Simulation and Do Plant Sizing are both YES. "); ErrorsFound = true; } @@ -1193,7 +1266,7 @@ namespace SimulationManager { Num = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, CurrentModuleObject); if (Num > 1) { ErrorsFound = true; - ShowFatalError(state, EnergyPlus::format("GetProjectData: Only one (\"1\") {} object per simulation is allowed.", CurrentModuleObject)); + ShowFatalError(state, std::format("GetProjectData: Only one (\"1\") {} object per simulation is allowed.", CurrentModuleObject)); } state.dataGlobal->createPerfLog = Num > 0; std::string overrideModeValue = "Normal"; @@ -1307,8 +1380,7 @@ namespace SimulationManager { } } else { ShowSevereError( - state, - EnergyPlus::format("Invalid over ride mode specified in PerformancePrecisionTradeoffs object: {}", overrideModeValue)); + state, std::format("Invalid over ride mode specified in PerformancePrecisionTradeoffs object: {}", overrideModeValue)); } if (overrideTimestep) { @@ -1706,7 +1778,7 @@ namespace SimulationManager { { auto result = std::make_unique(filePath, mode); // (AUTO_OK_UPTR) if (!result->good()) { - ShowFatalError(state, EnergyPlus::format("OpenOutputFiles: Could not open file {} for output (write).", filePath)); + ShowFatalError(state, std::format("OpenOutputFiles: Could not open file {} for output (write).", filePath.string())); } return result; } @@ -1725,7 +1797,7 @@ namespace SimulationManager { result = std::make_unique(std::move(f)); } catch (const std::system_error &error) { ShowSevereError(state, error.what()); - ShowFatalError(state, EnergyPlus::format("OpenOutputFiles: Could not open file {} for output (write).", filePath)); + ShowFatalError(state, std::format("OpenOutputFiles: Could not open file {} for output (write).", filePath.string())); } return result; } @@ -2273,13 +2345,11 @@ namespace SimulationManager { state.dataSimulationManager->WarningOut = false; } ShowWarningError( - state, - EnergyPlus::format("Node Connection Error for object {}={}", CType, state.dataBranchNodeConnections->CompSets(Count).CName)); + state, std::format("Node Connection Error for object {}={}", CType, state.dataBranchNodeConnections->CompSets(Count).CName)); ShowContinueError( - state, - EnergyPlus::format(" {} not on any Branch or Parent Object", state.dataBranchNodeConnections->CompSets(Count).Description)); - ShowContinueError(state, EnergyPlus::format(" Inlet Node : {}", state.dataBranchNodeConnections->CompSets(Count).InletNodeName)); - ShowContinueError(state, EnergyPlus::format(" Outlet Node: {}", state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); + state, std::format(" {} not on any Branch or Parent Object", state.dataBranchNodeConnections->CompSets(Count).Description)); + ShowContinueError(state, std::format(" Inlet Node : {}", state.dataBranchNodeConnections->CompSets(Count).InletNodeName)); + ShowContinueError(state, std::format(" Outlet Node: {}", state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); ++state.dataBranchNodeConnections->NumNodeConnectionErrors; if (state.dataBranchNodeConnections->CompSets(Count).ComponentObjectType == Node::ConnectionObjectType::SolarCollectorUnglazedTranspired) { @@ -2294,12 +2364,12 @@ namespace SimulationManager { state.dataSimulationManager->WarningOut = false; } ShowSevereError(state, - EnergyPlus::format("Potential Node Connection Error for object {}, name={}", - CType, - state.dataBranchNodeConnections->CompSets(Count).CName)); + std::format("Potential Node Connection Error for object {}, name={}", + CType, + state.dataBranchNodeConnections->CompSets(Count).CName)); ShowContinueError(state, " Node Types are still UNDEFINED -- See Branch/Node Details file for further information"); - ShowContinueError(state, EnergyPlus::format(" Inlet Node : {}", state.dataBranchNodeConnections->CompSets(Count).InletNodeName)); - ShowContinueError(state, EnergyPlus::format(" Outlet Node: {}", state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); + ShowContinueError(state, std::format(" Inlet Node : {}", state.dataBranchNodeConnections->CompSets(Count).InletNodeName)); + ShowContinueError(state, std::format(" Outlet Node: {}", state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); nodeConnectionErrorFlag = true; ++state.dataBranchNodeConnections->NumNodeConnectionErrors; } @@ -2335,13 +2405,13 @@ namespace SimulationManager { std::string_view const ParentCType1 = Node::ConnectionObjectTypeNamesUC[static_cast(state.dataBranchNodeConnections->CompSets(Count).ParentObjectType)]; ShowWarningError(state, "Component plus inlet/outlet node pair used more than once:"); - ShowContinueError(state, EnergyPlus::format(" Component : {}={}", CType, state.dataBranchNodeConnections->CompSets(Count).CName)); - ShowContinueError(state, EnergyPlus::format(" Inlet Node : {}", state.dataBranchNodeConnections->CompSets(Count).InletNodeName)); - ShowContinueError(state, EnergyPlus::format(" Outlet Node: {}", state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); - ShowContinueError( - state, EnergyPlus::format(" Used by : {}={}", ParentCType, state.dataBranchNodeConnections->CompSets(Count).ParentCName)); - ShowContinueError( - state, EnergyPlus::format(" and by : {}={}", ParentCType1, state.dataBranchNodeConnections->CompSets(Count1).ParentCName)); + ShowContinueError(state, std::format(" Component : {}={}", CType, state.dataBranchNodeConnections->CompSets(Count).CName)); + ShowContinueError(state, std::format(" Inlet Node : {}", state.dataBranchNodeConnections->CompSets(Count).InletNodeName)); + ShowContinueError(state, std::format(" Outlet Node: {}", state.dataBranchNodeConnections->CompSets(Count).OutletNodeName)); + ShowContinueError(state, + std::format(" Used by : {}={}", ParentCType, state.dataBranchNodeConnections->CompSets(Count).ParentCName)); + ShowContinueError(state, + std::format(" and by : {}={}", ParentCType1, state.dataBranchNodeConnections->CompSets(Count1).ParentCName)); ++state.dataBranchNodeConnections->NumNodeConnectionErrors; } } @@ -2757,12 +2827,11 @@ namespace SimulationManager { ShowMessage(state, "No node connection errors were found."); } else { if (state.dataBranchNodeConnections->NumNodeConnectionErrors > 1) { - ShowMessage( - state, - EnergyPlus::format("There were {} node connection errors noted.", state.dataBranchNodeConnections->NumNodeConnectionErrors)); + ShowMessage(state, + std::format("There were {} node connection errors noted.", state.dataBranchNodeConnections->NumNodeConnectionErrors)); } else { - ShowMessage( - state, EnergyPlus::format("There was {} node connection error noted.", state.dataBranchNodeConnections->NumNodeConnectionErrors)); + ShowMessage(state, + std::format("There was {} node connection error noted.", state.dataBranchNodeConnections->NumNodeConnectionErrors)); } } diff --git a/src/EnergyPlus/SingleDuct.cc b/src/EnergyPlus/SingleDuct.cc index 6b996c4a6ba..882db244c8f 100644 --- a/src/EnergyPlus/SingleDuct.cc +++ b/src/EnergyPlus/SingleDuct.cc @@ -47,12 +47,15 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include -// EnergyPlus Headers +// Local Headers #include + +// EnergyPlus Headers #include #include #include @@ -577,7 +580,7 @@ void GetSysInput(EnergyPlusData &state) ShowContinueError( state, EnergyPlus::format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); - ShowContinueError(state, EnergyPlus::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); ShowContinueError(state, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -606,14 +609,12 @@ void GetSysInput(EnergyPlusData &state) if (airTerm.DamperHeatingAction != Action::ReverseWithLimits) { if (airTerm.MaxAirVolFlowRateDuringReheat > 0.0) { - ShowWarningError(state, - EnergyPlus::format("Since {} = {}, input for {} will be ignored.", cAlphaFields(10), Alphas(10), cNumericFields(7))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowWarningError(state, std::format("Since {} = {}, input for {} will be ignored.", cAlphaFields(10), Alphas(10), cNumericFields(7))); + ShowContinueError(state, std::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); } if (airTerm.MaxAirVolFractionDuringReheat > 0.0) { - ShowWarningError(state, - EnergyPlus::format("Since {} = {}, input for {} will be ignored.", cAlphaFields(10), Alphas(10), cNumericFields(8))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowWarningError(state, std::format("Since {} = {}, input for {} will be ignored.", cAlphaFields(10), Alphas(10), cNumericFields(8))); + ShowContinueError(state, std::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); } } @@ -630,8 +631,8 @@ void GetSysInput(EnergyPlusData &state) if (!lAlphaBlanks(11)) { airTerm.OARequirementsPtr = Util::FindItemInList(Alphas(11), state.dataSize->OARequirements); if (airTerm.OARequirementsPtr == 0) { - ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(11), Alphas(11))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowSevereError(state, std::format("{} = {} not found.", cAlphaFields(11), Alphas(11))); + ShowContinueError(state, std::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } else { airTerm.NoOAFlowInputFromUser = false; @@ -647,7 +648,7 @@ void GetSysInput(EnergyPlusData &state) ValidateComponent(state, Alphas(7), Alphas(8), IsNotOK, airTerm.sysType); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("In {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("In {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } @@ -712,8 +713,8 @@ void GetSysInput(EnergyPlusData &state) airTerm.reheatCoilType = HVAC::CoilType::HeatingSteam; airTerm.ReheatComp_PlantType = DataPlant::PlantEquipmentType::CoilSteamAirHeating; } else if (!airTerm.ReheatComp.empty()) { - ShowSevereError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(5), airTerm.ReheatComp)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowSevereError(state, std::format("Illegal {} = {}.", cAlphaFields(5), airTerm.ReheatComp)); + ShowContinueError(state, std::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } airTerm.ReheatName = Alphas(6); @@ -769,15 +770,15 @@ void GetSysInput(EnergyPlusData &state) airTerm.MaxAirVolFlowRate = Numbers(1); airTerm.ZoneMinAirFracDes = Numbers(2); if (airTerm.ZoneMinAirFracDes < 0.0) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", airTerm.sysType, airTerm.SysName)); - ShowContinueError( - state, EnergyPlus::format("{} must be greater than or equal to 0. Resetting to 0 and the simulation continues.", cNumericFields(2))); + ShowWarningError(state, std::format("{} \"{}\"", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, + std::format("{} must be greater than or equal to 0. Resetting to 0 and the simulation continues.", cNumericFields(2))); airTerm.ZoneMinAirFracDes = 0.0; } if (airTerm.ZoneMinAirFracDes > 1.0) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", airTerm.sysType, airTerm.SysName)); - ShowContinueError( - state, EnergyPlus::format("{} must be less than or equal to 1. Resetting to 1 and the simulation continues.", cNumericFields(2))); + ShowWarningError(state, std::format("{} \"{}\"", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, + std::format("{} must be less than or equal to 1. Resetting to 1 and the simulation continues.", cNumericFields(2))); airTerm.ZoneMinAirFracDes = 1.0; } // The reheat coil control node is necessary for hot water and steam reheat, but not necessary for @@ -788,14 +789,14 @@ void GetSysInput(EnergyPlusData &state) IsNotOK = false; airTerm.ReheatControlNode = GetCoilSteamInletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } } else { IsNotOK = false; airTerm.ReheatControlNode = GetCoilWaterInletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } } @@ -843,10 +844,9 @@ void GetSysInput(EnergyPlusData &state) } // one assumes if there isn't one assigned, it's an error? if (airTerm.ADUNum == 0) { - ShowSevereError( - state, - EnergyPlus::format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, EnergyPlus::format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); + ShowSevereError(state, + std::format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); ErrorsFound = true; } else { @@ -860,9 +860,8 @@ void GetSysInput(EnergyPlusData &state) if (state.dataZoneEquip->ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode > 0) { ShowSevereError(state, "Error in connecting a terminal unit to a zone"); ShowContinueError( - state, - EnergyPlus::format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); - ShowContinueError(state, EnergyPlus::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + state, std::format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); + ShowContinueError(state, std::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); ShowContinueError(state, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -891,7 +890,7 @@ void GetSysInput(EnergyPlusData &state) ValidateComponent(state, Alphas(5), Alphas(6), IsNotOK, airTerm.sysType); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("In {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("In {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } @@ -958,8 +957,8 @@ void GetSysInput(EnergyPlusData &state) airTerm.reheatCoilType = HVAC::CoilType::HeatingSteam; airTerm.ReheatComp_PlantType = DataPlant::PlantEquipmentType::CoilSteamAirHeating; } else { - ShowSevereError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(5), airTerm.ReheatComp)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowSevereError(state, std::format("Illegal {} = {}.", cAlphaFields(5), airTerm.ReheatComp)); + ShowContinueError(state, std::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } airTerm.ReheatName = Alphas(6); @@ -1018,14 +1017,14 @@ void GetSysInput(EnergyPlusData &state) IsNotOK = false; airTerm.ReheatControlNode = GetCoilSteamInletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } } else { IsNotOK = false; airTerm.ReheatControlNode = GetCoilWaterInletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } } @@ -1074,10 +1073,9 @@ void GetSysInput(EnergyPlusData &state) } // one assumes if there isn't one assigned, it's an error? if (airTerm.ADUNum == 0) { - ShowSevereError( - state, - EnergyPlus::format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, EnergyPlus::format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); + ShowSevereError(state, + std::format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); ErrorsFound = true; } else { @@ -1090,9 +1088,9 @@ void GetSysInput(EnergyPlusData &state) if (airTerm.OutletNodeNum == state.dataZoneEquip->ZoneEquipConfig(CtrlZone).InletNode(SupAirIn)) { if (state.dataZoneEquip->ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode > 0) { ShowSevereError(state, "Error in connecting a terminal unit to a zone"); - ShowContinueError( - state, EnergyPlus::format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.OutletNodeNum))); - ShowContinueError(state, EnergyPlus::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, + std::format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.OutletNodeNum))); + ShowContinueError(state, std::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); ShowContinueError(state, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -1113,7 +1111,7 @@ void GetSysInput(EnergyPlusData &state) ValidateComponent(state, Alphas(5), Alphas(6), IsNotOK, airTerm.sysType); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("In {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("In {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } @@ -1216,10 +1214,9 @@ void GetSysInput(EnergyPlusData &state) } // one assumes if there isn't one assigned, it's an error? if (airTerm.ADUNum == 0) { - ShowSevereError( - state, - EnergyPlus::format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, EnergyPlus::format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.OutletNodeNum))); + ShowSevereError(state, + std::format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.OutletNodeNum))); ErrorsFound = true; } else { @@ -1232,9 +1229,9 @@ void GetSysInput(EnergyPlusData &state) if (airTerm.OutletNodeNum == state.dataZoneEquip->ZoneEquipConfig(CtrlZone).InletNode(SupAirIn)) { if (state.dataZoneEquip->ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode > 0) { ShowSevereError(state, "Error in connecting a terminal unit to a zone"); - ShowContinueError( - state, EnergyPlus::format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.OutletNodeNum))); - ShowContinueError(state, EnergyPlus::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, + std::format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.OutletNodeNum))); + ShowContinueError(state, std::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); ShowContinueError(state, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -1258,8 +1255,8 @@ void GetSysInput(EnergyPlusData &state) } else { airTerm.OARequirementsPtr = Util::FindItemInList(Alphas(5), state.dataSize->OARequirements); if (airTerm.OARequirementsPtr == 0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError(state, EnergyPlus::format("..invalid {}=\"{}\".", cAlphaFields(5), Alphas(5))); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, std::format("..invalid {}=\"{}\".", cAlphaFields(5), Alphas(5))); ErrorsFound = true; } else { airTerm.NoOAFlowInputFromUser = false; @@ -1275,9 +1272,9 @@ void GetSysInput(EnergyPlusData &state) airTerm.OAPerPersonMode = DataZoneEquipment::PerPersonVentRateMode::ByDesignLevel; } else { airTerm.OAPerPersonMode = DataZoneEquipment::PerPersonVentRateMode::DCVByCurrentLevel; - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); - ShowContinueError( - state, EnergyPlus::format("..invalid {}=\"{}\". The default input of CurrentOccupancy is assigned", cAlphaFields(6), Alphas(6))); + ShowWarningError(state, std::format("{}{}=\"{}\", invalid data.", RoutineName, CurrentModuleObject, Alphas(1))); + ShowContinueError(state, + std::format("..invalid {}=\"{}\". The default input of CurrentOccupancy is assigned", cAlphaFields(6), Alphas(6))); } } @@ -1369,8 +1366,8 @@ void GetSysInput(EnergyPlusData &state) } else if (Util::SameString(Alphas(5), "Scheduled")) { airTerm.ZoneMinAirFracMethod = MinFlowFraction::Scheduled; } else { - ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(5), Alphas(5))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowSevereError(state, std::format("{} = {} not found.", cAlphaFields(5), Alphas(5))); + ShowContinueError(state, std::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } @@ -1382,9 +1379,8 @@ void GetSysInput(EnergyPlusData &state) airTerm.ConstantMinAirFracSetByUser = true; airTerm.ZoneMinAirFracDes = Numbers(2); if (airTerm.ZoneMinAirFracMethod == MinFlowFraction::Fixed) { - ShowWarningError(state, - EnergyPlus::format("Since {} = {}, input for {} will be ignored.", cAlphaFields(5), Alphas(5), cNumericFields(2))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowWarningError(state, std::format("Since {} = {}, input for {} will be ignored.", cAlphaFields(5), Alphas(5), cNumericFields(2))); + ShowContinueError(state, std::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); airTerm.ZoneMinAirFracDes = 0.0; } } @@ -1397,9 +1393,8 @@ void GetSysInput(EnergyPlusData &state) airTerm.FixedMinAirSetByUser = true; airTerm.DesignFixedMinAir = Numbers(3); if (airTerm.ZoneMinAirFracMethod == MinFlowFraction::Constant) { - ShowWarningError(state, - EnergyPlus::format("Since {} = {}, input for {} will be ignored.", cAlphaFields(5), Alphas(5), cNumericFields(3))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowWarningError(state, std::format("Since {} = {}, input for {} will be ignored.", cAlphaFields(5), Alphas(5), cNumericFields(3))); + ShowContinueError(state, std::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); airTerm.ZoneFixedMinAir = 0.0; } } @@ -1442,10 +1437,9 @@ void GetSysInput(EnergyPlusData &state) } // one assumes if there isn't one assigned, it's an error? if (airTerm.ADUNum == 0) { - ShowSevereError( - state, - EnergyPlus::format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, EnergyPlus::format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); + ShowSevereError(state, + std::format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); ErrorsFound = true; } else { @@ -1459,9 +1453,8 @@ void GetSysInput(EnergyPlusData &state) if (state.dataZoneEquip->ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode > 0) { ShowSevereError(state, "Error in connecting a terminal unit to a zone"); ShowContinueError( - state, - EnergyPlus::format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); - ShowContinueError(state, EnergyPlus::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + state, std::format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); + ShowContinueError(state, std::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); ShowContinueError(state, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -1483,8 +1476,8 @@ void GetSysInput(EnergyPlusData &state) if (!lAlphaBlanks(7)) { airTerm.OARequirementsPtr = Util::FindItemInList(Alphas(7), state.dataSize->OARequirements); if (airTerm.OARequirementsPtr == 0) { - ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(7), Alphas(7))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowSevereError(state, std::format("{} = {} not found.", cAlphaFields(7), Alphas(7))); + ShowContinueError(state, std::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } else { airTerm.NoOAFlowInputFromUser = false; @@ -1579,15 +1572,15 @@ void GetSysInput(EnergyPlusData &state) airTerm.MaxAirVolFlowRate = Numbers(1); airTerm.ZoneMinAirFracDes = Numbers(2); if (airTerm.ZoneMinAirFracDes < 0.0) { - ShowWarningError(state, EnergyPlus::format("{} = \"{}", airTerm.sysType, airTerm.SysName)); - ShowContinueError( - state, EnergyPlus::format("{} must be greater than or equal to 0. Resetting to 0 and the simulation continues.", cNumericFields(2))); + ShowWarningError(state, std::format("{} = \"{}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, + std::format("{} must be greater than or equal to 0. Resetting to 0 and the simulation continues.", cNumericFields(2))); airTerm.ZoneMinAirFracDes = 0.0; } if (airTerm.ZoneMinAirFracDes > 1.0) { - ShowWarningError(state, EnergyPlus::format("{} = \"{}", airTerm.sysType, airTerm.SysName)); - ShowContinueError( - state, EnergyPlus::format("{} must be less than or equal to 1. Resetting to 1 and the simulation continues.", cNumericFields(2))); + ShowWarningError(state, std::format("{} = \"{}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, + std::format("{} must be less than or equal to 1. Resetting to 1 and the simulation continues.", cNumericFields(2))); airTerm.ZoneMinAirFracDes = 1.0; } @@ -1617,10 +1610,9 @@ void GetSysInput(EnergyPlusData &state) } // one assumes if there isn't one assigned, it's an error? if (airTerm.ADUNum == 0) { - ShowSevereError( - state, - EnergyPlus::format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, EnergyPlus::format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); + ShowSevereError(state, + std::format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); ErrorsFound = true; } else { @@ -1634,9 +1626,8 @@ void GetSysInput(EnergyPlusData &state) if (state.dataZoneEquip->ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode > 0) { ShowSevereError(state, "Error in connecting a terminal unit to a zone"); ShowContinueError( - state, - EnergyPlus::format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); - ShowContinueError(state, EnergyPlus::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + state, std::format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); + ShowContinueError(state, std::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); ShowContinueError(state, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -1713,14 +1704,14 @@ void GetSysInput(EnergyPlusData &state) airTerm.ReheatAirOutletNode = GetHeatingCoilOutletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); airTerm.ReheatCoilMaxCapacity = GetHeatingCoilCapacity(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); } } else if (Util::SameString(airTerm.ReheatComp, "Coil:Heating:Electric")) { airTerm.reheatCoilType = HVAC::CoilType::HeatingElectric; airTerm.ReheatAirOutletNode = GetHeatingCoilOutletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); airTerm.ReheatCoilMaxCapacity = GetHeatingCoilCapacity(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); } } else if (Util::SameString(airTerm.ReheatComp, "Coil:Heating:Water")) { airTerm.reheatCoilType = HVAC::CoilType::HeatingWater; @@ -1729,8 +1720,8 @@ void GetSysInput(EnergyPlusData &state) airTerm.reheatCoilType = HVAC::CoilType::HeatingSteam; airTerm.ReheatComp_PlantType = DataPlant::PlantEquipmentType::CoilSteamAirHeating; } else if (!airTerm.ReheatComp.empty()) { - ShowSevereError(state, EnergyPlus::format("Illegal {} = {}.", cAlphaFields(7), airTerm.ReheatComp)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowSevereError(state, std::format("Illegal {} = {}.", cAlphaFields(7), airTerm.ReheatComp)); + ShowContinueError(state, std::format("Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } @@ -1786,10 +1777,9 @@ void GetSysInput(EnergyPlusData &state) AirTermSysInletNodeName = state.dataLoopNodes->NodeID(airTerm.InletNodeNum); if (!Util::SameString(Alphas(3), AirTermSysInletNodeName)) { ShowWarningError( - state, - EnergyPlus::format("{}Invalid air terminal object air inlet node name in {} = {}", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, EnergyPlus::format(" Specified air inlet node name is = {}.", Alphas(3))); - ShowContinueError(state, EnergyPlus::format(" Expected air inlet node name is = {}.", AirTermSysInletNodeName)); + state, std::format("{}Invalid air terminal object air inlet node name in {} = {}", RoutineName, airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format(" Specified air inlet node name is = {}.", Alphas(3))); + ShowContinueError(state, std::format(" Expected air inlet node name is = {}.", AirTermSysInletNodeName)); // ErrorsFound = true; } @@ -1814,7 +1804,7 @@ void GetSysInput(EnergyPlusData &state) IsNotOK = false; airTerm.ReheatControlNode = GetCoilSteamInletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } else { // A4, \field Unit supply air outlet node @@ -1824,7 +1814,7 @@ void GetSysInput(EnergyPlusData &state) IsNotOK = false; airTerm.ReheatAirOutletNode = GetCoilAirOutletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } } @@ -1834,7 +1824,7 @@ void GetSysInput(EnergyPlusData &state) IsNotOK = false; airTerm.ReheatControlNode = GetCoilWaterInletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } else { // A4, \field Unit supply air outlet node @@ -1844,7 +1834,7 @@ void GetSysInput(EnergyPlusData &state) IsNotOK = false; airTerm.ReheatAirOutletNode = GetCoilOutletNode(state, airTerm.ReheatComp, airTerm.ReheatName, IsNotOK); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); ErrorsFound = true; } } @@ -1862,10 +1852,9 @@ void GetSysInput(EnergyPlusData &state) AirTermSysOutletNodeName = state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode); if (!Util::SameString(Alphas(4), AirTermSysOutletNodeName)) { ShowWarningError( - state, - EnergyPlus::format("{}Invalid air terminal object air outlet node name in {} = {}", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, EnergyPlus::format(" Specified air outlet node name is = {}.", Alphas(4))); - ShowContinueError(state, EnergyPlus::format(" Expected air outlet node name is = {}.", AirTermSysOutletNodeName)); + state, std::format("{}Invalid air terminal object air outlet node name in {} = {}", RoutineName, airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format(" Specified air outlet node name is = {}.", Alphas(4))); + ShowContinueError(state, std::format(" Expected air outlet node name is = {}.", AirTermSysOutletNodeName)); // ErrorsFound = true; } @@ -1900,10 +1889,9 @@ void GetSysInput(EnergyPlusData &state) } // one assumes if there isn't one assigned, it's an error? if (airTerm.ADUNum == 0) { - ShowSevereError( - state, - EnergyPlus::format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); - ShowContinueError(state, EnergyPlus::format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); + ShowSevereError(state, + std::format("{}No matching Air Distribution Unit, for System = [{},{}].", RoutineName, airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("...should have outlet node = {}", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); ErrorsFound = true; } else { @@ -1920,9 +1908,8 @@ void GetSysInput(EnergyPlusData &state) if (state.dataZoneEquip->ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode > 0) { ShowSevereError(state, "Error in connecting a terminal unit to a zone"); ShowContinueError( - state, - EnergyPlus::format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); - ShowContinueError(state, EnergyPlus::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); + state, std::format("{} already connects to another zone", state.dataLoopNodes->NodeID(airTerm.ReheatAirOutletNode))); + ShowContinueError(state, std::format("Occurs for terminal unit {} = {}", airTerm.sysType, airTerm.SysName)); ShowContinueError(state, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -1942,7 +1929,7 @@ void GetSysInput(EnergyPlusData &state) } if (IsNotOK) { ShowWarningError(state, "Did not Match Supply Air Outlet Node to any Zone Node"); - ShowContinueError(state, EnergyPlus::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); + ShowContinueError(state, std::format("..Occurs in {} = {}", airTerm.sysType, airTerm.SysName)); } if (lAlphaBlanks(9)) { @@ -2002,11 +1989,11 @@ void GetSysInput(EnergyPlusData &state) if (state.dataSize->FinalZoneSizing(ZoneSizIndex).ZoneNum == state.dataSingleDuct->sd_airterminal(state.dataSingleDuct->SysIndexGSI).CtrlZoneNum) { if (state.dataSize->FinalZoneSizing(ZoneSizIndex).ZoneSecondaryRecirculation > 0.0) { - ShowWarningError( - state, EnergyPlus::format("{}A zone secondary recirculation fraction is specified for zone served by ", RoutineName)); + ShowWarningError(state, + std::format("{}A zone secondary recirculation fraction is specified for zone served by ", RoutineName)); ShowContinueError(state, - EnergyPlus::format("...terminal unit \"{}\" , that indicates a single path system", - state.dataSingleDuct->sd_airterminal(state.dataSingleDuct->SysIndexGSI).SysName)); + std::format("...terminal unit \"{}\" , that indicates a single path system", + state.dataSingleDuct->sd_airterminal(state.dataSingleDuct->SysIndexGSI).SysName)); ShowContinueError(state, "...The zone secondary recirculation for that zone was set to 0.0"); state.dataSize->FinalZoneSizing(ZoneSizIndex).ZoneSecondaryRecirculation = 0.0; goto SizLoop_exit; @@ -2026,7 +2013,7 @@ void GetSysInput(EnergyPlusData &state) lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } } @@ -2079,7 +2066,7 @@ void SingleDuctAirTerminal::InitSys(EnergyPlusData &state, bool const FirstHVACI ScanPlantLoopsForObject(state, this->ReheatName, this->ReheatComp_PlantType, this->HWplantLoc, errFlag, _, _, _, _, _); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Reference Unit=\"{}\", type={}", this->SysName, this->sysType)); + ShowContinueError(state, std::format("Reference Unit=\"{}\", type={}", this->SysName, this->sysType)); ShowFatalError(state, "InitSys: Program terminated for previous conditions."); } @@ -2106,12 +2093,12 @@ void SingleDuctAirTerminal::InitSys(EnergyPlusData &state, bool const FirstHVACI continue; } ShowSevereError(state, - EnergyPlus::format("InitSingleDuctSystems: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", - state.dataDefineEquipment->AirDistUnit(state.dataSingleDuct->sd_airterminal(SysIndex).ADUNum).Name)); + std::format("InitSingleDuctSystems: ADU=[Air Distribution Unit,{}] is not on any ZoneHVAC:EquipmentList.", + state.dataDefineEquipment->AirDistUnit(state.dataSingleDuct->sd_airterminal(SysIndex).ADUNum).Name)); ShowContinueError(state, - EnergyPlus::format("...System=[{},{}] will not be simulated.", - state.dataSingleDuct->sd_airterminal(SysIndex).sysType, - state.dataSingleDuct->sd_airterminal(SysIndex).SysName)); + std::format("...System=[{},{}] will not be simulated.", + state.dataSingleDuct->sd_airterminal(SysIndex).sysType, + state.dataSingleDuct->sd_airterminal(SysIndex).SysName)); } } @@ -2135,7 +2122,7 @@ void SingleDuctAirTerminal::InitSys(EnergyPlusData &state, bool const FirstHVACI errFlag = false; this->ReheatCoilMaxCapacity = GetHeatingCoilCapacity(state, this->ReheatComp, this->ReheatName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs for terminal unit {} = {}", this->sysType, this->SysName)); + ShowContinueError(state, std::format("Occurs for terminal unit {} = {}", this->sysType, this->SysName)); } } if (this->ReheatCoilMaxCapacity != AutoSize) { @@ -2473,9 +2460,9 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if ((std::abs(MaxAirVolFlowRateDes - MaxAirVolFlowRateUser) / MaxAirVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", - this->sysType, - this->SysName)); + std::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", + this->sysType, + this->SysName)); ShowContinueError(state, EnergyPlus::format("User-Specified Maximum Air Flow Rate of {:.5R} [m3/s]", MaxAirVolFlowRateUser)); ShowContinueError( @@ -2532,9 +2519,9 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if ((std::abs(MaxHeatAirVolFlowRateDes - MaxHeatAirVolFlowRateUser) / MaxHeatAirVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", - this->sysType, - this->SysName)); + std::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", + this->sysType, + this->SysName)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Heating Air Flow Rate of {:.5R} [m3/s]", MaxHeatAirVolFlowRateUser)); @@ -2616,13 +2603,12 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) MinAirFlowFracDes = 1.0; ShowWarningError( state, - EnergyPlus::format("SingleDuctSystem:SizeSys: Autosized maximum air flow rate for {} was increased to meet the zone " - "primary air flow determined according to the ASHRAE Standard 62.1 Simplified Procedure.", - this->SysName)); + std::format("SingleDuctSystem:SizeSys: Autosized maximum air flow rate for {} was increased to meet the zone " + "primary air flow determined according to the ASHRAE Standard 62.1 Simplified Procedure.", + this->SysName)); } else if (MinAirFlowFracDes > 1.0) { ShowWarningError( - state, - EnergyPlus::format("SingleDuctSystem:SizeSys: Maximum air flow rate for {} is potentially too low.", this->SysName)); + state, std::format("SingleDuctSystem:SizeSys: Maximum air flow rate for {} is potentially too low.", this->SysName)); ShowContinueError( state, "The flow is lower than the minimum flow rate calculated following the ASHRAE Standard 62.1 Simplified Procedure:"); @@ -2661,9 +2647,9 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((MinAirFlowFracUser > 0.0) && ((std::abs(MinAirFlowFracDes - MinAirFlowFracUser) / MinAirFlowFracUser) > state.dataSize->AutoVsHardSizingThreshold)) { - ShowMessage(state, - EnergyPlus::format( - "SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); + ShowMessage( + state, + std::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); ShowContinueError(state, EnergyPlus::format("User-Specified Minimum Cooling Air Flow Fraction of {:.5R}", MinAirFlowFracUser)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Minimum Cooling Air Flow Fraction of {:.5R}", MinAirFlowFracDes)); @@ -2719,13 +2705,12 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) this->MaxAirVolFlowRate = FixedMinAirDes; ShowWarningError( state, - EnergyPlus::format("SingleDuctSystem:SizeSys: Autosized maximum air flow rate for {} was increased to meet the zone " - "primary air flow determined according to the ASHRAE Standard 62.1 Simplified Procedure.", - this->SysName)); + std::format("SingleDuctSystem:SizeSys: Autosized maximum air flow rate for {} was increased to meet the zone " + "primary air flow determined according to the ASHRAE Standard 62.1 Simplified Procedure.", + this->SysName)); } else if (FixedMinAirDes > this->MaxAirVolFlowRate) { ShowWarningError( - state, - EnergyPlus::format("SingleDuctSystem:SizeSys: Maximum air flow rate for {} is potentially too low.", this->SysName)); + state, std::format("SingleDuctSystem:SizeSys: Maximum air flow rate for {} is potentially too low.", this->SysName)); ShowContinueError( state, "The flow is lower than the minimum flow rate calculated following the ASHRAE Standard 62.1 Simplified Procedure:"); @@ -2758,9 +2743,9 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) FixedMinAirUser * this->ZoneTurndownMinAirFrac); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(FixedMinAirDes - FixedMinAirUser) / FixedMinAirUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); + ShowMessage( + state, + std::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); ShowContinueError(state, EnergyPlus::format("User-Specified Minimum Cooling Air Flow Rate of {:.5R} [m3/s]", FixedMinAirUser)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Minimum Cooling Air Flow Rate of {:.5R} [m3/s]", FixedMinAirDes)); @@ -2865,9 +2850,9 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxAirVolFractionDuringReheatDes - MaxAirVolFractionDuringReheatUser) / MaxAirVolFractionDuringReheatUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); + ShowMessage( + state, + std::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Flow Fraction during Reheat of {:.5R} []", MaxAirVolFractionDuringReheatUser)); @@ -2902,9 +2887,9 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxAirVolFlowRateDuringReheatDes - MaxAirVolFlowRateDuringReheatUser) / MaxAirVolFlowRateDuringReheatUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); + ShowMessage( + state, + std::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); ShowContinueError(state, EnergyPlus::format("User-Specified Maximum Flow per Zone Floor Area during Reheat of {:.5R} [m3/s-m2]", MaxAirVolFlowRateDuringReheatUser)); @@ -2943,9 +2928,9 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxAirVolFractionDuringReheatDes - MaxAirVolFractionDuringReheatUser) / MaxAirVolFractionDuringReheatUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); + ShowMessage( + state, + std::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Flow Fraction during Reheat of {:.5R} []", MaxAirVolFractionDuringReheatUser)); @@ -2959,9 +2944,9 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxAirVolFlowRateDuringReheatDes - MaxAirVolFlowRateDuringReheatUser) / MaxAirVolFlowRateDuringReheatUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); + ShowMessage( + state, + std::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); ShowContinueError(state, EnergyPlus::format("User-Specified Maximum Flow per Zone Floor Area during Reheat of {:.5R} [m3/s-m2]", MaxAirVolFlowRateDuringReheatUser)); @@ -3050,9 +3035,8 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if (state.dataSize->TermUnitFinalZoneSizing.size() > 0 && this->DamperHeatingAction == Action::ReverseWithLimits && TermUnitSizing(state.dataSize->CurTermUnitSizingNum).AirVolFlow < state.dataSize->TermUnitFinalZoneSizing(state.dataSize->CurTermUnitSizingNum).DesHeatVolFlow) { - ShowMessage( - state, - EnergyPlus::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); + ShowMessage(state, + std::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", this->sysType, this->SysName)); ShowContinueError(state, EnergyPlus::format("Terminal unit design air flow rate during Reheat of {:.5R} [m3/s] used to size the heating coil", TermUnitSizing(state.dataSize->CurTermUnitSizingNum).AirVolFlow)); @@ -3160,7 +3144,7 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) state.dataSingleDuct->CoilWaterOutletNodeSS, PlantSizingErrorsFound); if (PlantSizingErrorsFound) { - ShowContinueError(state, EnergyPlus::format("...Occurs in {}:{}", this->sysType, this->SysName)); + ShowContinueError(state, std::format("...Occurs in {}:{}", this->sysType, this->SysName)); ErrorsFound = true; } if (PltSizHeatNum > 0) { @@ -3189,7 +3173,7 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) } } else { ShowSevereError(state, "Autosizing of water flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in AirTerminal Object={}", this->SysName)); + ShowContinueError(state, std::format("Occurs in AirTerminal Object={}", this->SysName)); ErrorsFound = true; } this->MaxReheatWaterVolFlow = MaxReheatWaterVolFlowDes; @@ -3224,9 +3208,9 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if ((std::abs(MaxReheatWaterVolFlowDes - MaxReheatWaterVolFlowUser) / MaxReheatWaterVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", - this->sysType, - this->SysName)); + std::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", + this->sysType, + this->SysName)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Reheat Water Flow Rate of {:.5R} [m3/s]", MaxReheatWaterVolFlowUser)); @@ -3269,7 +3253,7 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) state.dataSingleDuct->CoilSteamOutletNodeSS, PlantSizingErrorsFound); if (PlantSizingErrorsFound) { - ShowContinueError(state, EnergyPlus::format("...Occurs in {}:{}", this->sysType, this->SysName)); + ShowContinueError(state, std::format("...Occurs in {}:{}", this->sysType, this->SysName)); ErrorsFound = true; } if (PltSizHeatNum > 0) { @@ -3302,8 +3286,7 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) } } else { ShowSevereError(state, "Autosizing of Steam flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, - EnergyPlus::format("Occurs in AirTerminal:SingleDuct:ConstantVolume:Reheat Object={}", this->SysName)); + ShowContinueError(state, std::format("Occurs in AirTerminal:SingleDuct:ConstantVolume:Reheat Object={}", this->SysName)); ErrorsFound = true; } this->MaxReheatSteamVolFlow = MaxReheatSteamVolFlowDes; @@ -3323,9 +3306,9 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) if ((std::abs(MaxReheatSteamVolFlowDes - MaxReheatSteamVolFlowUser) / MaxReheatSteamVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", - this->sysType, - this->SysName)); + std::format("SizeHVACSingleDuct: Potential issue with equipment sizing for {} = \"{}\".", + this->sysType, + this->SysName)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Reheat Steam Flow Rate of {:.5R} [m3/s]", MaxReheatSteamVolFlowUser)); @@ -3367,7 +3350,7 @@ void SingleDuctAirTerminal::SizeSys(EnergyPlusData &state) ShowWarningError(state, "SingleDuctSystem:SizeSys: Air Terminal Unit flow limits are not consistent, minimum flow limit is larger than " "reheat maximum"); - ShowContinueError(state, EnergyPlus::format("Air Terminal Unit name = {}", this->SysName)); + ShowContinueError(state, std::format("Air Terminal Unit name = {}", this->SysName)); ShowContinueError(state, EnergyPlus::format("Maximum terminal flow during reheat = {:.6R} [m3/s] or flow fraction = {:.4R}", this->MaxAirVolFlowRateDuringReheat, @@ -4426,14 +4409,14 @@ void SingleDuctAirTerminal::SimVAVVS(EnergyPlusData &state, bool const FirstHVAC state.dataSingleDuct->sd_airterminal(this->SysNum).solveRootStats); if (SolFlag == General::SOLVEROOT_ERROR_ITER) { if (this->IterationLimit == 0) { - ShowWarningError(state, EnergyPlus::format("Supply air flow control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, std::format("Supply air flow control failed in VS VAV terminal unit {}", this->SysName)); ShowContinueError(state, " Iteration limit exceeded in calculating air flow rate"); } ShowRecurringWarningErrorAtEnd( state, "Supply air flow Iteration limit exceeded in VS VAV terminal unit " + this->SysName, this->IterationLimit); } else if (SolFlag == General::SOLVEROOT_ERROR_INIT) { if (this->IterationFailed == 0) { - ShowWarningError(state, EnergyPlus::format("Supply air flow control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, std::format("Supply air flow control failed in VS VAV terminal unit {}", this->SysName)); ShowContinueError(state, " Bad air flow limits"); } ShowRecurringWarningErrorAtEnd( @@ -4526,14 +4509,14 @@ void SingleDuctAirTerminal::SimVAVVS(EnergyPlusData &state, bool const FirstHVAC state.dataSingleDuct->sd_airterminal(this->SysNum).solveRootStats); if (SolFlag == General::SOLVEROOT_ERROR_ITER) { if (this->IterationLimit == 0) { - ShowWarningError(state, EnergyPlus::format("Supply air flow control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, std::format("Supply air flow control failed in VS VAV terminal unit {}", this->SysName)); ShowContinueError(state, " Iteration limit exceeded in calculating air flow rate"); } ShowRecurringWarningErrorAtEnd( state, "Supply air flow Iteration limit exceeded in VS VAV terminal unit " + this->SysName, this->IterationLimit); } else if (SolFlag == General::SOLVEROOT_ERROR_INIT) { if (this->IterationFailed == 0) { - ShowWarningError(state, EnergyPlus::format("Supply air flow control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, std::format("Supply air flow control failed in VS VAV terminal unit {}", this->SysName)); ShowContinueError(state, " Bad air flow limits"); } ShowRecurringWarningErrorAtEnd( @@ -4611,14 +4594,14 @@ void SingleDuctAirTerminal::SimVAVVS(EnergyPlusData &state, bool const FirstHVAC state.dataSingleDuct->sd_airterminal(this->SysNum).solveRootStats); if (SolFlag == General::SOLVEROOT_ERROR_ITER) { if (this->IterationLimit == 0) { - ShowWarningError(state, EnergyPlus::format("Steam heating coil control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, std::format("Steam heating coil control failed in VS VAV terminal unit {}", this->SysName)); ShowContinueError(state, " Iteration limit exceeded in calculating air flow rate"); } ShowRecurringWarningErrorAtEnd( state, "Steam heating coil iteration limit exceeded in VS VAV terminal unit " + this->SysName, this->IterationLimit); } else if (SolFlag == General::SOLVEROOT_ERROR_INIT) { if (this->IterationFailed == 0) { - ShowWarningError(state, EnergyPlus::format("Steam heating coil control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, std::format("Steam heating coil control failed in VS VAV terminal unit {}", this->SysName)); ShowContinueError(state, " Bad air flow limits"); } ShowRecurringWarningErrorAtEnd( @@ -4660,14 +4643,14 @@ void SingleDuctAirTerminal::SimVAVVS(EnergyPlusData &state, bool const FirstHVAC MassFlow = state.dataLoopNodes->Node(SysInletNode).MassFlowRate; if (SolFlag == General::SOLVEROOT_ERROR_ITER) { if (this->IterationLimit == 0) { - ShowWarningError(state, EnergyPlus::format("Heating coil control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, std::format("Heating coil control failed in VS VAV terminal unit {}", this->SysName)); ShowContinueError(state, " Iteration limit exceeded in calculating air flow rate"); } ShowRecurringWarningErrorAtEnd( state, "Heating coil control iteration limit exceeded in VS VAV terminal unit " + this->SysName, this->IterationLimit); } else if (SolFlag == General::SOLVEROOT_ERROR_INIT) { if (this->IterationFailed == 0) { - ShowWarningError(state, EnergyPlus::format("Heating coil control failed in VS VAV terminal unit {}", this->SysName)); + ShowWarningError(state, std::format("Heating coil control failed in VS VAV terminal unit {}", this->SysName)); ShowContinueError(state, " Bad air flow limits"); } ShowRecurringWarningErrorAtEnd( @@ -4679,7 +4662,7 @@ void SingleDuctAirTerminal::SimVAVVS(EnergyPlusData &state, bool const FirstHVAC this->CalcVAVVS(state, FirstHVACIteration, ZoneNodeNum, 0.0, QTotLoad, fanType, MassFlow, FanOp, QDelivered); } } else { - ShowFatalError(state, EnergyPlus::format("Invalid Reheat Component={}", this->ReheatComp)); + ShowFatalError(state, std::format("Invalid Reheat Component={}", this->ReheatComp)); } } else { @@ -4835,7 +4818,7 @@ void SingleDuctAirTerminal::SimConstVol(EnergyPlusData &state, bool const FirstH SimulateHeatingCoilComponents(state, this->ReheatName, FirstHVACIteration, QZnReq, this->ReheatComp_Index); } break; default: { - ShowFatalError(state, EnergyPlus::format("Invalid Reheat Component={}", this->ReheatComp)); + ShowFatalError(state, std::format("Invalid Reheat Component={}", this->ReheatComp)); } break; } @@ -4866,7 +4849,7 @@ void SingleDuctAirTerminal::SimConstVol(EnergyPlusData &state, bool const FirstH SimulateHeatingCoilComponents(state, this->ReheatName, FirstHVACIteration, 0.0, this->ReheatComp_Index); } break; default: { - ShowFatalError(state, EnergyPlus::format("Invalid Reheat Component={}", this->ReheatComp)); + ShowFatalError(state, std::format("Invalid Reheat Component={}", this->ReheatComp)); } break; } } @@ -4964,7 +4947,7 @@ void SingleDuctAirTerminal::CalcVAVVS(EnergyPlusData &state, SimulateHeatingCoilComponents(state, this->ReheatName, FirstHVACIteration, HCoilReq, this->ReheatComp_Index); } break; default: { - ShowFatalError(state, EnergyPlus::format("Invalid Reheat Component={}", this->ReheatComp)); + ShowFatalError(state, std::format("Invalid Reheat Component={}", this->ReheatComp)); } break; } @@ -5058,18 +5041,18 @@ void GetHVACSingleDuctSysIndex(EnergyPlusData &state, SDSIndex = Util::FindItemInList(SDSName, state.dataSingleDuct->sd_airterminal, &SingleDuctAirTerminal::SysName); if (SDSIndex == 0) { if (!ThisObjectType.empty()) { - ShowSevereError(state, fmt::format("{}, GetHVACSingleDuctSysIndex: Single duct system not found={}", ThisObjectType, SDSName)); + ShowSevereError(state, std::format("{}, GetHVACSingleDuctSysIndex: Single duct system not found={}", ThisObjectType, SDSName)); } else { - ShowSevereError(state, EnergyPlus::format("GetHVACSingleDuctSysIndex: Single duct system not found={}", SDSName)); + ShowSevereError(state, std::format("GetHVACSingleDuctSysIndex: Single duct system not found={}", SDSName)); } ErrorsFound = true; } else { if ((state.dataSingleDuct->sd_airterminal(SDSIndex).SysType_Num != SysType::SingleDuctConstVolReheat) && (state.dataSingleDuct->sd_airterminal(SDSIndex).SysType_Num != SysType::SingleDuctVAVReheat)) { if (!ThisObjectType.empty()) { - ShowSevereError(state, fmt::format("{}, GetHVACSingleDuctSysIndex: Could not find allowed types={}", ThisObjectType, SDSName)); + ShowSevereError(state, std::format("{}, GetHVACSingleDuctSysIndex: Could not find allowed types={}", ThisObjectType, SDSName)); } else { - ShowSevereError(state, EnergyPlus::format("GetHVACSingleDuctSysIndex: Could not find allowed types={}", SDSName)); + ShowSevereError(state, std::format("GetHVACSingleDuctSysIndex: Could not find allowed types={}", SDSName)); } ShowContinueError(state, "The allowed types are: AirTerminal:SingleDuct:ConstantVolume:Reheat and AirTerminal:SingleDuct:VAV:Reheat"); ErrorsFound = true; @@ -5102,7 +5085,7 @@ void SimATMixer(EnergyPlusData &state, std::string const &SysName, bool const Fi state.dataSingleDuct->SysNumSATM = Util::FindItemInList(SysName, state.dataSingleDuct->SysATMixer); SysIndex = state.dataSingleDuct->SysNumSATM; if (state.dataSingleDuct->SysNumSATM == 0) { - ShowFatalError(state, EnergyPlus::format("Object {} not found", SysName)); + ShowFatalError(state, std::format("Object {} not found", SysName)); } } else { state.dataSingleDuct->SysNumSATM = SysIndex; @@ -5243,11 +5226,10 @@ void GetATMixers(EnergyPlusData &state) state.dataSingleDuct->SysATMixer(ATMixerNum).OARequirementsPtr = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(8), state.dataSize->OARequirements); if (state.dataSingleDuct->SysATMixer(ATMixerNum).OARequirementsPtr == 0) { - ShowSevereError( - state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + std::format("{}{}=\"{}\", invalid data.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( - state, - EnergyPlus::format("..invalid {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); + state, std::format("..invalid {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(8), state.dataIPShortCut->cAlphaArgs(8))); ErrorsFound = true; } else { state.dataSingleDuct->SysATMixer(ATMixerNum).NoOAFlowInputFromUser = false; @@ -5263,44 +5245,44 @@ void GetATMixers(EnergyPlusData &state) state.dataSingleDuct->SysATMixer(ATMixerNum).OAPerPersonMode = DataZoneEquipment::PerPersonVentRateMode::ByDesignLevel; } else { state.dataSingleDuct->SysATMixer(ATMixerNum).OAPerPersonMode = DataZoneEquipment::PerPersonVentRateMode::DCVByCurrentLevel; - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", invalid data.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError(state, + std::format("{}{}=\"{}\", invalid data.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - EnergyPlus::format("..invalid {}=\"{}\". The default input of CurrentOccupancy is assigned", - state.dataIPShortCut->cAlphaFieldNames(9), - state.dataIPShortCut->cAlphaArgs(9))); + std::format("..invalid {}=\"{}\". The default input of CurrentOccupancy is assigned", + state.dataIPShortCut->cAlphaFieldNames(9), + state.dataIPShortCut->cAlphaArgs(9))); } } // Check for dupes in the three nodes. if (state.dataSingleDuct->SysATMixer(ATMixerNum).SecInNode == state.dataSingleDuct->SysATMixer(ATMixerNum).PriInNode) { ShowSevereError(state, - EnergyPlus::format("{} = {} {} = {} duplicates the {}.", - cCurrentModuleObject, - state.dataSingleDuct->SysATMixer(ATMixerNum).Name, - state.dataIPShortCut->cAlphaArgs(5), - state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).PriInNode), - state.dataIPShortCut->cAlphaArgs(4))); + std::format("{} = {} {} = {} duplicates the {}.", + cCurrentModuleObject, + state.dataSingleDuct->SysATMixer(ATMixerNum).Name, + state.dataIPShortCut->cAlphaArgs(5), + state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).PriInNode), + state.dataIPShortCut->cAlphaArgs(4))); ErrorsFound = true; } else if (state.dataSingleDuct->SysATMixer(ATMixerNum).SecInNode == state.dataSingleDuct->SysATMixer(ATMixerNum).MixedAirOutNode) { ShowSevereError(state, - EnergyPlus::format("{} = {} {} = {} duplicates the {}.", - cCurrentModuleObject, - state.dataSingleDuct->SysATMixer(ATMixerNum).Name, - state.dataIPShortCut->cAlphaArgs(6), - state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).MixedAirOutNode), - state.dataIPShortCut->cAlphaArgs(4))); + std::format("{} = {} {} = {} duplicates the {}.", + cCurrentModuleObject, + state.dataSingleDuct->SysATMixer(ATMixerNum).Name, + state.dataIPShortCut->cAlphaArgs(6), + state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).MixedAirOutNode), + state.dataIPShortCut->cAlphaArgs(4))); ErrorsFound = true; } if (state.dataSingleDuct->SysATMixer(ATMixerNum).PriInNode == state.dataSingleDuct->SysATMixer(ATMixerNum).MixedAirOutNode) { ShowSevereError(state, - EnergyPlus::format("{} = {} {} = {} duplicates the {}.", - cCurrentModuleObject, - state.dataSingleDuct->SysATMixer(ATMixerNum).Name, - state.dataIPShortCut->cAlphaArgs(6), - state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).MixedAirOutNode), - state.dataIPShortCut->cAlphaArgs(5))); + std::format("{} = {} {} = {} duplicates the {}.", + cCurrentModuleObject, + state.dataSingleDuct->SysATMixer(ATMixerNum).Name, + state.dataIPShortCut->cAlphaArgs(6), + state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).MixedAirOutNode), + state.dataIPShortCut->cAlphaArgs(5))); ErrorsFound = true; } @@ -5314,13 +5296,13 @@ void GetATMixers(EnergyPlusData &state) // one assumes if there isn't one assigned, it's an error? if (state.dataSingleDuct->SysATMixer(ATMixerNum).ADUNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}No matching Air Distribution Unit, for System = [{},{}].", - RoutineName, - cCurrentModuleObject, - state.dataSingleDuct->SysATMixer(ATMixerNum).Name)); + std::format("{}No matching Air Distribution Unit, for System = [{},{}].", + RoutineName, + cCurrentModuleObject, + state.dataSingleDuct->SysATMixer(ATMixerNum).Name)); ShowContinueError(state, - EnergyPlus::format("...should have outlet node = {}", - state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).MixedAirOutNode))); + std::format("...should have outlet node = {}", + state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).MixedAirOutNode))); ErrorsFound = true; } else { @@ -5386,15 +5368,15 @@ void GetATMixers(EnergyPlusData &state) if (!ZoneNodeFoundAgain) { ShowSevereError( state, - EnergyPlus::format("{} = \"{}\". Inlet Side Air Terminal Mixer air inlet node name must be the same as either a zone " - "exhaust node name or an induced air node in ZonePlenum.", - cCurrentModuleObject, - state.dataSingleDuct->SysATMixer(ATMixerNum).Name)); + std::format("{} = \"{}\". Inlet Side Air Terminal Mixer air inlet node name must be the same as either a zone " + "exhaust node name or an induced air node in ZonePlenum.", + cCurrentModuleObject, + state.dataSingleDuct->SysATMixer(ATMixerNum).Name)); ShowContinueError(state, "..Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object."); ShowContinueError(state, "..Induced Air Outlet Node name is specified in AirLoopHVAC:ReturnPlenum object."); ShowContinueError(state, - EnergyPlus::format("..Inlet Side CONNECTED Air Terminal Mixer inlet node name = {}", - state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).SecInNode))); + std::format("..Inlet Side CONNECTED Air Terminal Mixer inlet node name = {}", + state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).SecInNode))); ErrorsFound = true; } } @@ -5432,14 +5414,13 @@ void GetATMixers(EnergyPlusData &state) if (ZoneNodeNotFound) { ShowSevereError( state, - EnergyPlus::format( - "{} = \"{}\". Supply Side Air Terminal Mixer air outlet node name must be the same as a zone inlet node name.", - cCurrentModuleObject, - state.dataSingleDuct->SysATMixer(ATMixerNum).Name)); + std::format("{} = \"{}\". Supply Side Air Terminal Mixer air outlet node name must be the same as a zone inlet node name.", + cCurrentModuleObject, + state.dataSingleDuct->SysATMixer(ATMixerNum).Name)); ShowContinueError(state, "..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object."); ShowContinueError(state, - EnergyPlus::format("..Supply Side connected Air Terminal Mixer outlet node name = {}", - state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).MixedAirOutNode))); + std::format("..Supply Side connected Air Terminal Mixer outlet node name = {}", + state.dataLoopNodes->NodeID(state.dataSingleDuct->SysATMixer(ATMixerNum).MixedAirOutNode))); ErrorsFound = true; } } @@ -5458,11 +5439,10 @@ void GetATMixers(EnergyPlusData &state) if (state.dataSize->ZoneSizingInput(SizingInputNum).ZoneDesignSpecOAIndex == 0) { ShowWarningError( state, - EnergyPlus::format( - "{}{}=\"{}\", invalid data.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}{}=\"{}\", invalid data.", RoutineName, cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, - EnergyPlus::format("{} is blank in both the mixer and the Sizing:Zone object for the same zone.", - state.dataIPShortCut->cAlphaFieldNames(8))); + std::format("{} is blank in both the mixer and the Sizing:Zone object for the same zone.", + state.dataIPShortCut->cAlphaFieldNames(8))); ShowContinueError(state, "The mixer outdoor airflow rate is set to zero."); state.dataSingleDuct->SysATMixer(ATMixerNum).DesignPrimaryAirVolRate = 0.0; } else { @@ -5481,8 +5461,8 @@ void GetATMixers(EnergyPlusData &state) } else { ShowWarningError( state, - EnergyPlus::format("{}is blank and there is no Sizing:Zone for the same zone. The mixer outdoor airflow rate is set to zero.", - state.dataIPShortCut->cAlphaFieldNames(8))); + std::format("{}is blank and there is no Sizing:Zone for the same zone. The mixer outdoor airflow rate is set to zero.", + state.dataIPShortCut->cAlphaFieldNames(8))); state.dataSingleDuct->SysATMixer(ATMixerNum).DesignPrimaryAirVolRate = 0.0; } } @@ -5491,7 +5471,7 @@ void GetATMixers(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Program terminates.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in input. Program terminates.", RoutineName)); } } @@ -5604,7 +5584,7 @@ void CalcATMixer(EnergyPlusData &state, int const SysNum) // for inlet side mixer, the mixed air flow has been set, but we don't know the secondary flow secInNode.MassFlowRate = max(MixedAirMassFlowRate - priInNode.MassFlowRate, 0.0); if (std::abs(priInNode.MassFlowRate + secInNode.MassFlowRate - MixedAirMassFlowRate) > SmallMassFlow) { - ShowSevereError(state, EnergyPlus::format("CalcATMixer: Invalid mass flow rates in AirTerminal:SingleDuct:Mixer={}", atMixer.Name)); + ShowSevereError(state, std::format("CalcATMixer: Invalid mass flow rates in AirTerminal:SingleDuct:Mixer={}", atMixer.Name)); ShowContinueErrorTimeStamp(state, EnergyPlus::format("Primary mass flow rate={:.6R}Secondary mass flow rate={:.6R}Mixed mass flow rate={:.6R}", priInNode.MassFlowRate, @@ -5766,14 +5746,13 @@ void setATMixerSizingProperties(EnergyPlusData &state, if (state.dataSize->FinalZoneSizing.allocated() && state.dataSingleDuct->SysATMixer(inletATMixerIndex).printWarning) { auto const &finalZoneSizing = state.dataSize->FinalZoneSizing(curZoneEqNum); if (!finalZoneSizing.AccountForDOAS && finalZoneSizing.DOASControlStrategy != DOASControl::NeutralSup) { - ShowWarningError(state, - EnergyPlus::format("AirTerminal:SingleDuct:Mixer: {}", state.dataSingleDuct->SysATMixer(inletATMixerIndex).Name)); + ShowWarningError(state, std::format("AirTerminal:SingleDuct:Mixer: {}", state.dataSingleDuct->SysATMixer(inletATMixerIndex).Name)); ShowContinueError( state, " Supply side Air Terminal Mixer does not adjust zone equipment coil sizing and may result in inappropriately sized coils."); - ShowContinueError(state, - EnergyPlus::format(" Set Account for Dedicated Outdoor Air System = Yes in Sizing:Zone object for zone = {}", - finalZoneSizing.ZoneName)); + ShowContinueError( + state, + std::format(" Set Account for Dedicated Outdoor Air System = Yes in Sizing:Zone object for zone = {}", finalZoneSizing.ZoneName)); } state.dataSingleDuct->SysATMixer(inletATMixerIndex).printWarning = false; } @@ -5783,11 +5762,11 @@ void setATMixerSizingProperties(EnergyPlusData &state, if (state.dataSize->FinalZoneSizing.allocated() && state.dataSingleDuct->SysATMixer(inletATMixerIndex).printWarning) { auto const &finalZoneSizing = state.dataSize->FinalZoneSizing(curZoneEqNum); if (finalZoneSizing.AccountForDOAS && finalZoneSizing.DOASControlStrategy != DOASControl::NeutralSup) { - ShowWarningError(state, EnergyPlus::format("AirTerminal:SingleDuct:Mixer: {}", state.dataSingleDuct->SysATMixer(inletATMixerIndex).Name)); + ShowWarningError(state, std::format("AirTerminal:SingleDuct:Mixer: {}", state.dataSingleDuct->SysATMixer(inletATMixerIndex).Name)); ShowContinueError(state, " Inlet side Air Terminal Mixer automatically adjusts zone equipment coil sizing."); - ShowContinueError(state, - EnergyPlus::format(" Set Account for Dedicated Outdoor Air System = No in Sizing:Zone object for zone = {}", - finalZoneSizing.ZoneName)); + ShowContinueError( + state, + std::format(" Set Account for Dedicated Outdoor Air System = No in Sizing:Zone object for zone = {}", finalZoneSizing.ZoneName)); state.dataSingleDuct->SysATMixer(inletATMixerIndex).printWarning = false; } } diff --git a/src/EnergyPlus/SizingManager.cc b/src/EnergyPlus/SizingManager.cc index e88ce1e354d..4ab9e50acd1 100644 --- a/src/EnergyPlus/SizingManager.cc +++ b/src/EnergyPlus/SizingManager.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include #include // EnergyPlus Headers @@ -301,8 +302,9 @@ void ManageSizing(EnergyPlusData &state) } else { DisplayString(state, "Performing Zone Sizing Simulation for Load Component Report"); } - DisplayString(state, - fmt::format("...for Sizing Period: #{} {}", NumSizingPeriodsPerformed, state.dataEnvrn->EnvironmentName)); + DisplayString( + state, + EnergyPlus::format("...for Sizing Period: #{} {}", NumSizingPeriodsPerformed, state.dataEnvrn->EnvironmentName)); } UpdateZoneSizing(state, Constant::CallIndicator::BeginDay); UpdateFacilitySizing(state, Constant::CallIndicator::BeginDay); @@ -350,7 +352,7 @@ void ManageSizing(EnergyPlusData &state) TimeStepInDay = (state.dataGlobal->HourOfDay - 1) * state.dataGlobal->TimeStepsInHour + state.dataGlobal->TimeStep; if (state.dataGlobal->HourOfDay == 1 && state.dataGlobal->TimeStep == 1) { state.dataSize->DesDayWeath(state.dataSize->CurOverallSimDay).DateString = - fmt::format("{}/{}", state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth); + EnergyPlus::format("{}/{}", state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth); } state.dataSize->DesDayWeath(state.dataSize->CurOverallSimDay).Temp(TimeStepInDay) = state.dataEnvrn->OutDryBulbTemp; state.dataSize->DesDayWeath(state.dataSize->CurOverallSimDay).HumRat(TimeStepInDay) = state.dataEnvrn->OutHumRat; @@ -492,8 +494,8 @@ void ManageSizing(EnergyPlusData &state) } else { // (.NOT.WarmupFlag) if (state.dataGlobal->DayOfSim == 1) { DisplayString(state, "Calculating System sizing"); - DisplayString(state, - fmt::format("...for Sizing Period: #{} {}", NumSizingPeriodsPerformed, state.dataEnvrn->EnvironmentName)); + DisplayString( + state, EnergyPlus::format("...for Sizing Period: #{} {}", NumSizingPeriodsPerformed, state.dataEnvrn->EnvironmentName)); } UpdateSysSizing(state, Constant::CallIndicator::BeginDay); } @@ -2307,14 +2309,14 @@ void GetOARequirements(EnergyPlusData &state) } } } else { - ShowSevereError(state, EnergyPlus::format("{}{}={} is empty.", RoutineName, cCurrentModuleObject2, thisOAReq.Name)); + ShowSevereError(state, std::format("{}{}={} is empty.", RoutineName, cCurrentModuleObject2, thisOAReq.Name)); ShowContinueError(state, "At least one pair of Space Name and Space Design Specification Outdoor Air Object Name is required."); ErrorsFound = true; } } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } } } @@ -2356,9 +2358,8 @@ void ProcessInputOARequirements(EnergyPlusData &state, if (NumAlphas > 1) { thisOARequirements.OAFlowMethod = static_cast(getEnumValue(OAFlowCalcMethodNamesUC, Util::makeUPPER(Alphas(2)))); if (thisOARequirements.OAFlowMethod == OAFlowCalcMethod::Invalid) { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, state.dataSize->OARequirements(OAIndex).Name)); - ShowContinueError(state, EnergyPlus::format("...Invalid {}=\"{}\",", cAlphaFields(2), Alphas(2))); + ShowSevereError(state, std::format("{}{}=\"{}\",", RoutineName, CurrentModuleObject, state.dataSize->OARequirements(OAIndex).Name)); + ShowContinueError(state, std::format("...Invalid {}=\"{}\",", cAlphaFields(2), Alphas(2))); ShowContinueError(state, "...Valid choices are Flow/Person, Flow/Zone, Flow/Area, AirChanges/Hour, Sum, Maximum, IndoorAirQualityProcedure, " "ProportionalControlBasedOnDesignOccupancy, and ProportionalControlBasedOnOccupancySchedule."); @@ -2551,7 +2552,7 @@ void GetZoneAirDistribution(EnergyPlusData &state) lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } } } @@ -2612,7 +2613,7 @@ void GetSizingParams(EnergyPlusData &state) state.dataSize->GlobalCoolSizingFactor = 1.0; state.dataSize->NumTimeStepsInAvg = state.dataGlobal->TimeStepsInHour; } else { - ShowFatalError(state, EnergyPlus::format("{}: More than 1 occurrence of this object; only 1 allowed", cCurrentModuleObject)); + ShowFatalError(state, std::format("{}: More than 1 occurrence of this object; only 1 allowed", cCurrentModuleObject)); } if (state.dataGlobal->OverrideTimestep) { state.dataSize->NumTimeStepsInAvg = state.dataGlobal->TimeStepsInHour; @@ -2622,11 +2623,11 @@ void GetSizingParams(EnergyPlusData &state) } if (state.dataSize->NumTimeStepsInAvg < state.dataGlobal->TimeStepsInHour) { ShowWarningError(state, - EnergyPlus::format("{}: note {} entered value=[{}] is less than 1 hour (i.e., {} timesteps).", - cCurrentModuleObject, - state.dataIPShortCut->cNumericFieldNames(3), - state.dataSize->NumTimeStepsInAvg, - state.dataGlobal->TimeStepsInHour)); + std::format("{}: note {} entered value=[{}] is less than 1 hour (i.e., {} timesteps).", + cCurrentModuleObject, + state.dataIPShortCut->cNumericFieldNames(3), + state.dataSize->NumTimeStepsInAvg, + state.dataGlobal->TimeStepsInHour)); } cCurrentModuleObject = "OutputControl:Sizing:Style"; @@ -2660,10 +2661,10 @@ void GetSizingParams(EnergyPlusData &state) } else { state.dataSize->SizingFileColSep = CharComma; // comma ShowWarningError(state, - EnergyPlus::format("{}: invalid {} entered value=\"{}\", Commas will be used to separate fields.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}: invalid {} entered value=\"{}\", Commas will be used to separate fields.", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(1), + state.dataIPShortCut->cAlphaArgs(1))); state.dataIPShortCut->cAlphaArgs(1) = "Comma"; } print(state.files.eio, "! ,Style\n"); @@ -2764,17 +2765,17 @@ void GetZoneSizingInput(EnergyPlusData &state) SizingZoneObjects(Item).ZoneOrZoneListPtr = ZLItem; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {} not found.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(1))); + std::format("{}=\"{}\" invalid {} not found.", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(1))); ErrorsFound = true; errFlag = true; } } if (errFlag) { - ShowSevereError(state, EnergyPlus::format("GetZoneSizingInput: Errors with invalid names in {} objects.", cCurrentModuleObject)); + ShowSevereError(state, std::format("GetZoneSizingInput: Errors with invalid names in {} objects.", cCurrentModuleObject)); ShowContinueError(state, "...These will not be read in. Other errors may occur."); state.dataSize->NumZoneSizingInput = 0; } @@ -2840,12 +2841,10 @@ void GetZoneSizingInput(EnergyPlusData &state) } else if (coolingSATMethod == "TEMPERATUREDIFFERENCE") { state.dataSize->ZoneSizingInput(ZoneSizIndex).ZnCoolDgnSAMethod = TemperatureDifference; } else { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("... incorrect {}=\"{}\"", - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, + std::format("... incorrect {}=\"{}\"", state.dataIPShortCut->cAlphaFieldNames(2), state.dataIPShortCut->cAlphaArgs(2))); ShowContinueError(state, "... valid values are SupplyAirTemperature or TemperatureDifference."); ErrorsFound = true; } @@ -2935,8 +2934,7 @@ void GetZoneSizingInput(EnergyPlusData &state) state.dataIPShortCut->cNumericFieldNames(5), state.dataIPShortCut->rNumericArgs(5))); ShowContinueError( - state, - EnergyPlus::format(".. value should not be negative. Occurs in Sizing Object={}", state.dataIPShortCut->cAlphaArgs(1))); + state, std::format(".. value should not be negative. Occurs in Sizing Object={}", state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else { state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolDesHumRat = state.dataIPShortCut->rNumericArgs(5); @@ -2955,8 +2953,7 @@ void GetZoneSizingInput(EnergyPlusData &state) state.dataIPShortCut->cNumericFieldNames(6), state.dataIPShortCut->rNumericArgs(6))); ShowContinueError( - state, - EnergyPlus::format(".. value should not be negative. Occurs in Sizing Object={}", state.dataIPShortCut->cAlphaArgs(1))); + state, std::format(".. value should not be negative. Occurs in Sizing Object={}", state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else { state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatDesHumRat = state.dataIPShortCut->rNumericArgs(6); @@ -2973,12 +2970,10 @@ void GetZoneSizingInput(EnergyPlusData &state) if (OAIndex > 0) { state.dataSize->ZoneSizingInput(ZoneSizIndex).ZoneDesignSpecOAIndex = OAIndex; } else { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("... incorrect {}=\"{}\".", - state.dataIPShortCut->cAlphaFieldNames(4), - state.dataIPShortCut->cAlphaArgs(4))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, + std::format("... incorrect {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(4), state.dataIPShortCut->cAlphaArgs(4))); ErrorsFound = true; } } else { // If no design spec object specified, i.e. no OA, then leave ZoneDesignSpecOAIndex = 0 @@ -2990,7 +2985,7 @@ void GetZoneSizingInput(EnergyPlusData &state) if (state.dataIPShortCut->lNumericFieldBlanks(7) || state.dataIPShortCut->rNumericArgs(7) == 0.0) { state.dataSize->ZoneSizingInput(ZoneSizIndex).HeatSizingFactor = state.dataSize->GlobalHeatSizingFactor; } else if (state.dataIPShortCut->rNumericArgs(7) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(7), @@ -3005,7 +3000,7 @@ void GetZoneSizingInput(EnergyPlusData &state) if (state.dataIPShortCut->lNumericFieldBlanks(8) || state.dataIPShortCut->rNumericArgs(8) == 0.0) { state.dataSize->ZoneSizingInput(ZoneSizIndex).CoolSizingFactor = state.dataSize->GlobalCoolSizingFactor; } else if (state.dataIPShortCut->rNumericArgs(8) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(8), @@ -3025,7 +3020,7 @@ void GetZoneSizingInput(EnergyPlusData &state) if (state.dataIPShortCut->lNumericFieldBlanks(9)) { state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolAirFlow = 0.0; } else if (state.dataIPShortCut->rNumericArgs(9) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(9), @@ -3048,7 +3043,7 @@ void GetZoneSizingInput(EnergyPlusData &state) state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolMinAirFlowPerArea = state.dataIPShortCut->rNumericArgs(10); } } else if (state.dataIPShortCut->rNumericArgs(10) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(108), @@ -3066,7 +3061,7 @@ void GetZoneSizingInput(EnergyPlusData &state) if (state.dataIPShortCut->lNumericFieldBlanks(11)) { state.dataSize->ZoneSizingInput(ZoneSizIndex).DesCoolMinAirFlow = 0.0; } else if (state.dataIPShortCut->rNumericArgs(11) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(11), @@ -3077,7 +3072,7 @@ void GetZoneSizingInput(EnergyPlusData &state) } // N12,\field Cooling Minimum Air Flow Fraction if (state.dataIPShortCut->rNumericArgs(12) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(12), @@ -3098,7 +3093,7 @@ void GetZoneSizingInput(EnergyPlusData &state) if (state.dataIPShortCut->lNumericFieldBlanks(13)) { state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatAirFlow = 0.0; } else if (state.dataIPShortCut->rNumericArgs(13) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(13), @@ -3122,7 +3117,7 @@ void GetZoneSizingInput(EnergyPlusData &state) state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlowPerArea = state.dataIPShortCut->rNumericArgs(14); } } else if (state.dataIPShortCut->rNumericArgs(14) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(14), @@ -3147,7 +3142,7 @@ void GetZoneSizingInput(EnergyPlusData &state) state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlow = state.dataIPShortCut->rNumericArgs(15); } } else if (state.dataIPShortCut->rNumericArgs(15) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(15), @@ -3171,7 +3166,7 @@ void GetZoneSizingInput(EnergyPlusData &state) state.dataSize->ZoneSizingInput(ZoneSizIndex).DesHeatMaxAirFlowFrac = state.dataIPShortCut->rNumericArgs(16); } } else if (state.dataIPShortCut->rNumericArgs(16) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(16), @@ -3211,12 +3206,10 @@ void GetZoneSizingInput(EnergyPlusData &state) state.dataSize->ZoneAirDistribution(ObjIndex).ZoneVentilationEff; } else { // generate a warning message - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, - EnergyPlus::format("... not found {}=\"{}\".", - state.dataIPShortCut->cAlphaFieldNames(7), - state.dataIPShortCut->cAlphaArgs(7))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError( + state, + std::format("... not found {}=\"{}\".", state.dataIPShortCut->cAlphaFieldNames(7), state.dataIPShortCut->cAlphaArgs(7))); ErrorsFound = true; } } else { @@ -3248,8 +3241,7 @@ void GetZoneSizingInput(EnergyPlusData &state) state.dataSize->ZoneSizingInput(ZoneSizIndex).DOASHighSetpoint = state.dataIPShortCut->rNumericArgs(18); if (state.dataIPShortCut->rNumericArgs(17) > 0.0 && state.dataIPShortCut->rNumericArgs(18) > 0.0 && state.dataIPShortCut->rNumericArgs(17) >= state.dataIPShortCut->rNumericArgs(18)) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "... Dedicated Outside Air Low Setpoint for Design must be less than the High Setpoint"); ErrorsFound = true; } @@ -3295,14 +3287,14 @@ void GetZoneSizingInput(EnergyPlusData &state) ShowWarningCustom( state, eoh, - EnergyPlus::format("Maximum value ({}%) of Zone Humidistat Humidification Set Point Schedule Name = {} is " - "greater than minimum value ({}%) of Zone Humidistat Dehumidifcation Set Point Schedule Name = {}. " - "Humidification set point will be limited by Dehumidification set point during zone sizing and " - "simulation continues.", - maxHumidify, - state.dataIPShortCut->cAlphaArgs(14), - minDehumidify, - state.dataIPShortCut->cAlphaArgs(13))); + std::format("Maximum value ({}%) of Zone Humidistat Humidification Set Point Schedule Name = {} is " + "greater than minimum value ({}%) of Zone Humidistat Dehumidifcation Set Point Schedule Name = {}. " + "Humidification set point will be limited by Dehumidification set point during zone sizing and " + "simulation continues.", + maxHumidify, + state.dataIPShortCut->cAlphaArgs(14), + minDehumidify, + state.dataIPShortCut->cAlphaArgs(13))); } } zoneSizingIndex.heatCoilSizingMethod = static_cast( @@ -3313,7 +3305,7 @@ void GetZoneSizingInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}: Errors found in getting input. Program terminates.", cCurrentModuleObject)); + ShowFatalError(state, std::format("{}: Errors found in getting input. Program terminates.", cCurrentModuleObject)); } } @@ -3322,7 +3314,7 @@ void ReportTemperatureInputError( { if (state.dataIPShortCut->rNumericArgs(paramNum) < comparisonTemperature) { if (shouldFlagSevere) { // heating supply air temperature is lower than cooling supply air temperature--not allowed - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" has invalid data.", cObjectName, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\" has invalid data.", cObjectName, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}] is less than {}=[{:.2R}]", state.dataIPShortCut->cNumericFieldNames(paramNum), @@ -3332,7 +3324,7 @@ void ReportTemperatureInputError( ShowContinueError(state, "This is not allowed. Please check and revise your input."); ErrorsFound = true; } else { // then input is lower than comparison temperature--just produce a warning for user to check input - ShowWarningError(state, EnergyPlus::format("{}=\"{}\" has invalid data.", cObjectName, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}=\"{}\" has invalid data.", cObjectName, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}] is less than [{:.2R}]", state.dataIPShortCut->cNumericFieldNames(paramNum), @@ -3561,8 +3553,7 @@ void GetSystemSizingInput(EnergyPlusData &state) SysSizInput(SysSizIndex).DesOutAirVolFlow = AutoSize; } else if (state.dataIPShortCut->rNumericArgs(iDesignOAVolFlowNumericNum) < 0.0 && state.dataIPShortCut->rNumericArgs(iDesignOAVolFlowNumericNum) != AutoSize) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(iDesignOAVolFlowNumericNum), @@ -3585,9 +3576,9 @@ void GetSystemSizingInput(EnergyPlusData &state) SysSizInput(SysSizIndex).SysAirMinFlowRat = 0.0; } else if ((state.dataIPShortCut->rNumericArgs(iMinSysAirFlowRatioNumericNum) < 0.0) && (state.dataIPShortCut->rNumericArgs(iMinSysAirFlowRatioNumericNum) != DataSizing::AutoSize)) { - ShowSevereError(state, - EnergyPlus::format( - "{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iMinSysAirFlowRatioNumericNum))); + ShowSevereError( + state, + std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iMinSysAirFlowRatioNumericNum))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(iMinSysAirFlowRatioNumericNum), @@ -3632,8 +3623,7 @@ void GetSystemSizingInput(EnergyPlusData &state) if (state.dataIPShortCut->lNumericFieldBlanks(iMaxCoolAirVolFlowNumericNum)) { SysSizInput(SysSizIndex).DesCoolAirFlow = 0.0; } else if (state.dataIPShortCut->rNumericArgs(iMaxCoolAirVolFlowNumericNum) < 0.0) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(iMaxCoolAirVolFlowNumericNum), @@ -3660,8 +3650,7 @@ void GetSystemSizingInput(EnergyPlusData &state) if (state.dataIPShortCut->lNumericFieldBlanks(iMaxHeatAirVolFlowNumericNum)) { SysSizInput(SysSizIndex).DesHeatAirFlow = 0.0; } else if (state.dataIPShortCut->rNumericArgs(iMaxHeatAirVolFlowNumericNum) < 0.0) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(iMaxHeatAirVolFlowNumericNum), @@ -3682,8 +3671,7 @@ void GetSystemSizingInput(EnergyPlusData &state) if (state.dataIPShortCut->lNumericFieldBlanks(iZoneMaxOAFractionNumericNum)) { SysSizInput(SysSizIndex).MaxZoneOAFraction = 0.0; } else if (state.dataIPShortCut->rNumericArgs(iZoneMaxOAFractionNumericNum) < 0.0) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(iZoneMaxOAFractionNumericNum), @@ -3711,12 +3699,12 @@ void GetSystemSizingInput(EnergyPlusData &state) SysSizInput(SysSizIndex).ScaleCoolSAFMethod = FlowPerCoolingCapacity; SysSizInput(SysSizIndex).FlowPerCoolingCapacity = state.dataIPShortCut->rNumericArgs(iCoolFlowPerCoolCapNumericNum); } else { - ShowSevereError( - state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, + std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - EnergyPlus::format("... incorrect {}=\"{}\".", - state.dataIPShortCut->cAlphaFieldNames(iCoolSAFMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iCoolSAFMAlphaNum))); + std::format("... incorrect {}=\"{}\".", + state.dataIPShortCut->cAlphaFieldNames(iCoolSAFMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iCoolSAFMAlphaNum))); ShowContinueError(state, "... valid values are DesignDay, Flow/System, FlowPerFloorArea, FractionOfAutosizedCoolingAirflow, or " "FlowPerCoolingCapacity."); @@ -3746,12 +3734,12 @@ void GetSystemSizingInput(EnergyPlusData &state) SysSizInput(SysSizIndex).ScaleHeatSAFMethod = FlowPerHeatingCapacity; SysSizInput(SysSizIndex).FlowPerHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatFlowPerHeatCapNumericNum); } else { - ShowSevereError( - state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, + std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - EnergyPlus::format("... incorrect {}=\"{}\".", - state.dataIPShortCut->cAlphaFieldNames(iHeatSAFMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatSAFMAlphaNum))); + std::format("... incorrect {}=\"{}\".", + state.dataIPShortCut->cAlphaFieldNames(iHeatSAFMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatSAFMAlphaNum))); ShowContinueError(state, "... valid values are DesignDay, Flow/System, FlowPerFloorArea, FractionOfAutosizedHeatingAirflow, or " "FlowPerHeatingCapacity."); @@ -3766,36 +3754,35 @@ void GetSystemSizingInput(EnergyPlusData &state) SysSizInput(SysSizIndex).SystemOAMethod = SysOAMethod::VRP; if (SysSizInput(SysSizIndex).loadSizingType == DataSizing::LoadSizing::Ventilation) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", invalid combination of inputs.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + std::format("{}=\"{}\", invalid combination of inputs.", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - EnergyPlus::format("{} = {} and {} = {}.", - state.dataIPShortCut->cAlphaFieldNames(iLoadTypeSizeAlphaNum), - state.dataIPShortCut->cAlphaArgs(iLoadTypeSizeAlphaNum), - state.dataIPShortCut->cAlphaFieldNames(iSystemOASMethodAlphaNum), - state.dataIPShortCut->cAlphaArgs(iSystemOASMethodAlphaNum))); + std::format("{} = {} and {} = {}.", + state.dataIPShortCut->cAlphaFieldNames(iLoadTypeSizeAlphaNum), + state.dataIPShortCut->cAlphaArgs(iLoadTypeSizeAlphaNum), + state.dataIPShortCut->cAlphaFieldNames(iSystemOASMethodAlphaNum), + state.dataIPShortCut->cAlphaArgs(iSystemOASMethodAlphaNum))); ShowContinueError(state, "Resetting System Outdoor Air Method to ZoneSum."); SysSizInput(SysSizIndex).SystemOAMethod = SysOAMethod::ZoneSum; } else { if (SysSizInput(SysSizIndex).DesOutAirVolFlow > 0) { ShowSevereError( - state, - EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - EnergyPlus::format("SystemOAMethod is set to VRP and {} > 0, user entry will be ignored.", - state.dataIPShortCut->cNumericFieldNames(iDesignOAVolFlowNumericNum))); + std::format("SystemOAMethod is set to VRP and {} > 0, user entry will be ignored.", + state.dataIPShortCut->cNumericFieldNames(iDesignOAVolFlowNumericNum))); } } } else if (systemOAMethod == "STANDARD62.1SIMPLIFIEDPROCEDURE") { SysSizInput(SysSizIndex).SystemOAMethod = SysOAMethod::SP; } else { - ShowSevereError( - state, EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, + std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - EnergyPlus::format("... incorrect {}=\"{}\".", - state.dataIPShortCut->cAlphaFieldNames(iSystemOASMethodAlphaNum), - state.dataIPShortCut->cAlphaArgs(iSystemOASMethodAlphaNum))); + std::format("... incorrect {}=\"{}\".", + state.dataIPShortCut->cAlphaFieldNames(iSystemOASMethodAlphaNum), + state.dataIPShortCut->cAlphaArgs(iSystemOASMethodAlphaNum))); ShowContinueError(state, "... valid values are ZoneSum or Standard62.1VentilationRateProcedure."); ErrorsFound = true; } @@ -3807,11 +3794,11 @@ void GetSystemSizingInput(EnergyPlusData &state) // SysSizInput( SysSizIndex ).ScaledCoolingCapacity = AutoSize can be set to autosize cooling capacity SysSizInput(SysSizIndex).ScaledCoolingCapacity = state.dataIPShortCut->rNumericArgs(iCoolDesignCapacityNumericNum); if (SysSizInput(SysSizIndex).ScaledCoolingCapacity < 0.0 && SysSizInput(SysSizIndex).ScaledCoolingCapacity != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iCoolDesignCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iCoolDesignCapacityNumericNum))); + std::format("Illegal {} = {:.7f}", + state.dataIPShortCut->cNumericFieldNames(iCoolDesignCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iCoolDesignCapacityNumericNum))); ErrorsFound = true; } } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum), "CAPACITYPERFLOORAREA")) { @@ -3819,36 +3806,35 @@ void GetSystemSizingInput(EnergyPlusData &state) if (!state.dataIPShortCut->lNumericFieldBlanks(iCoolCapacityPerFloorAreaNumericNum)) { SysSizInput(SysSizIndex).ScaledCoolingCapacity = state.dataIPShortCut->rNumericArgs(iCoolCapacityPerFloorAreaNumericNum); if (SysSizInput(SysSizIndex).ScaledCoolingCapacity <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - EnergyPlus::format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); + std::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iCoolCapacityPerFloorAreaNumericNum), - state.dataIPShortCut->rNumericArgs(iCoolCapacityPerFloorAreaNumericNum))); + std::format("Illegal {} = {:.7f}", + state.dataIPShortCut->cNumericFieldNames(iCoolCapacityPerFloorAreaNumericNum), + state.dataIPShortCut->rNumericArgs(iCoolCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } else if (SysSizInput(SysSizIndex).ScaledCoolingCapacity == AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - EnergyPlus::format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); + std::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); ShowContinueError( - state, - EnergyPlus::format("Illegal {} = Autosize", state.dataIPShortCut->cNumericFieldNames(iCoolCapacityPerFloorAreaNumericNum))); + state, std::format("Illegal {} = Autosize", state.dataIPShortCut->cNumericFieldNames(iCoolCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - EnergyPlus::format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); - ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", - state.dataIPShortCut->cNumericFieldNames(iCoolCapacityPerFloorAreaNumericNum))); + std::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); + ShowContinueError( + state, + std::format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iCoolCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum), "FRACTIONOFAUTOSIZEDCOOLINGCAPACITY")) { @@ -3856,34 +3842,33 @@ void GetSystemSizingInput(EnergyPlusData &state) if (!state.dataIPShortCut->lNumericFieldBlanks(iCoolFracOfAutosizedCapacityNumericNum)) { SysSizInput(SysSizIndex).ScaledCoolingCapacity = state.dataIPShortCut->rNumericArgs(iCoolFracOfAutosizedCapacityNumericNum); if (SysSizInput(SysSizIndex).ScaledCoolingCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iCoolFracOfAutosizedCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iCoolFracOfAutosizedCapacityNumericNum))); + std::format("Illegal {} = {:.7f}", + state.dataIPShortCut->cNumericFieldNames(iCoolFracOfAutosizedCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iCoolFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - EnergyPlus::format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); - ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", - state.dataIPShortCut->cNumericFieldNames(iCoolFracOfAutosizedCapacityNumericNum))); + std::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); + ShowContinueError( + state, + std::format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iCoolFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum), "NONE")) { SysSizInput(SysSizIndex).CoolingCapMethod = None; SysSizInput(SysSizIndex).ScaledCoolingCapacity = 0.0; } else { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - EnergyPlus::format("... incorrect {}=\"{}\".", - state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); + std::format("... incorrect {}=\"{}\".", + state.dataIPShortCut->cAlphaFieldNames(iCoolCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iCoolCAPMAlphaNum))); ShowContinueError(state, "... valid values are CoolingDesignCapacity, CapacityPerFloorArea, FractionOfAutosizedCoolingCapacity, or None."); ErrorsFound = true; @@ -3895,11 +3880,11 @@ void GetSystemSizingInput(EnergyPlusData &state) // SysSizInput( SysSizIndex ).ScaledHeatingCapacity = AutoSize can be set to autosize heating capacity SysSizInput(SysSizIndex).ScaledHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum); if (SysSizInput(SysSizIndex).ScaledHeatingCapacity < 0.0 && SysSizInput(SysSizIndex).ScaledHeatingCapacity != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum))); + std::format("Illegal {} = {:.7f}", + state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum), "CAPACITYPERFLOORAREA")) { @@ -3907,36 +3892,35 @@ void GetSystemSizingInput(EnergyPlusData &state) if (!state.dataIPShortCut->lNumericFieldBlanks(iHeatCapacityPerFloorAreaNumericNum)) { SysSizInput(SysSizIndex).ScaledHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum); if (SysSizInput(SysSizIndex).ScaledHeatingCapacity <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - EnergyPlus::format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + std::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); + std::format("Illegal {} = {:.7f}", + state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } else if (SysSizInput(SysSizIndex).ScaledHeatingCapacity == AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - EnergyPlus::format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + std::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError( - state, - EnergyPlus::format("Illegal {} = Autosize", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); + state, std::format("Illegal {} = Autosize", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - EnergyPlus::format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", - state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); + std::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowContinueError( + state, + std::format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum), "FRACTIONOFAUTOSIZEDHEATINGCAPACITY")) { @@ -3944,34 +3928,33 @@ void GetSystemSizingInput(EnergyPlusData &state) if (!state.dataIPShortCut->lNumericFieldBlanks(iHeatFracOfAutosizedCapacityNumericNum)) { SysSizInput(SysSizIndex).ScaledHeatingCapacity = state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum); if (SysSizInput(SysSizIndex).ScaledHeatingCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); + std::format("Illegal {} = {:.7f}", + state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, SysSizInput(SysSizIndex).AirPriLoopName)); ShowContinueError(state, - EnergyPlus::format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); - ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", - state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); + std::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowContinueError( + state, + std::format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum), "NONE")) { SysSizInput(SysSizIndex).HeatingCapMethod = None; SysSizInput(SysSizIndex).ScaledHeatingCapacity = 0.0; } else { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, - EnergyPlus::format("... incorrect {}=\"{}\".", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + std::format("... incorrect {}=\"{}\".", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, "... valid values are HeatingDesignCapacity, CapacityPerFloorArea, FractionOfAutosizedHeatingCapacity, or None."); ErrorsFound = true; @@ -3986,8 +3969,7 @@ void GetSystemSizingInput(EnergyPlusData &state) SysSizInput(SysSizIndex).OccupantDiversity = AutoSize; } else if (state.dataIPShortCut->rNumericArgs(iOccupantDiversity) <= 0.0 && state.dataIPShortCut->rNumericArgs(iOccupantDiversity) != AutoSize) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be negative.", state.dataIPShortCut->cNumericFieldNames(iOccupantDiversity), @@ -3995,8 +3977,7 @@ void GetSystemSizingInput(EnergyPlusData &state) ErrorsFound = true; } else if (state.dataIPShortCut->rNumericArgs(iOccupantDiversity) > 1.0 && state.dataIPShortCut->rNumericArgs(iOccupantDiversity) != AutoSize) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(iNameAlphaNum))); ShowContinueError(state, EnergyPlus::format("... incorrect {}=[{:.2R}], value should not be greater than 1.0.", state.dataIPShortCut->cNumericFieldNames(iOccupantDiversity), @@ -4012,7 +3993,7 @@ void GetSystemSizingInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}: Errors found in getting input. Program terminates.", cCurrentModuleObject)); + ShowFatalError(state, std::format("{}: Errors found in getting input. Program terminates.", cCurrentModuleObject)); } } @@ -4113,7 +4094,7 @@ void GetPlantSizingInput(EnergyPlusData &state) } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}: Errors found in getting input. Program terminates.", cCurrentModuleObject)); + ShowFatalError(state, std::format("{}: Errors found in getting input. Program terminates.", cCurrentModuleObject)); } } @@ -4660,17 +4641,16 @@ void GetZoneHVACSizing(EnergyPlusData &state) } if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow <= 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - cNumericFields(iMaxCoolAirVolFlowNumericNum), - Numbers(iMaxCoolAirVolFlowNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError( + state, + std::format("Illegal {} = {:.7f}", cNumericFields(iMaxCoolAirVolFlowNumericNum), Numbers(iMaxCoolAirVolFlowNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iMaxCoolAirVolFlowNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iMaxCoolAirVolFlowNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iCoolSAFMAlphaNum), "FlowPerFloorArea")) { @@ -4679,27 +4659,27 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow = Numbers(iCoolFlowPerFloorAreaNumericNum); if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow <= 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - cNumericFields(iCoolFlowPerFloorAreaNumericNum), - Numbers(iCoolFlowPerFloorAreaNumericNum))); + std::format("Illegal {} = {:.7f}", + cNumericFields(iCoolFlowPerFloorAreaNumericNum), + Numbers(iCoolFlowPerFloorAreaNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow == AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = Autosize", cNumericFields(iCoolFlowPerFloorAreaNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); + ShowContinueError(state, std::format("Illegal {} = Autosize", cNumericFields(iCoolFlowPerFloorAreaNumericNum))); ErrorsFound = true; } else { // user input cooling supply air flow per unit conditioned area is saved in ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iCoolFlowPerFloorAreaNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iCoolFlowPerFloorAreaNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iCoolSAFMAlphaNum), "FractionOfAutosizedCoolingAirflow")) { @@ -4708,27 +4688,27 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow = Numbers(iCoolFlowPerFracCoolNumericNum); if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow <= 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - cNumericFields(iCoolFlowPerFracCoolNumericNum), - Numbers(iCoolFlowPerFracCoolNumericNum))); + std::format("Illegal {} = {:.7f}", + cNumericFields(iCoolFlowPerFracCoolNumericNum), + Numbers(iCoolFlowPerFracCoolNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow == AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = Autosize", cNumericFields(iCoolFlowPerFracCoolNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); + ShowContinueError(state, std::format("Illegal {} = Autosize", cNumericFields(iCoolFlowPerFracCoolNumericNum))); ErrorsFound = true; } else { // user input fraction of cooling supply air flow rate is saved in ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iCoolFlowPerFracCoolNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iCoolFlowPerFracCoolNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iCoolSAFMAlphaNum), "FlowPerCoolingCapacity")) { @@ -4738,27 +4718,27 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow = Numbers(iCoolFlowPerCoolCapNumericNum); if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow <= 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - cNumericFields(iCoolFlowPerCoolCapNumericNum), - Numbers(iCoolFlowPerCoolCapNumericNum))); + std::format("Illegal {} = {:.7f}", + cNumericFields(iCoolFlowPerCoolCapNumericNum), + Numbers(iCoolFlowPerCoolCapNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow == AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = Autosize", cNumericFields(iCoolFlowPerCoolCapNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); + ShowContinueError(state, std::format("Illegal {} = Autosize", cNumericFields(iCoolFlowPerCoolCapNumericNum))); ErrorsFound = true; } else { // user input cooling supply air flow per unit cooling capacity is saved in ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iCoolFlowPerCoolCapNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iCoolFlowPerCoolCapNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iCoolSAFMAlphaNum), "None") || lAlphaBlanks(iCoolSAFMAlphaNum)) { @@ -4766,8 +4746,8 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).MaxCoolAirVolFlow = 0.0; // cooling supply air flow rate will not be sized, may be cooling coil does not exist } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(iCoolSAFMAlphaNum), Alphas(iCoolSAFMAlphaNum))); ErrorsFound = true; } // Determine supply air flow rate sizing method for heating mode @@ -4781,17 +4761,16 @@ void GetZoneHVACSizing(EnergyPlusData &state) if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow <= 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - cNumericFields(iMaxHeatAirVolFlowNumericNum), - Numbers(iMaxHeatAirVolFlowNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError( + state, + std::format("Illegal {} = {:.7f}", cNumericFields(iMaxHeatAirVolFlowNumericNum), Numbers(iMaxHeatAirVolFlowNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iMaxHeatAirVolFlowNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iMaxHeatAirVolFlowNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatSAFMAlphaNum), "FlowPerFloorArea")) { @@ -4800,27 +4779,27 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow = Numbers(iHeatFlowPerFloorAreaNumericNum); if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow <= 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - cNumericFields(iHeatFlowPerFloorAreaNumericNum), - Numbers(iHeatFlowPerFloorAreaNumericNum))); + std::format("Illegal {} = {:.7f}", + cNumericFields(iHeatFlowPerFloorAreaNumericNum), + Numbers(iHeatFlowPerFloorAreaNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow == AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = Autosize", cNumericFields(iHeatFlowPerFloorAreaNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); + ShowContinueError(state, std::format("Illegal {} = Autosize", cNumericFields(iHeatFlowPerFloorAreaNumericNum))); ErrorsFound = true; } else { // user input heating supply air flow per unit conditioned area is saved in ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iHeatFlowPerFloorAreaNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iHeatFlowPerFloorAreaNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatSAFMAlphaNum), "FractionOfAutosizedHeatingAirflow")) { @@ -4829,27 +4808,27 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow = Numbers(iHeatFlowPerFracCoolNumericNum); if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow <= 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - cNumericFields(iHeatFlowPerFracCoolNumericNum), - Numbers(iHeatFlowPerFracCoolNumericNum))); + std::format("Illegal {} = {:.7f}", + cNumericFields(iHeatFlowPerFracCoolNumericNum), + Numbers(iHeatFlowPerFracCoolNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow == AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = Autosize", cNumericFields(iHeatFlowPerFracCoolNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); + ShowContinueError(state, std::format("Illegal {} = Autosize", cNumericFields(iHeatFlowPerFracCoolNumericNum))); ErrorsFound = true; } else { // user input fraction of heating supply air flow rate is saved in ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iHeatFlowPerFracCoolNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iHeatFlowPerFracCoolNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatSAFMAlphaNum), "FlowPerHeatingCapacity")) { @@ -4858,35 +4837,35 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow = Numbers(iHeatFlowPerHeatCapNumericNum); if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow <= 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - cNumericFields(iHeatFlowPerHeatCapNumericNum), - Numbers(iHeatFlowPerHeatCapNumericNum))); + std::format("Illegal {} = {:.7f}", + cNumericFields(iHeatFlowPerHeatCapNumericNum), + Numbers(iHeatFlowPerHeatCapNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow == AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = Autosize", cNumericFields(iHeatFlowPerHeatCapNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); + ShowContinueError(state, std::format("Illegal {} = Autosize", cNumericFields(iHeatFlowPerHeatCapNumericNum))); ErrorsFound = true; } else { // user input heating supply air flow per unit heating capacity is saved in ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iHeatFlowPerHeatCapNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iHeatFlowPerHeatCapNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatSAFMAlphaNum), "None") || lAlphaBlanks(iHeatSAFMAlphaNum)) { state.dataSize->ZoneHVACSizing(zSIndex).HeatingSAFMethod = None; state.dataSize->ZoneHVACSizing(zSIndex).MaxHeatAirVolFlow = 0.0; } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(iHeatSAFMAlphaNum), Alphas(iHeatSAFMAlphaNum))); ErrorsFound = true; } @@ -4900,19 +4879,18 @@ void GetZoneHVACSizing(EnergyPlusData &state) } if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow < 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - cNumericFields(iMaxNoCoolHeatAirVolFlowNumericNum), - Numbers(iMaxNoCoolHeatAirVolFlowNumericNum))); + std::format("Illegal {} = {:.7f}", + cNumericFields(iMaxNoCoolHeatAirVolFlowNumericNum), + Numbers(iMaxNoCoolHeatAirVolFlowNumericNum))); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError( - state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iMaxNoCoolHeatAirVolFlowNumericNum))); + std::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iMaxNoCoolHeatAirVolFlowNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iNoCoolHeatSAFMAlphaNum), "FlowPerFloorArea")) { @@ -4921,20 +4899,20 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow = Numbers(iNoCoolHeatFlowPerFloorAreaNumericNum); if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow < 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError( - state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, + std::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum), - Numbers(iNoCoolHeatFlowPerFloorAreaNumericNum))); + std::format("Illegal {} = {:.7f}", + cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum), + Numbers(iNoCoolHeatFlowPerFloorAreaNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow == AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError( - state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = Autosize", cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, + std::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowContinueError(state, std::format("Illegal {} = Autosize", cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum))); ErrorsFound = true; } else { // user input supply air flow per unit floor area during no cooling or heating area is saved in @@ -4942,11 +4920,10 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError( - state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum))); + std::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iNoCoolHeatFlowPerFloorAreaNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iNoCoolHeatSAFMAlphaNum), "FractionOfAutosizedCoolingAirflow")) { @@ -4955,20 +4932,20 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow = Numbers(iNoCoolHeatFlowPerFracCoolNumericNum); if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow < 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError( - state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum), - Numbers(iNoCoolHeatFlowPerFracCoolNumericNum))); + std::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowContinueError(state, + std::format("Illegal {} = {:.7f}", + cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum), + Numbers(iNoCoolHeatFlowPerFracCoolNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow == AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError( - state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = Autosize", cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, + std::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowContinueError(state, std::format("Illegal {} = Autosize", cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum))); ErrorsFound = true; } else { // user input fraction of cooling supply air flow rate during no cooling or heating area is saved in @@ -4976,11 +4953,10 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError( - state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum))); + std::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iNoCoolHeatFlowPerFracCoolNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iNoCoolHeatSAFMAlphaNum), "FractionOfAutosizedHeatingAirflow")) { @@ -4989,20 +4965,20 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow = Numbers(iNoCoolHeatFlowPerFracHeatNumericNum); if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow < 0.0 && state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow != AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError( - state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, + std::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum), - Numbers(iNoCoolHeatFlowPerFracHeatNumericNum))); + std::format("Illegal {} = {:.7f}", + cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum), + Numbers(iNoCoolHeatFlowPerFracHeatNumericNum))); ErrorsFound = true; // Autosized input is not allowed } else if (state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow == AutoSize) { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError( - state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Illegal {} = Autosize", cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, + std::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowContinueError(state, std::format("Illegal {} = Autosize", cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum))); ErrorsFound = true; } else { // user input fraction of heating supply air flow rate during no cooling or heating area is saved in @@ -5010,20 +4986,18 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError( - state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum))); + std::format("Input for {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iNoCoolHeatFlowPerFracHeatNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iNoCoolHeatSAFMAlphaNum), "None") || lAlphaBlanks(iNoCoolHeatSAFMAlphaNum)) { state.dataSize->ZoneHVACSizing(zSIndex).NoCoolHeatSAFMethod = None; state.dataSize->ZoneHVACSizing(zSIndex).MaxNoCoolHeatAirVolFlow = 0.0; } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, - EnergyPlus::format("Illegal {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(iNoCoolHeatSAFMAlphaNum), Alphas(iNoCoolHeatSAFMAlphaNum))); ErrorsFound = true; } @@ -5036,9 +5010,9 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iCoolDesignCapacityNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iCoolDesignCapacityNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iCoolCAPMAlphaNum), "CapacityPerFloorArea")) { @@ -5046,10 +5020,9 @@ void GetZoneHVACSizing(EnergyPlusData &state) if (!lNumericBlanks(iCoolCapacityPerFloorAreaNumericNum)) { state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity = Numbers(iCoolCapacityPerFloorAreaNumericNum); } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); - ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iCoolCapacityPerFloorAreaNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iCoolCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iCoolCAPMAlphaNum), "FractionOfAutosizedCoolingCapacity")) { @@ -5057,17 +5030,16 @@ void GetZoneHVACSizing(EnergyPlusData &state) if (!lNumericBlanks(iCoolFracOfAutosizedCapacityNumericNum)) { state.dataSize->ZoneHVACSizing(zSIndex).ScaledCoolingCapacity = Numbers(iCoolFracOfAutosizedCapacityNumericNum); } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); - ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iCoolFracOfAutosizedCapacityNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iCoolFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iCoolCAPMAlphaNum), "None") || lAlphaBlanks(iCoolCAPMAlphaNum)) { state.dataSize->ZoneHVACSizing(zSIndex).CoolingCapMethod = None; } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(iCoolCAPMAlphaNum), Alphas(iCoolCAPMAlphaNum))); ErrorsFound = true; } @@ -5080,9 +5052,9 @@ void GetZoneHVACSizing(EnergyPlusData &state) state.dataSize->ZoneHVACSizing(zSIndex).RequestAutoSize = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); - ShowContinueError(state, EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iHeatDesignCapacityNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatCAPMAlphaNum), "CapacityPerFloorArea")) { @@ -5090,10 +5062,9 @@ void GetZoneHVACSizing(EnergyPlusData &state) if (!lNumericBlanks(iHeatCapacityPerFloorAreaNumericNum)) { state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity = Numbers(iHeatCapacityPerFloorAreaNumericNum); } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); - ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iHeatCapacityPerFloorAreaNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatCAPMAlphaNum), "FractionOfAutosizedHeatingCapacity")) { @@ -5101,17 +5072,16 @@ void GetZoneHVACSizing(EnergyPlusData &state) if (!lNumericBlanks(iHeatFracOfAutosizedCapacityNumericNum)) { state.dataSize->ZoneHVACSizing(zSIndex).ScaledHeatingCapacity = Numbers(iHeatFracOfAutosizedCapacityNumericNum); } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); - ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", cNumericFields(iHeatFracOfAutosizedCapacityNumericNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Input for {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); + ShowContinueError(state, std::format("Blank field not allowed for {}", cNumericFields(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else if (Util::SameString(Alphas(iHeatCAPMAlphaNum), "None") || lAlphaBlanks(iHeatCAPMAlphaNum)) { state.dataSize->ZoneHVACSizing(zSIndex).HeatingCapMethod = None; } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); - ShowContinueError(state, EnergyPlus::format("Illegal {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); + ShowSevereError(state, std::format("{} = {}", CurrentModuleObject, state.dataSize->ZoneHVACSizing(zSIndex).Name)); + ShowContinueError(state, std::format("Illegal {} = {}", cAlphaFields(iHeatCAPMAlphaNum), Alphas(iHeatCAPMAlphaNum))); ErrorsFound = true; } } @@ -5125,7 +5095,7 @@ void GetZoneHVACSizing(EnergyPlusData &state) lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } } diff --git a/src/EnergyPlus/SolarCollectors.cc b/src/EnergyPlus/SolarCollectors.cc index 611b0835172..c2da9d2f6ba 100644 --- a/src/EnergyPlus/SolarCollectors.cc +++ b/src/EnergyPlus/SolarCollectors.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -606,21 +607,20 @@ namespace SolarCollectors { } if (!state.dataSurface->Surface(SurfNum).ExtSolar) { ShowWarningError(state, - EnergyPlus::format("{} = {}: Surface {} is not exposed to exterior radiation.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + std::format("{} = {}: Surface {} is not exposed to exterior radiation.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(3))); } // check surface orientation, warn if upside down if ((state.dataSurface->Surface(SurfNum).Tilt < -95.0) || (state.dataSurface->Surface(SurfNum).Tilt > 95.0)) { ShowWarningError(state, - EnergyPlus::format("Suspected input problem with {} = {}", - state.dataIPShortCut->cAlphaFieldNames(3), - state.dataIPShortCut->cAlphaArgs(3))); + std::format("Suspected input problem with {} = {}", + state.dataIPShortCut->cAlphaFieldNames(3), + state.dataIPShortCut->cAlphaArgs(3))); ShowContinueError( - state, - EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Surface used for solar collector faces down"); ShowContinueError(state, EnergyPlus::format("Surface tilt angle (degrees from ground outward normal) = {:.2R}", @@ -632,11 +632,11 @@ namespace SolarCollectors { for (int CollectorNum2 = 1; CollectorNum2 <= state.dataSolarCollectors->NumOfCollectors; ++CollectorNum2) { if (state.dataSolarCollectors->Collector(CollectorNum2).Surface == SurfNum) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Surface {} is referenced by more than one {}", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3), - CurrentModuleObject)); + std::format("{} = {}: Surface {} is referenced by more than one {}", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(3), + CurrentModuleObject)); ErrorsFound = true; break; } @@ -650,7 +650,7 @@ namespace SolarCollectors { state.dataSurface->Surface(SurfNum).Area > 0.01) { - ShowWarningError(state, EnergyPlus::format("{} = {}: ", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowWarningError(state, std::format("{} = {}: ", CurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Gross area of solar collector parameters and surface object differ by more than 1%."); ShowContinueError(state, "Gross collector area is always used in the calculation. Modify the surface "); ShowContinueError(state, "coordinates to match its area with collector gross area. Otherwise, the underlying "); @@ -666,20 +666,20 @@ namespace SolarCollectors { int Found = Util::FindItemInList(state.dataSolarCollectors->Collector(CollectorNum).OSCMName, state.dataSurface->OSCM); if (Found == 0) { ShowSevereError(state, - EnergyPlus::format("{} not found={} in {} ={}", - state.dataIPShortCut->cAlphaFieldNames(5), - state.dataSolarCollectors->Collector(CollectorNum).OSCMName, - CurrentModuleObject, - state.dataSolarCollectors->Collector(CollectorNum).Name)); + std::format("{} not found={} in {} ={}", + state.dataIPShortCut->cAlphaFieldNames(5), + state.dataSolarCollectors->Collector(CollectorNum).OSCMName, + CurrentModuleObject, + state.dataSolarCollectors->Collector(CollectorNum).Name)); ErrorsFound = true; } } else { ShowSevereError(state, - EnergyPlus::format("{} not found={} in {} ={}", - state.dataIPShortCut->cAlphaFieldNames(5), - state.dataSolarCollectors->Collector(CollectorNum).BCType, - CurrentModuleObject, - state.dataSolarCollectors->Collector(CollectorNum).Name)); + std::format("{} not found={} in {} ={}", + state.dataIPShortCut->cAlphaFieldNames(5), + state.dataSolarCollectors->Collector(CollectorNum).BCType, + CurrentModuleObject, + state.dataSolarCollectors->Collector(CollectorNum).Name)); ErrorsFound = true; } @@ -731,7 +731,7 @@ namespace SolarCollectors { } // ICSNum if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("Errors in {} input.", CurrentModuleObject)); + ShowFatalError(state, std::format("Errors in {} input.", CurrentModuleObject)); } } } @@ -1248,17 +1248,17 @@ namespace SolarCollectors { if (qEquation < 0.0) { if (this->ErrIndex == 0) { ShowSevereMessage(state, - EnergyPlus::format("CalcSolarCollector: {}=\"{}\", possible bad input coefficients.", - DataPlant::PlantEquipTypeNames[static_cast(this->Type)], - this->Name)); + std::format("CalcSolarCollector: {}=\"{}\", possible bad input coefficients.", + DataPlant::PlantEquipTypeNames[static_cast(this->Type)], + this->Name)); ShowContinueError(state, "...coefficients cause negative quadratic equation part in calculating temperature of stagnant fluid."); ShowContinueError(state, "...examine input coefficients for accuracy. Calculation will be treated as linear."); } ShowRecurringSevereErrorAtEnd(state, - EnergyPlus::format("CalcSolarCollector: {}=\"{}\", coefficient error continues.", - DataPlant::PlantEquipTypeNames[static_cast(this->Type)], - this->Name), + std::format("CalcSolarCollector: {}=\"{}\", coefficient error continues.", + DataPlant::PlantEquipTypeNames[static_cast(this->Type)], + this->Name), this->ErrIndex, qEquation, qEquation); @@ -1278,14 +1278,14 @@ namespace SolarCollectors { if (Iteration > 100) { if (this->IterErrIndex == 0) { ShowWarningMessage(state, - EnergyPlus::format("CalcSolarCollector: {}=\"{}\": Solution did not converge.", - DataPlant::PlantEquipTypeNames[static_cast(this->Type)], - this->Name)); + std::format("CalcSolarCollector: {}=\"{}\": Solution did not converge.", + DataPlant::PlantEquipTypeNames[static_cast(this->Type)], + this->Name)); } ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("CalcSolarCollector: {}=\"{}\", solution not converge error continues.", - DataPlant::PlantEquipTypeNames[static_cast(this->Type)], - this->Name), + std::format("CalcSolarCollector: {}=\"{}\", solution not converge error continues.", + DataPlant::PlantEquipTypeNames[static_cast(this->Type)], + this->Name), this->IterErrIndex); break; } @@ -1341,12 +1341,12 @@ namespace SolarCollectors { if (IAM > 10.0) { // Greater than 10 is probably not a possibility ShowSevereError( state, - EnergyPlus::format( + std::format( "IAM Function: SolarCollectorPerformance:FlatPlate = {}: Incident Angle Modifier is out of bounds due to bad coefficients.", this->Name)); - ShowContinueError(state, EnergyPlus::format("Coefficient 2 of Incident Angle Modifier = {}", this->iam1)); - ShowContinueError(state, EnergyPlus::format("Coefficient 3 of Incident Angle Modifier = {}", this->iam2)); - ShowContinueError(state, EnergyPlus::format("Calculated Incident Angle Modifier = {}", IAM)); + ShowContinueError(state, std::format("Coefficient 2 of Incident Angle Modifier = {}", this->iam1)); + ShowContinueError(state, std::format("Coefficient 3 of Incident Angle Modifier = {}", this->iam2)); + ShowContinueError(state, std::format("Calculated Incident Angle Modifier = {}", IAM)); ShowContinueError(state, "Expected Incident Angle Modifier should be approximately 1.5 or less."); ShowFatalError(state, "Errors in SolarCollectorPerformance:FlatPlate input."); } @@ -2173,10 +2173,9 @@ namespace SolarCollectors { } if (!Found) { - ShowFatalError( - state, - EnergyPlus::format("Did not find surface in Exterior Vented Cavity description in GetExtVentedCavityIndex, Surface name = {}", - state.dataSurface->Surface(SurfacePtr).Name)); + ShowFatalError(state, + std::format("Did not find surface in Exterior Vented Cavity description in GetExtVentedCavityIndex, Surface name = {}", + state.dataSurface->Surface(SurfacePtr).Name)); } else { VentCavIndex = CavNum; diff --git a/src/EnergyPlus/SolarShading.cc b/src/EnergyPlus/SolarShading.cc index e4cecce67d8..e8a0bd0464f 100644 --- a/src/EnergyPlus/SolarShading.cc +++ b/src/EnergyPlus/SolarShading.cc @@ -49,6 +49,7 @@ #include #include #include +#include #include // ObjexxFCL Headers @@ -56,6 +57,9 @@ #include #include +// Third Party Headers +#include + // EnergyPlus Headers #include #include @@ -95,7 +99,6 @@ #include #include #include -#include namespace EnergyPlus::SolarShading { @@ -188,7 +191,7 @@ void InitSolarCalculations(EnergyPlusData &state) if (!static_cast(state.dataSolarShading->shd_stream.get())->is_open()) { ShowFatalError(state, EnergyPlus::format("InitSolarCalculations: Could not open file \"{}\" for output (write).", - state.dataStrGlobals->outputShdFilePath)); + state.dataStrGlobals->outputShdFilePath.string())); } } else { state.dataSolarShading->shd_stream = std::make_unique(nullptr); @@ -632,9 +635,8 @@ void GetShadowingInput(EnergyPlusData &state) state.dataSysVars->ReportExtShadingSunlitFrac = false; state.dataIPShortCut->cAlphaArgs(aNum) = "No"; } else { - ShowWarningError(state, EnergyPlus::format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); - ShowContinueError(state, - EnergyPlus::format("Value entered=\"{}\", InternalCalculation will be used.", state.dataIPShortCut->cAlphaArgs(aNum))); + ShowWarningError(state, std::format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); + ShowContinueError(state, std::format("Value entered=\"{}\", InternalCalculation will be used.", state.dataIPShortCut->cAlphaArgs(aNum))); } } else { state.dataIPShortCut->cAlphaArgs(aNum) = "No"; @@ -649,9 +651,9 @@ void GetShadowingInput(EnergyPlusData &state) } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(aNum), "No")) { state.dataIPShortCut->cAlphaArgs(aNum) = "No"; } else { - ShowWarningError(state, EnergyPlus::format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); - ShowContinueError( - state, EnergyPlus::format("Value entered=\"{}\", all shading effects would be considered.", state.dataIPShortCut->cAlphaArgs(aNum))); + ShowWarningError(state, std::format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); + ShowContinueError(state, + std::format("Value entered=\"{}\", all shading effects would be considered.", state.dataIPShortCut->cAlphaArgs(aNum))); } } else { state.dataIPShortCut->cAlphaArgs(aNum) = "No"; @@ -665,9 +667,9 @@ void GetShadowingInput(EnergyPlusData &state) } else if (Util::SameString(state.dataIPShortCut->cAlphaArgs(aNum), "No")) { state.dataIPShortCut->cAlphaArgs(aNum) = "No"; } else { - ShowWarningError(state, EnergyPlus::format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); - ShowContinueError( - state, EnergyPlus::format("Value entered=\"{}\", all shading effects would be considered.", state.dataIPShortCut->cAlphaArgs(aNum))); + ShowWarningError(state, std::format("{}: invalid {}", cCurrentModuleObject, state.dataIPShortCut->cAlphaFieldNames(aNum))); + ShowContinueError(state, + std::format("Value entered=\"{}\", all shading effects would be considered.", state.dataIPShortCut->cAlphaArgs(aNum))); } } else { state.dataIPShortCut->cAlphaArgs(aNum) = "No"; @@ -692,23 +694,22 @@ void GetShadowingInput(EnergyPlusData &state) ShowWarningError(state, "GetShadowingInput: The shading transmittance for shading devices may change throughout the year."); ShowContinueError( state, - EnergyPlus::format("Choose Shading Calculation Update Frequency Method = Timestep in the {} object to capture all shading impacts.", - cCurrentModuleObject)); + std::format("Choose Shading Calculation Update Frequency Method = Timestep in the {} object to capture all shading impacts.", + cCurrentModuleObject)); } if (!state.dataSysVars->DetailedSkyDiffuseAlgorithm && s_surf->ShadingTransmittanceVaries && state.dataHeatBal->SolarDistribution != DataHeatBalance::Shadowing::Minimal) { ShowWarningError(state, "GetShadowingInput: The shading transmittance for shading devices may change throughout the year."); ShowContinueError(state, "Simulation has been reset to use DetailedSkyDiffuseModeling. Simulation continues."); - ShowContinueError(state, - EnergyPlus::format("Choose DetailedSkyDiffuseModeling in the {} object to remove this warning.", cCurrentModuleObject)); + ShowContinueError(state, std::format("Choose DetailedSkyDiffuseModeling in the {} object to remove this warning.", cCurrentModuleObject)); state.dataSysVars->DetailedSkyDiffuseAlgorithm = true; state.dataIPShortCut->cAlphaArgs(2) = "DetailedSkyDiffuseModeling"; if (!state.dataSysVars->DetailedSolarTimestepIntegration && state.dataSolarShading->ShadowingCalcFrequency > 1) { ShowContinueError(state, - EnergyPlus::format("Better accuracy may be gained by setting the {} to 1 in the {} object.", - state.dataIPShortCut->cNumericFieldNames(1), - cCurrentModuleObject)); + std::format("Better accuracy may be gained by setting the {} to 1 in the {} object.", + state.dataIPShortCut->cNumericFieldNames(1), + cCurrentModuleObject)); } } else if (state.dataSysVars->DetailedSkyDiffuseAlgorithm) { if (!s_surf->ShadingTransmittanceVaries || state.dataHeatBal->SolarDistribution == DataHeatBalance::Shadowing::Minimal) { @@ -717,8 +718,8 @@ void GetShadowingInput(EnergyPlusData &state) "shading devices does not change throughout the year"); ShowContinueError(state, " or MinimalShadowing has been chosen."); ShowContinueError(state, "Simulation should be set to use SimpleSkyDiffuseModeling, but is left at Detailed for simulation."); - ShowContinueError( - state, EnergyPlus::format("Choose SimpleSkyDiffuseModeling in the {} object to reduce computation time.", cCurrentModuleObject)); + ShowContinueError(state, + std::format("Choose SimpleSkyDiffuseModeling in the {} object to reduce computation time.", cCurrentModuleObject)); } } @@ -846,7 +847,7 @@ void checkSurfaceExternalShadingSchedules(EnergyPlusData &state) if (state.dataSysVars->shadingMethod == DataSystemVariables::ShadingMethod::Scheduled) { ShowWarningError( state, - EnergyPlus::format( + std::format( "ShadowCalculation specified \"Scheduled\" for the Shading Calculation Method but no schedule provided for {}.", thisSurf.Name)); ShowContinueError(state, @@ -858,7 +859,7 @@ void checkSurfaceExternalShadingSchedules(EnergyPlusData &state) } else if (state.dataSysVars->shadingMethod == DataSystemVariables::ShadingMethod::Imported) { ShowWarningError( state, - EnergyPlus::format( + std::format( "ShadowCalculation specified \"Imported\" for the Shading Calculation Method but no schedule provided for {}.", thisSurf.Name)); ShowContinueError( @@ -870,9 +871,8 @@ void checkSurfaceExternalShadingSchedules(EnergyPlusData &state) } ShowContinueError(state, "for sunlit fraction if this was not desired. Otherwise, this surface will not be shaded at all."); } else if (numNotDef <= maxErrMessages) { - ShowWarningError( - state, - EnergyPlus::format("No schedule was provided for {} either. See above error message for more details.", thisSurf.Name)); + ShowWarningError(state, + std::format("No schedule was provided for {} either. See above error message for more details.", thisSurf.Name)); } } } else { @@ -880,18 +880,18 @@ void checkSurfaceExternalShadingSchedules(EnergyPlusData &state) numNotDef += 1; if (numNotDef == 1) { ShowWarningError(state, - EnergyPlus::format("ShadowCalculation did not specify \"Scheduled\" or \"Imported\" for the Shading Calculation " - "Method but schedule provided for {}.", - thisSurf.Name)); + std::format("ShadowCalculation did not specify \"Scheduled\" or \"Imported\" for the Shading Calculation " + "Method but schedule provided for {}.", + thisSurf.Name)); } else if (numNotDef <= maxErrMessages) { - ShowWarningError( - state, EnergyPlus::format("Schedule was also provided for {}. See above error message for more details.", thisSurf.Name)); + ShowWarningError(state, + std::format("Schedule was also provided for {}. See above error message for more details.", thisSurf.Name)); } } } } if (numNotDef > maxErrMessages) { - ShowContinueError(state, EnergyPlus::format("This message is only shown for the first {} occurrences of this issue.", maxErrMessages)); + ShowContinueError(state, std::format("This message is only shown for the first {} occurrences of this issue.", maxErrMessages)); } } @@ -1454,7 +1454,7 @@ void AllocateModuleArrays(EnergyPlusData &state) for (I = 1; I <= NumOfLayers; ++I) { if (state.dataConstruction->Construct(surf.Construction).WindowTypeBSDF) { SetupOutputVariable(state, - EnergyPlus::format("Surface Window Total Absorbed Shortwave Radiation Rate Layer {}", I), + std::format("Surface Window Total Absorbed Shortwave Radiation Rate Layer {}", I), Constant::Units::W, state.dataHeatBal->SurfWinQRadSWwinAbsLayer(SurfLoop, I), OutputProcessor::TimeStepType::Zone, @@ -1463,7 +1463,7 @@ void AllocateModuleArrays(EnergyPlusData &state) } if (state.dataConstruction->Construct(surf.Construction).WindowTypeBSDF || (I == 1)) { SetupOutputVariable(state, - EnergyPlus::format("Surface Window Front Face Temperature Layer {}", I), + std::format("Surface Window Front Face Temperature Layer {}", I), Constant::Units::C, state.dataHeatBal->SurfWinFenLaySurfTempFront(SurfLoop, I), OutputProcessor::TimeStepType::Zone, @@ -1472,7 +1472,7 @@ void AllocateModuleArrays(EnergyPlusData &state) } if (state.dataConstruction->Construct(surf.Construction).WindowTypeBSDF || (I == NumOfLayers)) { SetupOutputVariable(state, - EnergyPlus::format("Surface Window Back Face Temperature Layer {}", I), + std::format("Surface Window Back Face Temperature Layer {}", I), Constant::Units::C, state.dataHeatBal->SurfWinFenLaySurfTempBack(SurfLoop, I), OutputProcessor::TimeStepType::Zone, @@ -2752,8 +2752,8 @@ void AnisoSkyViewFactors(EnergyPlusData &state) if (CosIncAngBeamOnSurface > (1.0 + cosine_tolerance)) { ShowSevereError(state, "Cosine of incident angle of beam solar on surface out of range...too high"); ShowContinueError(state, "This is a diagnostic error that should not be encountered under normal circumstances"); - ShowContinueError(state, EnergyPlus::format("Occurs on surface: {}", s_surf->Surface(SurfNum).Name)); - ShowContinueError(state, EnergyPlus::format("Current value = {} ... should be within [-1, +1]", CosIncAngBeamOnSurface)); + ShowContinueError(state, std::format("Occurs on surface: {}", s_surf->Surface(SurfNum).Name)); + ShowContinueError(state, std::format("Current value = {} ... should be within [-1, +1]", CosIncAngBeamOnSurface)); ShowFatalError(state, "Anisotropic solar calculation causes fatal error"); } CosIncAngBeamOnSurface = 1.0; @@ -2761,8 +2761,8 @@ void AnisoSkyViewFactors(EnergyPlusData &state) if (CosIncAngBeamOnSurface < (-1.0 - cosine_tolerance)) { ShowSevereError(state, "Cosine of incident angle of beam solar on surface out of range...too low"); ShowContinueError(state, "This is a diagnostic error that should not be encountered under normal circumstances"); - ShowContinueError(state, EnergyPlus::format("Occurs on surface: {}", s_surf->Surface(SurfNum).Name)); - ShowContinueError(state, EnergyPlus::format("Current value = {} ... should be within [-1, +1]", CosIncAngBeamOnSurface)); + ShowContinueError(state, std::format("Occurs on surface: {}", s_surf->Surface(SurfNum).Name)); + ShowContinueError(state, std::format("Current value = {} ... should be within [-1, +1]", CosIncAngBeamOnSurface)); ShowFatalError(state, "Anisotropic solar calculation causes fatal error"); } CosIncAngBeamOnSurface = -1.0; @@ -2860,15 +2860,15 @@ void CHKBKS(EnergyPlusData &state, DOTP = dot(CVec, DVec); if (DOTP > 0.0009) { ShowSevereError(state, "Problem in interior solar distribution calculation (CHKBKS)"); - ShowContinueError( - state, EnergyPlus::format(" Solar Distribution = FullInteriorExterior will not work in Zone={}", s_surf->Surface(NRS).ZoneName)); + ShowContinueError(state, + std::format(" Solar Distribution = FullInteriorExterior will not work in Zone={}", s_surf->Surface(NRS).ZoneName)); ShowContinueError( state, - EnergyPlus::format(" because one or more of vertices, such as Vertex {} of back surface={}, is in front of receiving surface={}", - N, - s_surf->Surface(NBS).Name, - s_surf->Surface(NRS).Name)); - ShowContinueError(state, EnergyPlus::format(" (Dot Product indicator={:20.4F})", DOTP)); + std::format(" because one or more of vertices, such as Vertex {} of back surface={}, is in front of receiving surface={}", + N, + s_surf->Surface(NBS).Name, + s_surf->Surface(NRS).Name)); + ShowContinueError(state, std::format(" (Dot Product indicator={:20.4F})", DOTP)); ShowContinueError(state, " Check surface geometry; if OK, use Solar Distribution = FullExterior instead. Use Output:Diagnostics, " "DisplayExtraWarnings; for more details."); @@ -3365,8 +3365,7 @@ void ComputeIntSolarAbsorpFactors(EnergyPlusData &state) // fill floor area even though surfs not called "Floor", they are roughly horizontal and face upwards. thisEnclosure.FloorArea = HorizAreaSum; ShowWarningError(state, "ComputeIntSolarAbsorpFactors: Solar distribution model is set to place solar gains on the zone floor,"); - ShowContinueError(state, - EnergyPlus::format("...Enclosure=\"{}\" has no floor, but has approximate horizontal surfaces.", thisEnclosure.Name)); + ShowContinueError(state, std::format("...Enclosure=\"{}\" has no floor, but has approximate horizontal surfaces.", thisEnclosure.Name)); ShowContinueError(state, EnergyPlus::format("...these Tilt > 120 degrees, (area=[{:.2R}] m2) will be used.", HorizAreaSum)); } @@ -3411,13 +3410,12 @@ void ComputeIntSolarAbsorpFactors(EnergyPlusData &state) if (thisEnclosure.ExtWindowArea > 0.0) { // we have a problem, the sun has no floor to go to if (thisEnclosure.FloorArea <= 0.0) { ShowSevereError(state, "ComputeIntSolarAbsorpFactors: Solar distribution model is set to place solar gains on the zone floor,"); - ShowContinueError( - state, EnergyPlus::format("but Zone or Enclosure =\"{}\" does not appear to have any floor surfaces.", thisEnclosure.Name)); + ShowContinueError(state, + std::format("but Zone or Enclosure =\"{}\" does not appear to have any floor surfaces.", thisEnclosure.Name)); ShowContinueError(state, "Solar gains will be spread evenly on all surfaces in the zone, and the simulation continues..."); } else { // Floor Area > 0 but still can't absorb ShowSevereError(state, "ComputeIntSolarAbsorpFactors: Solar distribution model is set to place solar gains on the zone floor,"); - ShowContinueError(state, - EnergyPlus::format("but Zone or Enclosure =\"{}\" floor cannot absorb any solar gains. ", thisEnclosure.Name)); + ShowContinueError(state, std::format("but Zone or Enclosure =\"{}\" floor cannot absorb any solar gains. ", thisEnclosure.Name)); ShowContinueError(state, "Check the solar absorptance of the inside layer of the floor surface construction/material."); ShowContinueError(state, "Solar gains will be spread evenly on all surfaces in the zone, and the simulation continues..."); } @@ -3674,7 +3672,7 @@ void HTRANS(EnergyPlusData &state, // 1 - Compute H.C. of vertices & sides if (NS > 2 * state.dataSolarShading->MaxHCS) { - ShowFatalError(state, EnergyPlus::format("Solar Shading: HTrans: Too many Figures (>{})", state.dataSolarShading->MaxHCS)); + ShowFatalError(state, std::format("Solar Shading: HTrans: Too many Figures (>{})", state.dataSolarShading->MaxHCS)); } state.dataSolarShading->HCNV(NS) = NumVertices; @@ -3737,7 +3735,7 @@ void HTRANS0(EnergyPlusData &state, // Locals if (NS > 2 * state.dataSolarShading->MaxHCS) { - ShowFatalError(state, EnergyPlus::format("Solar Shading: HTrans0: Too many Figures (>{})", state.dataSolarShading->MaxHCS)); + ShowFatalError(state, std::format("Solar Shading: HTrans0: Too many Figures (>{})", state.dataSolarShading->MaxHCS)); } state.dataSolarShading->HCNV(NS) = NumVertices; @@ -3781,7 +3779,7 @@ void HTRANS1(EnergyPlusData &state, // Using/Aliasing if (NS > 2 * state.dataSolarShading->MaxHCS) { - ShowFatalError(state, EnergyPlus::format("Solar Shading: HTrans1: Too many Figures (>{})", state.dataSolarShading->MaxHCS)); + ShowFatalError(state, std::format("Solar Shading: HTrans1: Too many Figures (>{})", state.dataSolarShading->MaxHCS)); } state.dataSolarShading->HCNV(NS) = NumVertices; @@ -4802,9 +4800,9 @@ void DeterminePolygonOverlap(EnergyPlusData &state, if (!state.dataSolarShading->TooManyFiguresMessage && !state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - EnergyPlus::format("DeterminePolygonOverlap: Too many figures [>{}] detected in an overlap calculation. Use " - "Output:Diagnostics,DisplayExtraWarnings; for more details.", - state.dataSolarShading->MaxHCS)); + std::format("DeterminePolygonOverlap: Too many figures [>{}] detected in an overlap calculation. Use " + "Output:Diagnostics,DisplayExtraWarnings; for more details.", + state.dataSolarShading->MaxHCS)); state.dataSolarShading->TooManyFiguresMessage = true; } @@ -4898,9 +4896,9 @@ void DeterminePolygonOverlap(EnergyPlusData &state, if (!state.dataSolarShading->TooManyVerticesMessage && !state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - EnergyPlus::format("DeterminePolygonOverlap: Too many vertices [>{}] detected in an overlap calculation. Use " - "Output:Diagnostics,DisplayExtraWarnings; for more details.", - state.dataSolarShading->MaxHCV)); + std::format("DeterminePolygonOverlap: Too many vertices [>{}] detected in an overlap calculation. Use " + "Output:Diagnostics,DisplayExtraWarnings; for more details.", + state.dataSolarShading->MaxHCV)); state.dataSolarShading->TooManyVerticesMessage = true; } @@ -5414,7 +5412,7 @@ void DetermineShadowingCombinations(EnergyPlusData &state) rPoly.push_back(vPrev.y); rPoly.push_back(vPrev.z); - Penumbra::Surface rSurf(rPoly, fmt::format("{} reveal {}", s_surf->Surface(GRSNR).Name, i)); + Penumbra::Surface rSurf(rPoly, std::format("{} reveal {}", s_surf->Surface(GRSNR).Name, i)); state.dataSolarShading->penumbra->add_surface(rSurf); } } else { @@ -5686,8 +5684,8 @@ void DetermineShadowingCombinations(EnergyPlusData &state) if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( state, - EnergyPlus::format("DetermineShadowingCombinations: Surface=\"{}\" is a receiving surface and is non-convex.", - s_surf->Surface(HTSnum).Name)); + std::format("DetermineShadowingCombinations: Surface=\"{}\" is a receiving surface and is non-convex.", + s_surf->Surface(HTSnum).Name)); ShowContinueError(state, "...Shadowing values may be inaccurate. Check .shd report file for more surface shading details"); } else { @@ -5726,8 +5724,8 @@ void DetermineShadowingCombinations(EnergyPlusData &state) if (CastingSurface(HTS) && !s_surf->Surface(HTS).IsConvex) { if (state.dataGlobal->DisplayExtraWarnings) { ShowSevereError(state, - EnergyPlus::format("DetermineShadowingCombinations: Surface=\"{}\" is a casting surface and is non-convex.", - s_surf->Surface(HTS).Name)); + std::format("DetermineShadowingCombinations: Surface=\"{}\" is a casting surface and is non-convex.", + s_surf->Surface(HTS).Name)); ShowContinueError(state, "...Shadowing values may be inaccurate. Check .shd report file for more surface shading details"); } else { ++state.dataErrTracking->TotalCastingNonConvexSurfaces; @@ -5736,20 +5734,18 @@ void DetermineShadowingCombinations(EnergyPlusData &state) } if (state.dataErrTracking->TotalReceivingNonConvexSurfaces > 0) { - ShowWarningMessage( - state, - EnergyPlus::format("DetermineShadowingCombinations: There are {} surfaces which are receiving surfaces and are non-convex.", - state.dataErrTracking->TotalReceivingNonConvexSurfaces)); + ShowWarningMessage(state, + std::format("DetermineShadowingCombinations: There are {} surfaces which are receiving surfaces and are non-convex.", + state.dataErrTracking->TotalReceivingNonConvexSurfaces)); ShowContinueError(state, "...Shadowing values may be inaccurate. Check .shd report file for more surface shading details"); ShowContinueError(state, "...Add Output:Diagnostics,DisplayExtraWarnings; to see individual warnings for each surface."); state.dataErrTracking->TotalWarningErrors += state.dataErrTracking->TotalReceivingNonConvexSurfaces; } if (state.dataErrTracking->TotalCastingNonConvexSurfaces > 0) { - ShowSevereMessage( - state, - EnergyPlus::format("DetermineShadowingCombinations: There are {} surfaces which are casting surfaces and are non-convex.", - state.dataErrTracking->TotalCastingNonConvexSurfaces)); + ShowSevereMessage(state, + std::format("DetermineShadowingCombinations: There are {} surfaces which are casting surfaces and are non-convex.", + state.dataErrTracking->TotalCastingNonConvexSurfaces)); ShowContinueError(state, "...Shadowing values may be inaccurate. Check .shd report file for more surface shading details"); ShowContinueError(state, "...Add Output:Diagnostics,DisplayExtraWarnings; to see individual severes for each surface."); state.dataErrTracking->TotalSevereErrors += state.dataErrTracking->TotalCastingNonConvexSurfaces; @@ -10020,8 +10016,8 @@ void WindowShadingManager(EnergyPlusData &state) } break; default: - ShowWarningError( - state, EnergyPlus::format("Invalid Selection of Window Shading Control Type for Surface {}", s_surf->Surface(ISurf).Name)); + ShowWarningError(state, + std::format("Invalid Selection of Window Shading Control Type for Surface {}", s_surf->Surface(ISurf).Name)); } WinShadingType ShType = s_surf->WindowShadingControl(IShadingCtrl).ShadingType; @@ -10252,9 +10248,8 @@ void WindowShadingManager(EnergyPlusData &state) if (SurfWinShadingFlagEMS != WinShadingType::Invalid) { s_surf->SurfWinShadingFlag(ISurf) = SurfWinShadingFlagEMS; } else { - ShowWarningError( - state, - EnergyPlus::format("Invalid EMS value of Window Shading Control Type for Surface {}", s_surf->Surface(ISurf).Name)); + ShowWarningError(state, + std::format("Invalid EMS value of Window Shading Control Type for Surface {}", s_surf->Surface(ISurf).Name)); } } } // End of surface loop @@ -10471,9 +10466,9 @@ void WindowGapAirflowControl(EnergyPlusData &state) auto const *sched = s_surf->SurfWinAirflowScheds(ISurf); Real64 ScheduleMult = sched->getCurrentVal(); // Multiplier value from schedule if (ScheduleMult < 0.0 || ScheduleMult > 1.0) { - ShowFatalError(state, - EnergyPlus::format("Airflow schedule has a value outside the range 0.0 to 1.0 for window={}", - s_surf->Surface(ISurf).Name)); + ShowFatalError( + state, + std::format("Airflow schedule has a value outside the range 0.0 to 1.0 for window={}", s_surf->Surface(ISurf).Name)); } s_surf->SurfWinAirflowThisTS(ISurf) = ScheduleMult * s_surf->SurfWinMaxAirflow(ISurf); } @@ -11705,27 +11700,26 @@ void ReportSurfaceErrors(EnergyPlusData &state) } TotCount += Count; state.dataErrTracking->TotalWarningErrors += Count - 1; - ShowWarningError( - state, - EnergyPlus::format("Base surface does not surround subsurface (CHKSBS), Overlap Status={}", - state.dataSolarShading->cOverLapStatus(state.dataSolarShading->TrackBaseSubSurround(Loop1).MiscIndex))); - ShowContinueError(state, EnergyPlus::format(" The base surround errors occurred {} times.", Count)); + ShowWarningError(state, + std::format("Base surface does not surround subsurface (CHKSBS), Overlap Status={}", + state.dataSolarShading->cOverLapStatus(state.dataSolarShading->TrackBaseSubSurround(Loop1).MiscIndex))); + ShowContinueError(state, std::format(" The base surround errors occurred {} times.", Count)); for (Loop2 = 1; Loop2 <= state.dataSolarShading->NumBaseSubSurround; ++Loop2) { if (state.dataSolarShading->TrackBaseSubSurround(Loop1).SurfIndex1 == state.dataSolarShading->TrackBaseSubSurround(Loop2).SurfIndex1 && state.dataSolarShading->TrackBaseSubSurround(Loop1).MiscIndex == state.dataSolarShading->TrackBaseSubSurround(Loop2).MiscIndex) { ShowContinueError(state, - EnergyPlus::format("Surface \"{}\" {} SubSurface \"{}\"", - s_surf->Surface(state.dataSolarShading->TrackBaseSubSurround(Loop1).SurfIndex1).Name, - MSG(state.dataSolarShading->TrackBaseSubSurround(Loop1).MiscIndex), - s_surf->Surface(state.dataSolarShading->TrackBaseSubSurround(Loop2).SurfIndex2).Name)); + std::format("Surface \"{}\" {} SubSurface \"{}\"", + s_surf->Surface(state.dataSolarShading->TrackBaseSubSurround(Loop1).SurfIndex1).Name, + MSG(state.dataSolarShading->TrackBaseSubSurround(Loop1).MiscIndex), + s_surf->Surface(state.dataSolarShading->TrackBaseSubSurround(Loop2).SurfIndex2).Name)); } } SurfErrorReported(state.dataSolarShading->TrackBaseSubSurround(Loop1).SurfIndex1) = true; } if (TotCount > 0) { ShowMessage(state, ""); - ShowContinueError(state, EnergyPlus::format(" The base surround errors occurred {} times (total).", TotCount)); + ShowContinueError(state, std::format(" The base surround errors occurred {} times (total).", TotCount)); ShowMessage(state, ""); } @@ -11733,7 +11727,7 @@ void ReportSurfaceErrors(EnergyPlusData &state) SurfErrorReported = false; TotCount = 0; if (state.dataSolarShading->NumTooManyVertices > 0) { - ShowMessage(state, EnergyPlus::format("Too many vertices [>={}] in shadow overlap errors occurring...", state.dataSolarShading->MaxHCV)); + ShowMessage(state, std::format("Too many vertices [>={}] in shadow overlap errors occurring...", state.dataSolarShading->MaxHCV)); ShowMessage(state, "These occur throughout the year and may occur several times for the same surfaces. You " "may be able to reduce them by " @@ -11754,13 +11748,12 @@ void ReportSurfaceErrors(EnergyPlusData &state) TotCount += Count; state.dataErrTracking->TotalWarningErrors += Count - 1; ShowMessage(state, ""); - ShowWarningError(state, EnergyPlus::format("Too many vertices [>={}] in a shadow overlap", state.dataSolarShading->MaxHCV)); - ShowContinueError( - state, - EnergyPlus::format("Overlapping figure={}, Surface Class=[{}]", - s_surf->Surface(state.dataSolarShading->TrackTooManyVertices(Loop1).SurfIndex1).Name, - cSurfaceClass(s_surf->Surface(state.dataSolarShading->TrackTooManyVertices(Loop1).SurfIndex1).Class))); - ShowContinueError(state, EnergyPlus::format(" This error occurred {} times.", Count)); + ShowWarningError(state, std::format("Too many vertices [>={}] in a shadow overlap", state.dataSolarShading->MaxHCV)); + ShowContinueError(state, + std::format("Overlapping figure={}, Surface Class=[{}]", + s_surf->Surface(state.dataSolarShading->TrackTooManyVertices(Loop1).SurfIndex1).Name, + cSurfaceClass(s_surf->Surface(state.dataSolarShading->TrackTooManyVertices(Loop1).SurfIndex1).Class))); + ShowContinueError(state, std::format(" This error occurred {} times.", Count)); for (Loop2 = 1; Loop2 <= state.dataSolarShading->NumTooManyVertices; ++Loop2) { if (state.dataSolarShading->TrackTooManyVertices(Loop1).SurfIndex1 == state.dataSolarShading->TrackTooManyVertices(Loop2).SurfIndex1) { @@ -11769,9 +11762,9 @@ void ReportSurfaceErrors(EnergyPlusData &state) } ShowContinueError( state, - EnergyPlus::format("Figure being Overlapped={}, Surface Class=[{}]", - s_surf->Surface(state.dataSolarShading->TrackTooManyVertices(Loop2).SurfIndex2).Name, - cSurfaceClass(s_surf->Surface(state.dataSolarShading->TrackTooManyVertices(Loop2).SurfIndex2).Class))); + std::format("Figure being Overlapped={}, Surface Class=[{}]", + s_surf->Surface(state.dataSolarShading->TrackTooManyVertices(Loop2).SurfIndex2).Name, + cSurfaceClass(s_surf->Surface(state.dataSolarShading->TrackTooManyVertices(Loop2).SurfIndex2).Class))); SurfErrorReported2(state.dataSolarShading->TrackTooManyVertices(Loop2).SurfIndex2) = true; } } @@ -11779,14 +11772,14 @@ void ReportSurfaceErrors(EnergyPlusData &state) } if (TotCount > 0) { ShowMessage(state, ""); - ShowContinueError(state, EnergyPlus::format(" The too many vertices errors occurred {} times (total).", TotCount)); + ShowContinueError(state, std::format(" The too many vertices errors occurred {} times (total).", TotCount)); ShowMessage(state, ""); } SurfErrorReported = false; TotCount = 0; if (state.dataSolarShading->NumTooManyFigures > 0) { - ShowMessage(state, EnergyPlus::format("Too many figures [>={}] in shadow overlap errors occurring...", state.dataSolarShading->MaxHCS)); + ShowMessage(state, std::format("Too many figures [>={}] in shadow overlap errors occurring...", state.dataSolarShading->MaxHCS)); ShowMessage(state, "These occur throughout the year and may occur several times for the same surfaces. You " "may be able to reduce them by " @@ -11806,13 +11799,12 @@ void ReportSurfaceErrors(EnergyPlusData &state) TotCount += Count; state.dataErrTracking->TotalWarningErrors += Count - 1; ShowMessage(state, ""); - ShowWarningError(state, EnergyPlus::format("Too many figures [>={}] in a shadow overlap", state.dataSolarShading->MaxHCS)); - ShowContinueError( - state, - EnergyPlus::format("Overlapping figure={}, Surface Class=[{}]", - s_surf->Surface(state.dataSolarShading->TrackTooManyFigures(Loop1).SurfIndex1).Name, - cSurfaceClass(s_surf->Surface(state.dataSolarShading->TrackTooManyFigures(Loop1).SurfIndex1).Class))); - ShowContinueError(state, EnergyPlus::format(" This error occurred {} times.", Count)); + ShowWarningError(state, std::format("Too many figures [>={}] in a shadow overlap", state.dataSolarShading->MaxHCS)); + ShowContinueError(state, + std::format("Overlapping figure={}, Surface Class=[{}]", + s_surf->Surface(state.dataSolarShading->TrackTooManyFigures(Loop1).SurfIndex1).Name, + cSurfaceClass(s_surf->Surface(state.dataSolarShading->TrackTooManyFigures(Loop1).SurfIndex1).Class))); + ShowContinueError(state, std::format(" This error occurred {} times.", Count)); for (Loop2 = 1; Loop2 <= state.dataSolarShading->NumTooManyFigures; ++Loop2) { if (state.dataSolarShading->TrackTooManyFigures(Loop1).SurfIndex1 == state.dataSolarShading->TrackTooManyFigures(Loop2).SurfIndex1) { if (SurfErrorReported2(state.dataSolarShading->TrackTooManyFigures(Loop2).SurfIndex2)) { @@ -11820,9 +11812,9 @@ void ReportSurfaceErrors(EnergyPlusData &state) } ShowContinueError( state, - EnergyPlus::format("Figure being Overlapped={}, Surface Class=[{}]", - s_surf->Surface(state.dataSolarShading->TrackTooManyFigures(Loop2).SurfIndex2).Name, - cSurfaceClass(s_surf->Surface(state.dataSolarShading->TrackTooManyFigures(Loop2).SurfIndex2).Class))); + std::format("Figure being Overlapped={}, Surface Class=[{}]", + s_surf->Surface(state.dataSolarShading->TrackTooManyFigures(Loop2).SurfIndex2).Name, + cSurfaceClass(s_surf->Surface(state.dataSolarShading->TrackTooManyFigures(Loop2).SurfIndex2).Class))); SurfErrorReported2(state.dataSolarShading->TrackTooManyFigures(Loop2).SurfIndex2) = true; } } @@ -11830,7 +11822,7 @@ void ReportSurfaceErrors(EnergyPlusData &state) } if (TotCount > 0) { ShowMessage(state, ""); - ShowContinueError(state, EnergyPlus::format(" The too many figures errors occurred {} times (total).", TotCount)); + ShowContinueError(state, std::format(" The too many figures errors occurred {} times (total).", TotCount)); ShowMessage(state, ""); } SurfErrorReported.deallocate(); diff --git a/src/EnergyPlus/StandardRatings.cc b/src/EnergyPlus/StandardRatings.cc index 227e81cb71d..5a406b440fe 100644 --- a/src/EnergyPlus/StandardRatings.cc +++ b/src/EnergyPlus/StandardRatings.cc @@ -46,6 +46,7 @@ // POSSIBILITY OF SUCH DAMAGE. // C++ Headers +#include #include // EnergyPlus Headers @@ -7104,7 +7105,7 @@ namespace StandardRatings { for (int ClassNum = 1; ClassNum <= 4; ++ClassNum) { int Num = (ClassNum - 1) * 4; std::string ClassName = EnergyPlus::format("Class {}", ClassNum); - std::string CompNameNew = fmt::format("{}({})", CompName, ClassName); + std::string CompNameNew = EnergyPlus::format("{}({})", CompName, ClassName); static constexpr std::string_view Format_102( " DX Cooling Coil ASHRAE 127 Standard Ratings Information, {}, {}, {}, {:.1R}, {:.1R}, {:.1R}, " "{:.1R}, {:.1R}, {:.1R}, {:.1R}, {:.1R}\n"); @@ -7320,21 +7321,20 @@ namespace StandardRatings { if (CapCurveHighOATLimitsExceeded || CapCurveFlowLimitsExceeded) { if (state.dataGlobal->DisplayExtraWarnings) { ShowContinueError(state, - EnergyPlus::format("{}={}: Standard Rating Cooling Capacity calculated is not at the AHRI test condition.", - HVAC::coilTypeNames[(int)coilType], - DXCoilName)); + std::format("{}={}: Standard Rating Cooling Capacity calculated is not at the AHRI test condition.", + HVAC::coilTypeNames[(int)coilType], + DXCoilName)); if (CapCurveHighOATLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( - " Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], - GetCurveName(state, CapFTempCurveIndex))); + std::format(" Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], + GetCurveName(state, CapFTempCurveIndex))); } if (CapCurveFlowLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( + std::format( " Check limits in Total Cooling Capacity Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}", Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFFlowCurveIndex)->curveType)], GetCurveName(state, CapFFlowCurveIndex))); @@ -7346,21 +7346,20 @@ namespace StandardRatings { if (CapCurveHighOATLimitsExceeded || CapCurveFlowLimitsExceeded || EIRCurveHighOATLimitsExceeded || EIRCurveFlowLimitsExceeded) { if (state.dataGlobal->DisplayExtraWarnings) { ShowContinueError(state, - EnergyPlus::format("{}={}: Energy Efficiency Ratio (EER) calculated is not at the AHRI test condition.", - HVAC::coilTypeNames[(int)coilType], - DXCoilName)); + std::format("{}={}: Energy Efficiency Ratio (EER) calculated is not at the AHRI test condition.", + HVAC::coilTypeNames[(int)coilType], + DXCoilName)); if (CapCurveHighOATLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( - " Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], - GetCurveName(state, CapFTempCurveIndex))); + std::format(" Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], + GetCurveName(state, CapFTempCurveIndex))); } if (CapCurveFlowLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( + std::format( " Check limits in Total Cooling Capacity Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}", Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFFlowCurveIndex)->curveType)], GetCurveName(state, CapFFlowCurveIndex))); @@ -7368,18 +7367,16 @@ namespace StandardRatings { if (EIRCurveHighOATLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( - " Check limits in Energy Input Ratio Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)], - GetCurveName(state, EIRFTempCurveIndex))); + std::format(" Check limits in Energy Input Ratio Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)], + GetCurveName(state, EIRFTempCurveIndex))); } if (EIRCurveFlowLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( - " Check limits in Energy Input Ratio Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFFlowCurveIndex)->curveType)], - GetCurveName(state, EIRFFlowCurveIndex))); + std::format(" Check limits in Energy Input Ratio Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFFlowCurveIndex)->curveType)], + GetCurveName(state, EIRFFlowCurveIndex))); } } } @@ -7388,23 +7385,21 @@ namespace StandardRatings { if (CapCurveMidOATLimitsExceeded || EIRCurveMidOATLimitsExceeded || CapCurveFlowLimitsExceeded || EIRCurveFlowLimitsExceeded || PLFfPLRforSEERLimitsExceeded) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowContinueError( - state, - EnergyPlus::format("{}={}: Seasonal Energy Efficiency Ratio (SEER) calculated is not at the AHRI test condition.", - HVAC::coilTypeNames[(int)coilType], - DXCoilName)); + ShowContinueError(state, + std::format("{}={}: Seasonal Energy Efficiency Ratio (SEER) calculated is not at the AHRI test condition.", + HVAC::coilTypeNames[(int)coilType], + DXCoilName)); if (CapCurveMidOATLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( - " Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], - GetCurveName(state, CapFTempCurveIndex))); + std::format(" Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], + GetCurveName(state, CapFTempCurveIndex))); } if (CapCurveFlowLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( + std::format( " Check limits in Total Cooling Capacity Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}", Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFFlowCurveIndex)->curveType)], GetCurveName(state, CapFFlowCurveIndex))); @@ -7412,25 +7407,23 @@ namespace StandardRatings { if (EIRCurveMidOATLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( - " Check limits in Energy Input Ratio Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)], - GetCurveName(state, EIRFTempCurveIndex))); + std::format(" Check limits in Energy Input Ratio Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)], + GetCurveName(state, EIRFTempCurveIndex))); } if (EIRCurveFlowLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( - " Check limits in Energy Input Ratio Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFFlowCurveIndex)->curveType)], - GetCurveName(state, EIRFFlowCurveIndex))); + std::format(" Check limits in Energy Input Ratio Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFFlowCurveIndex)->curveType)], + GetCurveName(state, EIRFFlowCurveIndex))); } if (PLFfPLRforSEERLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format(" Check limits in Part Load Fraction Correlation Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(PLFFPLRCurveIndex)->curveType)], - GetCurveName(state, PLFFPLRCurveIndex))); + std::format(" Check limits in Part Load Fraction Correlation Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(PLFFPLRCurveIndex)->curveType)], + GetCurveName(state, PLFFPLRCurveIndex))); } } } @@ -7440,39 +7433,37 @@ namespace StandardRatings { if (state.dataGlobal->DisplayExtraWarnings) { ShowContinueError( state, - EnergyPlus::format("{}={}: Integrated Energy Efficiency Ratio (IEER) calculated is not at the AHRI test condition.", - HVAC::coilTypeNames[(int)coilType], - DXCoilName)); + std::format("{}={}: Integrated Energy Efficiency Ratio (IEER) calculated is not at the AHRI test condition.", + HVAC::coilTypeNames[(int)coilType], + DXCoilName)); if (CapCurveIEERLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( - " Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], - GetCurveName(state, CapFTempCurveIndex))); + std::format(" Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], + GetCurveName(state, CapFTempCurveIndex))); } if (CapCurveFlowLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( + std::format( " Check limits in Total Cooling Capacity Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}", Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFFlowCurveIndex)->curveType)], GetCurveName(state, CapFFlowCurveIndex))); } if (EIRCurveIEERLimitsExceeded) { - ShowContinueError(state, - EnergyPlus::format( - " Check limits in EIR Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)], - GetCurveName(state, EIRFTempCurveIndex))); + ShowContinueError( + state, + std::format(" Check limits in EIR Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)], + GetCurveName(state, EIRFTempCurveIndex))); } if (EIRCurveFlowLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( - " Check limits in Energy Input Ratio Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFFlowCurveIndex)->curveType)], - GetCurveName(state, EIRFFlowCurveIndex))); + std::format(" Check limits in Energy Input Ratio Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFFlowCurveIndex)->curveType)], + GetCurveName(state, EIRFFlowCurveIndex))); } } } @@ -7526,38 +7517,36 @@ namespace StandardRatings { if (HeatingCapCurveHSPFLimitsExceeded || HeatingEIRCurveHSPFLimitsExceeded) { ShowWarningError( state, - EnergyPlus::format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.", - HVAC::coilTypeNames[(int)coilType], - DXCoilName)); + std::format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.", + HVAC::coilTypeNames[(int)coilType], + DXCoilName)); ShowContinueError(state, " Review the Standard Ratings calculations in the Engineering Reference for this coil type. Also, use " "Output:Diagnostics, DisplayExtraWarnings for further guidance."); if (state.dataGlobal->DisplayExtraWarnings) { - ShowContinueError(state, - EnergyPlus::format("{}The max and/or min limits specified in the corresponding curve objects", RoutineName)); + ShowContinueError(state, std::format("{}The max and/or min limits specified in the corresponding curve objects", RoutineName)); ShowContinueError(state, " do not include the AHRI test conditions required to calculate one or more of the Standard Rating values."); } if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - EnergyPlus::format("{}={}: Heating Seasonal Performance Factor calculated is not at the AHRI test condition.", - HVAC::coilTypeNames[(int)coilType], - DXCoilName)); + std::format("{}={}: Heating Seasonal Performance Factor calculated is not at the AHRI test condition.", + HVAC::coilTypeNames[(int)coilType], + DXCoilName)); ShowContinueError(state, " Review the Standard Ratings calculations in the Engineering Reference for this coil type."); if (HeatingCapCurveHSPFLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( - " Check limits in Total Heating Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], - GetCurveName(state, CapFTempCurveIndex))); + std::format(" Check limits in Total Heating Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], + GetCurveName(state, CapFTempCurveIndex))); } if (HeatingEIRCurveHSPFLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format(" Check limits in EIR Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)], - GetCurveName(state, EIRFTempCurveIndex))); + std::format(" Check limits in EIR Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)], + GetCurveName(state, EIRFTempCurveIndex))); } } } @@ -7607,16 +7596,15 @@ namespace StandardRatings { ShowWarningError( state, - EnergyPlus::format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.", - HVAC::coilTypeNames[(int)coilType], - DXCoilName)); + std::format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.", + HVAC::coilTypeNames[(int)coilType], + DXCoilName)); ShowContinueError(state, " Review the Standard Ratings calculations in the Engineering Reference for this coil type. Also, use " "Output:Diagnostics, DisplayExtraWarnings for further guidance."); if (state.dataGlobal->DisplayExtraWarnings) { - ShowContinueError(state, - EnergyPlus::format("{}The max and/or min limits specified in the corresponding curve objects", RoutineName)); + ShowContinueError(state, std::format("{}The max and/or min limits specified in the corresponding curve objects", RoutineName)); ShowContinueError(state, " do not include the AHRI test conditions required to calculate one or more of the Standard Rating values."); } @@ -7624,23 +7612,21 @@ namespace StandardRatings { // For Standard Rating Cooling Capacity: if (CapCurveHighOATLimitsExceeded || CapCurveFlowLimitsExceeded) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowContinueError( - state, - EnergyPlus::format("{}={}: The Standard Rating Cooling Capacity calculated is not at the AHRI test condition.", - HVAC::coilTypeNames[(int)coilType], - DXCoilName)); + ShowContinueError(state, + std::format("{}={}: The Standard Rating Cooling Capacity calculated is not at the AHRI test condition.", + HVAC::coilTypeNames[(int)coilType], + DXCoilName)); if (CapCurveHighOATLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( - " Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], - GetCurveName(state, CapFTempCurveIndex))); + std::format(" Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], + GetCurveName(state, CapFTempCurveIndex))); } if (CapCurveFlowLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( + std::format( " Check limits in Total Cooling Capacity Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}", Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFFlowCurveIndex)->curveType)], GetCurveName(state, CapFFlowCurveIndex))); @@ -7654,21 +7640,20 @@ namespace StandardRatings { if (state.dataGlobal->DisplayExtraWarnings) { ShowContinueError( state, - EnergyPlus::format("{}={}: The Seasonal Energy Efficiency Ratio (SEER) calculated is not at the AHRI test condition.", - HVAC::coilTypeNames[(int)coilType], - DXCoilName)); + std::format("{}={}: The Seasonal Energy Efficiency Ratio (SEER) calculated is not at the AHRI test condition.", + HVAC::coilTypeNames[(int)coilType], + DXCoilName)); if (CapCurveLowOATLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( - " Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], - GetCurveName(state, CapFTempCurveIndex))); + std::format(" Check limits in Total Cooling Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], + GetCurveName(state, CapFTempCurveIndex))); } if (CapCurveFlowLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( + std::format( " Check limits in Total Cooling Capacity Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}", Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFFlowCurveIndex)->curveType)], GetCurveName(state, CapFFlowCurveIndex))); @@ -7676,18 +7661,16 @@ namespace StandardRatings { if (EIRCurveLowOATLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( - " Check limits in Energy Input Ratio Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)], - GetCurveName(state, EIRFTempCurveIndex))); + std::format(" Check limits in Energy Input Ratio Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)], + GetCurveName(state, EIRFTempCurveIndex))); } if (EIRCurveFlowLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( - " Check limits in Energy Input Ratio Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFFlowCurveIndex)->curveType)], - GetCurveName(state, EIRFFlowCurveIndex))); + std::format(" Check limits in Energy Input Ratio Function of Flow Fraction Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFFlowCurveIndex)->curveType)], + GetCurveName(state, EIRFFlowCurveIndex))); } } } @@ -7753,16 +7736,15 @@ namespace StandardRatings { ShowWarningError( state, - EnergyPlus::format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.", - HVAC::coilTypeNames[(int)coilType], - DXCoilName)); + std::format("The Standard Ratings is calculated for {} = {} but not at the AHRI test condition due to curve out of bound.", + HVAC::coilTypeNames[(int)coilType], + DXCoilName)); ShowContinueError(state, " Review the Standard Ratings calculations in the Engineering Reference for this coil type. Also, use " "Output:Diagnostics, DisplayExtraWarnings for further guidance."); if (state.dataGlobal->DisplayExtraWarnings) { - ShowContinueError(state, - EnergyPlus::format("{}The max and/or min limits specified in the corresponding curve objects", RoutineName)); + ShowContinueError(state, std::format("{}The max and/or min limits specified in the corresponding curve objects", RoutineName)); ShowContinueError(state, " do not include the AHRI test conditions required to calculate one or more of the Standard Rating values."); } @@ -7770,38 +7752,36 @@ namespace StandardRatings { if (CapCurveOATLimitsExceeded) { if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - EnergyPlus::format("{}={}: The Net Heating Capacity Calculated is not at the AHRI test condition.", - HVAC::coilTypeNames[(int)coilType], - DXCoilName)); + std::format("{}={}: The Net Heating Capacity Calculated is not at the AHRI test condition.", + HVAC::coilTypeNames[(int)coilType], + DXCoilName)); ShowContinueError( state, - EnergyPlus::format(" Check limits in Total Heating Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], - GetCurveName(state, CapFTempCurveIndex))); + std::format(" Check limits in Total Heating Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], + GetCurveName(state, CapFTempCurveIndex))); } } if (HeatingCapCurveHSPFLimitsExceeded || HeatingEIRCurveHSPFLimitsExceeded) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError( - state, - EnergyPlus::format("{}={}: The Heating Seasonal Performance Factor calculated is not at the AHRI test condition.", - HVAC::coilTypeNames[(int)coilType], - DXCoilName)); + ShowWarningError(state, + std::format("{}={}: The Heating Seasonal Performance Factor calculated is not at the AHRI test condition.", + HVAC::coilTypeNames[(int)coilType], + DXCoilName)); if (HeatingCapCurveHSPFLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format( - " Check limits in Total Heating Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], - GetCurveName(state, CapFTempCurveIndex))); + std::format(" Check limits in Total Heating Capacity Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(CapFTempCurveIndex)->curveType)], + GetCurveName(state, CapFTempCurveIndex))); } if (HeatingEIRCurveHSPFLimitsExceeded) { ShowContinueError( state, - EnergyPlus::format(" Check limits in EIR Function of Temperature Curve, Curve Type = {}, Curve Name = {}", - Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)], - GetCurveName(state, EIRFTempCurveIndex))); + std::format(" Check limits in EIR Function of Temperature Curve, Curve Type = {}, Curve Name = {}", + Curve::objectNames[static_cast(state.dataCurveManager->curves(EIRFTempCurveIndex)->curveType)], + GetCurveName(state, EIRFTempCurveIndex))); } } } diff --git a/src/EnergyPlus/SteamBaseboardRadiator.cc b/src/EnergyPlus/SteamBaseboardRadiator.cc index aad0c6a998d..7005586647d 100644 --- a/src/EnergyPlus/SteamBaseboardRadiator.cc +++ b/src/EnergyPlus/SteamBaseboardRadiator.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -367,7 +368,7 @@ namespace SteamBaseboardRadiator { state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", + EnergyPlus::format("Illegal {} = {:.7f}", state.dataIPShortCut->cNumericFieldNames(iHeatCapacityPerFloorAreaNumericNum), state.dataIPShortCut->rNumericArgs(iHeatCapacityPerFloorAreaNumericNum))); ErrorsFound = true; @@ -410,7 +411,7 @@ namespace SteamBaseboardRadiator { state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).designName)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", + EnergyPlus::format("Illegal {} = {:.7f}", state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum), state.dataIPShortCut->rNumericArgs(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; @@ -425,19 +426,19 @@ namespace SteamBaseboardRadiator { state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", - state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); + std::format("Blank field not allowed for {}", + state.dataIPShortCut->cNumericFieldNames(iHeatFracOfAutosizedCapacityNumericNum))); ErrorsFound = true; } } else { ShowSevereError(state, - EnergyPlus::format("{} = {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).designName)); + std::format("{} = {}", + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, + state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).designName)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + std::format("Illegal {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); ErrorsFound = true; } @@ -446,11 +447,11 @@ namespace SteamBaseboardRadiator { if (state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).Offset <= 0.0) { state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).Offset = 0.001; ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was less than the allowable minimum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(3))); + std::format("{}{}=\"{}\", {} was less than the allowable minimum.", + RoutineName, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(3))); ShowContinueError(state, "...reset to default value=[0.001]."); } @@ -458,20 +459,20 @@ namespace SteamBaseboardRadiator { state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).FracRadiant = state.dataIPShortCut->rNumericArgs(4); if (state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).FracRadiant < MinFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(4))); + std::format("{}{}=\"{}\", {} was lower than the allowable minimum.", + RoutineName, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(4))); ShowContinueError(state, EnergyPlus::format("...reset to minimum value=[{:.3R}].", MinFraction)); state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).FracRadiant = MinFraction; } else if (state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).FracRadiant > MaxFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(4))); + std::format("{}{}=\"{}\", {} was higher than the allowable maximum.", + RoutineName, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(4))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.3R}].", MaxFraction)); state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).FracRadiant = MaxFraction; } @@ -480,21 +481,21 @@ namespace SteamBaseboardRadiator { state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).FracDistribPerson = state.dataIPShortCut->rNumericArgs(5); if (state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).FracDistribPerson < MinFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was lower than the allowable minimum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(5))); + std::format("{}{}=\"{}\", {} was lower than the allowable minimum.", + RoutineName, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(5))); ShowContinueError(state, EnergyPlus::format("...reset to minimum value=[{:.3R}].", MinFraction)); state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).FracDistribPerson = MinFraction; } if (state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).FracDistribPerson > MaxFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(5))); + std::format("{}{}=\"{}\", {} was higher than the allowable maximum.", + RoutineName, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam_Design, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(5))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.3R}].", MaxFraction)); state.dataSteamBaseboardRadiator->SteamBaseboardDesign(BaseboardDesignNum).FracDistribPerson = MaxFraction; } @@ -595,27 +596,27 @@ namespace SteamBaseboardRadiator { if (state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).ScaledHeatingCapacity < 0.0 && state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).ScaledHeatingCapacity != AutoSize) { ShowSevereError(state, - EnergyPlus::format("{} = {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); + std::format("{} = {}", + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, + state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); ShowContinueError(state, - EnergyPlus::format("Illegal {} = {:.7T}", - state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum), - state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum))); + std::format("Illegal {} = {:.7f}", + state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum), + state.dataIPShortCut->rNumericArgs(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else { ShowSevereError(state, - EnergyPlus::format("{} = {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); - ShowContinueError(state, - EnergyPlus::format("Input for {} = {}", - state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), - state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + std::format("{} = {}", + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, + state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); ShowContinueError(state, - EnergyPlus::format("Blank field not allowed for {}", - state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum))); + std::format("Input for {} = {}", + state.dataIPShortCut->cAlphaFieldNames(iHeatCAPMAlphaNum), + state.dataIPShortCut->cAlphaArgs(iHeatCAPMAlphaNum))); + ShowContinueError( + state, + std::format("Blank field not allowed for {}", state.dataIPShortCut->cNumericFieldNames(iHeatDesignCapacityNumericNum))); ErrorsFound = true; } } else if (SteamBaseboardDesignDataObject.HeatingCapMethod == CapacityPerFloorArea) { @@ -632,31 +633,31 @@ namespace SteamBaseboardRadiator { state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SteamVolFlowRateMax = state.dataIPShortCut->rNumericArgs(3); if (state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SteamVolFlowRateMax >= MaxSteamFlowRate) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was higher than the allowable maximum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(3))); + std::format("{}{}=\"{}\", {} was higher than the allowable maximum.", + RoutineName, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(3))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.2R}].", MaxSteamFlowRate)); state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SteamVolFlowRateMax = MaxSteamFlowRate; } else if (state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SteamVolFlowRateMax <= MinSteamFlowRate && state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SteamVolFlowRateMax != AutoSize) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {} was less than the allowable minimum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(3))); + std::format("{}{}=\"{}\", {} was less than the allowable minimum.", + RoutineName, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(3))); ShowContinueError(state, EnergyPlus::format("...reset to minimum value=[{:.2R}].", MinSteamFlowRate)); state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).SteamVolFlowRateMax = MinSteamFlowRate; } // Remaining fraction is added to the zone as convective heat transfer if (SteamBaseboardDesignDataObject.FracRadiant > MaxFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", Fraction Radiant was higher than the allowable maximum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}{}=\"{}\", Fraction Radiant was higher than the allowable maximum.", + RoutineName, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, + state.dataIPShortCut->cAlphaArgs(1))); SteamBaseboardDesignDataObject.FracRadiant = MaxFraction; state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).FracConvect = 0.0; } else { @@ -673,13 +674,12 @@ namespace SteamBaseboardRadiator { // END IF if ((state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).TotSurfToDistrib < MinDistribSurfaces) && (SteamBaseboardDesignDataObject.FracRadiant > MinFraction)) { - ShowSevereError( - state, - EnergyPlus::format("{}{}=\"{}\", the number of surface/radiant fraction groups entered was less than the allowable minimum.", - std::string{RoutineName}, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); + ShowSevereError(state, + std::format("{}{}=\"{}\", the number of surface/radiant fraction groups entered was less than the allowable minimum.", + std::string{RoutineName}, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("...the minimum that must be entered=[{}].", MinDistribSurfaces)); ErrorsFound = true; state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).TotSurfToDistrib = 0; } @@ -707,10 +707,10 @@ namespace SteamBaseboardRadiator { } if (state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).ZonePtr <= 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" is not on any ZoneHVAC:EquipmentList.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); + std::format("{}{}=\"{}\" is not on any ZoneHVAC:EquipmentList.", + RoutineName, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, + state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); ErrorsFound = true; continue; } @@ -730,21 +730,21 @@ namespace SteamBaseboardRadiator { state.dataIPShortCut->rNumericArgs(SurfNum + 3); if (state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).FracDistribToSurf(SurfNum) > MaxFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {}was greater than the allowable maximum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(SurfNum + 3))); + std::format("{}{}=\"{}\", {}was greater than the allowable maximum.", + RoutineName, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(SurfNum + 3))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.1R}].", MaxFraction)); state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).TotSurfToDistrib = MaxFraction; } if (state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).FracDistribToSurf(SurfNum) < MinFraction) { ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", {}was less than the allowable minimum.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cNumericFieldNames(SurfNum + 3))); + std::format("{}{}=\"{}\", {}was less than the allowable minimum.", + RoutineName, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cNumericFieldNames(SurfNum + 3))); ShowContinueError(state, EnergyPlus::format("...reset to maximum value=[{:.1R}].", MinFraction)); state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).TotSurfToDistrib = MinFraction; } @@ -760,25 +760,25 @@ namespace SteamBaseboardRadiator { if (AllFracsSummed > (MaxFraction + 0.01)) { ShowSevereError(state, - EnergyPlus::format("Fraction of radiation distributed to surfaces sums up to greater than 1 for {}", - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Occurs in Baseboard Heater={}", state.dataIPShortCut->cAlphaArgs(1))); + std::format("Fraction of radiation distributed to surfaces sums up to greater than 1 for {}", + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("Occurs in Baseboard Heater={}", state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } if ((AllFracsSummed < (MaxFraction - 0.01)) && (SteamBaseboardDesignDataObject.FracRadiant > MinFraction)) { // User didn't distribute all of the | radiation warn that some will be lost ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", Summed radiant fractions for people + surface groups < 1.0", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}{}=\"{}\", Summed radiant fractions for people + surface groups < 1.0", + RoutineName, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "The rest of the radiant energy delivered by the baseboard heater will be lost"); } state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).steam = Fluid::GetSteam(state); if (state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).steam == nullptr && BaseboardNum == 1) { - ShowSevereError(state, EnergyPlus::format("{}Steam Properties for {} not found.", RoutineName, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}Steam Properties for {} not found.", RoutineName, state.dataIPShortCut->cAlphaArgs(1))); if (SteamMessageNeeded) { ShowContinueError(state, "Steam Fluid Properties should have been included in the input file."); } @@ -789,9 +789,9 @@ namespace SteamBaseboardRadiator { if (ErrorsFound) { ShowFatalError(state, - EnergyPlus::format("{}{}Errors found getting input. Program terminates.", - RoutineName, - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam)); + std::format("{}{}Errors found getting input. Program terminates.", + RoutineName, + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam)); } // Setup Report variables for the Coils @@ -937,9 +937,9 @@ namespace SteamBaseboardRadiator { continue; } ShowSevereError(state, - EnergyPlus::format("InitBaseboard: Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataSteamBaseboardRadiator->SteamBaseboard(Loop).Name)); + std::format("InitBaseboard: Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, + state.dataSteamBaseboardRadiator->SteamBaseboard(Loop).Name)); } } @@ -1196,9 +1196,9 @@ namespace SteamBaseboardRadiator { if ((std::abs(SteamVolFlowRateMaxDes - SteamVolFlowRateMaxUser) / SteamVolFlowRateMaxUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeSteamBaseboard: Potential issue with equipment sizing for " - "ZoneHVAC:Baseboard:RadiantConvective:Steam=\"{}\".", - state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); + std::format("SizeSteamBaseboard: Potential issue with equipment sizing for " + "ZoneHVAC:Baseboard:RadiantConvective:Steam=\"{}\".", + state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Steam Flow Rate of {:.5R} [m3/s]", SteamVolFlowRateMaxUser)); @@ -1218,8 +1218,8 @@ namespace SteamBaseboardRadiator { // if there is no heating Sizing:Plant object and autosizing was requested, issue an error message // first error will be issued by MyPlantSizingIndex ShowSevereError(state, "Autosizing of steam baseboard requires a heating loop Sizing:Plant object"); - ShowContinueError( - state, EnergyPlus::format("Occurs in Baseboard Heater={}", state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); + ShowContinueError(state, + std::format("Occurs in Baseboard Heater={}", state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); ErrorsFound = true; } } @@ -1496,29 +1496,29 @@ namespace SteamBaseboardRadiator { if (ThisSurfIntensity > MaxRadHeatFlux) { // CR 8074, trap for excessive intensity (throws off surface balance ) ShowSevereError(state, "DistributeBBSteamRadGains: excessive thermal radiation heat flux intensity detected"); - ShowContinueError(state, EnergyPlus::format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); + ShowContinueError(state, std::format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); ShowContinueError(state, EnergyPlus::format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); + std::format("Occurs in {} = {}", + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, + state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); ShowContinueError(state, EnergyPlus::format("Radiation intensity = {:.2R} [W/m2]", ThisSurfIntensity)); ShowContinueError(state, - EnergyPlus::format("Assign a larger surface area or more surfaces in {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam)); + std::format("Assign a larger surface area or more surfaces in {}", + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam)); ShowFatalError(state, "DistributeBBSteamRadGains: excessive thermal radiation heat flux intensity detected"); } } else { // small surface ShowSevereError(state, "DistributeBBSteamRadGains: surface not large enough to receive thermal radiation heat flux"); - ShowContinueError(state, EnergyPlus::format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); + ShowContinueError(state, std::format("Surface = {}", state.dataSurface->Surface(SurfNum).Name)); ShowContinueError(state, EnergyPlus::format("Surface area = {:.3R} [m2]", state.dataSurface->Surface(SurfNum).Area)); ShowContinueError(state, - EnergyPlus::format("Occurs in {} = {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, - state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); - ShowContinueError(state, - EnergyPlus::format("Assign a larger surface area or more surfaces in {}", - state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam)); + std::format("Occurs in {} = {}", + state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam, + state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); + ShowContinueError( + state, + std::format("Assign a larger surface area or more surfaces in {}", state.dataSteamBaseboardRadiator->cCMO_BBRadiator_Steam)); ShowFatalError(state, "DistributeBBSteamRadGains: surface not large enough to receive thermal radiation heat flux"); } } @@ -1585,7 +1585,7 @@ namespace SteamBaseboardRadiator { if (CompIndex == 0) { BaseboardNum = Util::FindItemInList(BaseboardName, state.dataSteamBaseboardRadiator->SteamBaseboard, &SteamBaseboardParams::Name); if (BaseboardNum == 0) { - ShowFatalError(state, EnergyPlus::format("UpdateSteamBaseboardPlantConnection: Specified baseboard not valid ={}", BaseboardName)); + ShowFatalError(state, std::format("UpdateSteamBaseboardPlantConnection: Specified baseboard not valid ={}", BaseboardName)); } CompIndex = BaseboardNum; } else { @@ -1593,7 +1593,7 @@ namespace SteamBaseboardRadiator { if (BaseboardNum > state.dataSteamBaseboardRadiator->NumSteamBaseboards || BaseboardNum < 1) { ShowFatalError( state, - EnergyPlus::format( + std::format( "UpdateSteamBaseboardPlantConnection: Invalid CompIndex passed={}, Number of baseboards={}, Entered baseboard name={}", BaseboardNum, state.dataSteamBaseboardRadiator->NumSteamBaseboards, @@ -1603,20 +1603,20 @@ namespace SteamBaseboardRadiator { if (BaseboardName != state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name) { ShowFatalError( state, - EnergyPlus::format("UpdateSteamBaseboardPlantConnection: Invalid CompIndex passed={}, baseboard name={}, stored baseboard " - "Name for that index={}", - BaseboardNum, - BaseboardName, - state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); + std::format("UpdateSteamBaseboardPlantConnection: Invalid CompIndex passed={}, baseboard name={}, stored baseboard " + "Name for that index={}", + BaseboardNum, + BaseboardName, + state.dataSteamBaseboardRadiator->SteamBaseboard(BaseboardNum).Name)); } if (BaseboardType != DataPlant::PlantEquipmentType::Baseboard_Rad_Conv_Steam) { ShowFatalError( state, - EnergyPlus::format("UpdateSteamBaseboardPlantConnection: Invalid CompIndex passed={}, baseboard name={}, stored baseboard " - "Name for that index={}", - BaseboardNum, - BaseboardName, - PlantEquipTypeNames[static_cast(BaseboardType)])); + std::format("UpdateSteamBaseboardPlantConnection: Invalid CompIndex passed={}, baseboard name={}, stored baseboard " + "Name for that index={}", + BaseboardNum, + BaseboardName, + PlantEquipTypeNames[static_cast(BaseboardType)])); } } } diff --git a/src/EnergyPlus/SteamCoils.cc b/src/EnergyPlus/SteamCoils.cc index 711ff8abcb1..5b781b2dffb 100644 --- a/src/EnergyPlus/SteamCoils.cc +++ b/src/EnergyPlus/SteamCoils.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -1619,8 +1620,7 @@ namespace SteamCoils { } if (CoilIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("GetCoilAirInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); + ShowSevereError(state, std::format("GetCoilAirInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); ErrorsFound = true; NodeNumber = 0; } else { @@ -1667,8 +1667,7 @@ namespace SteamCoils { } if (CoilIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("GetCoilAirOutletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); + ShowSevereError(state, std::format("GetCoilAirOutletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); ErrorsFound = true; NodeNumber = 0; } else { @@ -1751,8 +1750,7 @@ namespace SteamCoils { } if (CoilIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); + ShowSevereError(state, std::format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); ErrorsFound = true; NodeNumber = 0; } else { @@ -1799,8 +1797,7 @@ namespace SteamCoils { } if (IndexNum == 0) { - ShowSevereError(state, - EnergyPlus::format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); + ShowSevereError(state, std::format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); ErrorsFound = true; NodeNumber = 0; } else { @@ -1838,8 +1835,7 @@ namespace SteamCoils { } if (CoilIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); + ShowSevereError(state, std::format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); ErrorsFound = true; NodeNumber = 0; } else { @@ -1886,8 +1882,7 @@ namespace SteamCoils { } if (IndexNum == 0) { - ShowSevereError(state, - EnergyPlus::format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); + ShowSevereError(state, std::format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); ErrorsFound = true; NodeNumber = 0; } else { @@ -1938,7 +1933,7 @@ namespace SteamCoils { } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format("GetCoilSteamInletNode: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilSteamInletNode: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; Capacity = 0.0; } @@ -1971,8 +1966,7 @@ namespace SteamCoils { } if (CoilIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); + ShowSevereError(state, std::format("GetCoilSteamInletNode: Could not find CoilType = \"Coil:Heating:Steam\" with Name = {}", CoilName)); ErrorsFound = true; return CoilControlType::Invalid; } @@ -2021,8 +2015,7 @@ namespace SteamCoils { } if (WhichCoil == 0) { - ShowSevereError(state, - EnergyPlus::format("GetSteamCoilControlNodeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetSteamCoilControlNodeNum: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorFlag = true; NodeNumber = 0; } @@ -2073,7 +2066,7 @@ namespace SteamCoils { } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format("GetCoilAvailScheduleIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilAvailScheduleIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; AvailSchIndex = 0; } @@ -2105,9 +2098,9 @@ namespace SteamCoils { if (CoilNum <= 0 || CoilNum > state.dataSteamCoils->NumSteamCoils) { ShowSevereError(state, - EnergyPlus::format("SetHeatingCoilData: called with heating coil Number out of range={} should be >0 and <{}", - CoilNum, - state.dataSteamCoils->NumSteamCoils)); + std::format("SetHeatingCoilData: called with heating coil Number out of range={} should be >0 and <{}", + CoilNum, + state.dataSteamCoils->NumSteamCoils)); ErrorsFound = true; return; } diff --git a/src/EnergyPlus/SurfaceGeometry.cc b/src/EnergyPlus/SurfaceGeometry.cc index 85f54de8010..c71ca54a5c9 100644 --- a/src/EnergyPlus/SurfaceGeometry.cc +++ b/src/EnergyPlus/SurfaceGeometry.cc @@ -49,6 +49,7 @@ #include #include #include +#include #include // ObjexxFCL Headers @@ -514,27 +515,26 @@ namespace SurfaceGeometry { if (state.dataSurfaceGeometry->ErrCount == 1 && !state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( state, - EnergyPlus::format("{}Entered Ceiling Height for some zone(s) significantly different from calculated Ceiling Height", - RoutineName)); + std::format("{}Entered Ceiling Height for some zone(s) significantly different from calculated Ceiling Height", + RoutineName)); ShowContinueError(state, "...use Output:Diagnostics,DisplayExtraWarnings; to show more details on each max iteration exceeded."); } if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( state, - EnergyPlus::format("{}Entered Ceiling Height for Zone=\"{}\" significantly different from calculated Ceiling Height", - RoutineName, - thisZone.Name)); + std::format("{}Entered Ceiling Height for Zone=\"{}\" significantly different from calculated Ceiling Height", + RoutineName, + thisZone.Name)); static constexpr std::string_view ValFmt("{:.2F}"); std::string String1 = EnergyPlus::format(ValFmt, thisZone.CeilingHeight); std::string String2 = EnergyPlus::format(ValFmt, AverageHeight); ShowContinueError( state, - EnergyPlus::format( - "{}Entered Ceiling Height={}, Calculated Ceiling Height={}, entered height will be used in calculations.", - RoutineName, - String1, - String2)); + std::format("{}Entered Ceiling Height={}, Calculated Ceiling Height={}, entered height will be used in calculations.", + RoutineName, + String1, + String2)); } } } @@ -597,9 +597,9 @@ namespace SurfaceGeometry { thisZone.Centroid.z /= TotSurfArea; } if (internalMassSurfacesPresent && !nonInternalMassSurfacesPresent) { - ShowSevereError(state, - EnergyPlus::format( - "{}Zone=\"{}\" has only internal mass surfaces. Need at least one other surface.", RoutineName, thisZone.Name)); + ShowSevereError( + state, + std::format("{}Zone=\"{}\" has only internal mass surfaces. Need at least one other surface.", RoutineName, thisZone.Name)); ErrorsFound = true; } } @@ -1070,9 +1070,8 @@ namespace SurfaceGeometry { if (RelWarning && !state.dataSurfaceGeometry->WarningDisplayed) { ShowWarningError( state, - EnergyPlus::format( - "{}World Coordinate System selected. Any non-zero Building/Zone North Axes or non-zero Zone Origins are ignored.", - RoutineName)); + std::format("{}World Coordinate System selected. Any non-zero Building/Zone North Axes or non-zero Zone Origins are ignored.", + RoutineName)); ShowContinueError(state, "These may be used in daylighting reference point coordinate calculations but not in normal geometry inputs."); state.dataSurfaceGeometry->WarningDisplayed = true; @@ -1092,9 +1091,8 @@ namespace SurfaceGeometry { if (RelWarning && !state.dataSurfaceGeometry->WarningDisplayed) { ShowWarningError( state, - EnergyPlus::format( - "{}World Coordinate System selected. Any non-zero Building/Zone North Axes or non-zero Zone Origins are ignored.", - RoutineName)); + std::format("{}World Coordinate System selected. Any non-zero Building/Zone North Axes or non-zero Zone Origins are ignored.", + RoutineName)); ShowContinueError(state, "These may be used in daylighting reference point coordinate calculations but not in normal geometry inputs."); state.dataSurfaceGeometry->WarningDisplayed = true; @@ -1213,7 +1211,7 @@ namespace SurfaceGeometry { state.dataSurface->TotSurfaces = NumSurfs + AddedSubSurfaces + NeedToAddSurfaces + NeedToAddSubSurfaces; if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors discovered, program terminates.", RoutineName)); + ShowFatalError(state, std::format("{}Errors discovered, program terminates.", RoutineName)); } state.dataSurface->Surface.allocate(state.dataSurface->TotSurfaces); // Allocate the Surface derived type appropriately @@ -1358,8 +1356,7 @@ namespace SurfaceGeometry { // Debug write(outputfiledebug,*) ' subsurf, basesurf=',TRIM('iz-'//SurfaceTmp(SurfNum)%BaseSurfName) } else { ShowSevereError( - state, - EnergyPlus::format("{}Adding unentered subsurface, could not find base surface=iz-{}", RoutineName, surfTemp.BaseSurfName)); + state, std::format("{}Adding unentered subsurface, could not find base surface=iz-{}", RoutineName, surfTemp.BaseSurfName)); SurfError = true; } } @@ -1389,13 +1386,13 @@ namespace SurfaceGeometry { } if (surfTemp.Class < SurfaceClass::Window || surfTemp.Class > SurfaceClass::TDD_Diffuser) { if (surfTemp.Class == SurfaceClass::None) { - ShowSevereError(state, EnergyPlus::format("{}Invalid SubSurface detected, Surface={}", RoutineName, surfTemp.Name)); + ShowSevereError(state, std::format("{}Invalid SubSurface detected, Surface={}", RoutineName, surfTemp.Name)); } else { ShowSevereError(state, - EnergyPlus::format("{}Invalid SubSurface detected, Surface={}, class={} invalid class for subsurface", - RoutineName, - surfTemp.Name, - state.dataSurfaceGeometry->BaseSurfCls(int(surfTemp.Class)))); + std::format("{}Invalid SubSurface detected, Surface={}, class={} invalid class for subsurface", + RoutineName, + surfTemp.Name, + state.dataSurfaceGeometry->BaseSurfCls(int(surfTemp.Class)))); SurfError = true; } } @@ -1689,22 +1686,21 @@ namespace SurfaceGeometry { if (MovedSurfs != state.dataSurface->TotSurfaces) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}Reordered # of Surfaces ({}) not = Total # of Surfaces ({})", RoutineName, MovedSurfs, state.dataSurface->TotSurfaces)); SurfError = true; for (int Loop = 1; Loop <= state.dataSurface->TotSurfaces; ++Loop) { if (!SurfaceTmpClassMoved(Loop) && state.dataSurfaceGeometry->SurfaceTmp(Loop).Class == SurfaceClass::Invalid) { ShowSevereError(state, - EnergyPlus::format("{}Error in Surface= \"{} indicated Zone=\"{}\"", - RoutineName, - state.dataSurfaceGeometry->SurfaceTmp(Loop).Name, - state.dataSurfaceGeometry->SurfaceTmp(Loop).ZoneName)); + std::format("{}Error in Surface= \"{} indicated Zone=\"{}\"", + RoutineName, + state.dataSurfaceGeometry->SurfaceTmp(Loop).Name, + state.dataSurfaceGeometry->SurfaceTmp(Loop).ZoneName)); } } ShowWarningError( state, - EnergyPlus::format("{}Remaining surface checks will use \"reordered number of surfaces\", not number of original surfaces", - RoutineName)); + std::format("{}Remaining surface checks will use \"reordered number of surfaces\", not number of original surfaces", RoutineName)); } // Realign the relationship: surface to base surface @@ -1715,13 +1711,13 @@ namespace SurfaceGeometry { movedSurf.BaseSurf = newBaseSurfNum; if (newBaseSurfNum < 1) { - ShowFatalError(state, - EnergyPlus::format( - "{}Couldn't find the new Surface Number for surface index {} named '{}'. Looking for BaseSurf old index of {}", - RoutineName, - SurfNum, - movedSurf.Name, - movedSurf.BaseSurf)); + ShowFatalError( + state, + std::format("{}Couldn't find the new Surface Number for surface index {} named '{}'. Looking for BaseSurf old index of {}", + RoutineName, + SurfNum, + movedSurf.Name, + movedSurf.BaseSurf)); } } auto &reportOrderNum = state.dataSurface->AllSurfaceListReportOrder[SurfNum - 1]; @@ -1795,16 +1791,16 @@ namespace SurfaceGeometry { // Check that matching surface is also "OtherZoneSurface" if (state.dataSurface->Surface(Found).ExtBoundCond <= 0 && state.dataSurface->Surface(Found).ExtBoundCond != unreconciledZoneSurface) { - ShowSevereError(state, EnergyPlus::format("{}Potential \"OtherZoneSurface\" is not matched correctly:", RoutineName)); + ShowSevereError(state, std::format("{}Potential \"OtherZoneSurface\" is not matched correctly:", RoutineName)); ShowContinueError(state, - EnergyPlus::format("Surface={}, Zone={}", - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(SurfNum).ZoneName)); + std::format("Surface={}, Zone={}", + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(SurfNum).ZoneName)); ShowContinueError(state, - EnergyPlus::format("Nonmatched Other/InterZone Surface={}, Zone={}", - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).ZoneName)); + std::format("Nonmatched Other/InterZone Surface={}, Zone={}", + state.dataSurface->Surface(Found).Name, + state.dataSurface->Surface(Found).ZoneName)); SurfError = true; } // Check that matching interzone surface has construction with reversed layers @@ -1814,24 +1810,23 @@ namespace SurfaceGeometry { ++state.dataSurfaceGeometry->ErrCount2; if (state.dataSurfaceGeometry->ErrCount2 == 1 && !state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( - state, - EnergyPlus::format("{}CAUTION -- Interspace surfaces are occurring in the same space(s).", RoutineName)); + state, std::format("{}CAUTION -- Interspace surfaces are occurring in the same space(s).", RoutineName)); ShowContinueError( state, "...use Output:Diagnostics,DisplayExtraWarnings; to show more details on individual occurrences."); } if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError( - state, EnergyPlus::format("{}CAUTION -- Interspace surfaces are usually in different spaces", RoutineName)); + ShowWarningError(state, + std::format("{}CAUTION -- Interspace surfaces are usually in different spaces", RoutineName)); ShowContinueError(state, - EnergyPlus::format("Surface={}, Space={}, Zone={}", - state.dataSurface->Surface(SurfNum).Name, - state.dataHeatBal->space(state.dataSurface->Surface(SurfNum).spaceNum).Name, - state.dataSurface->Surface(SurfNum).ZoneName)); + std::format("Surface={}, Space={}, Zone={}", + state.dataSurface->Surface(SurfNum).Name, + state.dataHeatBal->space(state.dataSurface->Surface(SurfNum).spaceNum).Name, + state.dataSurface->Surface(SurfNum).ZoneName)); ShowContinueError(state, - EnergyPlus::format("Surface={}, Space={}, Zone={}", - state.dataSurface->Surface(Found).Name, - state.dataHeatBal->space(state.dataSurface->Surface(Found).spaceNum).Name, - state.dataSurface->Surface(Found).ZoneName)); + std::format("Surface={}, Space={}, Zone={}", + state.dataSurface->Surface(Found).Name, + state.dataHeatBal->space(state.dataSurface->Surface(Found).spaceNum).Name, + state.dataSurface->Surface(Found).ZoneName)); } } int ConstrNum = state.dataSurface->Surface(SurfNum).Construction; @@ -1854,13 +1849,13 @@ namespace SurfaceGeometry { if (std::abs(state.dataHeatBal->NominalU(ConstrNum) - state.dataHeatBal->NominalU(ConstrNumFound)) > 0.001) { ShowSevereError( state, - EnergyPlus::format("{}Construction {} of interzone surface {} does not have the same number of layers as the " - "construction {} of adjacent surface {}", - RoutineName, - state.dataConstruction->Construct(ConstrNum).Name, - state.dataSurface->Surface(SurfNum).Name, - state.dataConstruction->Construct(ConstrNumFound).Name, - state.dataSurface->Surface(Found).Name)); + std::format("{}Construction {} of interzone surface {} does not have the same number of layers as the " + "construction {} of adjacent surface {}", + RoutineName, + state.dataConstruction->Construct(ConstrNum).Name, + state.dataSurface->Surface(SurfNum).Name, + state.dataConstruction->Construct(ConstrNumFound).Name, + state.dataSurface->Surface(Found).Name)); if (!state.dataConstruction->Construct(ConstrNum).ReverseConstructionNumLayersWarning || !state.dataConstruction->Construct(ConstrNumFound).ReverseConstructionNumLayersWarning) { ShowContinueError(state, "...this problem for this pair will not be reported again."); @@ -1876,15 +1871,14 @@ namespace SurfaceGeometry { CheckForReversedLayers(state, izConstDiff, ConstrNum, ConstrNumFound, TotLay); if (izConstDiff && std::abs(state.dataHeatBal->NominalU(ConstrNum) - state.dataHeatBal->NominalU(ConstrNumFound)) > 0.001) { - ShowSevereError( - state, - EnergyPlus::format("{}Construction {} of interzone surface {} does not have the same materials in the " - "reverse order as the construction {} of adjacent surface {}", - RoutineName, - state.dataConstruction->Construct(ConstrNum).Name, - state.dataSurface->Surface(SurfNum).Name, - state.dataConstruction->Construct(ConstrNumFound).Name, - state.dataSurface->Surface(Found).Name)); + ShowSevereError(state, + std::format("{}Construction {} of interzone surface {} does not have the same materials in the " + "reverse order as the construction {} of adjacent surface {}", + RoutineName, + state.dataConstruction->Construct(ConstrNum).Name, + state.dataSurface->Surface(SurfNum).Name, + state.dataConstruction->Construct(ConstrNumFound).Name, + state.dataSurface->Surface(Found).Name)); ShowContinueError(state, "or the properties of the reversed layers are not correct due to differing layer front and " "back side values"); @@ -1896,15 +1890,14 @@ namespace SurfaceGeometry { } SurfError = true; } else if (izConstDiff) { - ShowWarningError( - state, - EnergyPlus::format("{}Construction {} of interzone surface {} does not have the same materials in the " - "reverse order as the construction {} of adjacent surface {}", - RoutineName, - state.dataConstruction->Construct(ConstrNum).Name, - state.dataSurface->Surface(SurfNum).Name, - state.dataConstruction->Construct(ConstrNumFound).Name, - state.dataSurface->Surface(Found).Name)); + ShowWarningError(state, + std::format("{}Construction {} of interzone surface {} does not have the same materials in the " + "reverse order as the construction {} of adjacent surface {}", + RoutineName, + state.dataConstruction->Construct(ConstrNum).Name, + state.dataSurface->Surface(SurfNum).Name, + state.dataConstruction->Construct(ConstrNumFound).Name, + state.dataSurface->Surface(Found).Name)); ShowContinueError(state, "or the properties of the reversed layers are not correct due to differing layer front and " "back side values"); @@ -1941,7 +1934,7 @@ namespace SurfaceGeometry { if (state.dataSurfaceGeometry->ErrCount4 == 1 && !state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( state, - EnergyPlus::format( + std::format( "{}InterZone Surface Areas do not match as expected and might not satisfy conservation of energy:", RoutineName)); ShowContinueError( @@ -1950,39 +1943,37 @@ namespace SurfaceGeometry { if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( state, - EnergyPlus::format( + std::format( "{}InterZone Surface Areas do not match as expected and might not satisfy conservation of energy:", RoutineName)); if (MultFound == 1 && MultSurfNum == 1) { ShowContinueError(state, - EnergyPlus::format(" Area={:.1T} in Surface={}, Zone={}", - state.dataSurface->Surface(SurfNum).Area, - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(SurfNum).ZoneName)); + std::format(" Area={:.1f} in Surface={}, Zone={}", + state.dataSurface->Surface(SurfNum).Area, + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(SurfNum).ZoneName)); ShowContinueError(state, - EnergyPlus::format(" Area={:.1T} in Surface={}, Zone={}", - state.dataSurface->Surface(Found).Area, - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).ZoneName)); + std::format(" Area={:.1f} in Surface={}, Zone={}", + state.dataSurface->Surface(Found).Area, + state.dataSurface->Surface(Found).Name, + state.dataSurface->Surface(Found).ZoneName)); } else { // Show multiplier info - ShowContinueError( - state, - EnergyPlus::format(" Area={:.1T}, Multipliers={}, Total Area={:.1T} in Surface={} Zone={}", - state.dataSurface->Surface(SurfNum).Area, - MultSurfNum, - state.dataSurface->Surface(SurfNum).Area * MultSurfNum, - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(SurfNum).ZoneName)); - - ShowContinueError( - state, - EnergyPlus::format(" Area={:.1T}, Multipliers={}, Total Area={:.1T} in Surface={} Zone={}", - state.dataSurface->Surface(Found).Area, - MultFound, - state.dataSurface->Surface(Found).Area * MultFound, - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).ZoneName)); + ShowContinueError(state, + std::format(" Area={:.1f}, Multipliers={}, Total Area={:.1f} in Surface={} Zone={}", + state.dataSurface->Surface(SurfNum).Area, + MultSurfNum, + state.dataSurface->Surface(SurfNum).Area * MultSurfNum, + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(SurfNum).ZoneName)); + + ShowContinueError(state, + std::format(" Area={:.1f}, Multipliers={}, Total Area={:.1f} in Surface={} Zone={}", + state.dataSurface->Surface(Found).Area, + MultFound, + state.dataSurface->Surface(Found).Area * MultFound, + state.dataSurface->Surface(Found).Name, + state.dataSurface->Surface(Found).ZoneName)); } } } @@ -1990,17 +1981,17 @@ namespace SurfaceGeometry { // Check opposites Azimuth and Tilt // Tilt if (std::abs(std::abs(state.dataSurface->Surface(Found).Tilt + state.dataSurface->Surface(SurfNum).Tilt) - 180.0) > 1.0) { - ShowWarningError(state, EnergyPlus::format("{}InterZone Surface Tilts do not match as expected.", RoutineName)); + ShowWarningError(state, std::format("{}InterZone Surface Tilts do not match as expected.", RoutineName)); ShowContinueError(state, - EnergyPlus::format(" Tilt={:.1T} in Surface={}, Zone={}", - state.dataSurface->Surface(SurfNum).Tilt, - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(SurfNum).ZoneName)); + std::format(" Tilt={:.1f} in Surface={}, Zone={}", + state.dataSurface->Surface(SurfNum).Tilt, + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(SurfNum).ZoneName)); ShowContinueError(state, - EnergyPlus::format(" Tilt={:.1T} in Surface={}, Zone={}", - state.dataSurface->Surface(Found).Tilt, - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).ZoneName)); + std::format(" Tilt={:.1f} in Surface={}, Zone={}", + state.dataSurface->Surface(Found).Tilt, + state.dataSurface->Surface(Found).Name, + state.dataSurface->Surface(Found).ZoneName)); } // check surface class match. interzone surface. @@ -2008,30 +1999,30 @@ namespace SurfaceGeometry { state.dataSurface->Surface(Found).Class != SurfaceClass::Wall) || (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Wall && state.dataSurface->Surface(Found).Class == SurfaceClass::Wall)) { - ShowWarningError(state, EnergyPlus::format("{}InterZone Surface Classes do not match as expected.", RoutineName)); + ShowWarningError(state, std::format("{}InterZone Surface Classes do not match as expected.", RoutineName)); ShowContinueError(state, - EnergyPlus::format("Surface=\"{}\", surface class={}", - state.dataSurface->Surface(SurfNum).Name, - cSurfaceClass(state.dataSurface->Surface(SurfNum).Class))); + std::format("Surface=\"{}\", surface class={}", + state.dataSurface->Surface(SurfNum).Name, + cSurfaceClass(state.dataSurface->Surface(SurfNum).Class))); ShowContinueError(state, - EnergyPlus::format("Adjacent Surface=\"{}\", surface class={}", - state.dataSurface->Surface(Found).Name, - cSurfaceClass(state.dataSurface->Surface(Found).Class))); + std::format("Adjacent Surface=\"{}\", surface class={}", + state.dataSurface->Surface(Found).Name, + cSurfaceClass(state.dataSurface->Surface(Found).Class))); ShowContinueError(state, "Other errors/warnings may follow about these surfaces."); } if ((state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Roof && state.dataSurface->Surface(Found).Class != SurfaceClass::Floor) || (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Roof && state.dataSurface->Surface(Found).Class == SurfaceClass::Floor)) { - ShowWarningError(state, EnergyPlus::format("{}InterZone Surface Classes do not match as expected.", RoutineName)); + ShowWarningError(state, std::format("{}InterZone Surface Classes do not match as expected.", RoutineName)); ShowContinueError(state, - EnergyPlus::format("Surface=\"{}\", surface class={}", - state.dataSurface->Surface(SurfNum).Name, - cSurfaceClass(state.dataSurface->Surface(SurfNum).Class))); + std::format("Surface=\"{}\", surface class={}", + state.dataSurface->Surface(SurfNum).Name, + cSurfaceClass(state.dataSurface->Surface(SurfNum).Class))); ShowContinueError(state, - EnergyPlus::format("Adjacent Surface=\"{}\", surface class={}", - state.dataSurface->Surface(Found).Name, - cSurfaceClass(state.dataSurface->Surface(Found).Class))); + std::format("Adjacent Surface=\"{}\", surface class={}", + state.dataSurface->Surface(Found).Name, + cSurfaceClass(state.dataSurface->Surface(Found).Class))); ShowContinueError(state, "Other errors/warnings may follow about these surfaces."); } if (state.dataSurface->Surface(SurfNum).Class != SurfaceClass::Roof && @@ -2051,56 +2042,55 @@ namespace SurfaceGeometry { 180.0) > 1.0) { if (std::abs(state.dataSurface->Surface(SurfNum).SinTilt) > 0.5 || state.dataGlobal->DisplayExtraWarnings) { // if horizontal surfaces, then these are windows/doors/etc in those items. - ShowWarningError(state, - EnergyPlus::format("{}InterZone Surface Azimuths do not match as expected.", RoutineName)); + ShowWarningError(state, std::format("{}InterZone Surface Azimuths do not match as expected.", RoutineName)); ShowContinueError(state, - EnergyPlus::format(" Azimuth={:.1T}, Tilt={:.1T}, in Surface={}, Zone={}", - state.dataSurface->Surface(SurfNum).Azimuth, - state.dataSurface->Surface(SurfNum).Tilt, - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(SurfNum).ZoneName)); + std::format(" Azimuth={:.1f}, Tilt={:.1f}, in Surface={}, Zone={}", + state.dataSurface->Surface(SurfNum).Azimuth, + state.dataSurface->Surface(SurfNum).Tilt, + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(SurfNum).ZoneName)); ShowContinueError(state, - EnergyPlus::format(" Azimuth={:.1T}, Tilt={:.1T}, in Surface={}, Zone={}", - state.dataSurface->Surface(Found).Azimuth, - state.dataSurface->Surface(Found).Tilt, - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).ZoneName)); + std::format(" Azimuth={:.1f}, Tilt={:.1f}, in Surface={}, Zone={}", + state.dataSurface->Surface(Found).Azimuth, + state.dataSurface->Surface(Found).Tilt, + state.dataSurface->Surface(Found).Name, + state.dataSurface->Surface(Found).ZoneName)); ShowContinueError(state, - EnergyPlus::format("..surface class of first surface={}", - cSurfaceClass(state.dataSurface->Surface(SurfNum).Class))); + std::format("..surface class of first surface={}", + cSurfaceClass(state.dataSurface->Surface(SurfNum).Class))); ShowContinueError(state, - EnergyPlus::format("..surface class of second surface={}", - cSurfaceClass(state.dataSurface->Surface(Found).Class))); + std::format("..surface class of second surface={}", + cSurfaceClass(state.dataSurface->Surface(Found).Class))); } } } // Make sure exposures (Sun, Wind) are the same.....and are "not" if (state.dataSurface->Surface(SurfNum).ExtSolar || state.dataSurface->Surface(Found).ExtSolar) { - ShowWarningError( - state, EnergyPlus::format("{}Interzone surfaces cannot be \"SunExposed\" -- removing SunExposed", RoutineName)); + ShowWarningError(state, + std::format("{}Interzone surfaces cannot be \"SunExposed\" -- removing SunExposed", RoutineName)); ShowContinueError(state, - EnergyPlus::format(" Surface={}, Zone={}", - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(SurfNum).ZoneName)); + std::format(" Surface={}, Zone={}", + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(SurfNum).ZoneName)); ShowContinueError(state, - EnergyPlus::format(" Surface={}, Zone={}", - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).ZoneName)); + std::format(" Surface={}, Zone={}", + state.dataSurface->Surface(Found).Name, + state.dataSurface->Surface(Found).ZoneName)); state.dataSurface->Surface(SurfNum).ExtSolar = false; state.dataSurface->Surface(Found).ExtSolar = false; } if (state.dataSurface->Surface(SurfNum).ExtWind || state.dataSurface->Surface(Found).ExtWind) { - ShowWarningError( - state, EnergyPlus::format("{}Interzone surfaces cannot be \"WindExposed\" -- removing WindExposed", RoutineName)); + ShowWarningError(state, + std::format("{}Interzone surfaces cannot be \"WindExposed\" -- removing WindExposed", RoutineName)); ShowContinueError(state, - EnergyPlus::format(" Surface={}, Zone={}", - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(SurfNum).ZoneName)); + std::format(" Surface={}, Zone={}", + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(SurfNum).ZoneName)); ShowContinueError(state, - EnergyPlus::format(" Surface={}, Zone={}", - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).ZoneName)); + std::format(" Surface={}, Zone={}", + state.dataSurface->Surface(Found).Name, + state.dataSurface->Surface(Found).ZoneName)); state.dataSurface->Surface(SurfNum).ExtWind = false; state.dataSurface->Surface(Found).ExtWind = false; } @@ -2116,13 +2106,12 @@ namespace SurfaceGeometry { state.dataSurface->Surface(SurfNum).BaseSurf) { // base surface is not interzone surface ShowSevereError(state, - EnergyPlus::format("{}SubSurface=\"{}\" is an interzone subsurface.", - RoutineName, - state.dataSurface->Surface(SurfNum).Name)); - ShowContinueError( - state, - EnergyPlus::format("..but the Base Surface is not an interzone surface, Surface=\"{}\".", - state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name)); + std::format("{}SubSurface=\"{}\" is an interzone subsurface.", + RoutineName, + state.dataSurface->Surface(SurfNum).Name)); + ShowContinueError(state, + std::format("..but the Base Surface is not an interzone surface, Surface=\"{}\".", + state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name)); SurfError = true; } } @@ -2131,10 +2120,10 @@ namespace SurfaceGeometry { // Seems unlikely that an internal surface would be missing itself, so this message // only indicates for adjacent (interzone) surfaces. ShowSevereError(state, - EnergyPlus::format("{}Adjacent Surface not found: {} adjacent to surface {}", - RoutineName, - state.dataSurface->Surface(SurfNum).ExtBoundCondName, - state.dataSurface->Surface(SurfNum).Name)); + std::format("{}Adjacent Surface not found: {} adjacent to surface {}", + RoutineName, + state.dataSurface->Surface(SurfNum).ExtBoundCondName, + state.dataSurface->Surface(SurfNum).Name)); NonMatch = true; SurfError = true; } @@ -2142,24 +2131,24 @@ namespace SurfaceGeometry { if (state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).ExtBoundCond > 0 && state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).ExtBoundCond != state.dataSurface->Surface(SurfNum).BaseSurf) { // If Interzone surface, subsurface must be also. - ShowSevereError(state, EnergyPlus::format("{}SubSurface on Interzone Surface must be an Interzone SubSurface.", RoutineName)); - ShowContinueError( - state, EnergyPlus::format("...OutsideFaceEnvironment is blank, in Surface={}", state.dataSurface->Surface(SurfNum).Name)); + ShowSevereError(state, std::format("{}SubSurface on Interzone Surface must be an Interzone SubSurface.", RoutineName)); + ShowContinueError(state, + std::format("...OutsideFaceEnvironment is blank, in Surface={}", state.dataSurface->Surface(SurfNum).Name)); SurfError = true; } else { ++state.dataSurfaceGeometry->ErrCount3; if (state.dataSurfaceGeometry->ErrCount3 == 1 && !state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, EnergyPlus::format("{}Blank name for Outside Boundary Condition Objects.", RoutineName)); + ShowWarningError(state, std::format("{}Blank name for Outside Boundary Condition Objects.", RoutineName)); ShowContinueError(state, "...use Output:Diagnostics,DisplayExtraWarnings; to show more details on individual surfaces."); } if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - EnergyPlus::format("{}Blank name for Outside Boundary Condition Object, in surface={}", - RoutineName, - state.dataSurface->Surface(SurfNum).Name)); + std::format("{}Blank name for Outside Boundary Condition Object, in surface={}", + RoutineName, + state.dataSurface->Surface(SurfNum).Name)); ShowContinueError(state, - EnergyPlus::format("Resetting this surface to be an internal zone surface, zone={}", - state.dataSurface->Surface(SurfNum).ZoneName)); + std::format("Resetting this surface to be an internal zone surface, zone={}", + state.dataSurface->Surface(SurfNum).ZoneName)); } state.dataSurface->Surface(SurfNum).ExtBoundCondName = state.dataSurface->Surface(SurfNum).Name; state.dataSurface->Surface(SurfNum).ExtBoundCond = SurfNum; @@ -2167,17 +2156,17 @@ namespace SurfaceGeometry { } else { ++state.dataSurfaceGeometry->ErrCount3; if (state.dataSurfaceGeometry->ErrCount3 == 1 && !state.dataGlobal->DisplayExtraWarnings) { - ShowSevereError(state, EnergyPlus::format("{}Blank name for Outside Boundary Condition Objects.", RoutineName)); + ShowSevereError(state, std::format("{}Blank name for Outside Boundary Condition Objects.", RoutineName)); ShowContinueError(state, "...use Output:Diagnostics,DisplayExtraWarnings; to show more details on individual surfaces."); } if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - EnergyPlus::format("{}Blank name for Outside Boundary Condition Object, in surface={}", - RoutineName, - state.dataSurface->Surface(SurfNum).Name)); + std::format("{}Blank name for Outside Boundary Condition Object, in surface={}", + RoutineName, + state.dataSurface->Surface(SurfNum).Name)); ShowContinueError(state, - EnergyPlus::format("Resetting this surface to be an internal zone (adiabatic) surface, zone={}", - state.dataSurface->Surface(SurfNum).ZoneName)); + std::format("Resetting this surface to be an internal zone (adiabatic) surface, zone={}", + state.dataSurface->Surface(SurfNum).ZoneName)); } state.dataSurface->Surface(SurfNum).ExtBoundCondName = state.dataSurface->Surface(SurfNum).Name; state.dataSurface->Surface(SurfNum).ExtBoundCond = SurfNum; @@ -2187,7 +2176,7 @@ namespace SurfaceGeometry { } // ...end of the Surface DO loop for finding BaseSurf if (NonMatch) { - ShowSevereError(state, EnergyPlus::format("{}Non matching interzone surfaces found", RoutineName)); + ShowSevereError(state, std::format("{}Non matching interzone surfaces found", RoutineName)); } //********************************************************************************** @@ -2207,7 +2196,7 @@ namespace SurfaceGeometry { if (state.dataSurface->Surface(SurfNum).ExtBoundCond == SurfNum) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}Subsurface=\"{}\" exterior condition [adiabatic surface] in a base surface=\"{}\" with exterior condition [{}]", RoutineName, state.dataSurface->Surface(SurfNum).Name, @@ -2218,7 +2207,7 @@ namespace SurfaceGeometry { } else if (state.dataSurface->Surface(SurfNum).ExtBoundCond > 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}Subsurface=\"{}\" exterior condition [interzone surface] in a base surface=\"{}\" with exterior condition [{}]", RoutineName, state.dataSurface->Surface(SurfNum).Name, @@ -2230,24 +2219,24 @@ namespace SurfaceGeometry { DataSurfaces::OtherSideCondModeledExt) { ShowWarningError( state, - EnergyPlus::format("{}Subsurface=\"{}\" exterior condition [{}] in a base surface=\"{}\" with exterior condition [{}]", - RoutineName, - state.dataSurface->Surface(SurfNum).Name, - DataSurfaces::cExtBoundCondition(state.dataSurface->Surface(SurfNum).ExtBoundCond), - state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name, - DataSurfaces::cExtBoundCondition( - state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).ExtBoundCond))); + std::format("{}Subsurface=\"{}\" exterior condition [{}] in a base surface=\"{}\" with exterior condition [{}]", + RoutineName, + state.dataSurface->Surface(SurfNum).Name, + DataSurfaces::cExtBoundCondition(state.dataSurface->Surface(SurfNum).ExtBoundCond), + state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name, + DataSurfaces::cExtBoundCondition( + state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).ExtBoundCond))); ShowContinueError(state, "...SubSurface will not use the exterior condition model of the base surface."); } else { ShowSevereError( state, - EnergyPlus::format("{}Subsurface=\"{}\" exterior condition [{}] in a base surface=\"{}\" with exterior condition [{}]", - RoutineName, - state.dataSurface->Surface(SurfNum).Name, - DataSurfaces::cExtBoundCondition(state.dataSurface->Surface(SurfNum).ExtBoundCond), - state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name, - DataSurfaces::cExtBoundCondition( - state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).ExtBoundCond))); + std::format("{}Subsurface=\"{}\" exterior condition [{}] in a base surface=\"{}\" with exterior condition [{}]", + RoutineName, + state.dataSurface->Surface(SurfNum).Name, + DataSurfaces::cExtBoundCondition(state.dataSurface->Surface(SurfNum).ExtBoundCond), + state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name, + DataSurfaces::cExtBoundCondition( + state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).ExtBoundCond))); SurfError = true; } if (!SubSurfaceSevereDisplayed && SurfError) { @@ -2262,15 +2251,15 @@ namespace SurfaceGeometry { if (state.dataSurface->Surface(SurfNum).ExtBoundCond > 0) { ShowSevereError( state, - EnergyPlus::format("{}Subsurface=\"{}\" exterior condition [interzone surface] in a base surface=\"{}\" with exterior " - "condition [adiabatic surface]", - RoutineName, - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name)); + std::format("{}Subsurface=\"{}\" exterior condition [interzone surface] in a base surface=\"{}\" with exterior " + "condition [adiabatic surface]", + RoutineName, + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name)); } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}Subsurface=\"{}\" exterior condition [{}] in a base surface=\"{}\" with exterior condition [adiabatic surface]", RoutineName, state.dataSurface->Surface(SurfNum).Name, @@ -2286,10 +2275,10 @@ namespace SurfaceGeometry { } else if (state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).ExtBoundCond > 0) { // interzone surface if (state.dataSurface->Surface(SurfNum).ExtBoundCond == SurfNum) { ShowSevereError(state, - EnergyPlus::format("{}Subsurface=\"{}\" is an adiabatic surface in an Interzone base surface=\"{}\"", - RoutineName, - state.dataSurface->Surface(SurfNum).Name, - state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name)); + std::format("{}Subsurface=\"{}\" is an adiabatic surface in an Interzone base surface=\"{}\"", + RoutineName, + state.dataSurface->Surface(SurfNum).Name, + state.dataSurface->Surface(state.dataSurface->Surface(SurfNum).BaseSurf).Name)); if (!SubSurfaceSevereDisplayed) { ShowContinueError(state, "...calculations for heat balance would be compromised."); SubSurfaceSevereDisplayed = true; @@ -2426,10 +2415,9 @@ namespace SurfaceGeometry { // Warn if calculated floor area was zero and there is more than one Space ShowWarningError( state, - EnergyPlus::format( - "{}Entered Floor Area entered for Zone=\"{}\" significantly different from sum of Space Floor Areas", - RoutineName, - thisZone.Name)); + std::format("{}Entered Floor Area entered for Zone=\"{}\" significantly different from sum of Space Floor Areas", + RoutineName, + thisZone.Name)); ShowContinueError(state, "But the sum of the Space Floor Areas is zero and there is more than one Space in the zone." "Unable to apportion the zone floor area. Space Floor Areas are zero."); @@ -2533,7 +2521,7 @@ namespace SurfaceGeometry { if (errFlag) { ErrorsFound = true; - ShowContinueError(state, EnergyPlus::format("WindowShadingControl {} has errors, program will terminate.", winShadeCtrl.Name)); + ShowContinueError(state, std::format("WindowShadingControl {} has errors, program will terminate.", winShadeCtrl.Name)); } if (winShadeCtrl.slatAngleControl != DataSurfaces::SlatAngleControl::Fixed) { @@ -2581,8 +2569,7 @@ namespace SurfaceGeometry { if (OpaqueHTSurfsWithWin == 1 && OpaqueHTSurfs == 1 && InternalMassSurfs == 0) { SurfError = true; ShowSevereError( - state, - EnergyPlus::format("{}Zone {} has only one floor, wall or roof, and this surface has a window.", RoutineName, thisZone.Name)); + state, std::format("{}Zone {} has only one floor, wall or roof, and this surface has a window.", RoutineName, thisZone.Name)); ShowContinueError(state, "Add more floors, walls or roofs, or an internal mass surface."); } } @@ -2614,12 +2601,12 @@ namespace SurfaceGeometry { continue; } if (LayNumOutside != state.dataConstruction->Construct(surf.Construction).LayerPoint(1)) { - ShowSevereError(state, EnergyPlus::format("{}Only one EcoRoof Material is currently allowed for all constructions.", RoutineName)); - ShowContinueError(state, EnergyPlus::format("... first material={}", s_mat->materials(LayNumOutside)->Name)); + ShowSevereError(state, std::format("{}Only one EcoRoof Material is currently allowed for all constructions.", RoutineName)); + ShowContinueError(state, std::format("... first material={}", s_mat->materials(LayNumOutside)->Name)); ShowContinueError(state, - EnergyPlus::format("... conflicting Construction={} uses material={}", - state.dataConstruction->Construct(surf.Construction).Name, - s_mat->materials(state.dataConstruction->Construct(surf.Construction).LayerPoint(1))->Name)); + std::format("... conflicting Construction={} uses material={}", + state.dataConstruction->Construct(surf.Construction).Name, + s_mat->materials(state.dataConstruction->Construct(surf.Construction).LayerPoint(1))->Name)); ErrorsFound = true; } } @@ -2737,18 +2724,16 @@ namespace SurfaceGeometry { if (!state.dataGlobal->DisplayExtraWarnings) { ++iTmp1; } else { - ShowWarningError( - state, - EnergyPlus::format("{}Surface=\"{}\" uses InfraredTransparent construction in a non-interzone surface. (illegal use)", - RoutineName, - surf.Name)); + ShowWarningError(state, + std::format("{}Surface=\"{}\" uses InfraredTransparent construction in a non-interzone surface. (illegal use)", + RoutineName, + surf.Name)); } } if (iTmp1 > 0) { - ShowWarningError(state, - EnergyPlus::format("{}Surfaces use InfraredTransparent constructions {} in non-interzone surfaces. (illegal use)", - RoutineName, - iTmp1)); + ShowWarningError( + state, + std::format("{}Surfaces use InfraredTransparent constructions {} in non-interzone surfaces. (illegal use)", RoutineName, iTmp1)); ShowContinueError(state, "For explicit details on each use, use Output:Diagnostics,DisplayExtraWarnings;"); } } @@ -2794,54 +2779,53 @@ namespace SurfaceGeometry { if (state.dataSurfaceGeometry->Warning1Count > 0) { ShowWarningMessage(state, - EnergyPlus::format("{}Window dimensions differ from Window 5/6 data file dimensions, {} times.", - RoutineName, - state.dataSurfaceGeometry->Warning1Count)); + std::format("{}Window dimensions differ from Window 5/6 data file dimensions, {} times.", + RoutineName, + state.dataSurfaceGeometry->Warning1Count)); ShowContinueError(state, "This will affect the frame heat transfer calculation if the frame in the Data File entry"); ShowContinueError(state, "is not uniform, i.e., has sections with different geometry and/or thermal properties."); ShowContinueError(state, "For explicit details on each window, use Output:Diagnostics,DisplayExtraWarnings;"); } if (state.dataSurfaceGeometry->Warning2Count > 0) { ShowWarningMessage(state, - EnergyPlus::format("{}Exterior Windows have been replaced with Window 5/6 two glazing systems, {} times.", - RoutineName, - state.dataSurfaceGeometry->Warning2Count)); + std::format("{}Exterior Windows have been replaced with Window 5/6 two glazing systems, {} times.", + RoutineName, + state.dataSurfaceGeometry->Warning2Count)); ShowContinueError(state, "Note that originally entered dimensions are overridden."); ShowContinueError(state, "For explicit details on each window, use Output:Diagnostics,DisplayExtraWarnings;"); } if (state.dataSurfaceGeometry->Warning3Count > 0) { ShowWarningMessage(state, - EnergyPlus::format("{}Interior Windows have been replaced with Window 5/6 two glazing systems, {} times.", - RoutineName, - state.dataSurfaceGeometry->Warning3Count)); + std::format("{}Interior Windows have been replaced with Window 5/6 two glazing systems, {} times.", + RoutineName, + state.dataSurfaceGeometry->Warning3Count)); ShowContinueError(state, "Note that originally entered dimensions are overridden."); ShowContinueError(state, "For explicit details on each window, use Output:Diagnostics,DisplayExtraWarnings;"); } if (state.dataErrTracking->TotalMultipliedWindows > 0) { - ShowWarningMessage( - state, - EnergyPlus::format("{}There are {} window/glass door(s) that may cause inaccurate shadowing due to Solar Distribution.", - RoutineName, - state.dataErrTracking->TotalMultipliedWindows)); + ShowWarningMessage(state, + std::format("{}There are {} window/glass door(s) that may cause inaccurate shadowing due to Solar Distribution.", + RoutineName, + state.dataErrTracking->TotalMultipliedWindows)); ShowContinueError(state, "For explicit details on each window, use Output:Diagnostics,DisplayExtraWarnings;"); state.dataErrTracking->TotalWarningErrors += state.dataErrTracking->TotalMultipliedWindows; } if (state.dataErrTracking->TotalCoincidentVertices > 0) { ShowWarningMessage( state, - EnergyPlus::format("{}There are {} coincident/collinear vertices; These have been deleted unless the deletion would bring the " - "number of surface sides < 3.", - RoutineName, - state.dataErrTracking->TotalCoincidentVertices)); + std::format("{}There are {} coincident/collinear vertices; These have been deleted unless the deletion would bring the " + "number of surface sides < 3.", + RoutineName, + state.dataErrTracking->TotalCoincidentVertices)); ShowContinueError(state, "For explicit details on each problem surface, use Output:Diagnostics,DisplayExtraWarnings;"); state.dataErrTracking->TotalWarningErrors += state.dataErrTracking->TotalCoincidentVertices; } if (state.dataErrTracking->TotalDegenerateSurfaces > 0) { ShowSevereMessage(state, - EnergyPlus::format("{}There are {} degenerate surfaces; Degenerate surfaces are those with number of sides < 3.", - RoutineName, - state.dataErrTracking->TotalDegenerateSurfaces)); + std::format("{}There are {} degenerate surfaces; Degenerate surfaces are those with number of sides < 3.", + RoutineName, + state.dataErrTracking->TotalDegenerateSurfaces)); ShowContinueError(state, "These surfaces should be deleted."); ShowContinueError(state, "For explicit details on each problem surface, use Output:Diagnostics,DisplayExtraWarnings;"); state.dataErrTracking->TotalSevereErrors += state.dataErrTracking->TotalDegenerateSurfaces; @@ -2864,15 +2848,15 @@ namespace SurfaceGeometry { if (SurfError || ErrorsFound) { ErrorsFound = true; - ShowFatalError(state, EnergyPlus::format("{}Errors discovered, program terminates.", RoutineName)); + ShowFatalError(state, std::format("{}Errors discovered, program terminates.", RoutineName)); } int TotShadSurf = TotDetachedFixed + TotDetachedBldg + TotRectDetachedFixed + TotRectDetachedBldg + TotShdSubs + TotOverhangs + TotOverhangsProjection + TotFins + TotFinsProjection; int NumDElightCmplxFen = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, "Daylighting:DElight:ComplexFenestration"); if (TotShadSurf > 0 && (NumDElightCmplxFen > 0 || Dayltg::doesDayLightingUseDElight(state))) { - ShowWarningError( - state, EnergyPlus::format("{}When using DElight daylighting the presence of exterior shading surfaces is ignored.", RoutineName)); + ShowWarningError(state, + std::format("{}When using DElight daylighting the presence of exterior shading surfaces is ignored.", RoutineName)); } for (int SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; SurfNum++) { @@ -2910,7 +2894,7 @@ namespace SurfaceGeometry { if (SurfError || ErrorsFound) { ErrorsFound = true; - ShowFatalError(state, EnergyPlus::format("{}Errors discovered, program terminates.", RoutineName)); + ShowFatalError(state, std::format("{}Errors discovered, program terminates.", RoutineName)); } } @@ -2986,16 +2970,15 @@ namespace SurfaceGeometry { if ((thisSurf.ExtBoundCond == unreconciledZoneSurface) && (thisSurf.Name.substr(0, 3) == "iz-")) { if (state.dataHeatBal->Zone(thisSurf.Zone).numSpaces > 1) { // Only trigger warning if the spaceless surface is an autogenerated interzone surface - ShowWarningError( - state, - EnergyPlus::format("{}Surface=\"{}\" has Outside Boundary Condition=Zone, but Zone=\"{}\" has more than 1 Space.", - RoutineName, - thisSurf.Name.substr(3), - thisSurf.ZoneName)); + ShowWarningError(state, + std::format("{}Surface=\"{}\" has Outside Boundary Condition=Zone, but Zone=\"{}\" has more than 1 Space.", + RoutineName, + thisSurf.Name.substr(3), + thisSurf.ZoneName)); ShowContinueError(state, - EnergyPlus::format("Auto-generated surface=\"{}\" will be assigned to Space=\"{}\"", - thisSurf.Name, - state.dataHeatBal->space(thisSurf.spaceNum).Name)); + std::format("Auto-generated surface=\"{}\" will be assigned to Space=\"{}\"", + thisSurf.Name, + state.dataHeatBal->space(thisSurf.spaceNum).Name)); ShowContinueError(state, "Use Outside Boundary Condition = Space to specify the exact Space for the outside boundary."); } } @@ -3017,7 +3000,7 @@ namespace SurfaceGeometry { } for (int spaceNum = 1; spaceNum <= state.dataGlobal->numSpaces; ++spaceNum) { if (int(state.dataHeatBal->space(spaceNum).surfaces.size()) == 0) { - ShowWarningError(state, EnergyPlus::format("{}Space={} has no surfaces.", RoutineName, state.dataHeatBal->space(spaceNum).Name)); + ShowWarningError(state, std::format("{}Space={} has no surfaces.", RoutineName, state.dataHeatBal->space(spaceNum).Name)); } } } @@ -3257,8 +3240,7 @@ namespace SurfaceGeometry { int Found = Util::FindItem(GAlphas(1), FlCorners, 4); if (Found == 0) { - ShowSevereError(state, - EnergyPlus::format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), GAlphas(1))); + ShowSevereError(state, std::format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(1), GAlphas(1))); ErrorsFound = true; } else { state.dataSurface->Corner = Found; @@ -3277,8 +3259,7 @@ namespace SurfaceGeometry { OK = true; } if (!OK) { - ShowSevereError(state, - EnergyPlus::format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(2), GAlphas(2))); + ShowSevereError(state, std::format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(2), GAlphas(2))); ErrorsFound = true; } @@ -3294,9 +3275,8 @@ namespace SurfaceGeometry { OK = true; } if (!OK) { - ShowWarningError(state, - EnergyPlus::format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(3), GAlphas(3))); - ShowContinueError(state, EnergyPlus::format("{} defaults to \"WorldCoordinateSystem\"", s_ipsc->cAlphaFieldNames(3))); + ShowWarningError(state, std::format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(3), GAlphas(3))); + ShowContinueError(state, std::format("{} defaults to \"WorldCoordinateSystem\"", s_ipsc->cAlphaFieldNames(3))); state.dataSurface->WorldCoordSystem = true; OutMsg += "WorldCoordinateSystem,"; } @@ -3313,9 +3293,8 @@ namespace SurfaceGeometry { OK = true; } if (!OK) { - ShowWarningError(state, - EnergyPlus::format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(4), GAlphas(4))); - ShowContinueError(state, EnergyPlus::format("{} defaults to \"RelativeToZoneOrigin\"", s_ipsc->cAlphaFieldNames(4))); + ShowWarningError(state, std::format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(4), GAlphas(4))); + ShowContinueError(state, std::format("{} defaults to \"RelativeToZoneOrigin\"", s_ipsc->cAlphaFieldNames(4))); state.dataSurface->DaylRefWorldCoordSystem = false; OutMsg += "RelativeToZoneOrigin,"; } @@ -3332,36 +3311,35 @@ namespace SurfaceGeometry { OK = true; } if (!OK) { - ShowWarningError(state, - EnergyPlus::format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(5), GAlphas(5))); - ShowContinueError(state, EnergyPlus::format("{} defaults to \"RelativeToZoneOrigin\"", s_ipsc->cAlphaFieldNames(5))); + ShowWarningError(state, std::format("{}: Invalid {}={}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(5), GAlphas(5))); + ShowContinueError(state, std::format("{} defaults to \"RelativeToZoneOrigin\"", s_ipsc->cAlphaFieldNames(5))); state.dataSurfaceGeometry->RectSurfRefWorldCoordSystem = false; OutMsg += "RelativeToZoneOrigin"; } } else if (SELECT_CASE_var == 0) { - ShowSevereError(state, EnergyPlus::format("{}: Required object not found.", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("{}: Required object not found.", s_ipsc->cCurrentModuleObject)); OutMsg += "None found in input"; ErrorsFound = true; } else { - ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("{}: Too many objects entered. Only one allowed.", s_ipsc->cCurrentModuleObject)); ErrorsFound = true; } } if (!state.dataSurface->WorldCoordSystem) { if (state.dataSurface->DaylRefWorldCoordSystem) { - ShowWarningError(state, EnergyPlus::format("{}: Potential mismatch of coordinate specifications.", s_ipsc->cCurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("{}=\"{}\"; while ", s_ipsc->cAlphaFieldNames(3), GAlphas(3))); - ShowContinueError(state, EnergyPlus::format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(4), GAlphas(4))); + ShowWarningError(state, std::format("{}: Potential mismatch of coordinate specifications.", s_ipsc->cCurrentModuleObject)); + ShowContinueError(state, std::format("{}=\"{}\"; while ", s_ipsc->cAlphaFieldNames(3), GAlphas(3))); + ShowContinueError(state, std::format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(4), GAlphas(4))); } if (state.dataSurfaceGeometry->RectSurfRefWorldCoordSystem) { - ShowWarningError(state, EnergyPlus::format("{}: Potential mismatch of coordinate specifications.", s_ipsc->cCurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("{}=\"{}\"; while ", s_ipsc->cAlphaFieldNames(3), GAlphas(3))); - ShowContinueError(state, EnergyPlus::format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(5), GAlphas(5))); + ShowWarningError(state, std::format("{}: Potential mismatch of coordinate specifications.", s_ipsc->cCurrentModuleObject)); + ShowContinueError(state, std::format("{}=\"{}\"; while ", s_ipsc->cAlphaFieldNames(3), GAlphas(3))); + ShowContinueError(state, std::format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(5), GAlphas(5))); } } else { bool RelWarning = false; @@ -3379,14 +3357,14 @@ namespace SurfaceGeometry { if (RelWarning && !state.dataSurfaceGeometry->RectSurfRefWorldCoordSystem) { ShowWarningError( state, - EnergyPlus::format("{}: Potential mismatch of coordinate specifications. Note that the rectangular surfaces are relying on the " - "default SurfaceGeometry for 'Relative to zone' coordinate.", - s_ipsc->cCurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("{}=\"{}\"; while ", s_ipsc->cAlphaFieldNames(3), GAlphas(3))); + std::format("{}: Potential mismatch of coordinate specifications. Note that the rectangular surfaces are relying on the " + "default SurfaceGeometry for 'Relative to zone' coordinate.", + s_ipsc->cCurrentModuleObject)); + ShowContinueError(state, std::format("{}=\"{}\"; while ", s_ipsc->cAlphaFieldNames(3), GAlphas(3))); if (GAlphas(5) == "RELATIVE") { - ShowContinueError(state, EnergyPlus::format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(5), GAlphas(5))); + ShowContinueError(state, std::format("{}=\"{}\".", s_ipsc->cAlphaFieldNames(5), GAlphas(5))); } else if (GAlphas(5) != "ABSOLUTE") { - ShowContinueError(state, EnergyPlus::format("{}=\"defaults to RELATIVE\".", s_ipsc->cAlphaFieldNames(5))); + ShowContinueError(state, std::format("{}=\"defaults to RELATIVE\".", s_ipsc->cAlphaFieldNames(5))); } } } @@ -3451,9 +3429,9 @@ namespace SurfaceGeometry { state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, s_ipsc->cCurrentModuleObject, Loop, NumAlphas, NumNumbers); if (NumAlphas != 2) { ShowSevereError(state, - EnergyPlus::format("{}: Object Definition indicates not = 2 Alpha Objects, Number Indicated={}", - s_ipsc->cCurrentModuleObject, - NumAlphas)); + std::format("{}: Object Definition indicates not = 2 Alpha Objects, Number Indicated={}", + s_ipsc->cCurrentModuleObject, + NumAlphas)); ErrorsFound = true; } @@ -3510,11 +3488,11 @@ namespace SurfaceGeometry { } if (SchedMinValue < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {}=\"{}\", has schedule values < 0.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", {}=\"{}\", has schedule values < 0.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ShowContinueError(state, "...Schedule values < 0 have no meaning for shading elements."); } if (SchedMaxValue > 0.0) { @@ -3522,11 +3500,11 @@ namespace SurfaceGeometry { } if (SchedMaxValue > 1.0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {}=\"{}\", has schedule values > 1.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", {}=\"{}\", has schedule values > 1.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ShowContinueError(state, "...Schedule values > 1 have no meaning for shading elements."); } if (std::abs(SchedMinValue - SchedMaxValue) > Constant::OneMillionth) { @@ -3539,7 +3517,7 @@ namespace SurfaceGeometry { if (mod(NumNumbers - 1, 3) != 0) { ShowWarningError( state, - EnergyPlus::format( + std::format( "{}=\"{}\", {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, @@ -3547,11 +3525,11 @@ namespace SurfaceGeometry { } if (numSides < 3) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(1), - surfTemp.Sides)); + std::format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cNumericFieldNames(1), + surfTemp.Sides)); ErrorsFound = true; continue; } @@ -3560,15 +3538,14 @@ namespace SurfaceGeometry { surfTemp.Sides = s_ipsc->rNumericArgs(1); if (numSides > surfTemp.Sides) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", field {}={}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(1), - fmt::to_string(surfTemp.Sides))); - ShowContinueError(state, - EnergyPlus::format("...but {} were entered. Only the indicated {} will be used.", - numSides, - s_ipsc->cNumericFieldNames(1))); + std::format("{}=\"{}\", field {}={}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cNumericFieldNames(1), + fmt::to_string(surfTemp.Sides))); + ShowContinueError( + state, + std::format("...but {} were entered. Only the indicated {} will be used.", numSides, s_ipsc->cNumericFieldNames(1))); } } surfTemp.Vertex.allocate(surfTemp.Sides); @@ -3631,9 +3608,9 @@ namespace SurfaceGeometry { state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, s_ipsc->cCurrentModuleObject, Loop, NumAlphas, NumNumbers); if (NumAlphas != 1) { ShowSevereError(state, - EnergyPlus::format("{}: Object Definition indicates not = 1 Alpha Objects, Number Indicated={}", - s_ipsc->cCurrentModuleObject, - NumAlphas)); + std::format("{}: Object Definition indicates not = 1 Alpha Objects, Number Indicated={}", + s_ipsc->cCurrentModuleObject, + NumAlphas)); ErrorsFound = true; } @@ -3693,8 +3670,8 @@ namespace SurfaceGeometry { if (surfTemp.Area <= 0.0) { ShowSevereError( state, - EnergyPlus::format( - "{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); + std::format( + "{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2f}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); ErrorsFound = true; } @@ -3871,17 +3848,17 @@ namespace SurfaceGeometry { if (Item == 1) { if (SurfaceNumAlpha != 9) { ShowSevereError(state, - EnergyPlus::format("{}: Object Definition indicates not = 9 Alpha Objects, Number Indicated={}", - s_ipsc->cCurrentModuleObject, - SurfaceNumAlpha)); + std::format("{}: Object Definition indicates not = 9 Alpha Objects, Number Indicated={}", + s_ipsc->cCurrentModuleObject, + SurfaceNumAlpha)); ErrorsFound = true; } } else { if (SurfaceNumAlpha != 8) { ShowSevereError(state, - EnergyPlus::format("{}: Object Definition indicates not = 8 Alpha Objects, Number Indicated={}", - s_ipsc->cCurrentModuleObject, - SurfaceNumAlpha)); + std::format("{}: Object Definition indicates not = 8 Alpha Objects, Number Indicated={}", + s_ipsc->cCurrentModuleObject, + SurfaceNumAlpha)); ErrorsFound = true; } } @@ -3921,11 +3898,11 @@ namespace SurfaceGeometry { ClassItem = Util::FindItemInList(s_ipsc->cAlphaArgs(2), BaseSurfCls, 3); if (ClassItem == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } else { surfTemp.Class = BaseSurfIDs(ClassItem); @@ -3941,23 +3918,23 @@ namespace SurfaceGeometry { if (surfTemp.Construction == 0) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); } else if (state.dataConstruction->Construct(surfTemp.Construction).TypeIsWindow) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + std::format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); if (Item == 1) { - ShowContinueError(state, EnergyPlus::format("...because {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + ShowContinueError(state, std::format("...because {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); } else { - ShowContinueError(state, EnergyPlus::format("...because Surface Type={}", BaseSurfCls(ClassItem))); + ShowContinueError(state, std::format("...because Surface Type={}", BaseSurfCls(ClassItem))); } } else { state.dataConstruction->Construct(surfTemp.Construction).IsUsed = true; @@ -3975,11 +3952,11 @@ namespace SurfaceGeometry { surfTemp.Zone = ZoneNum; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); surfTemp.Class = SurfaceClass::Invalid; surfTemp.ZoneName = "Unknown Zone"; ErrorsFound = true; @@ -3993,21 +3970,21 @@ namespace SurfaceGeometry { surfTemp.spaceNum = spaceNum; if (surfTemp.Zone != state.dataHeatBal->space(spaceNum).zoneNum) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\" is not in the same zone as the surface.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + std::format("{}=\"{}\", invalid {}=\"{}\" is not in the same zone as the surface.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); surfTemp.Class = SurfaceClass::Invalid; ErrorsFound = true; } } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + std::format("{}=\"{}\", invalid {}=\"{}\" not found.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); surfTemp.Class = SurfaceClass::Invalid; ErrorsFound = true; } @@ -4030,7 +4007,7 @@ namespace SurfaceGeometry { if (!state.dataEnvrn->GroundTempInputs[(int)DataEnvironment::GroundTempType::BuildingSurface]) { ShowWarningError(state, "GetHTSurfaceData: Surfaces with interface to Ground found but no \"Ground Temperatures\" were input."); - ShowContinueError(state, EnergyPlus::format("Found first in surface={}", s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Found first in surface={}", s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("Defaults, constant throughout the year of ({:.1R}) will be used.", state.dataEnvrn->GroundTemp[(int)DataEnvironment::GroundTempType::BuildingSurface])); @@ -4046,7 +4023,7 @@ namespace SurfaceGeometry { ShowSevereError(state, "GetHTSurfaceData: Surfaces with interface to GroundFCfactorMethod found but no \"FC Ground " "Temperatures\" were input."); - ShowContinueError(state, EnergyPlus::format("Found first in surface={}", s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Found first in surface={}", s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Either add a \"Site:GroundTemperature:FCfactorMethod\" object or use a weather file with " "Ground Temperatures."); @@ -4058,21 +4035,21 @@ namespace SurfaceGeometry { if (surfTemp.Class == SurfaceClass::Wall && !state.dataConstruction->Construct(surfTemp.Construction).TypeIsCfactorWall) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}=\"{}\", invalid {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, s_ipsc->cAlphaFieldNames(ArgPointer))); ShowContinueError(state, - EnergyPlus::format("Construction=\"{}\" is not type Construction:CfactorUndergroundWall.", - state.dataConstruction->Construct(surfTemp.Construction).Name)); + std::format("Construction=\"{}\" is not type Construction:CfactorUndergroundWall.", + state.dataConstruction->Construct(surfTemp.Construction).Name)); ErrorsFound = true; } if (surfTemp.Class == SurfaceClass::Floor && !state.dataConstruction->Construct(surfTemp.Construction).TypeIsFfactorFloor) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}=\"{}\", invalid {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, s_ipsc->cAlphaFieldNames(ArgPointer))); ShowContinueError(state, - EnergyPlus::format("Construction=\"{}\" is not type Construction:FfactorGroundFloor.", - state.dataConstruction->Construct(surfTemp.Construction).Name)); + std::format("Construction=\"{}\" is not type Construction:FfactorGroundFloor.", + state.dataConstruction->Construct(surfTemp.Construction).Name)); ErrorsFound = true; } } @@ -4081,11 +4058,11 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(surfTemp.ExtBoundCondName, state.dataSurface->OSC, state.dataSurface->TotOSC); if (Found == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer + 1), - s_ipsc->cAlphaArgs(ArgPointer + 1))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer + 1), + s_ipsc->cAlphaArgs(ArgPointer + 1))); ShowContinueError(state, " no OtherSideCoefficients of that name."); ErrorsFound = true; } else { @@ -4106,11 +4083,11 @@ namespace SurfaceGeometry { if (s_ipsc->lAlphaFieldBlanks(ArgPointer + 1)) { surfTemp.ExtBoundCondName = surfTemp.Name; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer + 1))); - ShowContinueError(state, EnergyPlus::format("..{}=\"Surface\" must be non-blank.", s_ipsc->cAlphaFieldNames(ArgPointer))); + std::format("{}=\"{}\", invalid {}=.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer + 1))); + ShowContinueError(state, std::format("..{}=\"Surface\" must be non-blank.", s_ipsc->cAlphaFieldNames(ArgPointer))); ShowContinueError(state, "..This surface will become an adiabatic surface - no doors/windows allowed."); } @@ -4124,11 +4101,11 @@ namespace SurfaceGeometry { if (Found == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); ShowContinueError(state, "..Referenced as Zone for this surface."); ErrorsFound = true; } @@ -4144,11 +4121,11 @@ namespace SurfaceGeometry { if (Found == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - state.dataSurfaceGeometry->SurfaceTmp(SurfNum).Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + state.dataSurfaceGeometry->SurfaceTmp(SurfNum).Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); ShowContinueError(state, "..Referenced as Space for this surface."); ErrorsFound = true; } @@ -4158,10 +4135,9 @@ namespace SurfaceGeometry { if (!state.dataWeather->WeatherFileExists) { ShowSevereError( state, - EnergyPlus::format( - "{}=\"{}\", using \"Foundation\" type Outside Boundary Condition requires specification of a weather file", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + std::format("{}=\"{}\", using \"Foundation\" type Outside Boundary Condition requires specification of a weather file", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); ShowContinueError(state, "Either place in.epw in the working directory or specify a weather file on the command line using -w " "/path/to/weather.epw"); @@ -4183,20 +4159,19 @@ namespace SurfaceGeometry { surfTemp.OSCPtr = Found; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer + 1), - s_ipsc->cAlphaArgs(ArgPointer + 1))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer + 1), + s_ipsc->cAlphaArgs(ArgPointer + 1))); ErrorsFound = true; } } if (state.dataConstruction->Construct(surfTemp.Construction).SourceSinkPresent) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", construction may not have an internal source/sink", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + ShowSevereError( + state, + std::format("{}=\"{}\", construction may not have an internal source/sink", s_ipsc->cCurrentModuleObject, surfTemp.Name)); ErrorsFound = true; } surfTemp.ExtBoundCond = DataSurfaces::KivaFoundation; @@ -4204,11 +4179,11 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(surfTemp.ExtBoundCondName, state.dataSurface->OSCM, state.dataSurface->TotOSCM); if (Found == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer + 1), - s_ipsc->cAlphaArgs(ArgPointer + 1))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer + 1), + s_ipsc->cAlphaArgs(ArgPointer + 1))); ErrorsFound = true; } surfTemp.OSCMPtr = Found; @@ -4222,21 +4197,21 @@ namespace SurfaceGeometry { Util::SameString(s_ipsc->cAlphaArgs(ArgPointer), "GroundBasementPreprocessorUpperWall") || Util::SameString(s_ipsc->cAlphaArgs(ArgPointer), "GroundBasementPreprocessorLowerWall")) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); ShowContinueError(state, "The ExpandObjects program has not been run or is not in your EnergyPlus.exe folder."); ErrorsFound = true; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); ShowContinueError(state, "Should be one of \"Outdoors\", \"Adiabatic\", Ground\", \"Surface\", \"OtherSideCoefficients\", " "\"OtherSideConditionsModel\" or \"Zone\""); @@ -4249,11 +4224,11 @@ namespace SurfaceGeometry { if ((surfTemp.ExtBoundCond != DataSurfaces::ExternalEnvironment) && (surfTemp.ExtBoundCond != DataSurfaces::OtherSideCondModeledExt)) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + std::format("{}=\"{}\", {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); ShowContinueError(state, "..This surface is not exposed to External Environment. Sun exposure has no effect."); } else { surfTemp.ExtSolar = true; @@ -4262,11 +4237,11 @@ namespace SurfaceGeometry { surfTemp.ExtSolar = false; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); ErrorsFound = true; } @@ -4278,11 +4253,11 @@ namespace SurfaceGeometry { surfTemp.ExtWind = false; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(ArgPointer), - s_ipsc->cAlphaArgs(ArgPointer))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(ArgPointer), + s_ipsc->cAlphaArgs(ArgPointer))); ErrorsFound = true; } @@ -4301,7 +4276,7 @@ namespace SurfaceGeometry { if (mod(SurfaceNumProp - 2, 3) != 0) { ShowWarningError( state, - EnergyPlus::format( + std::format( "{}=\"{}\", {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, @@ -4309,11 +4284,11 @@ namespace SurfaceGeometry { } if (numSides < 3) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(2), - surfTemp.Sides)); + std::format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cNumericFieldNames(2), + surfTemp.Sides)); ErrorsFound = true; continue; } @@ -4322,15 +4297,14 @@ namespace SurfaceGeometry { surfTemp.Sides = s_ipsc->rNumericArgs(2); if (numSides > surfTemp.Sides) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", field {}={}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(2), - fmt::to_string(surfTemp.Sides))); - ShowContinueError(state, - EnergyPlus::format("...but {} were entered. Only the indicated {} will be used.", - numSides, - s_ipsc->cNumericFieldNames(2))); + std::format("{}=\"{}\", field {}={}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cNumericFieldNames(2), + fmt::to_string(surfTemp.Sides))); + ShowContinueError( + state, + std::format("...but {} were entered. Only the indicated {} will be used.", numSides, s_ipsc->cNumericFieldNames(2))); } } surfTemp.Vertex.allocate(surfTemp.Sides); @@ -4339,8 +4313,8 @@ namespace SurfaceGeometry { if (surfTemp.Area <= 0.0) { ShowSevereError( state, - EnergyPlus::format( - "{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); + std::format( + "{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2f}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); ErrorsFound = true; } @@ -4348,11 +4322,11 @@ namespace SurfaceGeometry { if (Util::SameString(s_ipsc->cAlphaArgs(5), "Surface")) { if (surfTemp.Sides != static_cast(surfTemp.Vertex.size())) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", After CheckConvexity, mismatch between Sides ({}) and size of Vertex ({}).", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - surfTemp.Sides, - surfTemp.Vertex.size())); + std::format("{}=\"{}\", After CheckConvexity, mismatch between Sides ({}) and size of Vertex ({}).", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + surfTemp.Sides, + surfTemp.Vertex.size())); ShowContinueError(state, "CheckConvexity is used to verify the convexity of a surface and detect collinear points."); ErrorsFound = true; } @@ -4364,8 +4338,8 @@ namespace SurfaceGeometry { if (std::abs(surfTemp.Height - state.dataConstruction->Construct(surfTemp.Construction).Height) > 0.05) { ShowWarningError( state, - EnergyPlus::format( - "{}=\"{}\", underground Wall Height = {:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Height)); + std::format( + "{}=\"{}\", underground Wall Height = {:.2f}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Height)); ShowContinueError(state, "..which does not match its construction height."); } } @@ -4375,16 +4349,16 @@ namespace SurfaceGeometry { if (std::abs(surfTemp.Area - state.dataConstruction->Construct(surfTemp.Construction).Area) > 0.1) { ShowWarningError( state, - EnergyPlus::format( - "{}=\"{}\", underground Floor Area = {:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); + std::format( + "{}=\"{}\", underground Floor Area = {:.2f}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); ShowContinueError(state, "..which does not match its construction area."); } if (surfTemp.Perimeter < state.dataConstruction->Construct(surfTemp.Construction).PerimeterExposed - 0.1) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", underground Floor Perimeter = {:.2T}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - surfTemp.Perimeter)); + std::format("{}=\"{}\", underground Floor Perimeter = {:.2f}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + surfTemp.Perimeter)); ShowContinueError(state, "..which is less than its construction exposed perimeter."); } } @@ -4402,25 +4376,25 @@ namespace SurfaceGeometry { // If we cannot find the referenced surface if (ExtSurfNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" references an outside boundary surface that cannot be found:{}", - s_ipsc->cCurrentModuleObject, - state.dataSurfaceGeometry->SurfaceTmp(i).Name, - state.dataSurfaceGeometry->SurfaceTmp(i).ExtBoundCondName)); + std::format("{}=\"{}\" references an outside boundary surface that cannot be found:{}", + s_ipsc->cCurrentModuleObject, + state.dataSurfaceGeometry->SurfaceTmp(i).Name, + state.dataSurfaceGeometry->SurfaceTmp(i).ExtBoundCondName)); ErrorsFound = true; // If vertex size mismatch } else if (state.dataSurfaceGeometry->SurfaceTmp(i).Vertex.size() != state.dataSurfaceGeometry->SurfaceTmp(ExtSurfNum).Vertex.size()) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", Vertex size mismatch between base surface :{} and outside boundary surface: {}", - s_ipsc->cCurrentModuleObject, - state.dataSurfaceGeometry->SurfaceTmp(i).Name, - state.dataSurfaceGeometry->SurfaceTmp(i).Name, - state.dataSurfaceGeometry->SurfaceTmp(ExtSurfNum).Name)); + std::format("{}=\"{}\", Vertex size mismatch between base surface :{} and outside boundary surface: {}", + s_ipsc->cCurrentModuleObject, + state.dataSurfaceGeometry->SurfaceTmp(i).Name, + state.dataSurfaceGeometry->SurfaceTmp(i).Name, + state.dataSurfaceGeometry->SurfaceTmp(ExtSurfNum).Name)); ShowContinueError( state, - EnergyPlus::format("The vertex sizes are {} for base surface and {} for outside boundary surface. Please check inputs.", - state.dataSurfaceGeometry->SurfaceTmp(i).Vertex.size(), - state.dataSurfaceGeometry->SurfaceTmp(ExtSurfNum).Vertex.size())); + std::format("The vertex sizes are {} for base surface and {} for outside boundary surface. Please check inputs.", + state.dataSurfaceGeometry->SurfaceTmp(i).Vertex.size(), + state.dataSurfaceGeometry->SurfaceTmp(ExtSurfNum).Vertex.size())); ErrorsFound = true; } } @@ -4569,7 +4543,7 @@ namespace SurfaceGeometry { if (NumNumbers < 7) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}=\"{}\", Too few number of numeric args=[{}].", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1), NumNumbers)); ErrorsFound = true; } @@ -4586,20 +4560,20 @@ namespace SurfaceGeometry { if (surfTemp.Construction == 0) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); } else if (state.dataConstruction->Construct(surfTemp.Construction).TypeIsWindow) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(2))); - ShowContinueError(state, EnergyPlus::format("...because {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(2))); + ShowContinueError(state, std::format("...because {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); } else { state.dataConstruction->Construct(surfTemp.Construction).IsUsed = true; surfTemp.ConstructionStoredInputValue = surfTemp.Construction; @@ -4615,11 +4589,11 @@ namespace SurfaceGeometry { surfTemp.Zone = ZoneNum; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); surfTemp.Class = SurfaceClass::Invalid; surfTemp.ZoneName = "Unknown Zone"; ErrorsFound = true; @@ -4632,11 +4606,11 @@ namespace SurfaceGeometry { surfTemp.spaceNum = spaceNum; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); surfTemp.Class = SurfaceClass::Invalid; ErrorsFound = true; } @@ -4651,9 +4625,9 @@ namespace SurfaceGeometry { ErrorsFound = true; ShowSevereError( state, - EnergyPlus::format("{}=\"{}\", Construction type is \"Construction:CfactorUndergroundWall\" but invalid for this object.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + std::format("{}=\"{}\", Construction type is \"Construction:CfactorUndergroundWall\" but invalid for this object.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); } if (surfTemp.Class == SurfaceClass::Floor && state.dataConstruction->Construct(surfTemp.Construction).TypeIsFfactorFloor && @@ -4663,9 +4637,9 @@ namespace SurfaceGeometry { ErrorsFound = true; ShowSevereError( state, - EnergyPlus::format("{}=\"{}\", Construction type is \"Construction:FfactorGroundFloor\" but invalid for this object.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + std::format("{}=\"{}\", Construction type is \"Construction:FfactorGroundFloor\" but invalid for this object.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); } } surfTemp.ExtSolar = false; @@ -4699,7 +4673,7 @@ namespace SurfaceGeometry { if (!state.dataEnvrn->GroundTempInputs[(int)DataEnvironment::GroundTempType::BuildingSurface]) { ShowWarningError(state, "GetRectSurfaces: Surfaces with interface to Ground found but no \"Ground Temperatures\" were input."); - ShowContinueError(state, EnergyPlus::format("Found first in surface={}", s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Found first in surface={}", s_ipsc->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("Defaults, constant throughout the year of ({:.1R}) will be used.", state.dataEnvrn->GroundTemp[(int)DataEnvironment::GroundTempType::BuildingSurface])); @@ -4713,7 +4687,7 @@ namespace SurfaceGeometry { ShowSevereError(state, "GetRectSurfaces: Surfaces with interface to GroundFCfactorMethod found but no \"FC Ground " "Temperatures\" were input."); - ShowContinueError(state, EnergyPlus::format("Found first in surface={}", s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Found first in surface={}", s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "Either add a \"Site:GroundTemperature:FCfactorMethod\" object or use a weather file with " "Ground Temperatures."); @@ -4751,8 +4725,8 @@ namespace SurfaceGeometry { if (surfTemp.Area <= 0.0) { ShowSevereError( state, - EnergyPlus::format( - "{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); + std::format( + "{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2f}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); ErrorsFound = true; } @@ -4761,8 +4735,7 @@ namespace SurfaceGeometry { if (std::abs(surfTemp.Height - state.dataConstruction->Construct(surfTemp.Construction).Height) > 0.05) { ShowWarningError( state, - EnergyPlus::format( - "{}=\"{}\", underground Wall Height = {:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Height)); + std::format("{}=\"{}\", underground Wall Height = {:.2f}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Height)); ShowContinueError(state, "..which deos not match its construction height."); } } @@ -4772,15 +4745,14 @@ namespace SurfaceGeometry { if (std::abs(surfTemp.Area - state.dataConstruction->Construct(surfTemp.Construction).Area) > 0.1) { ShowWarningError( state, - EnergyPlus::format( - "{}=\"{}\", underground Floor Area = {:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); + std::format("{}=\"{}\", underground Floor Area = {:.2f}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); ShowContinueError(state, "..which does not match its construction area."); } if (surfTemp.Perimeter < state.dataConstruction->Construct(surfTemp.Construction).PerimeterExposed - 0.1) { ShowWarningError( state, - EnergyPlus::format( - "{}=\"{}\", underground Floor Perimeter = {:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Perimeter)); + std::format( + "{}=\"{}\", underground Floor Perimeter = {:.2f}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Perimeter)); ShowContinueError(state, "..which is less than its construction exposed perimeter."); } } @@ -5037,17 +5009,17 @@ namespace SurfaceGeometry { if (SurfaceNumAlpha != 6) { ShowSevereError(state, - EnergyPlus::format("{}: Object Definition indicates not = 6 Alpha Objects, Number Indicated={}", - s_ipsc->cCurrentModuleObject, - SurfaceNumAlpha)); + std::format("{}: Object Definition indicates not = 6 Alpha Objects, Number Indicated={}", + s_ipsc->cCurrentModuleObject, + SurfaceNumAlpha)); ErrorsFound = true; } if (SurfaceNumProp != 15) { ShowSevereError(state, - EnergyPlus::format("{}: Object Definition indicates > 15 Numeric Objects, Number Indicated={}", - s_ipsc->cCurrentModuleObject, - SurfaceNumAlpha)); + std::format("{}: Object Definition indicates > 15 Numeric Objects, Number Indicated={}", + s_ipsc->cCurrentModuleObject, + SurfaceNumAlpha)); ErrorsFound = true; } NeedToAddSurfaces = 0; @@ -5080,9 +5052,9 @@ namespace SurfaceGeometry { auto &surfTemp = state.dataSurfaceGeometry->SurfaceTmp(SurfNum); if (SurfaceNumProp < 12) { - ShowSevereError(state, - EnergyPlus::format( - "{}=\"{}\", Too few number of numeric args=[{}].", s_ipsc->cCurrentModuleObject, surfTemp.Name, SurfaceNumProp)); + ShowSevereError( + state, + std::format("{}=\"{}\", Too few number of numeric args=[{}].", s_ipsc->cCurrentModuleObject, surfTemp.Name, SurfaceNumProp)); ErrorsFound = true; } @@ -5090,11 +5062,11 @@ namespace SurfaceGeometry { ValidChk = Util::FindItemInList(s_ipsc->cAlphaArgs(2), SubSurfCls, 6); if (ValidChk == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } else { surfTemp.Class = SubSurfIDs(ValidChk); // Set class number @@ -5104,11 +5076,11 @@ namespace SurfaceGeometry { if (surfTemp.Construction == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); ErrorsFound = true; continue; } @@ -5123,16 +5095,16 @@ namespace SurfaceGeometry { if (!construction.TypeIsWindow && !construction.TypeIsAirBoundary) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" has an opaque surface construction; it should have a window construction.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + std::format("{}=\"{}\" has an opaque surface construction; it should have a window construction.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); } if (state.dataConstruction->Construct(surfTemp.Construction).SourceSinkPresent) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\": Windows are not allowed to have embedded sources/sinks", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + std::format("{}=\"{}\": Windows are not allowed to have embedded sources/sinks", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); } } @@ -5140,12 +5112,12 @@ namespace SurfaceGeometry { if (state.dataConstruction->Construct(surfTemp.Construction).TypeIsWindow) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); - ShowContinueError(state, EnergyPlus::format("...because {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); + ShowContinueError(state, std::format("...because {}={}", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); } } @@ -5169,11 +5141,11 @@ namespace SurfaceGeometry { state.dataSurfaceGeometry->SurfaceTmp(Found).ExtBoundCondName == state.dataSurfaceGeometry->SurfaceTmp(Found).Name) { // Adiabatic surface, no windows or doors allowed ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, "... adiabatic surfaces cannot have windows or doors."); ShowContinueError(state, "... no solar transmission will result for these windows or doors. You must have interior windows or doors on " @@ -5181,11 +5153,11 @@ namespace SurfaceGeometry { } } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); surfTemp.ZoneName = "Unknown Zone"; ErrorsFound = true; } @@ -5196,11 +5168,10 @@ namespace SurfaceGeometry { if (surfTemp.ExtBoundCond == DataSurfaces::ExternalEnvironment) { if (!s_ipsc->lAlphaFieldBlanks(5)) { ShowWarningError( - state, - EnergyPlus::format("{}=\"{}\", invalid field {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, s_ipsc->cAlphaFieldNames(5))); + state, std::format("{}=\"{}\", invalid field {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, s_ipsc->cAlphaFieldNames(5))); ShowContinueError( state, - EnergyPlus::format( + std::format( "...when Base surface uses \"Outdoors\" as {}, subsurfaces need to be blank to inherit the outdoor characteristics.", s_ipsc->cAlphaFieldNames(5))); ShowContinueError(state, "...Surface external characteristics changed to reflect base surface."); @@ -5212,11 +5183,10 @@ namespace SurfaceGeometry { surfTemp.ExtBoundCondName = s_ipsc->cAlphaArgs(5); } else { ShowSevereError( - state, - EnergyPlus::format("{}=\"{}\", invalid blank {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, s_ipsc->cAlphaFieldNames(5))); + state, std::format("{}=\"{}\", invalid blank {}", s_ipsc->cCurrentModuleObject, surfTemp.Name, s_ipsc->cAlphaFieldNames(5))); ShowContinueError( state, - EnergyPlus::format( + std::format( "...when Base surface uses \"Surface\" as {}, subsurfaces must also specify specific surfaces in the adjacent zone.", s_ipsc->cAlphaFieldNames(5))); surfTemp.ExtBoundCondName = s_ipsc->cAlphaArgs(5); // putting it as blank will not confuse things later. @@ -5235,11 +5205,11 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(s_ipsc->cAlphaArgs(5), state.dataSurface->OSC, state.dataSurface->TotOSC); if (Found == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); ShowContinueError(state, "...base surface requires that this subsurface have OtherSideCoefficients -- not found."); ErrorsFound = true; } else { // found @@ -5274,19 +5244,18 @@ namespace SurfaceGeometry { if (mod(SurfaceNumProp - 3, 3) != 0) { ShowWarningError( state, - EnergyPlus::format( - "{}=\"{}\", {}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - EnergyPlus::format("{} not even multiple of 3. Will read in {}", s_ipsc->cNumericFieldNames(3), surfTemp.Sides))); + std::format("{}=\"{}\", {}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + EnergyPlus::format("{} not even multiple of 3. Will read in {}", s_ipsc->cNumericFieldNames(3), surfTemp.Sides))); } if (s_ipsc->rNumericArgs(3) < 3) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(3), - surfTemp.Sides)); + std::format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cNumericFieldNames(3), + surfTemp.Sides)); ErrorsFound = true; continue; } @@ -5295,14 +5264,13 @@ namespace SurfaceGeometry { surfTemp.Sides = s_ipsc->rNumericArgs(3); if (numSides > surfTemp.Sides) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", field {}={}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(3), - fmt::to_string(surfTemp.Sides))); + std::format("{}=\"{}\", field {}={}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cNumericFieldNames(3), + fmt::to_string(surfTemp.Sides))); ShowContinueError( - state, - EnergyPlus::format("...but {} were entered. Only the indicated {} will be used.", numSides, s_ipsc->cNumericFieldNames(3))); + state, std::format("...but {} were entered. Only the indicated {} will be used.", numSides, s_ipsc->cNumericFieldNames(3))); } } surfTemp.Vertex.allocate(surfTemp.Sides); @@ -5314,13 +5282,13 @@ namespace SurfaceGeometry { if ((surfTemp.Class != SurfaceClass::Window && surfTemp.Class != SurfaceClass::GlassDoor && surfTemp.Class != SurfaceClass::Door) && s_ipsc->rNumericArgs(2) > 1.0) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=[{:.1T}].", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(2), - s_ipsc->rNumericArgs(2))); - ShowContinueError( - state, EnergyPlus::format("...because {}={} multiplier will be set to 1.0.", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=[{:.1f}].", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cNumericFieldNames(2), + s_ipsc->rNumericArgs(2))); + ShowContinueError(state, + std::format("...because {}={} multiplier will be set to 1.0.", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); surfTemp.Multiplier = 1.0; } @@ -5339,26 +5307,25 @@ namespace SurfaceGeometry { surfTemp.Class == SurfaceClass::TDD_Dome) { if (surfTemp.ExtBoundCond == DataSurfaces::OtherSideCoefNoCalcExt || surfTemp.ExtBoundCond == DataSurfaces::OtherSideCoefCalcExt) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", Other side coefficients are not allowed with windows.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + ShowSevereError( + state, + std::format("{}=\"{}\", Other side coefficients are not allowed with windows.", s_ipsc->cCurrentModuleObject, surfTemp.Name)); ErrorsFound = true; } if (surfTemp.ExtBoundCond == DataSurfaces::Ground) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", Exterior boundary condition = Ground is not allowed with windows.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + std::format("{}=\"{}\", Exterior boundary condition = Ground is not allowed with windows.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); ErrorsFound = true; } if (surfTemp.ExtBoundCond == DataSurfaces::KivaFoundation) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", Exterior boundary condition = Foundation is not allowed with windows.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + std::format("{}=\"{}\", Exterior boundary condition = Foundation is not allowed with windows.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); ErrorsFound = true; } @@ -5369,11 +5336,11 @@ namespace SurfaceGeometry { if (surfTemp.Sides == 3) { // Triangular window if (!s_ipsc->cAlphaArgs(6).empty()) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(6), - s_ipsc->cAlphaArgs(6))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(6), + s_ipsc->cAlphaArgs(6))); ShowContinueError(state, ".. because it is a triangular window and cannot have a frame or divider or reveal reflection."); ShowContinueError(state, "Frame, divider and reveal reflection will be ignored for this window."); } @@ -5494,7 +5461,7 @@ namespace SurfaceGeometry { if (NumNumbers < 5) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}=\"{}\", Too few number of numeric args=[{}].", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1), NumNumbers)); ErrorsFound = true; } @@ -5511,11 +5478,11 @@ namespace SurfaceGeometry { if (surfTemp.Construction == 0) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); } else { state.dataConstruction->Construct(surfTemp.Construction).IsUsed = true; surfTemp.ConstructionStoredInputValue = surfTemp.Construction; @@ -5529,16 +5496,16 @@ namespace SurfaceGeometry { if (!construction.TypeIsWindow && !construction.TypeIsAirBoundary) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" has an opaque surface construction; it should have a window construction.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + std::format("{}=\"{}\" has an opaque surface construction; it should have a window construction.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); } if (state.dataConstruction->Construct(surfTemp.Construction).SourceSinkPresent) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\": Windows are not allowed to have embedded sources/sinks", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + std::format("{}=\"{}\": Windows are not allowed to have embedded sources/sinks", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); } } @@ -5546,11 +5513,11 @@ namespace SurfaceGeometry { if (state.dataConstruction->Construct(surfTemp.Construction).TypeIsWindow) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); } } @@ -5577,11 +5544,11 @@ namespace SurfaceGeometry { surfTemp.ViewFactorSky = state.dataSurfaceGeometry->SurfaceTmp(Found).ViewFactorSky; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); surfTemp.ZoneName = "Unknown Zone"; ErrorsFound = true; continue; @@ -5590,11 +5557,11 @@ namespace SurfaceGeometry { state.dataSurfaceGeometry->SurfaceTmp(Found).ExtBoundCondName == state.dataSurfaceGeometry->SurfaceTmp(Found).Name) { // Adiabatic surface, no windows or doors allowed ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); ShowContinueError(state, "... adiabatic surfaces cannot have windows or doors."); ShowContinueError(state, "... no solar transmission will result for these windows or doors. You must have interior windows or doors on " @@ -5603,14 +5570,13 @@ namespace SurfaceGeometry { if (surfTemp.ExtBoundCond == unreconciledZoneSurface) { // "Surface" Base Surface if (!GettingIZSurfaces) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid use of object", s_ipsc->cCurrentModuleObject, surfTemp.Name)); + ShowSevereError(state, std::format("{}=\"{}\", invalid use of object", s_ipsc->cCurrentModuleObject, surfTemp.Name)); ShowContinueError( state, - EnergyPlus::format( + std::format( "...when Base surface uses \"Surface\" as {}, subsurfaces must also specify specific surfaces in the adjacent zone.", s_ipsc->cAlphaFieldNames(5))); - ShowContinueError(state, - EnergyPlus::format("...Please use {}:Interzone to enter this surface.", s_ipsc->cCurrentModuleObject)); + ShowContinueError(state, std::format("...Please use {}:Interzone to enter this surface.", s_ipsc->cCurrentModuleObject)); surfTemp.ExtBoundCondName = BlankString; // putting it as blank will not confuse things later. ErrorsFound = true; } @@ -5634,10 +5600,10 @@ namespace SurfaceGeometry { ++NeedToAddSubSurfaces; } else { // Interior Window ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid Interzone Surface, specify {}:InterZone", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cCurrentModuleObject)); + std::format("{}=\"{}\", invalid Interzone Surface, specify {}:InterZone", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cCurrentModuleObject)); ShowContinueError(state, "...when base surface is an interzone surface, subsurface must also be an interzone surface."); ++NeedToAddSubSurfaces; ErrorsFound = true; @@ -5654,9 +5620,9 @@ namespace SurfaceGeometry { surfTemp.ExtBoundCond = unenteredAdjacentZoneSurface; } else { // not correct boundary condition for interzone subsurface ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid Base Surface type for Interzone Surface", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + std::format("{}=\"{}\", invalid Base Surface type for Interzone Surface", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); ShowContinueError(state, "...when base surface is not an interzone surface, subsurface must also not be an interzone surface."); ErrorsFound = true; @@ -5676,14 +5642,13 @@ namespace SurfaceGeometry { surfTemp.Multiplier = int(s_ipsc->rNumericArgs(1)); } else if (s_ipsc->rNumericArgs(1) > 1.0) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=[{:.1T}].", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(1), - s_ipsc->rNumericArgs(1))); + std::format("{}=\"{}\", invalid {}=[{:.1f}].", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cNumericFieldNames(1), + s_ipsc->rNumericArgs(1))); ShowContinueError( - state, - EnergyPlus::format("...because {}={} multiplier will be set to 1.0.", s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); + state, std::format("...because {}={} multiplier will be set to 1.0.", s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); surfTemp.Multiplier = 1.0; } @@ -5698,8 +5663,8 @@ namespace SurfaceGeometry { if (surfTemp.Area <= 0.0) { ShowSevereError( state, - EnergyPlus::format( - "{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2T}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); + std::format( + "{}=\"{}\", Surface Area <= 0.0; Entered Area={:.2f}", s_ipsc->cCurrentModuleObject, surfTemp.Name, surfTemp.Area)); ErrorsFound = true; } @@ -5718,17 +5683,17 @@ namespace SurfaceGeometry { if (surfTemp.ExtBoundCond == DataSurfaces::OtherSideCoefNoCalcExt || surfTemp.ExtBoundCond == DataSurfaces::OtherSideCoefCalcExt) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", Other side coefficients are not allowed with windows.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + std::format("{}=\"{}\", Other side coefficients are not allowed with windows.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); ErrorsFound = true; } if (surfTemp.ExtBoundCond == DataSurfaces::Ground) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", Exterior boundary condition = Ground is not allowed with windows.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name)); + std::format("{}=\"{}\", Exterior boundary condition = Ground is not allowed with windows.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name)); ErrorsFound = true; } @@ -5811,8 +5776,8 @@ namespace SurfaceGeometry { state, "WindowShadingControl: Interior shade or blind: Potential problem in match of unshaded/shaded constructions, " "shaded should have 1 more layers than unshaded."); - ShowContinueError(state, EnergyPlus::format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); - ShowContinueError(state, EnergyPlus::format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); + ShowContinueError(state, std::format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); + ShowContinueError(state, std::format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); ShowContinueError(state, "If preceding two constructions are same name, you have likely specified a WindowShadingControl (Field #3) " "with the Window Construction rather than a shaded construction."); @@ -5823,12 +5788,10 @@ namespace SurfaceGeometry { ErrorsFound = true; ShowSevereError( state, - EnergyPlus::format(" The glass and gas layers in the shaded and unshaded constructions do not match for window={}", - surfTemp.Name)); - ShowContinueError(state, - EnergyPlus::format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); - ShowContinueError(state, - EnergyPlus::format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); + std::format(" The glass and gas layers in the shaded and unshaded constructions do not match for window={}", + surfTemp.Name)); + ShowContinueError(state, std::format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); + ShowContinueError(state, std::format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); break; } } @@ -5841,8 +5804,8 @@ namespace SurfaceGeometry { ShowWarningError(state, "WindowShadingControl: Exterior shade, screen or blind: Potential problem in match of unshaded/shaded " "constructions, shaded should have 1 more layer than unshaded."); - ShowContinueError(state, EnergyPlus::format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); - ShowContinueError(state, EnergyPlus::format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); + ShowContinueError(state, std::format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); + ShowContinueError(state, std::format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); ShowContinueError( state, "If preceding two constructions have the same name, you have likely specified a WindowShadingControl (Field " @@ -5854,12 +5817,10 @@ namespace SurfaceGeometry { ErrorsFound = true; ShowSevereError( state, - EnergyPlus::format(" The glass and gas layers in the shaded and unshaded constructions do not match for window={}", - surfTemp.Name)); - ShowContinueError(state, - EnergyPlus::format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); - ShowContinueError(state, - EnergyPlus::format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); + std::format(" The glass and gas layers in the shaded and unshaded constructions do not match for window={}", + surfTemp.Name)); + ShowContinueError(state, std::format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); + ShowContinueError(state, std::format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); break; } } @@ -5869,7 +5830,7 @@ namespace SurfaceGeometry { // Divider not allowed with between-glass shade or blind if (surfTemp.FrameDivider > 0) { if (state.dataSurface->FrameDivider(surfTemp.FrameDivider).DividerWidth > 0.0) { - ShowWarningError(state, EnergyPlus::format("A divider cannot be specified for window {}", surfTemp.Name)); + ShowWarningError(state, std::format("A divider cannot be specified for window {}", surfTemp.Name)); ShowContinueError(state, ", which has a between-glass shade or blind."); ShowContinueError(state, "Calculation will proceed without the divider for this window."); state.dataSurface->FrameDivider(surfTemp.FrameDivider).DividerWidth = 0.0; @@ -5884,39 +5845,38 @@ namespace SurfaceGeometry { state, "WindowShadingControl: Between Glass Shade/Blind: Potential problem in match of unshaded/shaded constructions, " "shaded should have 2 more layers than unshaded."); - ShowContinueError(state, EnergyPlus::format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); - ShowContinueError(state, EnergyPlus::format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); + ShowContinueError(state, std::format("Unshaded construction={}", state.dataConstruction->Construct(ConstrNum).Name)); + ShowContinueError(state, std::format("Shaded construction={}", state.dataConstruction->Construct(ConstrNumSh).Name)); ShowContinueError(state, "If preceding two constructions are same name, you have likely specified a WindowShadingControl (Field #3) " "with the Window Construction rather than a shaded construction."); } if (state.dataConstruction->Construct(ConstrNum).LayerPoint(TotLayers) != state.dataConstruction->Construct(ConstrNumSh).LayerPoint(TotShLayers)) { - ShowSevereError( - state, EnergyPlus::format("{}: Mismatch in unshaded/shaded inside layer materials. These should match.", cRoutineName)); - ShowContinueError( - state, - EnergyPlus::format("Unshaded construction={}, Material={}", - state.dataConstruction->Construct(ConstrNum).Name, - s_mat->materials(state.dataConstruction->Construct(ConstrNum).LayerPoint(TotLayers))->Name)); + ShowSevereError(state, + std::format("{}: Mismatch in unshaded/shaded inside layer materials. These should match.", cRoutineName)); + ShowContinueError(state, + std::format("Unshaded construction={}, Material={}", + state.dataConstruction->Construct(ConstrNum).Name, + s_mat->materials(state.dataConstruction->Construct(ConstrNum).LayerPoint(TotLayers))->Name)); ShowContinueError( state, - EnergyPlus::format("Shaded construction={}, Material={}", - state.dataConstruction->Construct(ConstrNumSh).Name, - s_mat->materials(state.dataConstruction->Construct(ConstrNumSh).LayerPoint(TotShLayers))->Name)); + std::format("Shaded construction={}, Material={}", + state.dataConstruction->Construct(ConstrNumSh).Name, + s_mat->materials(state.dataConstruction->Construct(ConstrNumSh).LayerPoint(TotShLayers))->Name)); ErrorsFound = true; } if (state.dataConstruction->Construct(ConstrNum).LayerPoint(1) != state.dataConstruction->Construct(ConstrNumSh).LayerPoint(1)) { - ShowSevereError( - state, EnergyPlus::format("{}: Mismatch in unshaded/shaded inside layer materials. These should match.", cRoutineName)); + ShowSevereError(state, + std::format("{}: Mismatch in unshaded/shaded inside layer materials. These should match.", cRoutineName)); ShowContinueError(state, - EnergyPlus::format("Unshaded construction={}, Material={}", - state.dataConstruction->Construct(ConstrNum).Name, - s_mat->materials(state.dataConstruction->Construct(ConstrNum).LayerPoint(1))->Name)); + std::format("Unshaded construction={}, Material={}", + state.dataConstruction->Construct(ConstrNum).Name, + s_mat->materials(state.dataConstruction->Construct(ConstrNum).LayerPoint(1))->Name)); ShowContinueError(state, - EnergyPlus::format("Shaded construction={}, Material={}", - state.dataConstruction->Construct(ConstrNumSh).Name, - s_mat->materials(state.dataConstruction->Construct(ConstrNumSh).LayerPoint(1))->Name)); + std::format("Shaded construction={}, Material={}", + state.dataConstruction->Construct(ConstrNumSh).Name, + s_mat->materials(state.dataConstruction->Construct(ConstrNumSh).LayerPoint(1))->Name)); ErrorsFound = true; } if (TotGlassLayers == 2 || TotGlassLayers == 3) { @@ -5929,9 +5889,9 @@ namespace SurfaceGeometry { (s_mat->materials(MatGap1)->Thickness + s_mat->materials(MatGap2)->Thickness)); if (MatGapCalc > 0.001) { ShowSevereError(state, - EnergyPlus::format("{}: The gap width(s) for the unshaded window construction {}", - cRoutineName, - state.dataConstruction->Construct(ConstrNum).Name)); + std::format("{}: The gap width(s) for the unshaded window construction {}", + cRoutineName, + state.dataConstruction->Construct(ConstrNum).Name)); ShowContinueError(state, "are inconsistent with the gap widths for shaded window construction " + state.dataConstruction->Construct(ConstrNumSh).Name); @@ -5957,9 +5917,9 @@ namespace SurfaceGeometry { (s_mat->materials(MatGap1)->Thickness + s_mat->materials(MatGap2)->Thickness + s_mat->materials(MatSh)->Thickness)); if (MatGapCalc > 0.001) { ShowSevereError(state, - EnergyPlus::format("{}: The gap width(s) for the unshaded window construction {}", - cRoutineName, - state.dataConstruction->Construct(ConstrNum).Name)); + std::format("{}: The gap width(s) for the unshaded window construction {}", + cRoutineName, + state.dataConstruction->Construct(ConstrNum).Name)); ShowContinueError(state, "are inconsistent with the gap widths for shaded window construction " + state.dataConstruction->Construct(ConstrNumSh).Name); @@ -6003,14 +5963,14 @@ namespace SurfaceGeometry { // Warning if FrameAndDivider for this window is over-ridden by one from Window5 Data File if (surfTemp.FrameDivider > 0 && !s_ipsc->lAlphaFieldBlanks(FrameField)) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(FrameField), - s_ipsc->cAlphaArgs(FrameField))); + std::format("{}=\"{}\", {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(FrameField), + s_ipsc->cAlphaArgs(FrameField))); ShowContinueError(state, - EnergyPlus::format("will be replaced with FrameAndDivider from Window5 Data File entry {}", - state.dataConstruction->Construct(surfTemp.Construction).Name)); + std::format("will be replaced with FrameAndDivider from Window5 Data File entry {}", + state.dataConstruction->Construct(surfTemp.Construction).Name)); } if (!s_ipsc->lAlphaFieldBlanks(FrameField) && surfTemp.FrameDivider == 0) { @@ -6018,19 +5978,19 @@ namespace SurfaceGeometry { if (surfTemp.FrameDivider == 0) { if (!state.dataConstruction->Construct(surfTemp.Construction).WindowTypeEQL) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(FrameField), - s_ipsc->cAlphaArgs(FrameField))); + std::format("{}=\"{}\", invalid {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(FrameField), + s_ipsc->cAlphaArgs(FrameField))); ErrorsFound = true; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(FrameField), - s_ipsc->cAlphaArgs(FrameField))); + std::format("{}=\"{}\", invalid {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(FrameField), + s_ipsc->cAlphaArgs(FrameField))); ShowContinueError(state, "...Frame/Divider is not supported in Equivalent Layer Window model."); } } @@ -6041,11 +6001,11 @@ namespace SurfaceGeometry { if (surfTemp.FrameDivider > 0) { if (state.dataSurface->FrameDivider(surfTemp.FrameDivider).DividerWidth > 0.0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(FrameField), - s_ipsc->cAlphaArgs(FrameField))); + std::format("{}=\"{}\", invalid {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(FrameField), + s_ipsc->cAlphaArgs(FrameField))); ShowContinueError(state, "Divider cannot be specified because the construction has a between-glass shade or blind."); ShowContinueError(state, "Calculation will proceed without the divider for this window."); @@ -6066,11 +6026,11 @@ namespace SurfaceGeometry { if (surfTemp.FrameDivider > 0) { // Equivalent Layer window does not have frame/divider model ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(FrameField), - s_ipsc->cAlphaArgs(FrameField))); + std::format("{}=\"{}\", invalid {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(FrameField), + s_ipsc->cAlphaArgs(FrameField))); ShowContinueError(state, "Frame/Divider is not supported in Equivalent Layer Window model."); surfTemp.FrameDivider = 0; } @@ -6101,7 +6061,7 @@ namespace SurfaceGeometry { static_cast(state.dataHeatBal->SolarDistribution) > static_cast(DataHeatBalance::Shadowing::Minimal) && surfTemp.Multiplier > 1.0) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, EnergyPlus::format("{}: A Multiplier > 1.0 for window/glass door {}", cRoutineName, surfTemp.Name)); + ShowWarningError(state, std::format("{}: A Multiplier > 1.0 for window/glass door {}", cRoutineName, surfTemp.Name)); ShowContinueError(state, "in conjunction with SolarDistribution = FullExterior or FullInteriorExterior"); ShowContinueError(state, "can cause inaccurate shadowing on the window and/or"); ShowContinueError(state, "inaccurate interior solar distribution from the window."); @@ -6126,8 +6086,8 @@ namespace SurfaceGeometry { } } if (NumShades != 0) { - ShowSevereError(state, EnergyPlus::format("{}: Window \"{}\" must not directly reference", cRoutineName, SubSurfaceName)); - ShowContinueError(state, EnergyPlus::format("a Construction (i.e, \"{}\") with a shading device.", SubSurfaceConstruction)); + ShowSevereError(state, std::format("{}: Window \"{}\" must not directly reference", cRoutineName, SubSurfaceName)); + ShowContinueError(state, std::format("a Construction (i.e, \"{}\") with a shading device.", SubSurfaceConstruction)); ShowContinueError(state, "Use WindowShadingControl to specify a shading device for a window."); ErrorsFound = true; } @@ -6147,8 +6107,8 @@ namespace SurfaceGeometry { } if (dynamic_cast(mat)->GlassTransDirtFactor < 1.0) { - ShowSevereError( - state, EnergyPlus::format("{}: Interior Window or GlassDoor {} has a glass layer with", cRoutineName, SubSurfaceName)); + ShowSevereError(state, + std::format("{}: Interior Window or GlassDoor {} has a glass layer with", cRoutineName, SubSurfaceName)); ShowContinueError(state, "Dirt Correction Factor for Solar and Visible Transmittance < 1.0"); ShowContinueError(state, "A value less than 1.0 for this factor is only allowed for exterior windows and glass doors."); ErrorsFound = true; @@ -6191,10 +6151,10 @@ namespace SurfaceGeometry { } if (state.dataSurfaceGeometry->SurfaceTmp(surfTemp.BaseSurf).Area <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{}: Surface Openings have too much area for base surface={}", - cRoutineName, - state.dataSurfaceGeometry->SurfaceTmp(surfTemp.BaseSurf).Name)); - ShowContinueError(state, EnergyPlus::format("Opening Surface creating error={}", surfTemp.Name)); + std::format("{}: Surface Openings have too much area for base surface={}", + cRoutineName, + state.dataSurfaceGeometry->SurfaceTmp(surfTemp.BaseSurf).Name)); + ShowContinueError(state, std::format("Opening Surface creating error={}", surfTemp.Name)); ErrorsFound = true; } // Net area of base surface with unity window multipliers (used in shadowing checks) @@ -6376,10 +6336,9 @@ namespace SurfaceGeometry { s_ipsc->cCurrentModuleObject = "Shading:Zone:Detailed"; state.dataInputProcessing->inputProcessor->getObjectDefMaxArgs(state, s_ipsc->cCurrentModuleObject, Loop, NumAlphas, NumNumbers); if (NumAlphas != 3) { - ShowSevereError(state, - EnergyPlus::format("{}: Object Definition indicates not = 3 Alpha Objects, Number Indicated={}", - s_ipsc->cCurrentModuleObject, - NumAlphas)); + ShowSevereError( + state, + std::format("{}: Object Definition indicates not = 3 Alpha Objects, Number Indicated={}", s_ipsc->cCurrentModuleObject, NumAlphas)); ErrorsFound = true; } @@ -6428,20 +6387,20 @@ namespace SurfaceGeometry { surfTemp.ZoneName = state.dataSurfaceGeometry->SurfaceTmp(Found).ZoneName; // Necessary to have surface drawn in OutputReports } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } if (surfTemp.ExtBoundCond == unenteredAdjacentZoneSurface) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ShowContinueError(state, "...trying to attach a shading device to an interzone surface."); ErrorsFound = true; @@ -6449,11 +6408,11 @@ namespace SurfaceGeometry { } if (surfTemp.ExtBoundCond == unreconciledZoneSurface) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ShowContinueError(state, "...trying to attach a shading device to an interior surface."); ErrorsFound = true; @@ -6491,19 +6450,18 @@ namespace SurfaceGeometry { if (mod(NumNumbers - 1, 3) != 0) { ShowWarningError( state, - EnergyPlus::format( - "{}=\"{}\", {}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - EnergyPlus::format("{} not even multiple of 3. Will read in {}", s_ipsc->cNumericFieldNames(1), surfTemp.Sides))); + std::format("{}=\"{}\", {}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + EnergyPlus::format("{} not even multiple of 3. Will read in {}", s_ipsc->cNumericFieldNames(1), surfTemp.Sides))); } if (s_ipsc->rNumericArgs(1) < 3) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cNumericFieldNames(1), - surfTemp.Sides)); + std::format("{}=\"{}\", {} (autocalculate) must be >= 3. Only {} provided.", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cNumericFieldNames(1), + surfTemp.Sides)); ErrorsFound = true; continue; } @@ -6626,32 +6584,32 @@ namespace SurfaceGeometry { surfTemp.ZoneName = state.dataSurfaceGeometry->SurfaceTmp(Found).ZoneName; // Necessary to have surface drawn in OutputReports } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; continue; } if (surfTemp.ExtBoundCond == unenteredAdjacentZoneSurface) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ShowContinueError(state, "...trying to attach a shading device to an interzone surface."); ErrorsFound = true; surfTemp.ExtBoundCond = DataSurfaces::ExternalEnvironment; // reset so program won't crash during "add surfaces" } if (surfTemp.ExtBoundCond == unreconciledZoneSurface) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - surfTemp.Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + surfTemp.Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ShowContinueError(state, "...trying to attach a shading device to an interior surface."); ErrorsFound = true; surfTemp.ExtBoundCond = DataSurfaces::ExternalEnvironment; // reset so program won't crash during "add surfaces" @@ -7043,11 +7001,11 @@ namespace SurfaceGeometry { } else if (state.dataIPShortCut->lAlphaFieldBlanks(4)) { // If Space or SpaceList Name is blank, then throw error. ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\" invalid {}=\"{}\" not found.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); ++SurfNum; auto &surfTemp = state.dataSurfaceGeometry->SurfaceTmp(SurfNum); surfTemp.Class = SurfaceClass::Invalid; @@ -7079,11 +7037,11 @@ namespace SurfaceGeometry { state.dataSurface->IntMassObjects(Item).spaceOrSpaceListPtr = SLItem; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + std::format("{}=\"{}\" invalid {}=\"{}\" not found.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ++SurfNum; auto &surfTemp = state.dataSurfaceGeometry->SurfaceTmp(SurfNum); surfTemp.Class = SurfaceClass::Invalid; @@ -7093,7 +7051,7 @@ namespace SurfaceGeometry { } if (errFlag) { - ShowSevereError(state, EnergyPlus::format("{}Errors with invalid names in {} objects.", RoutineName, s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("{}Errors with invalid names in {} objects.", RoutineName, s_ipsc->cCurrentModuleObject)); ShowContinueError(state, "...These will not be read in. Other errors may occur."); NumIntMassSurfaces = 0; } @@ -7101,19 +7059,19 @@ namespace SurfaceGeometry { if (state.dataSurface->IntMassObjects(Item).Construction == 0) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {} not found={}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", {} not found={}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); } else if (state.dataConstruction->Construct(state.dataSurface->IntMassObjects(Item).Construction).TypeIsWindow) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}\" - has Window materials.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); } else { state.dataConstruction->Construct(state.dataSurface->IntMassObjects(Item).Construction).IsUsed = true; } @@ -7327,8 +7285,8 @@ namespace SurfaceGeometry { s_ipsc->cNumericFieldNames); SurfNum = Util::FindItemInList(s_ipsc->cAlphaArgs(1), state.dataSurface->Surface, state.dataSurface->TotSurfaces); if (SurfNum == 0) { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\", invalid specification", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format(".. not found {}=\"{}\".", s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, std::format("{}=\"{}\", invalid specification", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format(".. not found {}=\"{}\".", s_ipsc->cAlphaFieldNames(1), s_ipsc->cAlphaArgs(1))); // ErrorsFound =.TRUE. continue; } @@ -7342,9 +7300,9 @@ namespace SurfaceGeometry { } if (WrongSurfaceType) { ShowSevereError(state, - EnergyPlus::format("GetShadingSurfReflectanceData: {}=\"{}\", surface is not a shading surface.", - s_ipsc->cCurrentModuleObject, - surf.Name)); + std::format("GetShadingSurfReflectanceData: {}=\"{}\", surface is not a shading surface.", + s_ipsc->cCurrentModuleObject, + surf.Name)); ErrorsFound = true; continue; } @@ -7357,11 +7315,11 @@ namespace SurfaceGeometry { GlConstrNum = Util::FindItemInList(s_ipsc->cAlphaArgs(2), state.dataConstruction->Construct, state.dataHeatBal->TotConstructs); if (GlConstrNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {} not found={}", - s_ipsc->cCurrentModuleObject, - state.dataSurface->Surface(SurfNum).Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", {} not found={}", + s_ipsc->cCurrentModuleObject, + state.dataSurface->Surface(SurfNum).Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } else { state.dataConstruction->Construct(GlConstrNum).IsUsed = true; @@ -7460,9 +7418,9 @@ namespace SurfaceGeometry { if (MaxNumNumbers != 8) { ShowSevereError(state, - EnergyPlus::format("{}: Object Definition indicates not = 8 Number Objects, Number Indicated={}", - s_ipsc->cCurrentModuleObject, - MaxNumNumbers)); + std::format("{}: Object Definition indicates not = 8 Number Objects, Number Indicated={}", + s_ipsc->cCurrentModuleObject, + MaxNumNumbers)); ErrorsFound = true; } @@ -7491,20 +7449,20 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(state.dataHeatBal->ExtVentedCavity(Item).OSCMName, state.dataSurface->OSCM, state.dataSurface->TotOSCM); if (Found == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + state.dataHeatBal->ExtVentedCavity(Item).Name, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } } else { Found = 0; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {} cannot be blank.", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - s_ipsc->cAlphaFieldNames(2))); + std::format("{}=\"{}\", invalid {} cannot be blank.", + s_ipsc->cCurrentModuleObject, + state.dataHeatBal->ExtVentedCavity(Item).Name, + s_ipsc->cAlphaFieldNames(2))); ErrorsFound = true; } state.dataHeatBal->ExtVentedCavity(Item).OSCMPtr = Found; @@ -7528,11 +7486,11 @@ namespace SurfaceGeometry { // Was it set? if (state.dataHeatBal->ExtVentedCavity(Item).BaffleRoughness == Material::SurfaceRoughness::Invalid) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + state.dataHeatBal->ExtVentedCavity(Item).Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); ErrorsFound = true; } @@ -7540,9 +7498,9 @@ namespace SurfaceGeometry { state.dataHeatBal->ExtVentedCavity(Item).NumSurfs = NumAlphas - AlphaOffset; if (state.dataHeatBal->ExtVentedCavity(Item).NumSurfs == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", no underlying surfaces specified. Must have at least one.", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name)); + std::format("{}=\"{}\", no underlying surfaces specified. Must have at least one.", + s_ipsc->cCurrentModuleObject, + state.dataHeatBal->ExtVentedCavity(Item).Name)); ErrorsFound = true; continue; } @@ -7552,56 +7510,55 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset), state.dataSurface->Surface, state.dataSurface->TotSurfaces); if (Found == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), - s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + state.dataHeatBal->ExtVentedCavity(Item).Name, + s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), + s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); ErrorsFound = true; continue; } // check that surface is appropriate, Heat transfer, Sun, Wind, if (!state.dataSurface->Surface(Found).HeatTransSurf) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), - s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + state.dataHeatBal->ExtVentedCavity(Item).Name, + s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), + s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); ShowContinueError(state, "...because it is not a Heat Transfer Surface."); ErrorsFound = true; continue; } if (!state.dataSurface->Surface(Found).ExtSolar) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), - s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + state.dataHeatBal->ExtVentedCavity(Item).Name, + s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), + s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); ShowContinueError(state, "...because it is not exposed to Sun."); ErrorsFound = true; continue; } if (!state.dataSurface->Surface(Found).ExtWind) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), - s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + state.dataHeatBal->ExtVentedCavity(Item).Name, + s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), + s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); ShowContinueError(state, "...because it is not exposed to Wind."); ErrorsFound = true; continue; } if (state.dataSurface->Surface(Found).ExtBoundCond != DataSurfaces::OtherSideCondModeledExt) { ShowSevereError( - state, - EnergyPlus::format("{}=\"{}\", is invalid", s_ipsc->cCurrentModuleObject, state.dataHeatBal->ExtVentedCavity(Item).Name)); + state, std::format("{}=\"{}\", is invalid", s_ipsc->cCurrentModuleObject, state.dataHeatBal->ExtVentedCavity(Item).Name)); ShowContinueError(state, - EnergyPlus::format("...because {}=\"{}\".", - s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), - s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); + std::format("...because {}=\"{}\".", + s_ipsc->cAlphaFieldNames(ThisSurf + AlphaOffset), + s_ipsc->cAlphaArgs(ThisSurf + AlphaOffset))); ShowContinueError(state, "...is not an OtherSideConditionedModel surface."); ErrorsFound = true; continue; @@ -7640,17 +7597,17 @@ namespace SurfaceGeometry { SurfID = state.dataHeatBal->ExtVentedCavity(Item).SurfPtrs(ThisSurf); if (General::rotAzmDiffDeg(state.dataSurface->Surface(SurfID).Azimuth, AvgAzimuth) > AZITOL) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}, Surface {} has Azimuth different from others in the associated group.", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - state.dataSurface->Surface(SurfID).Name)); + std::format("{}=\"{}, Surface {} has Azimuth different from others in the associated group.", + s_ipsc->cCurrentModuleObject, + state.dataHeatBal->ExtVentedCavity(Item).Name, + state.dataSurface->Surface(SurfID).Name)); } if (std::abs(state.dataSurface->Surface(SurfID).Tilt - AvgTilt) > TILTOL) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}, Surface {} has Tilt different from others in the associated group.", - s_ipsc->cCurrentModuleObject, - state.dataHeatBal->ExtVentedCavity(Item).Name, - state.dataSurface->Surface(SurfID).Name)); + std::format("{}=\"{}, Surface {} has Tilt different from others in the associated group.", + s_ipsc->cCurrentModuleObject, + state.dataHeatBal->ExtVentedCavity(Item).Name, + state.dataSurface->Surface(SurfID).Name)); } // test that there are no windows. Now allow windows @@ -7682,13 +7639,13 @@ namespace SurfaceGeometry { state.dataHeatBal->ExtVentedCavity(Item).HdeltaNPL = s_ipsc->rNumericArgs(4); state.dataHeatBal->ExtVentedCavity(Item).PlenGapThick = s_ipsc->rNumericArgs(5); if (state.dataHeatBal->ExtVentedCavity(Item).PlenGapThick <= 0.0) { - ShowSevereError( - state, EnergyPlus::format("{}=\"{}\", invalid .", s_ipsc->cCurrentModuleObject, state.dataHeatBal->ExtVentedCavity(Item).Name)); + ShowSevereError(state, + std::format("{}=\"{}\", invalid .", s_ipsc->cCurrentModuleObject, state.dataHeatBal->ExtVentedCavity(Item).Name)); ErrorsFound = true; ShowContinueError(state, - EnergyPlus::format("...because field \"{}\" must be greater than Zero=[{:.2T}].", - s_ipsc->cNumericFieldNames(5), - s_ipsc->rNumericArgs(5))); + std::format("...because field \"{}\" must be greater than Zero=[{:.2f}].", + s_ipsc->cNumericFieldNames(5), + s_ipsc->rNumericArgs(5))); continue; } state.dataHeatBal->ExtVentedCavity(Item).AreaRatio = s_ipsc->rNumericArgs(6); @@ -7701,12 +7658,12 @@ namespace SurfaceGeometry { // subscript usage: Replaced by below state.dataHeatBal->ExtVentedCavity(Item).ProjArea = surfaceArea; if (state.dataHeatBal->ExtVentedCavity(Item).ProjArea <= 0.0) { - ShowSevereError( - state, EnergyPlus::format("{}=\"{}\", invalid .", s_ipsc->cCurrentModuleObject, state.dataHeatBal->ExtVentedCavity(Item).Name)); + ShowSevereError(state, + std::format("{}=\"{}\", invalid .", s_ipsc->cCurrentModuleObject, state.dataHeatBal->ExtVentedCavity(Item).Name)); ErrorsFound = true; ShowContinueError(state, - EnergyPlus::format("...because gross area of underlying surfaces must be greater than Zero=[{:.2T}].", - state.dataHeatBal->ExtVentedCavity(Item).ProjArea)); + std::format("...because gross area of underlying surfaces must be greater than Zero=[{:.2f}].", + state.dataHeatBal->ExtVentedCavity(Item).ProjArea)); continue; } state.dataHeatBal->ExtVentedCavity(Item).ActualArea = @@ -7792,16 +7749,15 @@ namespace SurfaceGeometry { int Found = Util::FindItemInList(s_ipsc->cAlphaArgs(alpF), state.dataSurface->Surface, state.dataSurface->TotSurfaces); if (Found == 0) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", did not find matching surface", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", did not find matching surface", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } alpF++; if (state.dataSurface->Surface(Found).Class != SurfaceClass::Floor) { - ShowWarningError(state, - EnergyPlus::format( - "{}: {}, surface is not a floor surface", s_ipsc->cCurrentModuleObject, state.dataSurface->Surface(Found).Name)); - ShowContinueError(state, EnergyPlus::format("{} will not be used", s_ipsc->cCurrentModuleObject)); + ShowWarningError( + state, + std::format("{}: {}, surface is not a floor surface", s_ipsc->cCurrentModuleObject, state.dataSurface->Surface(Found).Name)); + ShowContinueError(state, std::format("{} will not be used", s_ipsc->cCurrentModuleObject)); continue; } @@ -7839,21 +7795,21 @@ namespace SurfaceGeometry { data.exposedFraction = s_ipsc->rNumericArgs(numF) / state.dataSurface->Surface(Found).Perimeter; if (data.exposedFraction > 1 + tolerance) { ShowWarningError(state, - EnergyPlus::format("{}: {}, {} is greater than the perimeter of {}", - s_ipsc->cCurrentModuleObject, - state.dataSurface->Surface(Found).Name, - s_ipsc->cNumericFieldNames(numF), - state.dataSurface->Surface(Found).Name)); + std::format("{}: {}, {} is greater than the perimeter of {}", + s_ipsc->cCurrentModuleObject, + state.dataSurface->Surface(Found).Name, + s_ipsc->cNumericFieldNames(numF), + state.dataSurface->Surface(Found).Name)); ShowContinueError(state, - EnergyPlus::format("{} perimeter = {}, {} exposed perimeter = {}", - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).Perimeter, - s_ipsc->cCurrentModuleObject, - s_ipsc->rNumericArgs(numF))); + std::format("{} perimeter = {}, {} exposed perimeter = {}", + state.dataSurface->Surface(Found).Name, + state.dataSurface->Surface(Found).Perimeter, + s_ipsc->cCurrentModuleObject, + s_ipsc->rNumericArgs(numF))); ShowContinueError(state, - EnergyPlus::format("{} will be set equal to {} perimeter", - s_ipsc->cNumericFieldNames(numF), - state.dataSurface->Surface(Found).Name)); + std::format("{} will be set equal to {} perimeter", + s_ipsc->cNumericFieldNames(numF), + state.dataSurface->Surface(Found).Name)); data.exposedFraction = 1.0; } @@ -7911,17 +7867,17 @@ namespace SurfaceGeometry { if (calculationMethod == CalculationMethod::Bysegment) { if (numRemainingFields != (int)state.dataSurface->Surface(Found).Vertex.size()) { ShowSevereError(state, - EnergyPlus::format("{}: {}, must have equal number of segments as the floor has vertices.{}\" and \"{}\"", - s_ipsc->cCurrentModuleObject, - state.dataSurface->Surface(Found).Name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cNumericFieldNames(numF - 1))); + std::format("{}: {}, must have equal number of segments as the floor has vertices.{}\" and \"{}\"", + s_ipsc->cCurrentModuleObject, + state.dataSurface->Surface(Found).Name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cNumericFieldNames(numF - 1))); ShowContinueError(state, - EnergyPlus::format("{} number of vertices = {}, {} number of segments = {}", - state.dataSurface->Surface(Found).Name, - state.dataSurface->Surface(Found).Vertex.size(), - s_ipsc->cCurrentModuleObject, - numRemainingFields)); + std::format("{} number of vertices = {}, {} number of segments = {}", + state.dataSurface->Surface(Found).Name, + state.dataSurface->Surface(Found).Vertex.size(), + s_ipsc->cCurrentModuleObject, + numRemainingFields)); ErrorsFound = true; } for (int segNum = 0; segNum < numRemainingFields; segNum++) { @@ -8007,17 +7963,16 @@ namespace SurfaceGeometry { int SurfNum = Util::FindItemInList(s_ipsc->cAlphaArgs(2), state.dataSurface->Surface); if (SurfNum == 0) { ShowSevereError(state, - EnergyPlus::format("{} {} = \"{}\", object. Illegal value for \"{}\" has been found.", - RoutineName, - s_ipsc->cCurrentModuleObject, - SurfLocalEnv.Name, - s_ipsc->cAlphaFieldNames(2))); - ShowContinueError( - state, - EnergyPlus::format("{} entered value = \"{}\", no corresponding surface (ref BuildingSurface:Detailed) has been " - "found in the input file.", - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{} {} = \"{}\", object. Illegal value for \"{}\" has been found.", + RoutineName, + s_ipsc->cCurrentModuleObject, + SurfLocalEnv.Name, + s_ipsc->cAlphaFieldNames(2))); + ShowContinueError(state, + std::format("{} entered value = \"{}\", no corresponding surface (ref BuildingSurface:Detailed) has been " + "found in the input file.", + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } else { SurfLocalEnv.SurfPtr = SurfNum; @@ -8035,17 +7990,16 @@ namespace SurfaceGeometry { int SurroundingSurfsNum = Util::FindItemInList(s_ipsc->cAlphaArgs(4), state.dataSurface->SurroundingSurfsProperty); if (SurroundingSurfsNum == 0) { ShowSevereError(state, - EnergyPlus::format("{} {} = \"{}\", object. Illegal value for \"{}\" has been found.", - RoutineName, - s_ipsc->cCurrentModuleObject, - SurfLocalEnv.Name, - s_ipsc->cAlphaFieldNames(4))); - ShowContinueError( - state, - EnergyPlus::format("{} entered value = \"{}\", no corresponding surrounding surfaces properties has been found " - "in the input file.", - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + std::format("{} {} = \"{}\", object. Illegal value for \"{}\" has been found.", + RoutineName, + s_ipsc->cCurrentModuleObject, + SurfLocalEnv.Name, + s_ipsc->cAlphaFieldNames(4))); + ShowContinueError(state, + std::format("{} entered value = \"{}\", no corresponding surrounding surfaces properties has been found " + "in the input file.", + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ErrorsFound = true; } else { SurfLocalEnv.SurroundingSurfsPtr = SurroundingSurfsNum; @@ -8065,16 +8019,16 @@ namespace SurfaceGeometry { Node::ObjectIsParent); if (NodeNum == 0 && OutAirNodeManager::CheckOutAirNodeNumber(state, NodeNum)) { ShowSevereError(state, - EnergyPlus::format("{} {} = \"{}\", object. Illegal value for \"{}\" has been found.", - RoutineName, - s_ipsc->cCurrentModuleObject, - SurfLocalEnv.Name, - s_ipsc->cAlphaFieldNames(5))); + std::format("{} {} = \"{}\", object. Illegal value for \"{}\" has been found.", + RoutineName, + s_ipsc->cCurrentModuleObject, + SurfLocalEnv.Name, + s_ipsc->cAlphaFieldNames(5))); ShowContinueError( state, - EnergyPlus::format("{} entered value = \"{}\", no corresponding outdoor air node has been found in the input file.", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{} entered value = \"{}\", no corresponding outdoor air node has been found in the input file.", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); ErrorsFound = true; } else { SurfLocalEnv.OutdoorAirNodePtr = NodeNum; @@ -8086,16 +8040,16 @@ namespace SurfaceGeometry { int GndSurfsNum = Util::FindItemInList(s_ipsc->cAlphaArgs(6), state.dataSurface->GroundSurfsProperty); if (GndSurfsNum == 0) { ShowSevereError(state, - EnergyPlus::format("{} {} = \"{}\", object. Illegal value for \"{}\" has been found.", - RoutineName, - s_ipsc->cCurrentModuleObject, - SurfLocalEnv.Name, - s_ipsc->cAlphaFieldNames(6))); + std::format("{} {} = \"{}\", object. Illegal value for \"{}\" has been found.", + RoutineName, + s_ipsc->cCurrentModuleObject, + SurfLocalEnv.Name, + s_ipsc->cAlphaFieldNames(6))); ShowContinueError( state, - EnergyPlus::format("{} entered value = \"{}\", no corresponding ground surfaces object has been found in the input file.", - s_ipsc->cAlphaFieldNames(6), - s_ipsc->cAlphaArgs(6))); + std::format("{} entered value = \"{}\", no corresponding ground surfaces object has been found in the input file.", + s_ipsc->cAlphaFieldNames(6), + s_ipsc->cAlphaArgs(6))); ErrorsFound = true; } else { SurfLocalEnv.GroundSurfsPtr = GndSurfsNum; @@ -8209,15 +8163,13 @@ namespace SurfaceGeometry { // The object requires at least one srd surface input, each surface requires a set of 3 fields (2 Alpha fields Name and Temp // Sch Name and 1 Num fields View Factor) if (NumAlpha < 5) { - ShowSevereError(state, - EnergyPlus::format("{} = \"{}\" is not defined correctly.", s_ipsc->cCurrentModuleObject, SrdSurfsProp.Name)); + ShowSevereError(state, std::format("{} = \"{}\" is not defined correctly.", s_ipsc->cCurrentModuleObject, SrdSurfsProp.Name)); ShowContinueError(state, "At lease one set of surrounding surface properties should be defined."); ErrorsFound = true; continue; } if ((NumAlpha - 3) / 2 != (NumNumeric - 2)) { - ShowSevereError(state, - EnergyPlus::format("{} = \"{}\" is not defined correctly.", s_ipsc->cCurrentModuleObject, SrdSurfsProp.Name)); + ShowSevereError(state, std::format("{} = \"{}\" is not defined correctly.", s_ipsc->cCurrentModuleObject, SrdSurfsProp.Name)); ShowContinueError(state, "Check number of input fields for each surrounding surface."); ErrorsFound = true; continue; @@ -8403,15 +8355,14 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(s_ipsc->cAlphaArgs(1), state.dataSurface->Surface, state.dataSurface->TotSurfaces); if (Found == 0) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", did not find matching surface.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", did not find matching surface.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } else if (state.dataSurface->Surface(Found).insideHeatSourceTermSched != nullptr || state.dataSurface->Surface(Found).outsideHeatSourceTermSched != nullptr) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", multiple SurfaceProperty:HeatBalanceSourceTerm objects applied to the same surface.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + std::format("{}=\"{}\", multiple SurfaceProperty:HeatBalanceSourceTerm objects applied to the same surface.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } @@ -8428,22 +8379,20 @@ namespace SurfaceGeometry { ShowSevereItemNotFound(state, eoh, s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3)); ErrorsFound = true; } else if (state.dataSurface->Surface(Found).OSCPtr > 0) { - ShowSevereError( - state, - EnergyPlus::format("{}=\"SurfaceProperty:HeatBalanceSourceTerm\", cannot be specified for OtherSideCoefficient Surface={}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, + std::format("{}=\"SurfaceProperty:HeatBalanceSourceTerm\", cannot be specified for OtherSideCoefficient Surface={}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } else { state.dataSurface->allOutsideSourceSurfaceList.emplace_back(Found); } if (state.dataSurface->Surface(Found).outsideHeatSourceTermSched == nullptr && - state.dataSurface->Surface(Found).insideHeatSourceTermSched == nullptr) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", no schedule defined for additional heat source.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + state.dataSurface->Surface(Found).insideHeatSourceTermSched == nullptr) { + ShowSevereError( + state, + std::format("{}=\"{}\", no schedule defined for additional heat source.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } } @@ -8474,8 +8423,7 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(s_ipsc->cAlphaArgs(1), state.dataSurface->Surface, state.dataSurface->TotSurfaces); if (Found == 0) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", did not find matching surface.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\", did not find matching surface.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFoundSingleSurf = true; } @@ -8496,11 +8444,11 @@ namespace SurfaceGeometry { state.dataHeatBal->AnyCondFD = true; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFoundSingleSurf = true; } } @@ -8546,11 +8494,11 @@ namespace SurfaceGeometry { state.dataHeatBal->AnyCondFD = true; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); ErrorsFoundMultiSurf = true; } } @@ -8731,11 +8679,11 @@ namespace SurfaceGeometry { } else { SurfacesOfType = false; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFoundMultiSurf = true; } } @@ -8743,11 +8691,10 @@ namespace SurfaceGeometry { if (!SurfacesOfType) { ShowWarningError( state, - EnergyPlus::format( - "In {}=\"{}\", for Multiple Surface Assignment=\"{}\", there were no surfaces of that type found for assignment.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaArgs(2))); + std::format("In {}=\"{}\", for Multiple Surface Assignment=\"{}\", there were no surfaces of that type found for assignment.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaArgs(2))); } if (ErrorsFoundMultiSurf) { ErrorsFound = true; @@ -8788,11 +8735,11 @@ namespace SurfaceGeometry { state.dataHeatBal->AnyCondFD = true; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFoundSurfList = true; } } @@ -8802,9 +8749,9 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(s_ipsc->cAlphaArgs(Item1), state.dataSurface->Surface, state.dataSurface->TotSurfaces); if (Found == 0) { - ShowSevereError( - state, EnergyPlus::format("{}=\"{}\", did not find matching surface.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("Name of surface not found = \"{}\"", s_ipsc->cAlphaArgs(Item1))); + ShowSevereError(state, + std::format("{}=\"{}\", did not find matching surface.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("Name of surface not found = \"{}\"", s_ipsc->cAlphaArgs(Item1))); ErrorsFoundSurfList = true; } @@ -8849,11 +8796,11 @@ namespace SurfaceGeometry { state.dataHeatBal->AnyCondFD = true; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFoundByConstruct = true; } } @@ -8861,11 +8808,11 @@ namespace SurfaceGeometry { Found = Util::FindItemInList(s_ipsc->cAlphaArgs(3), state.dataConstruction->Construct, state.dataHeatBal->TotConstructs); if (Found == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); ErrorsFoundByConstruct = true; } @@ -8906,35 +8853,32 @@ namespace SurfaceGeometry { msgneeded = false; if (NumEMPDMat > 0 && !state.dataHeatBal->AnyEMPD) { - ShowWarningError( - state, - EnergyPlus::format("The input file includes {} MaterialProperty:MoisturePenetrationDepth:Settings objects but the moisture " - "penetration depth algorithm is not used anywhere.", - NumEMPDMat)); + ShowWarningError(state, + std::format("The input file includes {} MaterialProperty:MoisturePenetrationDepth:Settings objects but the moisture " + "penetration depth algorithm is not used anywhere.", + NumEMPDMat)); msgneeded = true; } if (NumPCMat > 0 && !state.dataHeatBal->AnyCondFD) { ShowWarningError( state, - EnergyPlus::format("The input file includes {} MaterialProperty:PhaseChange objects but the conduction finite difference algorithm " - "is not used anywhere.", - NumPCMat)); + std::format("The input file includes {} MaterialProperty:PhaseChange objects but the conduction finite difference algorithm " + "is not used anywhere.", + NumPCMat)); msgneeded = true; } if (NumVTCMat > 0 && !state.dataHeatBal->AnyCondFD) { - ShowWarningError( - state, - EnergyPlus::format("The input file includes {} MaterialProperty:VariableThermalConductivity objects but the conduction finite " - "difference algorithm is not used anywhere.", - NumVTCMat)); + ShowWarningError(state, + std::format("The input file includes {} MaterialProperty:VariableThermalConductivity objects but the conduction finite " + "difference algorithm is not used anywhere.", + NumVTCMat)); msgneeded = true; } if (SumHAMTMat > 0 && !state.dataHeatBal->AnyHAMT) { - ShowWarningError( - state, - EnergyPlus::format("The input file includes {} MaterialProperty:HeatAndMoistureTransfer:* objects but the combined heat and " - "moisture finite difference algorithm is not used anywhere.", - SumHAMTMat)); + ShowWarningError(state, + std::format("The input file includes {} MaterialProperty:HeatAndMoistureTransfer:* objects but the combined heat and " + "moisture finite difference algorithm is not used anywhere.", + SumHAMTMat)); msgneeded = true; } if (msgneeded) { @@ -9052,24 +8996,24 @@ namespace SurfaceGeometry { "An interior surface is defined as two surfaces with reverse constructions. The HeatTransferAlgorithm in " "both constructions should be same."); ShowContinueError(state, - EnergyPlus::format("The HeatTransferAlgorithm of Surface: {}, is {}", - surf.Name, - DataSurfaces::HeatTransAlgoStrs[static_cast(surf.HeatTransferAlgorithm)])); + std::format("The HeatTransferAlgorithm of Surface: {}, is {}", + surf.Name, + DataSurfaces::HeatTransAlgoStrs[static_cast(surf.HeatTransferAlgorithm)])); ShowContinueError(state, - EnergyPlus::format("The HeatTransferAlgorithm of Surface: {}, is {}", - extSurf.Name, - DataSurfaces::HeatTransAlgoStrs[static_cast(extSurf.HeatTransferAlgorithm)])); + std::format("The HeatTransferAlgorithm of Surface: {}, is {}", + extSurf.Name, + DataSurfaces::HeatTransAlgoStrs[static_cast(extSurf.HeatTransferAlgorithm)])); if (surf.HeatTransferAlgorithm > extSurf.HeatTransferAlgorithm) { ShowContinueError(state, - EnergyPlus::format("The HeatTransferAlgorithm of Surface: {}, is assigned to {}. Simulation continues.", - extSurf.Name, - DataSurfaces::HeatTransAlgoStrs[static_cast(surf.HeatTransferAlgorithm)])); + std::format("The HeatTransferAlgorithm of Surface: {}, is assigned to {}. Simulation continues.", + extSurf.Name, + DataSurfaces::HeatTransAlgoStrs[static_cast(surf.HeatTransferAlgorithm)])); extSurf.HeatTransferAlgorithm = surf.HeatTransferAlgorithm; } else { ShowContinueError(state, - EnergyPlus::format("The HeatTransferAlgorithm of Surface: {}, is assigned to {}. Simulation continues.", - surf.Name, - DataSurfaces::HeatTransAlgoStrs[static_cast(extSurf.HeatTransferAlgorithm)])); + std::format("The HeatTransferAlgorithm of Surface: {}, is assigned to {}. Simulation continues.", + surf.Name, + DataSurfaces::HeatTransAlgoStrs[static_cast(extSurf.HeatTransferAlgorithm)])); surf.HeatTransferAlgorithm = extSurf.HeatTransferAlgorithm; } } @@ -9338,10 +9282,10 @@ namespace SurfaceGeometry { if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - EnergyPlus::format("{}Distance between two vertices < .01, possibly coincident. for Surface={}, in Zone={}", - RoutineName, - surfTemp.Name, - surfTemp.ZoneName)); + std::format("{}Distance between two vertices < .01, possibly coincident. for Surface={}, in Zone={}", + RoutineName, + surfTemp.Name, + surfTemp.ZoneName)); bool const printPoppedFirst = (poppedVertexIndex < keptVertexIndex) ? !(poppedVertexIndex == 1 && keptVertexIndex == nSides) : (poppedVertexIndex == nSides && keptVertexIndex == 1); @@ -9360,9 +9304,9 @@ namespace SurfaceGeometry { if (nSides <= 3) { if (state.dataGlobal->DisplayExtraWarnings) { ShowContinueError(state, - EnergyPlus::format("Cannot Drop Vertex [{}]; Number of Surface Sides at minimum. This surface is now a " - "degenerate surface.", - poppedVertexIndex)); + std::format("Cannot Drop Vertex [{}]; Number of Surface Sides at minimum. This surface is now a " + "degenerate surface.", + poppedVertexIndex)); } ++state.dataErrTracking->TotalDegenerateSurfaces; // If degenerate, we won't be able to pop now nor later, so exit @@ -9371,7 +9315,7 @@ namespace SurfaceGeometry { } if (state.dataGlobal->DisplayExtraWarnings) { - ShowContinueError(state, EnergyPlus::format("Dropping Vertex [{}].", poppedVertexIndex)); + ShowContinueError(state, std::format("Dropping Vertex [{}].", poppedVertexIndex)); } --nSides; vertices.erase(it); @@ -9392,44 +9336,43 @@ namespace SurfaceGeometry { dotp = dot(surfTemp.NewellSurfaceNormalVector, TestVector); if (surfTemp.Class == SurfaceClass::Roof && dotp < -0.000001) { TiltString = EnergyPlus::format("{:.1R}", SurfTilt); - ShowWarningError( - state, - EnergyPlus::format("{}Roof/Ceiling is upside down! Tilt angle=[{}], should be near 0, Surface=\"{}\", in Zone=\"{}\".", - RoutineName, - TiltString, - surfTemp.Name, - surfTemp.ZoneName)); + ShowWarningError(state, + std::format("{}Roof/Ceiling is upside down! Tilt angle=[{}], should be near 0, Surface=\"{}\", in Zone=\"{}\".", + RoutineName, + TiltString, + surfTemp.Name, + surfTemp.ZoneName)); ShowContinueError(state, "Automatic fix is attempted."); ReverseAndRecalculate(state, SurfNum, surfTemp.Sides, SurfWorldAz, SurfTilt); } else if (surfTemp.Class == SurfaceClass::Roof && SurfTilt > 80.0) { TiltString = EnergyPlus::format("{:.1R}", SurfTilt); ShowWarningError( state, - EnergyPlus::format("{}Roof/Ceiling is not oriented correctly! Tilt angle=[{}], should be near 0, Surface=\"{}\", in Zone=\"{}\".", - RoutineName, - TiltString, - surfTemp.Name, - surfTemp.ZoneName)); + std::format("{}Roof/Ceiling is not oriented correctly! Tilt angle=[{}], should be near 0, Surface=\"{}\", in Zone=\"{}\".", + RoutineName, + TiltString, + surfTemp.Name, + surfTemp.ZoneName)); } if (surfTemp.Class == SurfaceClass::Floor && dotp > 0.000001) { TiltString = EnergyPlus::format("{:.1R}", SurfTilt); ShowWarningError(state, - EnergyPlus::format("{}Floor is upside down! Tilt angle=[{}], should be near 180, Surface=\"{}\", in Zone=\"{}\".", - RoutineName, - TiltString, - surfTemp.Name, - surfTemp.ZoneName)); + std::format("{}Floor is upside down! Tilt angle=[{}], should be near 180, Surface=\"{}\", in Zone=\"{}\".", + RoutineName, + TiltString, + surfTemp.Name, + surfTemp.ZoneName)); ShowContinueError(state, "Automatic fix is attempted."); ReverseAndRecalculate(state, SurfNum, surfTemp.Sides, SurfWorldAz, SurfTilt); } else if (surfTemp.Class == SurfaceClass::Floor && SurfTilt < 158.2) { // slope/grade = 40%! TiltString = EnergyPlus::format("{:.1R}", SurfTilt); ShowWarningError( state, - EnergyPlus::format("{}Floor is not oriented correctly! Tilt angle=[{}], should be near 180, Surface=\"{}\", in Zone=\"{}\".", - RoutineName, - TiltString, - surfTemp.Name, - surfTemp.ZoneName)); + std::format("{}Floor is not oriented correctly! Tilt angle=[{}], should be near 180, Surface=\"{}\", in Zone=\"{}\".", + RoutineName, + TiltString, + surfTemp.Name, + surfTemp.ZoneName)); } surfTemp.Azimuth = SurfWorldAz; surfTemp.Tilt = SurfTilt; @@ -9472,7 +9415,7 @@ namespace SurfaceGeometry { TransformVertsByAspect(state, SurfNum, surfTemp.Sides); } else { - ShowFatalError(state, EnergyPlus::format("{}Called with less than 2 sides, Surface={}", RoutineName, surfTemp.Name)); + ShowFatalError(state, std::format("{}Called with less than 2 sides, Surface={}", RoutineName, surfTemp.Name)); } // Preliminary Height/Width @@ -9537,15 +9480,14 @@ namespace SurfaceGeometry { surfTemp.Vertex, SurfAzimuth, SurfTilt, surfTemp.lcsx, surfTemp.lcsy, surfTemp.lcsz, surfTemp.NewellSurfaceNormalVector); if (surfTemp.Class == SurfaceClass::Roof && SurfTilt > 80.0) { TiltString = EnergyPlus::format("{:.1R}", SurfTilt); - ShowWarningError(state, - EnergyPlus::format("{}Roof/Ceiling is still upside down! Tilt angle=[{}], should be near 0, please fix manually.", - RoutineName, - TiltString)); + ShowWarningError( + state, + std::format("{}Roof/Ceiling is still upside down! Tilt angle=[{}], should be near 0, please fix manually.", RoutineName, TiltString)); } if (surfTemp.Class == SurfaceClass::Floor && SurfTilt < 158.2) { // 40% grade! - ShowWarningError(state, - EnergyPlus::format( - "{}Floor is still upside down! Tilt angle=[{}], should be near 180, please fix manually.", RoutineName, TiltString)); + ShowWarningError( + state, + std::format("{}Floor is still upside down! Tilt angle=[{}], should be near 180, please fix manually.", RoutineName, TiltString)); } } @@ -9739,11 +9681,11 @@ namespace SurfaceGeometry { windowShadingControl.ZoneIndex = Util::FindItemInList(s_ipsc->cAlphaArgs(2), state.dataHeatBal->Zone); if (windowShadingControl.ZoneIndex == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\" invalid {}=\"{}\" not found.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } @@ -9753,21 +9695,21 @@ namespace SurfaceGeometry { // INTERIORSHADE or EXTERIORSHADE if (s_ipsc->cAlphaArgs(3) == "INTERIORNONINSULATINGSHADE" || s_ipsc->cAlphaArgs(3) == "INTERIORINSULATINGSHADE") { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\" is using obsolete {}=\"{}\", changing to \"InteriorShade\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\" is using obsolete {}=\"{}\", changing to \"InteriorShade\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); windowShadingControl.ShadingType = DataSurfaces::WinShadingType::IntShade; s_ipsc->cAlphaArgs(3) = "INTERIORSHADE"; } if (s_ipsc->cAlphaArgs(3) == "EXTERIORNONINSULATINGSHADE" || s_ipsc->cAlphaArgs(3) == "EXTERIORINSULATINGSHADE") { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\" is using obsolete {}=\"{}\", changing to \"ExteriorShade\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\" is using obsolete {}=\"{}\", changing to \"ExteriorShade\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); windowShadingControl.ShadingType = DataSurfaces::WinShadingType::ExtShade; s_ipsc->cAlphaArgs(3) = "EXTERIORSHADE"; } @@ -9777,11 +9719,11 @@ namespace SurfaceGeometry { if (Found <= 1) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\" invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); } else { windowShadingControl.ShadingType = DataSurfaces::WinShadingType(Found); } @@ -9832,11 +9774,11 @@ namespace SurfaceGeometry { if (windowShadingControl.multiSurfaceControl == DataSurfaces::MultiSurfaceControl::Invalid) { windowShadingControl.multiSurfaceControl = DataSurfaces::MultiSurfaceControl::Sequential; ShowWarningError(state, - EnergyPlus::format("{}=\"{}\" should be either SEQUENTIAL or GROUP {}=\"{}\", defaulting to \"SEQUENTIAL\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(13), - s_ipsc->cAlphaArgs(13))); + std::format("{}=\"{}\" should be either SEQUENTIAL or GROUP {}=\"{}\", defaulting to \"SEQUENTIAL\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(13), + s_ipsc->cAlphaArgs(13))); } if (ControlNumAlpha >= 14) { @@ -9848,9 +9790,9 @@ namespace SurfaceGeometry { } } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid. Must reference at least one Fenestration Surface object name.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + std::format("{}=\"{}\" invalid. Must reference at least one Fenestration Surface object name.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); } windowShadingControl.shadingControlType = static_cast( @@ -9863,11 +9805,11 @@ namespace SurfaceGeometry { windowShadingControl.shadingControlType == DataSurfaces::WindowShadingControlType::OnIfScheduled)) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" for exterior screens.", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{}=\"{}\" invalid {}=\"{}\" for exterior screens.", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); ShowContinueError(state, "Valid shading control types for exterior window screens are ALWAYSON, ALWAYSOFF, or ONIFSCHEDULEALLOWS."); } @@ -9881,28 +9823,26 @@ namespace SurfaceGeometry { windowShadingControl.shadingControlType == DataSurfaces::WindowShadingControlType::OnIfScheduled)) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" for exterior screens.", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{}=\"{}\" invalid {}=\"{}\" for exterior screens.", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); ShowContinueError(state, "Valid shading control types for exterior window screens are ALWAYSON, ALWAYSOFF, or ONIFSCHEDULEALLOWS."); } } else if (s_ipsc->lAlphaFieldBlanks(4)) { ShowSevereError( state, - EnergyPlus::format( - "{}=\"{}\", {} is blank.", s_ipsc->cCurrentModuleObject, windowShadingControl.Name, s_ipsc->cAlphaFieldNames(4))); + std::format("{}=\"{}\", {} is blank.", s_ipsc->cCurrentModuleObject, windowShadingControl.Name, s_ipsc->cAlphaFieldNames(4))); ShowContinueError(state, "A valid construction is required."); ErrorsFound = true; } else { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}=\"{}\", {} is invalid.", s_ipsc->cCurrentModuleObject, windowShadingControl.Name, s_ipsc->cAlphaFieldNames(4))); - ShowContinueError(state, - EnergyPlus::format("Construction=\"{}\" was used. A valid construction is required.", s_ipsc->cAlphaArgs(4))); + ShowContinueError(state, std::format("Construction=\"{}\" was used. A valid construction is required.", s_ipsc->cAlphaArgs(4))); ErrorsFound = true; } } @@ -9912,8 +9852,8 @@ namespace SurfaceGeometry { windowShadingControl.shadingControlType != DataSurfaces::WindowShadingControlType::AlwaysOff && windowShadingControl.shadingControlType != DataSurfaces::WindowShadingControlType::OnIfScheduled && windowShadingControl.shadingControlType != DataSurfaces::WindowShadingControlType::HiGlare) { - ShowWarningError( - state, EnergyPlus::format("{}=\"{}\", The first SetPoint is zero.", s_ipsc->cCurrentModuleObject, windowShadingControl.Name)); + ShowWarningError(state, + std::format("{}=\"{}\", The first SetPoint is zero.", s_ipsc->cCurrentModuleObject, windowShadingControl.Name)); ShowContinueError(state, "..You may have forgotten to specify that setpoint."); } @@ -9932,26 +9872,26 @@ namespace SurfaceGeometry { (!windowShadingControl.ShadingControlIsScheduled)) { // CR 7709 BG ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{} = \"{}\" invalid, {} must be set to \"Yes\" for {} = OnIfScheduleAllows", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(7), - s_ipsc->cAlphaFieldNames(5))); + std::format("{} = \"{}\" invalid, {} must be set to \"Yes\" for {} = OnIfScheduleAllows", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(7), + s_ipsc->cAlphaFieldNames(5))); } if (windowShadingControl.shadingControlType == DataSurfaces::WindowShadingControlType::MeetDaylIlumSetp && windowShadingControl.ShadingType != DataSurfaces::WinShadingType::SwitchableGlazing) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\".", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\" invalid {}=\"{}\".", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); ShowContinueError(state, - EnergyPlus::format("...{} must be SwitchableGlazing for this control, but entered type=\"{}\".", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("...{} must be SwitchableGlazing for this control, but entered type=\"{}\".", + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); } DataSurfaces::WinShadingType ShTyp = windowShadingControl.ShadingType; @@ -9960,75 +9900,68 @@ namespace SurfaceGeometry { if (IShadedConst == 0 && IShadingDevice == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" has no matching shaded construction or shading device.", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name)); + std::format("{}=\"{}\" has no matching shaded construction or shading device.", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name)); ErrorsFound = true; } else if (IShadedConst == 0 && IShadingDevice > 0) { if (ShTyp == DataSurfaces::WinShadingType::SwitchableGlazing) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" has {}= SwitchableGlazing but no matching shaded construction", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\" has {}= SwitchableGlazing but no matching shaded construction", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaArgs(3))); ErrorsFound = true; } if ((ShTyp == DataSurfaces::WinShadingType::IntShade || ShTyp == DataSurfaces::WinShadingType::ExtShade) && s_mat->materials(IShadingDevice)->group != Material::Group::Shade) { - ShowSevereError( - state, - EnergyPlus::format("{}=\"{}\" has {}= InteriorShade or ExteriorShade but matching shading device is not a window shade", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaArgs(3))); - ShowContinueError(state, - EnergyPlus::format("{} in error=\"{}\".", s_ipsc->cAlphaFieldNames(8), s_mat->materials(IShadingDevice)->Name)); + ShowSevereError(state, + std::format("{}=\"{}\" has {}= InteriorShade or ExteriorShade but matching shading device is not a window shade", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaArgs(3))); + ShowContinueError(state, std::format("{} in error=\"{}\".", s_ipsc->cAlphaFieldNames(8), s_mat->materials(IShadingDevice)->Name)); ErrorsFound = true; } if ((ShTyp == DataSurfaces::WinShadingType::ExtScreen) && s_mat->materials(IShadingDevice)->group != Material::Group::Screen) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" has {}= ExteriorScreen but matching shading device is not a window screen", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaArgs(3))); - ShowContinueError(state, - EnergyPlus::format("{} in error=\"{}\".", s_ipsc->cAlphaFieldNames(8), s_mat->materials(IShadingDevice)->Name)); + std::format("{}=\"{}\" has {}= ExteriorScreen but matching shading device is not a window screen", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaArgs(3))); + ShowContinueError(state, std::format("{} in error=\"{}\".", s_ipsc->cAlphaFieldNames(8), s_mat->materials(IShadingDevice)->Name)); ErrorsFound = true; } if ((ShTyp == DataSurfaces::WinShadingType::IntBlind || ShTyp == DataSurfaces::WinShadingType::ExtBlind) && s_mat->materials(IShadingDevice)->group != Material::Group::Blind) { - ShowSevereError( - state, - EnergyPlus::format("{}=\"{}\" has {}= InteriorBlind or ExteriorBlind but matching shading device is not a window blind", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaArgs(3))); - ShowContinueError(state, - EnergyPlus::format("{} in error=\"{}\".", s_ipsc->cAlphaFieldNames(8), s_mat->materials(IShadingDevice)->Name)); + ShowSevereError(state, + std::format("{}=\"{}\" has {}= InteriorBlind or ExteriorBlind but matching shading device is not a window blind", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaArgs(3))); + ShowContinueError(state, std::format("{} in error=\"{}\".", s_ipsc->cAlphaFieldNames(8), s_mat->materials(IShadingDevice)->Name)); ErrorsFound = true; } if (ShTyp == DataSurfaces::WinShadingType::BGShade || ShTyp == DataSurfaces::WinShadingType::BGBlind) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" has {}= BetweenGlassShade or BetweenGlassBlind and", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\" has {}= BetweenGlassShade or BetweenGlassBlind and", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaArgs(3))); ShowContinueError( - state, - EnergyPlus::format("{} is specified. This is illegal. Specify shaded construction instead.", s_ipsc->cAlphaFieldNames(8))); + state, std::format("{} is specified. This is illegal. Specify shaded construction instead.", s_ipsc->cAlphaFieldNames(8))); ErrorsFound = true; } } else if (IShadedConst > 0 && IShadingDevice > 0) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\" Both {} and {} are specified.", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaFieldNames(9))); - ShowContinueError(state, - EnergyPlus::format("The {}=\"{}\" will be used.", - s_ipsc->cAlphaFieldNames(4), - state.dataConstruction->Construct(IShadedConst).Name)); + std::format("{}=\"{}\" Both {} and {} are specified.", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaFieldNames(9))); + ShowContinueError( + state, + std::format("The {}=\"{}\" will be used.", s_ipsc->cAlphaFieldNames(4), state.dataConstruction->Construct(IShadedConst).Name)); } // If type = interior or exterior shade or blind require that the shaded construction @@ -10044,75 +9977,75 @@ namespace SurfaceGeometry { if (s_mat->materials(state.dataConstruction->Construct(IShadedConst).LayerPoint(NLayers))->group != Material::Group::Shade) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" the {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + std::format("{}=\"{}\" the {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - EnergyPlus::format("of {}=\"{}\" should have a shade layer on the inside of the window.", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("of {}=\"{}\" should have a shade layer on the inside of the window.", + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); } } else if (windowShadingControl.ShadingType == DataSurfaces::WinShadingType::ExtShade) { IShadingDevice = state.dataConstruction->Construct(IShadedConst).LayerPoint(1); if (s_mat->materials(state.dataConstruction->Construct(IShadedConst).LayerPoint(1))->group != Material::Group::Shade) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" the {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(43), - s_ipsc->cAlphaArgs(4))); + std::format("{}=\"{}\" the {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(43), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - EnergyPlus::format("of {}=\"{}\" should have a shade layer on the outside of the window.", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("of {}=\"{}\" should have a shade layer on the outside of the window.", + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); } } else if (windowShadingControl.ShadingType == DataSurfaces::WinShadingType::ExtScreen) { IShadingDevice = state.dataConstruction->Construct(IShadedConst).LayerPoint(1); if (s_mat->materials(state.dataConstruction->Construct(IShadedConst).LayerPoint(1))->group != Material::Group::Screen) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" the {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + std::format("{}=\"{}\" the {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - EnergyPlus::format("of {}=\"{}\" should have a screen layer on the outside of the window.", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("of {}=\"{}\" should have a screen layer on the outside of the window.", + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); } } else if (windowShadingControl.ShadingType == DataSurfaces::WinShadingType::IntBlind) { IShadingDevice = state.dataConstruction->Construct(IShadedConst).LayerPoint(NLayers); if (s_mat->materials(state.dataConstruction->Construct(IShadedConst).LayerPoint(NLayers))->group != Material::Group::Blind) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" the {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + std::format("{}=\"{}\" the {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - EnergyPlus::format("of {}=\"{}\" should have a blind layer on the inside of the window.", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("of {}=\"{}\" should have a blind layer on the inside of the window.", + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); } } else if (windowShadingControl.ShadingType == DataSurfaces::WinShadingType::ExtBlind) { IShadingDevice = state.dataConstruction->Construct(IShadedConst).LayerPoint(1); if (s_mat->materials(state.dataConstruction->Construct(IShadedConst).LayerPoint(1))->group != Material::Group::Blind) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" the {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + std::format("{}=\"{}\" the {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - EnergyPlus::format("of {}=\"{}\" should have a blind layer on the outside of the window.", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("of {}=\"{}\" should have a blind layer on the outside of the window.", + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); } } else if (windowShadingControl.ShadingType == DataSurfaces::WinShadingType::BGShade) { if (NLayers != 5 && NLayers != 7) { @@ -10131,15 +10064,15 @@ namespace SurfaceGeometry { if (BGShadeBlindError) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" the {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + std::format("{}=\"{}\" the {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - EnergyPlus::format("of {}=\"{}\" should have two or three glass layers and a", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("of {}=\"{}\" should have two or three glass layers and a", + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); ShowContinueError(state, "between-glass shade layer with a gas layer on each side."); } } else if (windowShadingControl.ShadingType == DataSurfaces::WinShadingType::BGBlind) { @@ -10159,15 +10092,15 @@ namespace SurfaceGeometry { if (BGShadeBlindError) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" the {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + std::format("{}=\"{}\" the {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - EnergyPlus::format("of {}=\"{}\" should have two or three glass layers and a", - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("of {}=\"{}\" should have two or three glass layers and a", + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); ShowContinueError(state, "between-glass blind layer with a gas layer on each side."); } } @@ -10177,32 +10110,31 @@ namespace SurfaceGeometry { s_mat->materials(IShadingDevice)->group != Material::Group::Shade) { ShowSevereError( state, - EnergyPlus::format("{}=\"{}\" has {}= InteriorShade or ExteriorShade but matching shading device is not a window shade", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(3))); - ShowContinueError(state, EnergyPlus::format("Shading Device in error=\"{}\".", s_mat->materials(IShadingDevice)->Name)); + std::format("{}=\"{}\" has {}= InteriorShade or ExteriorShade but matching shading device is not a window shade", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(3))); + ShowContinueError(state, std::format("Shading Device in error=\"{}\".", s_mat->materials(IShadingDevice)->Name)); ErrorsFound = true; } if ((ShTyp == DataSurfaces::WinShadingType::ExtScreen) && s_mat->materials(IShadingDevice)->group != Material::Group::Screen) { - ShowSevereError( - state, - EnergyPlus::format("{}=\"{}\" has {}= ExteriorScreen but matching shading device is not an exterior window screen.", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(3))); - ShowContinueError(state, EnergyPlus::format("Shading Device in error=\"{}\".", s_mat->materials(IShadingDevice)->Name)); + ShowSevereError(state, + std::format("{}=\"{}\" has {}= ExteriorScreen but matching shading device is not an exterior window screen.", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(3))); + ShowContinueError(state, std::format("Shading Device in error=\"{}\".", s_mat->materials(IShadingDevice)->Name)); ErrorsFound = true; } if ((ShTyp == DataSurfaces::WinShadingType::IntBlind || ShTyp == DataSurfaces::WinShadingType::ExtBlind) && s_mat->materials(IShadingDevice)->group != Material::Group::Blind) { ShowSevereError( state, - EnergyPlus::format("{}=\"{}\" has {}= InteriorBlind or ExteriorBlind but matching shading device is not a window blind.", - s_ipsc->cCurrentModuleObject, - windowShadingControl.Name, - s_ipsc->cAlphaFieldNames(3))); - ShowContinueError(state, EnergyPlus::format("Shading Device in error=\"{}\".", s_mat->materials(IShadingDevice)->Name)); + std::format("{}=\"{}\" has {}= InteriorBlind or ExteriorBlind but matching shading device is not a window blind.", + s_ipsc->cCurrentModuleObject, + windowShadingControl.Name, + s_ipsc->cAlphaFieldNames(3))); + ShowContinueError(state, std::format("Shading Device in error=\"{}\".", s_mat->materials(IShadingDevice)->Name)); ErrorsFound = true; } } @@ -10230,23 +10162,21 @@ namespace SurfaceGeometry { ErrorsFound = true; ShowSevereError( state, - EnergyPlus::format( - "InitialAssociateWindowShadingControlFenestration: \"{}\", invalid because it is not an exterior window.", - surfTemp.Name)); + std::format("InitialAssociateWindowShadingControlFenestration: \"{}\", invalid because it is not an exterior window.", + surfTemp.Name)); ShowContinueError(state, - EnergyPlus::format(".. It appears on WindowShadingControl object: \"{}", - state.dataSurface->WindowShadingControl(iShadeCtrl).Name)); + std::format(".. It appears on WindowShadingControl object: \"{}", + state.dataSurface->WindowShadingControl(iShadeCtrl).Name)); } // check to make sure the window is not using equivalent layer window construction if (state.dataConstruction->Construct(surfTemp.Construction).WindowTypeEQL) { ErrorsFound = true; - ShowSevereError(state, - EnergyPlus::format("InitialAssociateWindowShadingControlFenestration: =\"{}\", invalid \".", surfTemp.Name)); + ShowSevereError(state, std::format("InitialAssociateWindowShadingControlFenestration: =\"{}\", invalid \".", surfTemp.Name)); ShowContinueError(state, ".. equivalent layer window model does not use shading control object."); ShowContinueError(state, ".. Shading control is set to none or zero, and simulation continues."); ShowContinueError(state, - EnergyPlus::format(".. It appears on WindowShadingControl object: \"{}", - state.dataSurface->WindowShadingControl(iShadeCtrl).Name)); + std::format(".. It appears on WindowShadingControl object: \"{}", + state.dataSurface->WindowShadingControl(iShadeCtrl).Name)); surfTemp.activeWindowShadingControl = 0; } } @@ -10270,12 +10200,12 @@ namespace SurfaceGeometry { // this error condition should not occur since the rearrangement of Surface() from SurfureTmp() is reliable. ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("FinalAssociateWindowShadingControlFenestration: Fenestration surface named \"{}\" has " - "WindowShadingContol index that does not match the initial index assigned.", - state.dataSurface->Surface(fenestrationIndex).Name)); + std::format("FinalAssociateWindowShadingControlFenestration: Fenestration surface named \"{}\" has " + "WindowShadingContol index that does not match the initial index assigned.", + state.dataSurface->Surface(fenestrationIndex).Name)); ShowContinueError(state, - EnergyPlus::format("This occurs while WindowShadingControl object: \"{}\" is being evaluated. ", - state.dataSurface->WindowShadingControl(iShadeCtrl).Name)); + std::format("This occurs while WindowShadingControl object: \"{}\" is being evaluated. ", + state.dataSurface->WindowShadingControl(iShadeCtrl).Name)); } } } @@ -10292,15 +10222,14 @@ namespace SurfaceGeometry { for (auto wsc = std::next(theSurf.windowShadingControlList.begin()); wsc != theSurf.windowShadingControlList.end(); ++wsc) { if (!isWindowShadingControlSimilar(state, firstWindowShadingControl, *wsc)) { ErrorsFound = true; - ShowSevereError( - state, - EnergyPlus::format("CheckWindowShadingControlSimilarForWindow: Fenestration surface named \"{}\" has multiple " - "WindowShadingContols that are not similar.", - theSurf.Name)); + ShowSevereError(state, + std::format("CheckWindowShadingControlSimilarForWindow: Fenestration surface named \"{}\" has multiple " + "WindowShadingContols that are not similar.", + theSurf.Name)); ShowContinueError(state, - EnergyPlus::format("for: \"{} and: {}", - state.dataSurface->WindowShadingControl(firstWindowShadingControl).Name, - state.dataSurface->WindowShadingControl(*wsc).Name)); + std::format("for: \"{} and: {}", + state.dataSurface->WindowShadingControl(firstWindowShadingControl).Name, + state.dataSurface->WindowShadingControl(*wsc).Name)); } } } @@ -10385,9 +10314,9 @@ namespace SurfaceGeometry { if (state.dataSurface->StormWindow(StormWinNum).DateOn == state.dataSurface->StormWindow(StormWinNum).DateOff) { ShowSevereError(state, - EnergyPlus::format("{}: Date On = Date Off -- not allowed, occurred in WindowProperty:StormWindow Input #{}", - s_ipsc->cCurrentModuleObject, - StormWinNum)); + std::format("{}: Date On = Date Off -- not allowed, occurred in WindowProperty:StormWindow Input #{}", + s_ipsc->cCurrentModuleObject, + StormWinNum)); ErrorsFound = true; } @@ -10413,19 +10342,19 @@ namespace SurfaceGeometry { if (state.dataSurface->StormWindow(StormWinNum).DayOfMonthOn > oneBasedDaysInMonth[state.dataSurface->StormWindow(StormWinNum).MonthOn]) { ShowSevereError(state, - EnergyPlus::format("{}: Date On (Day of Month) [{}], invalid for WindowProperty:StormWindow Input #{}", - s_ipsc->cCurrentModuleObject, - state.dataSurface->StormWindow(StormWinNum).DayOfMonthOn, - StormWinNum)); + std::format("{}: Date On (Day of Month) [{}], invalid for WindowProperty:StormWindow Input #{}", + s_ipsc->cCurrentModuleObject, + state.dataSurface->StormWindow(StormWinNum).DayOfMonthOn, + StormWinNum)); ErrorsFound = true; } break; } ShowSevereError(state, - EnergyPlus::format("{}: Date On Month [{}], invalid for WindowProperty:StormWindow Input #{}", - s_ipsc->cCurrentModuleObject, - state.dataSurface->StormWindow(StormWinNum).MonthOn, - StormWinNum)); + std::format("{}: Date On Month [{}], invalid for WindowProperty:StormWindow Input #{}", + s_ipsc->cCurrentModuleObject, + state.dataSurface->StormWindow(StormWinNum).MonthOn, + StormWinNum)); ErrorsFound = true; int const monthOff = state.dataSurface->StormWindow(StormWinNum).MonthOff; @@ -10433,19 +10362,19 @@ namespace SurfaceGeometry { if (state.dataSurface->StormWindow(StormWinNum).DayOfMonthOff > oneBasedDaysInMonth[state.dataSurface->StormWindow(StormWinNum).MonthOff]) { ShowSevereError(state, - EnergyPlus::format("{}: Date Off (Day of Month) [{}], invalid for WindowProperty:StormWindow Input #{}", - s_ipsc->cCurrentModuleObject, - state.dataSurface->StormWindow(StormWinNum).DayOfMonthOff, - StormWinNum)); + std::format("{}: Date Off (Day of Month) [{}], invalid for WindowProperty:StormWindow Input #{}", + s_ipsc->cCurrentModuleObject, + state.dataSurface->StormWindow(StormWinNum).DayOfMonthOff, + StormWinNum)); ErrorsFound = true; } break; } ShowSevereError(state, - EnergyPlus::format("{}: Date Off Month [{}], invalid for WindowProperty:StormWindow Input #{}", - s_ipsc->cCurrentModuleObject, - state.dataSurface->StormWindow(StormWinNum).MonthOff, - StormWinNum)); + std::format("{}: Date Off Month [{}], invalid for WindowProperty:StormWindow Input #{}", + s_ipsc->cCurrentModuleObject, + state.dataSurface->StormWindow(StormWinNum).MonthOff, + StormWinNum)); ErrorsFound = true; } @@ -10455,13 +10384,13 @@ namespace SurfaceGeometry { // Require BaseWindowNum be that of an exterior window int SurfNum = state.dataSurface->StormWindow(StormWinNum).BaseWindowNum; if (SurfNum == 0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\" invalid.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } else { auto const &surf = state.dataSurface->Surface(SurfNum); if (surf.Class != SurfaceClass::Window || surf.ExtBoundCond != 0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\"", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowSevereError(state, EnergyPlus::format("cannot be used with surface={}", surf.Name)); + ShowSevereError(state, std::format("{}=\"{}\"", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("cannot be used with surface={}", surf.Name)); ShowContinueError(state, "because that surface is not an exterior window."); ErrorsFound = true; } @@ -10471,28 +10400,27 @@ namespace SurfaceGeometry { int MatNum = state.dataSurface->StormWindow(StormWinNum).StormWinMaterialNum; if (SurfNum > 0) { if (MatNum == 0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\"", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError( - state, EnergyPlus::format("{}=\"{}\" not found as storm window layer.", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + ShowSevereError(state, std::format("{}=\"{}\"", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, + std::format("{}=\"{}\" not found as storm window layer.", s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } else { if (s_mat->materials(MatNum)->group != Material::Group::Glass) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\"", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError( - state, - EnergyPlus::format("{}=\"{}must be a WindowMaterial:Glazing or WindowMaterial:Glazing:RefractionExtinctionMethod", - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + ShowSevereError(state, std::format("{}=\"{}\"", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, + std::format("{}=\"{}must be a WindowMaterial:Glazing or WindowMaterial:Glazing:RefractionExtinctionMethod", + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } } // Error if base window has airflow control if (state.dataSurface->SurfWinAirflowControlType(SurfNum) != DataSurfaces::WindowAirFlowControlType::Invalid) { - ShowSevereError(state, - EnergyPlus::format( - "{}=\"{} cannot be used because it is an airflow window (i.e., has WindowProperty:AirflowControl specified)", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + ShowSevereError( + state, + std::format("{}=\"{} cannot be used because it is an airflow window (i.e., has WindowProperty:AirflowControl specified)", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } } @@ -10503,14 +10431,14 @@ namespace SurfaceGeometry { (state.dataSurface->StormWindow(StormWinNum).MonthOn < state.dataSurface->StormWindow(StormWinNum).MonthOff)) || (state.dataEnvrn->Latitude <= 0.0 && (state.dataSurface->StormWindow(StormWinNum).MonthOn > state.dataSurface->StormWindow(StormWinNum).MonthOff))) { - ShowWarningError( - state, EnergyPlus::format("{}=\"{}\" check times that storm window", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowWarningError(state, + std::format("{}=\"{}\" check times that storm window", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, - EnergyPlus::format("is put on (month={}, day={}) and taken off (month={}, day={});", - state.dataSurface->StormWindow(StormWinNum).MonthOn, - state.dataSurface->StormWindow(StormWinNum).DayOfMonthOn, - state.dataSurface->StormWindow(StormWinNum).MonthOff, - state.dataSurface->StormWindow(StormWinNum).DayOfMonthOff)); + std::format("is put on (month={}, day={}) and taken off (month={}, day={});", + state.dataSurface->StormWindow(StormWinNum).MonthOn, + state.dataSurface->StormWindow(StormWinNum).DayOfMonthOn, + state.dataSurface->StormWindow(StormWinNum).MonthOff, + state.dataSurface->StormWindow(StormWinNum).DayOfMonthOff)); ShowContinueError( state, EnergyPlus::format("these times may be reversed for your building latitude={:.2R} deg.", state.dataEnvrn->Latitude)); } @@ -10579,7 +10507,7 @@ namespace SurfaceGeometry { int SurfNum = Util::FindItemInList(s_ipsc->cAlphaArgs(1), state.dataSurface->Surface, state.dataSurface->TotSurfaces); if (SurfNum == 0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" not found.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\" not found.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } // Check that associated surface is a 2- or 3-pane exterior window @@ -10601,9 +10529,9 @@ namespace SurfaceGeometry { } if (WrongSurfaceType) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" is not an exterior window with 2 or 3 glass layers.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + std::format("{}=\"{}\" is not an exterior window with 2 or 3 glass layers.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); ErrorsFound = true; } } @@ -10612,34 +10540,34 @@ namespace SurfaceGeometry { if (s_ipsc->cAlphaArgs(2) != "INDOORAIR" && s_ipsc->cAlphaArgs(2) != "OUTDOORAIR") { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\" invalid {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); } // Error if illegal airflow destination if (s_ipsc->cAlphaArgs(3) != "INDOORAIR" && s_ipsc->cAlphaArgs(3) != "OUTDOORAIR" && s_ipsc->cAlphaArgs(3) != "RETURNAIR") { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\" invalid {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); } // Error if source = OutsideAir and destination = ReturnAir if (s_ipsc->cAlphaArgs(2) == "OUTDOORAIR" && s_ipsc->cAlphaArgs(3) == "RETURNAIR") { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); - ShowContinueError(state, EnergyPlus::format("..when {}=\"{}\"", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); + std::format("{}=\"{}\" invalid {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); + ShowContinueError(state, std::format("..when {}=\"{}\"", s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3))); } // Error if illegal airflow control type @@ -10647,64 +10575,64 @@ namespace SurfaceGeometry { s_ipsc->cAlphaArgs(4) != "SCHEDULEDONLY") { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + std::format("{}=\"{}\" invalid {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); } // Error if illegal value for Airflow Has Multiplier Schedule if (s_ipsc->cAlphaArgs(5) != "YES" && s_ipsc->cAlphaArgs(5) != "NO") { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5))); + std::format("{}=\"{}\" invalid {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5))); } // Error if Airflow Control Type = ScheduledOnly and Airflow Has Multiplier Schedule = No if (s_ipsc->cAlphaArgs(4) == "SCHEDULEDONLY" && s_ipsc->cAlphaArgs(5) == "NO") { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); - ShowContinueError(state, EnergyPlus::format("..when {}=\"{}\"", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); + std::format("{}=\"{}\" invalid {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); + ShowContinueError(state, std::format("..when {}=\"{}\"", s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5))); } // Warning if Airflow Control Type = AlwaysOnAtMaxFlow and Airflow Has Multiplier Schedule = Yes if (s_ipsc->cAlphaArgs(4) == "ALWAYSONATMAXIMUMFLOW" && s_ipsc->cAlphaArgs(5) == "YES") { ShowWarningError(state, - EnergyPlus::format("{}=\"{}has {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + std::format("{}=\"{}has {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - EnergyPlus::format("..but {}=\"{}If specified, the {} will be ignored.", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5), - s_ipsc->cAlphaFieldNames(5))); + std::format("..but {}=\"{}If specified, the {} will be ignored.", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5), + s_ipsc->cAlphaFieldNames(5))); } // Warning if Airflow Control Type = AlwaysOff and Airflow Has Multiplier Schedule = Yes if (s_ipsc->cAlphaArgs(4) == "ALWAYSOFF" && s_ipsc->cAlphaArgs(5) == "YES") { ShowWarningError(state, - EnergyPlus::format("{}=\"{}has {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + std::format("{}=\"{}has {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - EnergyPlus::format("..but {}=\"{}\". If specified, the {} will be ignored.", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5), - s_ipsc->cAlphaFieldNames(5))); + std::format("..but {}=\"{}\". If specified, the {} will be ignored.", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5), + s_ipsc->cAlphaFieldNames(5))); } if (SurfNum > 0) { @@ -10733,17 +10661,17 @@ namespace SurfaceGeometry { DataZoneEquipment::GetReturnAirNodeForZone(state, surf.Zone, retNodeName, callDescription); if (state.dataSurface->SurfWinAirflowReturnNodePtr(SurfNum) == 0) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\", airflow window return air node not found for {} = {}", - routineName, - s_ipsc->cCurrentModuleObject, - surf.Name, - s_ipsc->cAlphaFieldNames(3), - s_ipsc->cAlphaArgs(3))); + std::format("{}{}=\"{}\", airflow window return air node not found for {} = {}", + routineName, + s_ipsc->cCurrentModuleObject, + surf.Name, + s_ipsc->cAlphaFieldNames(3), + s_ipsc->cAlphaArgs(3))); if (!s_ipsc->lAlphaFieldBlanks(7)) { ShowContinueError(state, - EnergyPlus::format("{}=\"{}\" did not find a matching return air node.", - s_ipsc->cAlphaFieldNames(7), - s_ipsc->cAlphaArgs(7))); + std::format("{}=\"{}\" did not find a matching return air node.", + s_ipsc->cAlphaFieldNames(7), + s_ipsc->cAlphaArgs(7))); } ShowContinueError(state, "..Airflow windows with Airflow Destination = ReturnAir must reference a controlled Zone (appear in a " @@ -10767,16 +10695,16 @@ namespace SurfaceGeometry { ShowSevereItemNotFound(state, eoh, s_ipsc->cAlphaFieldNames(6), s_ipsc->cAlphaArgs(6)); ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", has {}=\"{}\"", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(4), - s_ipsc->cAlphaArgs(4))); + std::format("{}=\"{}\", has {}=\"{}\"", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(4), + s_ipsc->cAlphaArgs(4))); ShowContinueError(state, - EnergyPlus::format("..and {}=\"{}\", but no {} specified.", - s_ipsc->cAlphaFieldNames(5), - s_ipsc->cAlphaArgs(5), - s_ipsc->cAlphaFieldNames(6))); + std::format("..and {}=\"{}\", but no {} specified.", + s_ipsc->cAlphaFieldNames(5), + s_ipsc->cAlphaArgs(5), + s_ipsc->cAlphaFieldNames(6))); } else { state.dataSurface->SurfWinAirflowHasSchedule(SurfNum) = true; if ((state.dataSurface->SurfWinAirflowScheds(SurfNum) = Sched::GetSchedule(state, s_ipsc->cAlphaArgs(6))) == nullptr) { @@ -10788,9 +10716,9 @@ namespace SurfaceGeometry { // Warning if associated window is an interior window if (surf.ExtBoundCond != DataSurfaces::ExternalEnvironment && !ErrorsFound) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", is an Interior window; cannot be an airflow window.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + std::format("{}=\"{}\", is an Interior window; cannot be an airflow window.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); } if (!ErrorsFound) { // Require that gas in airflow gap has type = air @@ -10801,10 +10729,10 @@ namespace SurfaceGeometry { if (dynamic_cast(s_mat->materials(MatGapFlow))->gases[0].type != Material::GasType::Air) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", Gas type not air in airflow gap of construction {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - state.dataConstruction->Construct(ConstrNum).Name)); + std::format("{}=\"{}\", Gas type not air in airflow gap of construction {}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + state.dataConstruction->Construct(ConstrNum).Name)); } // Require that gas be air in airflow gaps on either side of a between glass shade/blind if (surf.HasShadeControl) { @@ -10825,9 +10753,9 @@ namespace SurfaceGeometry { Material::GasType::Air) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", gas type must be air on either side of the shade/blind", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1))); + std::format("{}=\"{}\", gas type must be air on either side of the shade/blind", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1))); } break; // only need the first window shading control since they should be the same } @@ -10856,7 +10784,7 @@ namespace SurfaceGeometry { if (TotKivaStgs > 1) { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("Multiple {} objects found. Only one is allowed.", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("Multiple {} objects found. Only one is allowed.", s_ipsc->cCurrentModuleObject)); } if (TotKivaStgs == 1) { @@ -10915,10 +10843,10 @@ namespace SurfaceGeometry { } else { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}, {} is not a valid choice for {}", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(alpF), - s_ipsc->cAlphaFieldNames(alpF))); + std::format("{}, {} is not a valid choice for {}", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(alpF), + s_ipsc->cAlphaFieldNames(alpF))); } } alpF++; @@ -10930,10 +10858,10 @@ namespace SurfaceGeometry { if (state.dataSurfaceGeometry->kivaManager.settings.deepGroundBoundary != HeatBalanceKivaManager::KivaManager::Settings::AUTO) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}, {} should not be set to Autocalculate unless {} is set to Autoselect", - s_ipsc->cCurrentModuleObject, - s_ipsc->cNumericFieldNames(numF), - s_ipsc->cAlphaFieldNames(alpF - 1))); + std::format("{}, {} should not be set to Autocalculate unless {} is set to Autoselect", + s_ipsc->cCurrentModuleObject, + s_ipsc->cNumericFieldNames(numF), + s_ipsc->cAlphaFieldNames(alpF - 1))); } } else { state.dataSurfaceGeometry->kivaManager.settings.deepGroundDepth = s_ipsc->rNumericArgs(numF); @@ -11022,11 +10950,11 @@ namespace SurfaceGeometry { if (m->group != Material::Group::Regular || m->ROnly) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); ShowContinueError(state, "Must be of type \"Material\""); continue; } @@ -11046,11 +10974,11 @@ namespace SurfaceGeometry { if (s_ipsc->lNumericFieldBlanks(numF)) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {} defined, but no {}provided", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF - 1), - s_ipsc->cNumericFieldNames(numF))); + std::format("{}=\"{}\", {} defined, but no {}provided", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF - 1), + s_ipsc->cNumericFieldNames(numF))); continue; } fndInput.intHIns.width = -s_ipsc->rNumericArgs(numF); @@ -11060,17 +10988,15 @@ namespace SurfaceGeometry { if (!s_ipsc->lNumericFieldBlanks(numF)) { ShowWarningError( state, - EnergyPlus::format( - "{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); - ShowContinueError(state, EnergyPlus::format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); + std::format("{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); + ShowContinueError(state, std::format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); } numF++; if (!s_ipsc->lNumericFieldBlanks(numF)) { ShowWarningError( state, - EnergyPlus::format( - "{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); - ShowContinueError(state, EnergyPlus::format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); + std::format("{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); + ShowContinueError(state, std::format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); } numF++; } @@ -11081,22 +11007,22 @@ namespace SurfaceGeometry { if (index == 0) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("Did not find matching material for {}=\"{}\", {}, missing material = {}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + std::format("Did not find matching material for {}=\"{}\", {}, missing material = {}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); continue; } auto *m = s_mat->materials(index); if (m->group != Material::Group::Regular || m->ROnly) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); ShowContinueError(state, "Must be of type \"Material\""); continue; } @@ -11111,11 +11037,11 @@ namespace SurfaceGeometry { if (s_ipsc->lNumericFieldBlanks(numF)) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {} defined, but no {}provided", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF - 1), - s_ipsc->cNumericFieldNames(numF))); + std::format("{}=\"{}\", {} defined, but no {}provided", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF - 1), + s_ipsc->cNumericFieldNames(numF))); continue; } fndInput.intVIns.depth = s_ipsc->rNumericArgs(numF); @@ -11125,9 +11051,8 @@ namespace SurfaceGeometry { if (!s_ipsc->lNumericFieldBlanks(numF)) { ShowWarningError( state, - EnergyPlus::format( - "{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); - ShowContinueError(state, EnergyPlus::format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); + std::format("{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); + ShowContinueError(state, std::format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); } numF++; } @@ -11138,22 +11063,22 @@ namespace SurfaceGeometry { if (index == 0) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("Did not find matching material for {}=\"{}\", {}, missing material = {}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + std::format("Did not find matching material for {}=\"{}\", {}, missing material = {}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); continue; } auto *m = s_mat->materials(index); if (m->group != Material::Group::Regular || m->ROnly) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); ShowContinueError(state, "Must be of type \"Material\""); continue; } @@ -11173,11 +11098,11 @@ namespace SurfaceGeometry { if (s_ipsc->lNumericFieldBlanks(numF)) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {} defined, but no {}provided", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF - 1), - s_ipsc->cNumericFieldNames(numF))); + std::format("{}=\"{}\", {} defined, but no {}provided", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF - 1), + s_ipsc->cNumericFieldNames(numF))); continue; } fndInput.extHIns.width = s_ipsc->rNumericArgs(numF); @@ -11187,17 +11112,15 @@ namespace SurfaceGeometry { if (!s_ipsc->lNumericFieldBlanks(numF)) { ShowWarningError( state, - EnergyPlus::format( - "{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); - ShowContinueError(state, EnergyPlus::format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); + std::format("{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); + ShowContinueError(state, std::format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); } numF++; if (!s_ipsc->lNumericFieldBlanks(numF)) { ShowWarningError( state, - EnergyPlus::format( - "{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); - ShowContinueError(state, EnergyPlus::format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); + std::format("{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); + ShowContinueError(state, std::format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); } numF++; } @@ -11208,22 +11131,22 @@ namespace SurfaceGeometry { if (index == 0) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("Did not find matching material for {}=\"{}\", {}, missing material = {}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + std::format("Did not find matching material for {}=\"{}\", {}, missing material = {}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); continue; } auto *m = s_mat->materials(index); if (m->group != Material::Group::Regular || m->ROnly) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); ShowContinueError(state, "Must be of type \"Material\""); continue; } @@ -11238,11 +11161,11 @@ namespace SurfaceGeometry { if (s_ipsc->lNumericFieldBlanks(numF)) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {} defined, but no {}provided", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF - 1), - s_ipsc->cNumericFieldNames(numF))); + std::format("{}=\"{}\", {} defined, but no {}provided", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF - 1), + s_ipsc->cNumericFieldNames(numF))); continue; } fndInput.extVIns.depth = s_ipsc->rNumericArgs(numF); @@ -11252,9 +11175,8 @@ namespace SurfaceGeometry { if (!s_ipsc->lNumericFieldBlanks(numF)) { ShowWarningError( state, - EnergyPlus::format( - "{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); - ShowContinueError(state, EnergyPlus::format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); + std::format("{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); + ShowContinueError(state, std::format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); } numF++; } @@ -11275,11 +11197,11 @@ namespace SurfaceGeometry { if (fndInput.wallConstructionIndex == 0) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("Did not find matching construction for {}=\"{}\", {}, missing construction = {}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + std::format("Did not find matching construction for {}=\"{}\", {}, missing construction = {}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); continue; } auto &c = state.dataConstruction->Construct(fndInput.wallConstructionIndex); @@ -11287,11 +11209,11 @@ namespace SurfaceGeometry { if (c.TypeIsWindow) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); ShowContinueError(state, "Cannot be a window construction"); continue; } @@ -11306,22 +11228,22 @@ namespace SurfaceGeometry { if (index == 0) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("Did not find matching material for {}=\"{}\", {}, missing material = {}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + std::format("Did not find matching material for {}=\"{}\", {}, missing material = {}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); continue; } auto *m = s_mat->materials(index); if (m->group != Material::Group::Regular || m->ROnly) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); ShowContinueError(state, "Must be of type \"Material\""); continue; } @@ -11336,11 +11258,11 @@ namespace SurfaceGeometry { if (s_ipsc->lNumericFieldBlanks(numF)) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {} defined, but no {}provided", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF - 1), - s_ipsc->cNumericFieldNames(numF))); + std::format("{}=\"{}\", {} defined, but no {}provided", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF - 1), + s_ipsc->cNumericFieldNames(numF))); continue; } fndInput.footing.depth = s_ipsc->rNumericArgs(numF); @@ -11350,9 +11272,8 @@ namespace SurfaceGeometry { if (!s_ipsc->lNumericFieldBlanks(numF)) { ShowWarningError( state, - EnergyPlus::format( - "{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); - ShowContinueError(state, EnergyPlus::format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); + std::format("{}=\"{}\", no {} defined", s_ipsc->cCurrentModuleObject, fndInput.name, s_ipsc->cAlphaFieldNames(alpF - 1))); + ShowContinueError(state, std::format("{} will not be used.", s_ipsc->cNumericFieldNames(numF))); } numF++; } @@ -11363,10 +11284,10 @@ namespace SurfaceGeometry { int numBlocks = numRemainingFields / 4; if (mod(numRemainingFields, 4) != 0) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\", number of Block fields not even multiple of 4. Will read in {}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - numBlocks)); + std::format("{}=\"{}\", number of Block fields not even multiple of 4. Will read in {}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + numBlocks)); } for (int blockNum = 0; blockNum < numBlocks; blockNum++) { Kiva::InputBlock block; @@ -11375,22 +11296,22 @@ namespace SurfaceGeometry { if (index == 0) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("Did not find matching material for {}=\"{}\", {}, missing material = {}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + std::format("Did not find matching material for {}=\"{}\", {}, missing material = {}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); continue; } auto *m = s_mat->materials(index); if (m->group != Material::Group::Regular || m->ROnly) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", invalid {}=\"{}", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF), - s_ipsc->cAlphaArgs(alpF))); + std::format("{}=\"{}\", invalid {}=\"{}", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF), + s_ipsc->cAlphaArgs(alpF))); ShowContinueError(state, "Must be of type \"Material\""); continue; } @@ -11399,10 +11320,10 @@ namespace SurfaceGeometry { } else { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {} is required and not given.", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF))); + std::format("{}=\"{}\", {} is required and not given.", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF))); continue; } alpF++; @@ -11417,11 +11338,11 @@ namespace SurfaceGeometry { if (s_ipsc->lNumericFieldBlanks(numF)) { ErrorsFound = true; ShowSevereError(state, - EnergyPlus::format("{}=\"{}\", {} defined, but no {}provided", - s_ipsc->cCurrentModuleObject, - fndInput.name, - s_ipsc->cAlphaFieldNames(alpF - 1), - s_ipsc->cNumericFieldNames(numF))); + std::format("{}=\"{}\", {} defined, but no {}provided", + s_ipsc->cCurrentModuleObject, + fndInput.name, + s_ipsc->cAlphaFieldNames(alpF - 1), + s_ipsc->cNumericFieldNames(numF))); continue; } block.x = s_ipsc->rNumericArgs(numF); @@ -11579,15 +11500,13 @@ namespace SurfaceGeometry { if (s_ipsc->rNumericArgs(1) > 0.0 && !any_ne(s_ipsc->rNumericArgs({3, 7}), 0.0) && (!state.dataSurface->OSC(OSCNum).SinusoidalConstTempCoef)) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" has zeros for all coefficients.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\" has zeros for all coefficients.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "...The outdoor air temperature for surfaces using this OtherSideCoefficients object will always be 0C."); } if (s_ipsc->rNumericArgs(1) <= 0.0 && !any_ne(s_ipsc->rNumericArgs({3, 7}), 0.0) && (!state.dataSurface->OSC(OSCNum).SinusoidalConstTempCoef)) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" has zeros for all coefficients.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}=\"{}\" has zeros for all coefficients.", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); ShowContinueError(state, "...The outside surface temperature for surfaces using this OtherSideCoefficients object will always be 0C."); } @@ -11897,11 +11816,11 @@ namespace SurfaceGeometry { if ((MaterialLayerGroup == Material::Group::GlassSimple) || (MaterialLayerGroup == Material::Group::ShadeEQL) || (MaterialLayerGroup == Material::Group::DrapeEQL) || (MaterialLayerGroup == Material::Group::BlindEQL) || (MaterialLayerGroup == Material::Group::ScreenEQL) || (MaterialLayerGroup == Material::Group::WindowGapEQL)) { - ShowSevereError(state, EnergyPlus::format("Invalid movable insulation material for {}:", s_ipsc->cCurrentModuleObject)); - ShowSevereError(state, - EnergyPlus::format("...Movable insulation material type specified = {}", - cMaterialGroupType(static_cast(MaterialLayerGroup)))); - ShowSevereError(state, EnergyPlus::format("...Movable insulation material name specified = {}", s_ipsc->cAlphaArgs(3))); + ShowSevereError(state, std::format("Invalid movable insulation material for {}:", s_ipsc->cCurrentModuleObject)); + ShowSevereError( + state, + std::format("...Movable insulation material type specified = {}", cMaterialGroupType(static_cast(MaterialLayerGroup)))); + ShowSevereError(state, std::format("...Movable insulation material name specified = {}", s_ipsc->cAlphaArgs(3))); ErrorsFound = true; } @@ -11922,10 +11841,10 @@ namespace SurfaceGeometry { if (thisMaterial->Resistance <= 0.0) { if (thisMaterial->Conductivity <= 0.0 || thisMaterial->Thickness <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{}, {}=\"{}\", invalid material.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}, {}=\"{}\", invalid material.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ShowContinueError(state, "\"Outside\", invalid material for movable insulation."); ShowContinueError(state, EnergyPlus::format("Material=\"{}\",Resistance=[{:.3R}], must be > 0 for use in Movable Insulation.", @@ -11940,10 +11859,10 @@ namespace SurfaceGeometry { if (thisMaterial->Conductivity <= 0.0) { if (thisMaterial->Resistance <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{}, {}=\"{}\", invalid material.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}, {}=\"{}\", invalid material.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ShowContinueError(state, "\"Outside\", invalid material for movable insulation."); ShowContinueError(state, EnergyPlus::format("Material=\"{}\",Conductivity=[{:.3R}], must be > 0 for use in Movable Insulation.", @@ -11969,10 +11888,10 @@ namespace SurfaceGeometry { if (thisMaterial->Resistance <= 0.0) { if (thisMaterial->Conductivity <= 0.0 || thisMaterial->Thickness <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{}, {}=\"{}\", invalid material.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}, {}=\"{}\", invalid material.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ShowContinueError(state, "\"Inside\", invalid material for movable insulation."); ShowContinueError(state, EnergyPlus::format("Material=\"{}\",Resistance=[{:.3R}], must be > 0 for use in Movable Insulation.", @@ -11990,8 +11909,8 @@ namespace SurfaceGeometry { } // switch (inulationType) if (state.dataSurface->Surface(SurfNum).Class == SurfaceClass::Window) { - ShowSevereError( - state, EnergyPlus::format("{}, {}=\"{}\"", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); + ShowSevereError(state, + std::format("{}, {}=\"{}\"", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaFieldNames(2), s_ipsc->cAlphaArgs(2))); ShowContinueError(state, "invalid use on a Window. Use WindowShadingControl instead."); ErrorsFound = true; } @@ -12034,11 +11953,10 @@ namespace SurfaceGeometry { int countNotFullyEnclosedZones = 0; for (auto &thisZone : state.dataHeatBal->Zone) { if (!thisZone.HasFloor) { - ShowWarningError( - state, - EnergyPlus::format("No floor exists in Zone=\"{}\", zone floor area is zero. All values for this zone that are entered per " - "floor area will be zero.", - thisZone.Name)); + ShowWarningError(state, + std::format("No floor exists in Zone=\"{}\", zone floor area is zero. All values for this zone that are entered per " + "floor area will be zero.", + thisZone.Name)); } Real64 SumAreas = 0.0; @@ -12121,9 +12039,9 @@ namespace SurfaceGeometry { } else if (thisZone.Volume == Constant::AutoCalculate) { // no user entered zone volume ShowSevereError( state, - EnergyPlus::format("For zone: {} it is not possible to calculate the volume from the surrounding surfaces so either provide the " - "volume value or define all the surfaces to fully enclose the zone.", - thisZone.Name)); + std::format("For zone: {} it is not possible to calculate the volume from the surrounding surfaces so either provide the " + "volume value or define all the surfaces to fully enclose the zone.", + thisZone.Name)); CalcVolume = 0.; volCalcMethod = ZoneVolumeCalcMethod::Invalid; } else { @@ -12133,11 +12051,10 @@ namespace SurfaceGeometry { if (!isZoneEnclosed) { ++countNotFullyEnclosedZones; if (state.dataGlobal->DisplayExtraWarnings) { // report missing - ShowWarningError( - state, - EnergyPlus::format("CalculateZoneVolume: The Zone=\"{}\" is not fully enclosed. To be fully enclosed, each edge of a " - "surface must also be an edge on one other surface.", - thisZone.Name)); + ShowWarningError(state, + std::format("CalculateZoneVolume: The Zone=\"{}\" is not fully enclosed. To be fully enclosed, each edge of a " + "surface must also be an edge on one other surface.", + thisZone.Name)); switch (volCalcMethod) { case ZoneVolumeCalcMethod::FloorAreaTimesHeight1: ShowContinueError(state, @@ -12174,18 +12091,18 @@ namespace SurfaceGeometry { if (edge.count < 2) { ShowContinueError( state, - fmt::format(" The surface \"{}\" has an edge that was used only once: it is not an edge on another surface", + std::format(" The surface \"{}\" has an edge that was used only once: it is not an edge on another surface", state.dataSurface->Surface(edge.surfNum).Name)); } else { ShowContinueError( state, - fmt::format(" The surface \"{}\" has an edge that was used {} times: it is an edge on three or more surfaces: ", + std::format(" The surface \"{}\" has an edge that was used {} times: it is an edge on three or more surfaces: ", state.dataSurface->Surface(edge.surfNum).Name, edge.count)); std::string surfaceNames = " It was found on the following Surfaces: "; for (int surfNum : edge.otherSurfNums) { - surfaceNames += fmt::format("'{}' ", state.dataSurface->Surface(surfNum).Name); + surfaceNames += std::format("'{}' ", state.dataSurface->Surface(surfNum).Name); } ShowContinueError(state, surfaceNames); } @@ -12218,8 +12135,7 @@ namespace SurfaceGeometry { // Warn user of using specified Zone Volume ShowWarningError( state, - EnergyPlus::format("Entered Volume entered for Zone=\"{}\" significantly different from calculated Volume", - thisZone.Name)); + std::format("Entered Volume entered for Zone=\"{}\" significantly different from calculated Volume", thisZone.Name)); ShowContinueError( state, EnergyPlus::format("Entered Zone Volume value={:.2R}, Calculated Zone Volume value={:.2R}, entered volume will be " @@ -12240,7 +12156,7 @@ namespace SurfaceGeometry { } if (thisZone.Volume <= 0.0) { - ShowWarningError(state, EnergyPlus::format("Indicated Zone Volume <= 0.0 for Zone={}", thisZone.Name)); + ShowWarningError(state, std::format("Indicated Zone Volume <= 0.0 for Zone={}", thisZone.Name)); ShowContinueError(state, EnergyPlus::format("The calculated Zone Volume was={:.2R}", thisZone.Volume)); ShowContinueError(state, "The simulation will continue with the Zone Volume set to 10.0 m3. "); ShowContinueError(state, "...use Output:Diagnostics,DisplayExtraWarnings; to show more details on individual zones."); @@ -12320,9 +12236,9 @@ namespace SurfaceGeometry { state, "CalculateZoneVolume: 1 zone is not fully enclosed. For more details use: Output:Diagnostics,DisplayExtrawarnings; "); } else if (countNotFullyEnclosedZones > 1) { ShowWarningError(state, - EnergyPlus::format("CalculateZoneVolume: {} zones are not fully enclosed. For more details use: " - "Output:Diagnostics,DisplayExtrawarnings; ", - countNotFullyEnclosedZones)); + std::format("CalculateZoneVolume: {} zones are not fully enclosed. For more details use: " + "Output:Diagnostics,DisplayExtrawarnings; ", + countNotFullyEnclosedZones)); } } } @@ -12939,18 +12855,18 @@ namespace SurfaceGeometry { if (!IsCoPlanar) { if (OutOfLine > 0.01) { ShowSevereError(state, - EnergyPlus::format("{}Suspected non-planar surface:\"{}\", Max \"out of line\"={:.5T} at Vertex # {}", - RoutineName, - surf.Name, - OutOfLine, - LastVertexInError)); + std::format("{}Suspected non-planar surface:\"{}\", Max \"out of line\"={:.5f} at Vertex # {}", + RoutineName, + surf.Name, + OutOfLine, + LastVertexInError)); } else { ShowWarningError(state, - EnergyPlus::format("{}Possible non-planar surface:\"{}\", Max \"out of line\"={:.5T} at Vertex # {}", - RoutineName, - surf.Name, - OutOfLine, - LastVertexInError)); + std::format("{}Possible non-planar surface:\"{}\", Max \"out of line\"={:.5f} at Vertex # {}", + RoutineName, + surf.Name, + OutOfLine, + LastVertexInError)); } // ErrorInSurface=.TRUE. } @@ -13041,7 +12957,7 @@ namespace SurfaceGeometry { Vectors::PlaneEquation( state.dataSurface->Surface(surf.BaseSurf).Vertex, state.dataSurface->Surface(surf.BaseSurf).Sides, BasePlane, SError); if (SError) { - ShowSevereError(state, EnergyPlus::format("{}Degenerate surface (likely two vertices equal):\"{}\".", RoutineName, surf.Name)); + ShowSevereError(state, std::format("{}Degenerate surface (likely two vertices equal):\"{}\".", RoutineName, surf.Name)); ErrorInSurface = true; } ThisReveal = -Vectors::Pt2Plane(surf.Vertex(2), BasePlane); @@ -13069,12 +12985,11 @@ namespace SurfaceGeometry { MakeEquivalentRectangle(state, ThisSurf, ErrorsFound); if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, - EnergyPlus::format("{}Suspected 4-sided but non-rectangular Window, Door or GlassDoor:", RoutineName)); + ShowWarningError(state, std::format("{}Suspected 4-sided but non-rectangular Window, Door or GlassDoor:", RoutineName)); ShowContinueError( state, - EnergyPlus::format( - "Surface={} is transformed into an equivalent rectangular surface with the same area and aspect ratio. ", surf.Name)); + std::format("Surface={} is transformed into an equivalent rectangular surface with the same area and aspect ratio. ", + surf.Name)); } } @@ -13110,14 +13025,14 @@ namespace SurfaceGeometry { FrArea = (surf.Height + 2.0 * FrWidth) * (surf.Width + 2.0 * FrWidth) - surf.Area / surf.Multiplier; state.dataSurface->SurfWinFrameArea(ThisSurf) = FrArea * surf.Multiplier; if ((state.dataSurface->Surface(surf.BaseSurf).Area - state.dataSurface->SurfWinFrameArea(ThisSurf)) <= 0.0) { - ShowSevereError( - state, EnergyPlus::format("{}Base Surface=\"{}\", ", RoutineName, state.dataSurface->Surface(surf.BaseSurf).Name)); - ShowContinueError( - state, EnergyPlus::format("Window Surface=\"{}\" area (with frame) is too large to fit on the surface.", surf.Name)); + ShowSevereError(state, + std::format("{}Base Surface=\"{}\", ", RoutineName, state.dataSurface->Surface(surf.BaseSurf).Name)); + ShowContinueError(state, + std::format("Window Surface=\"{}\" area (with frame) is too large to fit on the surface.", surf.Name)); ShowContinueError(state, - EnergyPlus::format("Base surface area (-windows and doors)=[{:.2T}] m2, frame area=[{:.2T}] m2.", - state.dataSurface->Surface(surf.BaseSurf).Area, - state.dataSurface->SurfWinFrameArea(ThisSurf))); + std::format("Base surface area (-windows and doors)=[{:.2f}] m2, frame area=[{:.2f}] m2.", + state.dataSurface->Surface(surf.BaseSurf).Area, + state.dataSurface->SurfWinFrameArea(ThisSurf))); ErrorInSurface = true; } state.dataSurface->Surface(surf.BaseSurf).Area -= state.dataSurface->SurfWinFrameArea(ThisSurf); @@ -13131,16 +13046,16 @@ namespace SurfaceGeometry { state.dataSurface->FrameDivider(FrDivNum).VertDividers * DivWidth); state.dataSurface->SurfWinDividerArea(ThisSurf) = DivArea * surf.Multiplier; if ((surf.Area - state.dataSurface->SurfWinDividerArea(ThisSurf)) <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{}Divider area exceeds glazed opening for window {}", RoutineName, surf.Name)); + ShowSevereError(state, std::format("{}Divider area exceeds glazed opening for window {}", RoutineName, surf.Name)); ShowContinueError(state, - EnergyPlus::format("Window surface area=[{:.2T}] m2, divider area=[{:.2T}] m2.", - surf.Area, - state.dataSurface->SurfWinDividerArea(ThisSurf))); + std::format("Window surface area=[{:.2f}] m2, divider area=[{:.2f}] m2.", + surf.Area, + state.dataSurface->SurfWinDividerArea(ThisSurf))); ErrorInSurface = true; } surf.Area -= state.dataSurface->SurfWinDividerArea(ThisSurf); // Glazed area if (DivArea <= 0.0) { - ShowWarningError(state, EnergyPlus::format("{}Calculated Divider Area <= 0.0 for Window={}", RoutineName, surf.Name)); + ShowWarningError(state, std::format("{}Calculated Divider Area <= 0.0 for Window={}", RoutineName, surf.Name)); if (state.dataSurface->FrameDivider(FrDivNum).HorDividers == 0) { ShowContinueError(state, "..Number of Horizontal Dividers = 0."); } @@ -13183,7 +13098,7 @@ namespace SurfaceGeometry { Vectors::PlaneEquation( state.dataSurface->Surface(surf.BaseSurf).Vertex, state.dataSurface->Surface(surf.BaseSurf).Sides, BasePlane, SError); if (SError) { - ShowSevereError(state, EnergyPlus::format("{}Degenerate surface (likely two vertices equal):\"{}\".", RoutineName, surf.Name)); + ShowSevereError(state, std::format("{}Degenerate surface (likely two vertices equal):\"{}\".", RoutineName, surf.Name)); ErrorInSurface = true; } ThisReveal = -Vectors::Pt2Plane(surf.Vertex(2), BasePlane); @@ -13301,7 +13216,7 @@ namespace SurfaceGeometry { } break; default: { // Error Condition - ShowSevereError(state, EnergyPlus::format("{}Incorrect surface shape number.", RoutineName), OptionalOutputFileRef{state.files.eso}); + ShowSevereError(state, std::format("{}Incorrect surface shape number.", RoutineName), OptionalOutputFileRef{state.files.eso}); ShowContinueError(state, "Please notify EnergyPlus support of this error and send input file."); ErrorInSurface = true; } break; @@ -13386,10 +13301,10 @@ namespace SurfaceGeometry { ProcessSurfaceVertices(state, ThisBaseSurface, ErrorsFound); } else { - ShowSevereError(state, EnergyPlus::format("{}Developer error for Subsurface={}", RoutineName, surf.Name)); + ShowSevereError(state, std::format("{}Developer error for Subsurface={}", RoutineName, surf.Name)); ShowContinueError(state, - EnergyPlus::format("Base surface={} vertices must be processed before any subsurfaces.", - state.dataSurface->Surface(ThisBaseSurface).Name)); + std::format("Base surface={} vertices must be processed before any subsurfaces.", + state.dataSurface->Surface(ThisBaseSurface).Name)); ShowFatalError(state, std::string{RoutineName}); } } @@ -13437,10 +13352,10 @@ namespace SurfaceGeometry { DotSelfX23 = magnitude_squared(x23); if (DotSelfX23 <= Constant::OneMillionth) { - ShowSevereError(state, EnergyPlus::format("CalcCoordinateTransformation: Invalid dot product, surface=\"{}\":", surf.Name)); + ShowSevereError(state, std::format("CalcCoordinateTransformation: Invalid dot product, surface=\"{}\":", surf.Name)); for (int I = 1; I <= surf.Sides; ++I) { auto const &point = surf.Vertex(I); - ShowContinueError(state, EnergyPlus::format(" ({:8.3F},{:8.3F},{:8.3F})", point.x, point.y, point.z)); + ShowContinueError(state, std::format(" ({:8.3F},{:8.3F},{:8.3F})", point.x, point.y, point.z)); } ShowFatalError( state, "CalcCoordinateTransformation: Program terminates due to preceding condition.", OptionalOutputFileRef{state.files.eso}); @@ -13611,7 +13526,7 @@ namespace SurfaceGeometry { int ConstrNum = surf.Construction; // Number of unshaded construction // Fatal error if base construction has more than three glass layers if (state.dataConstruction->Construct(ConstrNum).TotGlassLayers > 3) { - ShowFatalError(state, EnergyPlus::format("Window={} has more than 3 glass layers; a storm window cannot be applied.", surf.Name)); + ShowFatalError(state, std::format("Window={} has more than 3 glass layers; a storm window cannot be applied.", surf.Name)); } // create unshaded construction with storm window @@ -13653,8 +13568,8 @@ namespace SurfaceGeometry { s_mat->materials(MatBetweenGlassSh)->group == Material::Group::Blind) { ShAndSt = true; } else { - ShowContinueError( - state, EnergyPlus::format("Window={} has a shaded construction to which a storm window cannot be applied.", surf.Name)); + ShowContinueError(state, + std::format("Window={} has a shaded construction to which a storm window cannot be applied.", surf.Name)); ShowContinueError(state, "Storm windows can only be applied to shaded constructions that:"); ShowContinueError(state, "have an interior shade or blind and up to three glass layers, or"); ShowContinueError(state, "have a between-glass shade or blind and two glass layers."); @@ -13677,7 +13592,7 @@ namespace SurfaceGeometry { auto const &s_mat = state.dataMaterial; int mmDistance = int(1000 * distance); // Thickness of air gap in mm (usually between storm window and rest of window) - std::string MatNameStAir = EnergyPlus::format("{}{}MM", namePrefix, mmDistance); // Name of created air layer material + std::string MatNameStAir = std::format("{}{}MM", namePrefix, mmDistance); // Name of created air layer material int matNum = Material::GetMaterialNum(state, MatNameStAir); if (matNum != 0) { return matNum; @@ -13887,9 +13802,9 @@ namespace SurfaceGeometry { if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - EnergyPlus::format("SurfaceGeometry: ModifyWindow: Window {} uses the Window5 Data File Construction {}", - surfTemp.Name, - state.dataConstruction->Construct(IConst).Name)); + std::format("SurfaceGeometry: ModifyWindow: Window {} uses the Window5 Data File Construction {}", + surfTemp.Name, + state.dataConstruction->Construct(IConst).Name)); ShowContinueError(state, EnergyPlus::format("The height {:.3R}(m) or width (m) of this window differs by more than 10%{:.3R}", H, W)); ShowContinueError( @@ -13904,10 +13819,10 @@ namespace SurfaceGeometry { // Calculate net area for base surface state.dataSurfaceGeometry->SurfaceTmp(surfTemp.BaseSurf).Area -= surfTemp.Area; if (state.dataSurfaceGeometry->SurfaceTmp(surfTemp.BaseSurf).Area <= 0.0) { - ShowSevereError(state, - EnergyPlus::format("Subsurfaces have too much area for base surface={}", - state.dataSurfaceGeometry->SurfaceTmp(surfTemp.BaseSurf).Name)); - ShowContinueError(state, EnergyPlus::format("Subsurface creating error={}", surfTemp.Name)); + ShowSevereError( + state, + std::format("Subsurfaces have too much area for base surface={}", state.dataSurfaceGeometry->SurfaceTmp(surfTemp.BaseSurf).Name)); + ShowContinueError(state, std::format("Subsurface creating error={}", surfTemp.Name)); ErrorsFound = true; } @@ -13927,9 +13842,9 @@ namespace SurfaceGeometry { // vertex #2 of the first glazing system. if (state.dataGlobal->DisplayExtraWarnings) { - ShowMessage(state, - EnergyPlus::format( - "SurfaceGeometry: ModifyWindow: Window {} has been replaced with the Window 5/6 two glazing system=\"{}\".", + ShowMessage( + state, + std::format("SurfaceGeometry: ModifyWindow: Window {} has been replaced with the Window 5/6 two glazing system=\"{}\".", surfTemp.Name, state.dataConstruction->Construct(IConst).Name)); ShowContinueError(state, "Note that originally entered dimensions are overridden."); @@ -13945,7 +13860,7 @@ namespace SurfaceGeometry { if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( state, - EnergyPlus::format( + std::format( "SurfaceGeometry: ModifyWindow: Interior Window {} has been replaced with the Window 5/6 two glazing system=\"{}\".", surfTemp.Name, state.dataConstruction->Construct(IConst).Name)); @@ -13959,11 +13874,11 @@ namespace SurfaceGeometry { } else { // Interior window, specified not entered - ShowSevereError( - state, EnergyPlus::format("SurfaceGeometry: ModifyWindow: Interior Window {} is a window in an adjacent zone.", surfTemp.Name)); + ShowSevereError(state, + std::format("SurfaceGeometry: ModifyWindow: Interior Window {} is a window in an adjacent zone.", surfTemp.Name)); ShowContinueError(state, - EnergyPlus::format("Attempted to add/reverse Window 5/6 multiple glazing system=\"{}\".", - state.dataConstruction->Construct(IConst).Name)); + std::format("Attempted to add/reverse Window 5/6 multiple glazing system=\"{}\".", + state.dataConstruction->Construct(IConst).Name)); ShowContinueError(state, "Cannot use these Window 5/6 constructs for these Interior Windows. Program will terminate."); ErrorsFound = true; } @@ -14137,9 +14052,9 @@ namespace SurfaceGeometry { if (state.dataSurfaceGeometry->SurfaceTmp(surfTemp.BaseSurf).Area <= 0.0) { ShowSevereError(state, - EnergyPlus::format("SurfaceGeometry: ModifyWindow: Subsurfaces have too much area for base surface={}", - state.dataSurfaceGeometry->SurfaceTmp(surfTemp.BaseSurf).Name)); - ShowContinueError(state, EnergyPlus::format("Subsurface (window) creating error={}", surfTemp.Name)); + std::format("SurfaceGeometry: ModifyWindow: Subsurfaces have too much area for base surface={}", + state.dataSurfaceGeometry->SurfaceTmp(surfTemp.BaseSurf).Name)); + ShowContinueError(state, std::format("Subsurface (window) creating error={}", surfTemp.Name)); ShowContinueError( state, EnergyPlus::format("This window has been replaced by two windows from the Window5 Data File of total area {:.2R} m2", AreaNew)); @@ -14459,15 +14374,14 @@ namespace SurfaceGeometry { NewAspectRatio = rNumerics(2); transformPlane = cAlphas(1); if (transformPlane != "XY") { - ShowWarningError( - state, EnergyPlus::format("{}: invalid {}=\"{}...ignored.", CurrentModuleObject, s_ipsc->cAlphaFieldNames(1), cAlphas(1))); + ShowWarningError(state, + std::format("{}: invalid {}=\"{}...ignored.", CurrentModuleObject, s_ipsc->cAlphaFieldNames(1), cAlphas(1))); } state.dataSurfaceGeometry->firstTime = false; state.dataSurfaceGeometry->noTransform = false; state.dataSurface->AspectTransform = true; if (state.dataSurface->WorldCoordSystem) { - ShowWarningError(state, - EnergyPlus::format("{}: must use Relative Coordinate System. Transform request ignored.", CurrentModuleObject)); + ShowWarningError(state, std::format("{}: must use Relative Coordinate System. Transform request ignored.", CurrentModuleObject)); state.dataSurfaceGeometry->noTransform = true; state.dataSurface->AspectTransform = false; } @@ -14561,7 +14475,7 @@ namespace SurfaceGeometry { Real64 TotalArea(surface.GrossArea); if (TotalArea <= 0.0) { // catch a problem.... - ShowWarningError(state, EnergyPlus::format("CalcSurfaceCentroid: zero area surface, for surface={}", surface.Name)); + ShowWarningError(state, std::format("CalcSurfaceCentroid: zero area surface, for surface={}", surface.Name)); continue; } @@ -14626,13 +14540,13 @@ namespace SurfaceGeometry { } else { if (!surface.Name.empty()) { - ShowWarningError(state, EnergyPlus::format("CalcSurfaceCentroid: caught problem with # of sides, for surface={}", surface.Name)); - ShowContinueError(state, EnergyPlus::format("... number of sides must be >= 3, this surface # sides={}", surface.Sides)); + ShowWarningError(state, std::format("CalcSurfaceCentroid: caught problem with # of sides, for surface={}", surface.Name)); + ShowContinueError(state, std::format("... number of sides must be >= 3, this surface # sides={}", surface.Sides)); } else { - ShowWarningError(state, EnergyPlus::format("CalcSurfaceCentroid: caught problem with # of sides, for surface=#{}", ThisSurf)); + ShowWarningError(state, std::format("CalcSurfaceCentroid: caught problem with # of sides, for surface=#{}", ThisSurf)); ShowContinueError(state, "...surface name is blank. Examine surfaces -- this may be a problem with ill-formed interzone surfaces."); - ShowContinueError(state, EnergyPlus::format("... number of sides must be >= 3, this surface # sides={}", surface.Sides)); + ShowContinueError(state, std::format("... number of sides must be >= 3, this surface # sides={}", surface.Sides)); } centroid = 0.0; } @@ -14649,7 +14563,7 @@ namespace SurfaceGeometry { } // loop through surfaces if (negZcount > 0) { - ShowWarningError(state, EnergyPlus::format("CalcSurfaceCentroid: {} Surfaces have the Z coordinate < 0.", negZcount)); + ShowWarningError(state, std::format("CalcSurfaceCentroid: {} Surfaces have the Z coordinate < 0.", negZcount)); ShowContinueError(state, "...in any calculations, Wind Speed will be 0.0 for these surfaces."); ShowContinueError( state, @@ -14793,9 +14707,9 @@ namespace SurfaceGeometry { RadiantOrSolar = "Solar"; state.dataViewFactor->EnclSolInfo.allocate(state.dataGlobal->numSpaces); } else { - ShowFatalError(state, - EnergyPlus::format("{}: Illegal call to this function. Second argument must be 'RadiantEnclosures' or 'SolarEnclosures'", - RoutineName)); + ShowFatalError( + state, + std::format("{}: Illegal call to this function. Second argument must be 'RadiantEnclosures' or 'SolarEnclosures'", RoutineName)); } if (std::any_of(state.dataConstruction->Construct.begin(), state.dataConstruction->Construct.end(), @@ -14819,9 +14733,9 @@ namespace SurfaceGeometry { if (!state.dataGlobal->DisplayExtraWarnings) { ++errorCount; } else { - ShowSevereError(state, - EnergyPlus::format( - "{}: Surface=\"{}\" uses Construction:AirBoundary in a non-interzone surface.", RoutineName, surf.Name)); + ShowSevereError( + state, + std::format("{}: Surface=\"{}\" uses Construction:AirBoundary in a non-interzone surface.", RoutineName, surf.Name)); } } else { // Process air boundary - set surface properties and set up enclosures Radiant exchange, Boundary is grouped - assign enclosure @@ -14846,7 +14760,7 @@ namespace SurfaceGeometry { ++enclosureNum; auto &thisEnclosure = Enclosures(enclosureNum); thisSideEnclosureNum = enclosureNum; - thisEnclosure.Name = EnergyPlus::format("{} Enclosure {}", RadiantOrSolar, enclosureNum); + thisEnclosure.Name = std::format("{} Enclosure {}", RadiantOrSolar, enclosureNum); thisEnclosure.spaceNames.push_back(state.dataHeatBal->space(surf.spaceNum).Name); thisEnclosure.spaceNums.push_back(surf.spaceNum); thisEnclosure.FloorArea += state.dataHeatBal->space(surf.spaceNum).FloorArea; @@ -14973,8 +14887,8 @@ namespace SurfaceGeometry { } } if (errorCount > 0) { - ShowSevereError( - state, EnergyPlus::format("{}: {} surfaces use Construction:AirBoundary in non-interzone surfaces.", RoutineName, errorCount)); + ShowSevereError(state, + std::format("{}: {} surfaces use Construction:AirBoundary in non-interzone surfaces.", RoutineName, errorCount)); ShowContinueError(state, "For explicit details on each use, use Output:Diagnostics,DisplayExtraWarnings;"); } } @@ -15230,7 +15144,7 @@ namespace SurfaceGeometry { B = Z; } else { // This condition should not be reached if the surfaces are guaranteed to be planar already - ShowSevereError(state, EnergyPlus::format("CheckConvexity: Surface=\"{}\" is non-planar.", surfaceTmp.Name)); + ShowSevereError(state, std::format("CheckConvexity: Surface=\"{}\" is non-planar.", surfaceTmp.Name)); ShowContinueError(state, "Coincident Vertices will be removed as possible."); for (int n = 1; n <= surfaceTmp.Sides; ++n) { auto const &point = vertices(n); @@ -15275,10 +15189,9 @@ namespace SurfaceGeometry { colinearIndex -= NSides; } if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, - EnergyPlus::format("CheckConvexity: Surface=\"{}\", vertex {} is colinear with previous and next.", - surfaceTmp.Name, - colinearIndex)); + ShowWarningError( + state, + std::format("CheckConvexity: Surface=\"{}\", vertex {} is colinear with previous and next.", surfaceTmp.Name, colinearIndex)); } ++state.dataErrTracking->TotalCoincidentVertices; surfCollinearVerts.push_back(colinearIndex); @@ -15298,9 +15211,9 @@ namespace SurfaceGeometry { !state.dataSysVars->SutherlandHodgman && (state.dataSysVars->shadingMethod == DataSystemVariables::ShadingMethod::PolygonClipping)) { ShowWarningError(state, - EnergyPlus::format("CheckConvexity: Zone=\"{}\", Surface=\"{}\" is non-convex.", - state.dataHeatBal->Zone(surfaceTmp.Zone).Name, - surfaceTmp.Name)); + std::format("CheckConvexity: Zone=\"{}\", Surface=\"{}\" is non-convex.", + state.dataHeatBal->Zone(surfaceTmp.Zone).Name, + surfaceTmp.Name)); int Np1 = n + 1; if (Np1 > NSides) { Np1 -= NSides; @@ -15309,7 +15222,7 @@ namespace SurfaceGeometry { if (Np2 > NSides) { Np2 -= NSides; } - ShowContinueError(state, EnergyPlus::format("...vertex {} to vertex {} to vertex {}", n, Np1, Np2)); + ShowContinueError(state, std::format("...vertex {} to vertex {} to vertex {}", n, Np1, Np2)); ShowContinueError(state, EnergyPlus::format("...vertex {}=[{:.2R},{:.2R},{:.2R}]", n, X(n), Y(n), Z(n))); ShowContinueError(state, EnergyPlus::format("...vertex {}=[{:.2R},{:.2R},{:.2R}]", Np1, X(n + 1), Y(n + 1), Z(n + 1))); ShowContinueError(state, EnergyPlus::format("...vertex {}=[{:.2R},{:.2R},{:.2R}]", Np2, X(n + 2), Y(n + 2), Z(n + 2))); @@ -15332,12 +15245,11 @@ namespace SurfaceGeometry { surfaceTmp.Sides = NSides - M; if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError( - state, - EnergyPlus::format("CheckConvexity: Surface=\"{}\" has [{}] collinear points that have been removed.", surfaceTmp.Name, M)); + state, std::format("CheckConvexity: Surface=\"{}\" has [{}] collinear points that have been removed.", surfaceTmp.Name, M)); } } else { // too many if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, EnergyPlus::format("CheckConvexity: Surface=\"{}\" has [{}] collinear points.", surfaceTmp.Name, M)); + ShowWarningError(state, std::format("CheckConvexity: Surface=\"{}\" has [{}] collinear points.", surfaceTmp.Name, M)); ShowContinueError(state, "...too many to remove all. Will leave the surface with 3 sides. But this is now a degenerate surface"); } ++state.dataErrTracking->TotalDegenerateSurfaces; @@ -15360,9 +15272,9 @@ namespace SurfaceGeometry { if (state.dataGlobal->DisplayExtraWarnings) { ShowWarningError(state, - EnergyPlus::format("CheckConvexity: Surface=\"{}\": The vertex points has been reprocessed as Sides = {}", - surfaceTmp.Name, - surfaceTmp.Sides)); + std::format("CheckConvexity: Surface=\"{}\": The vertex points has been reprocessed as Sides = {}", + surfaceTmp.Name, + surfaceTmp.Sides)); } } } diff --git a/src/EnergyPlus/SurfaceGroundHeatExchanger.cc b/src/EnergyPlus/SurfaceGroundHeatExchanger.cc index c016d129474..cc151caebf2 100644 --- a/src/EnergyPlus/SurfaceGroundHeatExchanger.cc +++ b/src/EnergyPlus/SurfaceGroundHeatExchanger.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -819,10 +820,9 @@ namespace SurfaceGroundHeatExchanger { // Check for non-convergence if (iter > Maxiter) { if (this->ConvErrIndex3 == 0) { - ShowWarningMessage(state, - EnergyPlus::format("CalcSurfaceGroundHeatExchanger=\"{}\", Did not converge (part 3), Iterations={}", - this->Name, - Maxiter)); + ShowWarningMessage( + state, + std::format("CalcSurfaceGroundHeatExchanger=\"{}\", Did not converge (part 3), Iterations={}", this->Name, Maxiter)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd( diff --git a/src/EnergyPlus/SurfaceOctree.cc b/src/EnergyPlus/SurfaceOctree.cc index fc7679f316b..dddcbd7e7c1 100644 --- a/src/EnergyPlus/SurfaceOctree.cc +++ b/src/EnergyPlus/SurfaceOctree.cc @@ -45,15 +45,15 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -// EnergyPlus Headers -#include -#include - // C++ Headers #include #include #include +// EnergyPlus Headers +#include +#include + namespace EnergyPlus { // Package: Surface Octree System diff --git a/src/EnergyPlus/SwimmingPool.cc b/src/EnergyPlus/SwimmingPool.cc index 7845de78d68..61060014030 100644 --- a/src/EnergyPlus/SwimmingPool.cc +++ b/src/EnergyPlus/SwimmingPool.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -434,29 +435,26 @@ void SwimmingPoolData::ErrorCheckSetupPoolSurface( ErrorsFound = true; // Something present that is not allowed for a swimming pool (non-CTF algorithm, movable insulation, or radiant source/sink } else if (state.dataSurface->Surface(this->SurfacePtr).HeatTransferAlgorithm != DataSurfaces::HeatTransferModel::CTF) { - ShowSevereError( - state, - EnergyPlus::format("{} is a pool and is attempting to use a non-CTF solution algorithm. This is not allowed. Use the CTF solution " - "algorithm for this surface.", - state.dataSurface->Surface(this->SurfacePtr).Name)); + ShowSevereError(state, + std::format("{} is a pool and is attempting to use a non-CTF solution algorithm. This is not allowed. Use the CTF solution " + "algorithm for this surface.", + state.dataSurface->Surface(this->SurfacePtr).Name)); ErrorsFound = true; } else if (state.dataSurface->Surface(this->SurfacePtr).Class == DataSurfaces::SurfaceClass::Window) { - ShowSevereError( - state, - EnergyPlus::format("{} is a pool and is defined as a window. This is not allowed. A pool must be a floor that is NOT a window.", - state.dataSurface->Surface(this->SurfacePtr).Name)); + ShowSevereError(state, + std::format("{} is a pool and is defined as a window. This is not allowed. A pool must be a floor that is NOT a window.", + state.dataSurface->Surface(this->SurfacePtr).Name)); ErrorsFound = true; } else if (state.dataSurface->intMovInsuls(this->SurfacePtr).matNum > 0) { - ShowSevereError( - state, - EnergyPlus::format("{} is a pool and has movable insulation. This is not allowed. Remove the movable insulation for this surface.", - state.dataSurface->Surface(this->SurfacePtr).Name)); + ShowSevereError(state, + std::format("{} is a pool and has movable insulation. This is not allowed. Remove the movable insulation for this surface.", + state.dataSurface->Surface(this->SurfacePtr).Name)); ErrorsFound = true; } else if (state.dataConstruction->Construct(state.dataSurface->Surface(this->SurfacePtr).Construction).SourceSinkPresent) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} is a pool and uses a construction with a source/sink. This is not allowed. Use a standard construction for this surface.", state.dataSurface->Surface(this->SurfacePtr).Name)); ErrorsFound = true; @@ -466,8 +464,7 @@ void SwimmingPoolData::ErrorCheckSetupPoolSurface( this->ZonePtr = state.dataSurface->Surface(this->SurfacePtr).Zone; // Check to make sure pool surface is a floor if (state.dataSurface->Surface(this->SurfacePtr).Class != DataSurfaces::SurfaceClass::Floor) { - ShowSevereError(state, - EnergyPlus::format("{}{}=\"{} contains a surface name that is NOT a floor.", RoutineName, CurrentModuleObject, Alpha1)); + ShowSevereError(state, std::format("{}{}=\"{} contains a surface name that is NOT a floor.", RoutineName, CurrentModuleObject, Alpha1)); ShowContinueError( state, "A swimming pool must be associated with a surface that is a FLOOR. Association with other surface types is not permitted."); ErrorsFound = true; @@ -556,20 +553,19 @@ void SwimmingPoolData::initialize(EnergyPlusData &state, bool const FirstHVACIte if (this->CurActivityFactor < MinActivityFactor) { this->CurActivityFactor = MinActivityFactor; ShowWarningError(state, - EnergyPlus::format("{}: Swimming Pool =\"{} Activity Factor Schedule =\"{} has a negative value. This is not allowed.", - RoutineName, - this->Name, - this->activityFactorSched->Name)); + std::format("{}: Swimming Pool =\"{} Activity Factor Schedule =\"{} has a negative value. This is not allowed.", + RoutineName, + this->Name, + this->activityFactorSched->Name)); ShowContinueError(state, "The activity factor has been reset to zero."); } if (this->CurActivityFactor > MaxActivityFactor) { this->CurActivityFactor = 1.0; - ShowWarningError( - state, - EnergyPlus::format("{}: Swimming Pool =\"{} Activity Factor Schedule =\"{} has a value larger than 10. This is not allowed.", - RoutineName, - this->Name, - this->activityFactorSched->Name)); + ShowWarningError(state, + std::format("{}: Swimming Pool =\"{} Activity Factor Schedule =\"{} has a value larger than 10. This is not allowed.", + RoutineName, + this->Name, + this->activityFactorSched->Name)); ShowContinueError(state, "The activity factor has been reset to unity."); } } else { @@ -590,20 +586,20 @@ void SwimmingPoolData::initialize(EnergyPlusData &state, bool const FirstHVACIte if (this->peopleHeatGainSched != nullptr) { if (HeatGainPerPerson < 0.0) { ShowWarningError(state, - EnergyPlus::format("{}: Swimming Pool =\"{} Heat Gain Schedule =\"{} has a negative value. This is not allowed.", - RoutineName, - this->Name, - this->peopleHeatGainSched->Name)); + std::format("{}: Swimming Pool =\"{} Heat Gain Schedule =\"{} has a negative value. This is not allowed.", + RoutineName, + this->Name, + this->peopleHeatGainSched->Name)); ShowContinueError(state, "The heat gain per person has been reset to zero."); HeatGainPerPerson = 0.0; } if (this->peopleSched != nullptr) { if (PeopleModifier < 0.0) { ShowWarningError(state, - EnergyPlus::format("{}: Swimming Pool =\"{} People Schedule =\"{} has a negative value. This is not allowed.", - RoutineName, - this->Name, - this->peopleSched->Name)); + std::format("{}: Swimming Pool =\"{} People Schedule =\"{} has a negative value. This is not allowed.", + RoutineName, + this->Name, + this->peopleSched->Name)); ShowContinueError(state, "The number of people has been reset to zero."); PeopleModifier = 0.0; } @@ -621,20 +617,19 @@ void SwimmingPoolData::initialize(EnergyPlusData &state, bool const FirstHVACIte this->CurCoverSchedVal = this->coverSched->getCurrentVal(); // Why is this checking done here as opposed to where the schedule is first retrieved? if (this->CurCoverSchedVal > 1.0) { - ShowWarningError( - state, - EnergyPlus::format("{}: Swimming Pool =\"{} Cover Schedule =\"{} has a value greater than 1.0 (100%). This is not allowed.", - RoutineName, - this->Name, - this->coverSched->Name)); + ShowWarningError(state, + std::format("{}: Swimming Pool =\"{} Cover Schedule =\"{} has a value greater than 1.0 (100%). This is not allowed.", + RoutineName, + this->Name, + this->coverSched->Name)); ShowContinueError(state, "The cover has been reset to one or fully covered."); this->CurCoverSchedVal = 1.0; } else if (this->CurCoverSchedVal < 0.0) { ShowWarningError(state, - EnergyPlus::format("{}: Swimming Pool =\"{} Cover Schedule =\"{} has a negative value. This is not allowed.", - RoutineName, - this->Name, - this->coverSched->Name)); + std::format("{}: Swimming Pool =\"{} Cover Schedule =\"{} has a negative value. This is not allowed.", + RoutineName, + this->Name, + this->coverSched->Name)); ShowContinueError(state, "The cover has been reset to zero or uncovered."); this->CurCoverSchedVal = 0.0; } @@ -836,7 +831,7 @@ void SwimmingPoolData::initSwimmingPoolPlantLoopIndex(EnergyPlusData &state) PlantUtilities::ScanPlantLoopsForObject( state, this->Name, DataPlant::PlantEquipmentType::SwimmingPool_Indoor, this->HWplantLoc, errFlag, _, _, _, this->WaterInletNode, _); if (errFlag) { - ShowFatalError(state, EnergyPlus::format("{}: Program terminated due to previous condition(s).", RoutineName)); + ShowFatalError(state, std::format("{}: Program terminated due to previous condition(s).", RoutineName)); } } this->MyPlantScanFlagPool = false; diff --git a/src/EnergyPlus/SystemAvailabilityManager.cc b/src/EnergyPlus/SystemAvailabilityManager.cc index 1b704cffffd..5892777d456 100644 --- a/src/EnergyPlus/SystemAvailabilityManager.cc +++ b/src/EnergyPlus/SystemAvailabilityManager.cc @@ -48,14 +48,17 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include #include -// EnergyPlus Headers +// Local Headers #include #include + +// EnergyPlus Headers #include #include #include @@ -1760,7 +1763,7 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcNVentSysAvailMgr(state, SysAvailNum, PriAirSysNum, present(ZoneEquipType)); } else { - ShowFatalError(state, EnergyPlus::format("SimSysAvailManager: AvailabilityManager:NightVentilation not found: {}", SysAvailName)); + ShowFatalError(state, std::format("SimSysAvailManager: AvailabilityManager:NightVentilation not found: {}", SysAvailName)); } } break; @@ -1771,8 +1774,7 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcDiffTSysAvailMgr(state, SysAvailNum, previousStatus); } else { - ShowFatalError(state, - EnergyPlus::format("SimSysAvailManager: AvailabilityManager:DifferentialThermostat not found: {}", SysAvailName)); + ShowFatalError(state, std::format("SimSysAvailManager: AvailabilityManager:DifferentialThermostat not found: {}", SysAvailName)); } } break; case ManagerType::HiTempTOff: { // 'AvailabilityManager:HighTemperatureTurnOff' @@ -1782,8 +1784,7 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcHiTurnOffSysAvailMgr(state, SysAvailNum); } else { - ShowFatalError(state, - EnergyPlus::format("SimSysAvailManager: AvailabilityManager:HighTemperatureTurnOff not found: {}", SysAvailName)); + ShowFatalError(state, std::format("SimSysAvailManager: AvailabilityManager:HighTemperatureTurnOff not found: {}", SysAvailName)); } } break; case ManagerType::HiTempTOn: { // 'AvailabilityManager:HighTemperatureTurnOn' @@ -1793,8 +1794,7 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcHiTurnOnSysAvailMgr(state, SysAvailNum); } else { - ShowFatalError(state, - EnergyPlus::format("SimSysAvailManager: AvailabilityManager:HighTemperatureTurnOn not found: {}", SysAvailName)); + ShowFatalError(state, std::format("SimSysAvailManager: AvailabilityManager:HighTemperatureTurnOn not found: {}", SysAvailName)); } } break; case ManagerType::LoTempTOff: { // 'AvailabilityManager:LowTemperatureTurnOff' @@ -1804,8 +1804,7 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcLoTurnOffSysAvailMgr(state, SysAvailNum); } else { - ShowFatalError(state, - EnergyPlus::format("SimSysAvailManager: AvailabilityManager:LowTemperatureTurnOff not found: {}", SysAvailName)); + ShowFatalError(state, std::format("SimSysAvailManager: AvailabilityManager:LowTemperatureTurnOff not found: {}", SysAvailName)); } } break; @@ -1816,14 +1815,14 @@ namespace Avail { if (SysAvailNum > 0) { availStatus = CalcLoTurnOnSysAvailMgr(state, SysAvailNum); } else { - ShowFatalError(state, EnergyPlus::format("SimSysAvailManager: AvailabilityManager:LowTemperatureTurnOn not found: {}", SysAvailName)); + ShowFatalError(state, std::format("SimSysAvailManager: AvailabilityManager:LowTemperatureTurnOn not found: {}", SysAvailName)); } } break; default: { ShowSevereError(state, EnergyPlus::format("AvailabilityManager Type not found: {}", type)); - ShowContinueError(state, EnergyPlus::format("Occurs in Manager={}", SysAvailName)); + ShowContinueError(state, std::format("Occurs in Manager={}", SysAvailName)); ShowFatalError(state, "Preceding condition causes termination."); } } @@ -2032,8 +2031,7 @@ namespace Avail { case NightCycleControlType::OnZoneFansOnly: { if (ZoneCompNCControlType(SysAvailNum)) { ShowWarningError( - state, - EnergyPlus::format("AvailabilityManager:NightCycle = {}, is specified for a ZoneHVAC component.", nightCycleMgr.Name)); + state, std::format("AvailabilityManager:NightCycle = {}, is specified for a ZoneHVAC component.", nightCycleMgr.Name)); ShowContinueError(state, "The only valid Control Types for ZoneHVAC components are Status::CycleOnControlZone and StayOff."); ShowContinueError(state, "Night Cycle operation will not be modeled for ZoneHVAC components that reference this manager."); ZoneCompNCControlType(SysAvailNum) = false; @@ -3851,22 +3849,20 @@ namespace Avail { "All zones using this schedule have no hybrid ventilation control."); } if (SchedMax > 7.0) { - ShowSevereCustomField( - state, - eoh, - ipsc->cAlphaFieldNames(4), - ipsc->cAlphaArgs(4), - EnergyPlus::format("Maximum value should be 7. However, the maximum value in the schedule is {:.1T}", SchedMax)); + ShowSevereCustomField(state, + eoh, + ipsc->cAlphaFieldNames(4), + ipsc->cAlphaArgs(4), + std::format("Maximum value should be 7. However, the maximum value in the schedule is {:.1f}", SchedMax)); ErrorsFound = true; } if (SchedMin < 0.0) { - ShowSevereCustomField( - state, - eoh, - ipsc->cAlphaFieldNames(4), - ipsc->cAlphaArgs(4), - EnergyPlus::format("Minimum value should be 0. However, the minimum value in the schedule is {:.1T}", SchedMin)); + ShowSevereCustomField(state, + eoh, + ipsc->cAlphaFieldNames(4), + ipsc->cAlphaArgs(4), + std::format("Minimum value should be 0. However, the minimum value in the schedule is {:.1f}", SchedMin)); ErrorsFound = true; } @@ -3893,10 +3889,10 @@ namespace Avail { if (NumNumbers > 0) { hybridVentMgr.MaxWindSpeed = ipsc->rNumericArgs(1); if (ipsc->rNumericArgs(1) > 40.0 || ipsc->rNumericArgs(1) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} is beyond the range.", ipsc->cNumericFieldNames(1))); - ShowContinueError( - state, EnergyPlus::format("The input value is {:.0T}. The allowed value must be >= 0 and <= 40 m/s", ipsc->rNumericArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} is beyond the range.", ipsc->cNumericFieldNames(1))); + ShowContinueError(state, + std::format("The input value is {:.0f}. The allowed value must be >= 0 and <= 40 m/s", ipsc->rNumericArgs(1))); ErrorsFound = true; } } @@ -3905,40 +3901,38 @@ namespace Avail { if (NumNumbers > 1) { hybridVentMgr.MinOutdoorTemp = ipsc->rNumericArgs(2); if (ipsc->rNumericArgs(2) > 100.0 || ipsc->rNumericArgs(2) < -100.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} is beyond the range.", ipsc->cNumericFieldNames(2))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} is beyond the range.", ipsc->cNumericFieldNames(2))); ShowContinueError( - state, - EnergyPlus::format("The input value is {:.0T}. The allowed value must be between -100 C and +100 C", ipsc->rNumericArgs(2))); + state, std::format("The input value is {:.0f}. The allowed value must be between -100 C and +100 C", ipsc->rNumericArgs(2))); ErrorsFound = true; } } if (NumNumbers > 2) { hybridVentMgr.MaxOutdoorTemp = ipsc->rNumericArgs(3); if (ipsc->rNumericArgs(3) > 100.0 || ipsc->rNumericArgs(3) < -100.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} is beyond the range.", ipsc->cNumericFieldNames(3))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} is beyond the range.", ipsc->cNumericFieldNames(3))); ShowContinueError( - state, - EnergyPlus::format("The input value is {:.0T}. The allowed value must be between -100 C and +100 C", ipsc->rNumericArgs(3))); + state, std::format("The input value is {:.0f}. The allowed value must be between -100 C and +100 C", ipsc->rNumericArgs(3))); ErrorsFound = true; } } // Ensure MaxTemp >= MinTemp if (ipsc->rNumericArgs(2) >= ipsc->rNumericArgs(3)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" The {} must be less than the {}", - RoutineName, - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cNumericFieldNames(2), - ipsc->cNumericFieldNames(3))); + std::format("{}{}=\"{}\" The {} must be less than the {}", + RoutineName, + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cNumericFieldNames(2), + ipsc->cNumericFieldNames(3))); ShowContinueError(state, - EnergyPlus::format("The {} is {:.0T}. The {} is {:.0T}.", - ipsc->cNumericFieldNames(2), - ipsc->rNumericArgs(2), - ipsc->cNumericFieldNames(3), - ipsc->rNumericArgs(3))); + std::format("The {} is {:.0f}. The {} is {:.0f}.", + ipsc->cNumericFieldNames(2), + ipsc->rNumericArgs(2), + ipsc->cNumericFieldNames(3), + ipsc->rNumericArgs(3))); ErrorsFound = true; } @@ -3946,40 +3940,38 @@ namespace Avail { if (NumNumbers > 3) { hybridVentMgr.MinOutdoorEnth = ipsc->rNumericArgs(4); if (ipsc->rNumericArgs(4) > 300000.0 || ipsc->rNumericArgs(4) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} is beyond the range.", ipsc->cNumericFieldNames(4))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} is beyond the range.", ipsc->cNumericFieldNames(4))); ShowContinueError( - state, - EnergyPlus::format("The input value is {:.0T}. The allowed value must be between 0 and 300000 J/kg", ipsc->rNumericArgs(4))); + state, std::format("The input value is {:.0f}. The allowed value must be between 0 and 300000 J/kg", ipsc->rNumericArgs(4))); ErrorsFound = true; } } if (NumNumbers > 4) { hybridVentMgr.MaxOutdoorEnth = ipsc->rNumericArgs(5); if (ipsc->rNumericArgs(5) > 300000.0 || ipsc->rNumericArgs(5) < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} is beyond the range.", ipsc->cNumericFieldNames(5))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} is beyond the range.", ipsc->cNumericFieldNames(5))); ShowContinueError( - state, - EnergyPlus::format("The input value is {:.0T}. The allowed value must be between 0 and 300000 J/kg", ipsc->rNumericArgs(5))); + state, std::format("The input value is {:.0f}. The allowed value must be between 0 and 300000 J/kg", ipsc->rNumericArgs(5))); ErrorsFound = true; } } // Ensure MaxEnth >= MiniEnth if (ipsc->rNumericArgs(4) >= ipsc->rNumericArgs(5)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" The {} must be less than the {}", - RoutineName, - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cNumericFieldNames(4), - ipsc->cNumericFieldNames(5))); + std::format("{}{}=\"{}\" The {} must be less than the {}", + RoutineName, + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cNumericFieldNames(4), + ipsc->cNumericFieldNames(5))); ShowContinueError(state, - EnergyPlus::format("The {} is {:.0T}. The {} is {:.0T}.", - ipsc->cNumericFieldNames(4), - ipsc->rNumericArgs(4), - ipsc->cNumericFieldNames(5), - ipsc->rNumericArgs(5))); + std::format("The {} is {:.0f}. The {} is {:.0f}.", + ipsc->cNumericFieldNames(4), + ipsc->rNumericArgs(4), + ipsc->cNumericFieldNames(5), + ipsc->rNumericArgs(5))); ErrorsFound = true; } @@ -3987,40 +3979,38 @@ namespace Avail { if (NumNumbers > 5) { hybridVentMgr.MinOutdoorDewPoint = ipsc->rNumericArgs(6); if (ipsc->rNumericArgs(6) > 100.0 || ipsc->rNumericArgs(6) < -100.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} is beyond the range.", ipsc->cNumericFieldNames(6))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} is beyond the range.", ipsc->cNumericFieldNames(6))); ShowContinueError( - state, - EnergyPlus::format("The input value is {:.0T}. The allowed value must be between -100 C and +100 C", ipsc->rNumericArgs(6))); + state, std::format("The input value is {:.0f}. The allowed value must be between -100 C and +100 C", ipsc->rNumericArgs(6))); ErrorsFound = true; } } if (NumNumbers > 6) { hybridVentMgr.MaxOutdoorDewPoint = ipsc->rNumericArgs(7); if (ipsc->rNumericArgs(7) > 100.0 || ipsc->rNumericArgs(7) < -100.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("{} is beyond the range.", ipsc->cNumericFieldNames(7))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("{} is beyond the range.", ipsc->cNumericFieldNames(7))); ShowContinueError( - state, - EnergyPlus::format("The input value is {:.0T}. The allowed value must be between -100 C and +100 C", ipsc->rNumericArgs(7))); + state, std::format("The input value is {:.0f}. The allowed value must be between -100 C and +100 C", ipsc->rNumericArgs(7))); ErrorsFound = true; } } // Ensure MaxTemp >= MinTemp if (ipsc->rNumericArgs(6) >= ipsc->rNumericArgs(7)) { ShowSevereError(state, - EnergyPlus::format("{}{}=\"{}\" The {} must be less than the {}", - RoutineName, - cCurrentModuleObject, - ipsc->cAlphaArgs(1), - ipsc->cNumericFieldNames(6), - ipsc->cNumericFieldNames(7))); + std::format("{}{}=\"{}\" The {} must be less than the {}", + RoutineName, + cCurrentModuleObject, + ipsc->cAlphaArgs(1), + ipsc->cNumericFieldNames(6), + ipsc->cNumericFieldNames(7))); ShowContinueError(state, - EnergyPlus::format("The {} is {:.0T}. The {} is {:.0T}.", - ipsc->cNumericFieldNames(6), - ipsc->rNumericArgs(6), - ipsc->cNumericFieldNames(7), - ipsc->rNumericArgs(7))); + std::format("The {} is {:.0f}. The {} is {:.0f}.", + ipsc->cNumericFieldNames(6), + ipsc->rNumericArgs(6), + ipsc->cNumericFieldNames(7), + ipsc->rNumericArgs(7))); ErrorsFound = true; } @@ -4043,34 +4033,33 @@ namespace Avail { } else { GetCurveMinMaxValues(state, hybridVentMgr.OpeningFactorFWS, CurveMin, CurveMax); if (CurveMin < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError(state, - EnergyPlus::format("The minimum wind speed used in {}=\"{}should be greater than or equal to 0.0 (m/s)", - ipsc->cAlphaFieldNames(7), - ipsc->cAlphaArgs(7))); + std::format("The minimum wind speed used in {}=\"{}should be greater than or equal to 0.0 (m/s)", + ipsc->cAlphaFieldNames(7), + ipsc->cAlphaArgs(7))); ShowContinueError(state, "Curve minimum value appears to be less than 0."); ErrorsFound = true; } CurveVal = CurveValue(state, hybridVentMgr.OpeningFactorFWS, CurveMin); if (CurveVal < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError( state, - EnergyPlus::format("The minimum value of {} must be greater than or equal to 0.0 at the minimum value of wind speed.", - ipsc->cAlphaFieldNames(7))); - ShowContinueError(state, EnergyPlus::format("{}=\"{}\".", ipsc->cAlphaFieldNames(7), ipsc->cAlphaArgs(7))); - ShowContinueError(state, EnergyPlus::format("Curve output at the minimum wind speed = {:.3T}", CurveVal)); + std::format("The minimum value of {} must be greater than or equal to 0.0 at the minimum value of wind speed.", + ipsc->cAlphaFieldNames(7))); + ShowContinueError(state, std::format("{}=\"{}\".", ipsc->cAlphaFieldNames(7), ipsc->cAlphaArgs(7))); + ShowContinueError(state, std::format("Curve output at the minimum wind speed = {:.3f}", CurveVal)); ErrorsFound = true; } CurveVal = CurveValue(state, hybridVentMgr.OpeningFactorFWS, CurveMax); if (CurveVal > 1.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); - ShowContinueError( - state, - EnergyPlus::format("The maximum value of {} must be less than or equal to 1.0 at the maximum value of wind speed.", - ipsc->cAlphaFieldNames(7))); - ShowContinueError(state, EnergyPlus::format("{}=\"{}\".", ipsc->cAlphaFieldNames(7), ipsc->cAlphaArgs(7))); - ShowContinueError(state, EnergyPlus::format("Curve output at the maximum wind speed = {:.3T}", CurveVal)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowContinueError(state, + std::format("The maximum value of {} must be less than or equal to 1.0 at the maximum value of wind speed.", + ipsc->cAlphaFieldNames(7))); + ShowContinueError(state, std::format("{}=\"{}\".", ipsc->cAlphaFieldNames(7), ipsc->cAlphaArgs(7))); + ShowContinueError(state, std::format("Curve output at the maximum wind speed = {:.3f}", CurveVal)); ErrorsFound = true; } // Check curve type @@ -4103,10 +4092,10 @@ namespace Avail { } else if (hybridVentMgr.afnControlTypeSched != nullptr) { ShowWarningCustom(state, eoh, - EnergyPlus::format("{} and {} cannot be used at the same time, {} is disabled.", - ipsc->cAlphaFieldNames(8), - ipsc->cAlphaFieldNames(9), - ipsc->cAlphaFieldNames(9))); + std::format("{} and {} cannot be used at the same time, {} is disabled.", + ipsc->cAlphaFieldNames(8), + ipsc->cAlphaFieldNames(9), + ipsc->cAlphaFieldNames(9))); hybridVentMgr.simpleControlTypeSched = nullptr; } else if (!hybridVentMgr.simpleControlTypeSched->checkMinMaxVals(state, Clusive::In, 0.0, Clusive::In, 1.0)) { Sched::ShowSevereBadMinMax(state, eoh, ipsc->cAlphaFieldNames(9), ipsc->cAlphaArgs(9), Clusive::In, 0.0, Clusive::In, 1.0); @@ -4128,30 +4117,28 @@ namespace Avail { } if (state.afn->simulation_control.type == AirflowNetwork::ControlType::NoMultizoneOrDistribution) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, hybridVentMgr.Name)); + ShowWarningError(state, std::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, hybridVentMgr.Name)); ShowContinueError(state, "The Airflow Network model is not available for Hybrid Ventilation Control."); } else if (state.afn->simulation_control.type == AirflowNetwork::ControlType::MultizoneWithDistributionOnlyDuringFanOperation) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, hybridVentMgr.Name)); + ShowWarningError(state, std::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, hybridVentMgr.Name)); ShowContinueError(state, "Please check the AirflowNetwork Control field in the AirflowNetwork:SimulationControl object."); ShowContinueError(state, "The suggested choices are MultizoneWithDistribution or MultizoneWithoutDistribution."); } } else { // hybridVentMgr.VentilationPtr > 0 if (hybridVentMgr.ControlledZoneNum != state.dataHeatBal->Ventilation(hybridVentMgr.VentilationPtr).ZonePtr) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, ipsc->cAlphaArgs(1))); ShowContinueError( state, - EnergyPlus::format( - "The Zone name specified in the Ventilation object {}", - state.dataHeatBal->Zone(state.dataHeatBal->Ventilation(hybridVentMgr.VentilationPtr).ZonePtr).Name)); - ShowContinueError(state, - EnergyPlus::format("is not equal to the {}=\"{}\".", ipsc->cAlphaFieldNames(3), ipsc->cAlphaArgs(3))); + std::format("The Zone name specified in the Ventilation object {}", + state.dataHeatBal->Zone(state.dataHeatBal->Ventilation(hybridVentMgr.VentilationPtr).ZonePtr).Name)); + ShowContinueError(state, std::format("is not equal to the {}=\"{}\".", ipsc->cAlphaFieldNames(3), ipsc->cAlphaArgs(3))); ErrorsFound = true; } if (state.afn->simulation_control.type != AirflowNetwork::ControlType::NoMultizoneOrDistribution) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, hybridVentMgr.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\"", RoutineName, cCurrentModuleObject, hybridVentMgr.Name)); ShowContinueError(state, "The simple airflow objects are used for natural ventilation calculation."); ShowContinueError( state, @@ -4166,9 +4153,9 @@ namespace Avail { if (hybridVentMgr.simpleControlTypeSched != nullptr && hybridVentMgr.controlModeSched->getMaxVal(state) == 4.0) { ShowSevereCustom(state, eoh, - EnergyPlus::format("The outdoor ventilation air control type defined in {} cannot work together with {}", - ipsc->cAlphaArgs(4), - ipsc->cAlphaFieldNames(9))); + std::format("The outdoor ventilation air control type defined in {} cannot work together with {}", + ipsc->cAlphaArgs(4), + ipsc->cAlphaFieldNames(9))); ErrorsFound = true; } @@ -4186,13 +4173,13 @@ namespace Avail { if (state.dataAvail->HybridVentData(SysAvailNum - 1).afnControlTypeSched != nullptr) { if (state.dataAvail->HybridVentData(SysAvailNum).simpleControlTypeSched != nullptr) { ShowSevereError(state, - EnergyPlus::format("The AirflowNetwork model is used for natural ventilation calculation in {}=\"{}\"", - cCurrentModuleObject, - state.dataAvail->HybridVentData(SysAvailNum - 1).Name)); + std::format("The AirflowNetwork model is used for natural ventilation calculation in {}=\"{}\"", + cCurrentModuleObject, + state.dataAvail->HybridVentData(SysAvailNum - 1).Name)); ShowContinueError(state, - EnergyPlus::format("The simple airflow objects are used for natural ventilation calculation in {}=\"{}\"", - cCurrentModuleObject, - state.dataAvail->HybridVentData(SysAvailNum).Name)); + std::format("The simple airflow objects are used for natural ventilation calculation in {}=\"{}\"", + cCurrentModuleObject, + state.dataAvail->HybridVentData(SysAvailNum).Name)); ShowContinueError(state, "The hybrid ventilation control requires the same models to calculate natural ventilation"); ErrorsFound = true; } @@ -4200,13 +4187,13 @@ namespace Avail { if (state.dataAvail->HybridVentData(SysAvailNum - 1).simpleControlTypeSched != nullptr) { if (state.dataAvail->HybridVentData(SysAvailNum).afnControlTypeSched != nullptr) { ShowSevereError(state, - EnergyPlus::format("The Airflow Network model is used for natural ventilation calculation in {}=\"{}\"", - cCurrentModuleObject, - state.dataAvail->HybridVentData(SysAvailNum).Name)); + std::format("The Airflow Network model is used for natural ventilation calculation in {}=\"{}\"", + cCurrentModuleObject, + state.dataAvail->HybridVentData(SysAvailNum).Name)); ShowContinueError(state, - EnergyPlus::format("The simple airflow objects are used for natural ventilation calculation in {}=\"{}\"", - cCurrentModuleObject, - state.dataAvail->HybridVentData(SysAvailNum - 1).Name)); + std::format("The simple airflow objects are used for natural ventilation calculation in {}=\"{}\"", + cCurrentModuleObject, + state.dataAvail->HybridVentData(SysAvailNum - 1).Name)); ShowContinueError(state, "The hybrid ventilation control requires the same models to calculate natural ventilation"); ErrorsFound = true; } @@ -4215,7 +4202,7 @@ namespace Avail { } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{} Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, std::format("{} Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } // Set up output variables @@ -4365,10 +4352,10 @@ namespace Avail { } if (!zoneFound) { ShowSevereError(state, - EnergyPlus::format("{}, The controlled zone ={} is not served by this Air Loop={}", - managerTypeNames[(int)hybridVentMgr.type], - hybridVentMgr.ControlZoneName, - hybridVentMgr.AirLoopName)); + std::format("{}, The controlled zone ={} is not served by this Air Loop={}", + managerTypeNames[(int)hybridVentMgr.type], + hybridVentMgr.ControlZoneName, + hybridVentMgr.AirLoopName)); ErrorsFound = true; } } @@ -4384,19 +4371,18 @@ namespace Avail { (HybridVentNum != SysAvailNum)) { if (ControlledZoneNum == state.dataAvail->HybridVentData(HybridVentNum).ControlledZoneNum && ControlledZoneNum > 0) { - ShowWarningError(state, - EnergyPlus::format( - "AvailabilityManager:HybridVentilation = \"{}\" has the controlled zone name = \"{}\".", - state.dataAvail->HybridVentData(HybridVentNum).Name, - state.dataAvail->HybridVentData(HybridVentNum).ControlZoneName)); + ShowWarningError( + state, + std::format("AvailabilityManager:HybridVentilation = \"{}\" has the controlled zone name = \"{}\".", + state.dataAvail->HybridVentData(HybridVentNum).Name, + state.dataAvail->HybridVentData(HybridVentNum).ControlZoneName)); ShowContinueError( state, - EnergyPlus::format( - "This controlled zone already has hybrid ventilation control through this air loop = \"{}\".", - hybridVentMgr.AirLoopName)); + std::format("This controlled zone already has hybrid ventilation control through this air loop = \"{}\".", + hybridVentMgr.AirLoopName)); ShowContinueError( state, - EnergyPlus::format( + std::format( "Only AvailabilityManager:HybridVentilation = \"{}\" will be simulated. Simulation continues...", hybridVentMgr.Name)); } else { @@ -4414,22 +4400,20 @@ namespace Avail { if (hybridVentMgr.ControlledZoneNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}, The controlled zone is not defined correctly ={}", - managerTypeNames[(int)hybridVentMgr.type], - hybridVentMgr.ControlZoneName)); + std::format("{}, The controlled zone is not defined correctly ={}", + managerTypeNames[(int)hybridVentMgr.type], + hybridVentMgr.ControlZoneName)); ErrorsFound = true; } // check schedule value for adaptive temperature control if (hybridVentMgr.controlModeSched->hasVal(state, 5.0) || hybridVentMgr.controlModeSched->hasVal(state, 6.0)) { if (!state.dataHeatBal->AdaptiveComfortRequested_ASH55) { - ShowSevereError( - state, - EnergyPlus::format("GetHybridVentilationInputs: AvailabilityManager:HybridVentilation =\"{}\"", hybridVentMgr.Name)); - ShowContinueError( - state, - EnergyPlus::format("Ventilation Control Mode Schedule Name =\"{}\", When the schedule value is 5 or 6, operative " - "temperature control is requested. ", - hybridVentMgr.controlModeSched->Name)); + ShowSevereError(state, + std::format("GetHybridVentilationInputs: AvailabilityManager:HybridVentilation =\"{}\"", hybridVentMgr.Name)); + ShowContinueError(state, + std::format("Ventilation Control Mode Schedule Name =\"{}\", When the schedule value is 5 or 6, operative " + "temperature control is requested. ", + hybridVentMgr.controlModeSched->Name)); ShowContinueError(state, "However, AdaptiveASH55 is not entered in the Thermal Comfort Model Type fields in the People object."); ErrorsFound = true; @@ -4452,9 +4436,9 @@ namespace Avail { } if (AirLoopCount > 1) { ShowSevereError(state, - EnergyPlus::format("{}, The AirLoopHVAC name found more than once={}", - managerTypeNames[(int)state.dataAvail->HybridVentData(SysAvailIndex).type], - state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).Name)); + std::format("{}, The AirLoopHVAC name found more than once={}", + managerTypeNames[(int)state.dataAvail->HybridVentData(SysAvailIndex).type], + state.dataAirSystemsData->PrimaryAirSystems(AirLoopNum).Name)); ShowContinueError(state, "Each AirLoopHVAC allows one hybrid ventilation control object."); ErrorsFound = true; } @@ -4727,10 +4711,9 @@ namespace Avail { } } break; default: { - ShowSevereError( - state, - EnergyPlus::format("{}: incorrect Control Type: {}", managerTypeNames[(int)hybridVentMgr.type], hybridVentMgr.AirLoopName)); - ShowFatalError(state, EnergyPlus::format("Errors found in getting {} Control mode value", managerTypeNames[(int)hybridVentMgr.type])); + ShowSevereError(state, + std::format("{}: incorrect Control Type: {}", managerTypeNames[(int)hybridVentMgr.type], hybridVentMgr.AirLoopName)); + ShowFatalError(state, std::format("Errors found in getting {} Control mode value", managerTypeNames[(int)hybridVentMgr.type])); } } @@ -4759,9 +4742,9 @@ namespace Avail { ++hybridVentMgr.SingleHCErrCount; if (hybridVentMgr.SingleHCErrCount < 2) { ShowWarningError(state, - EnergyPlus::format("Hybrid ventilation control: {}: The zone temperature control type is " - "ThermostatSetpoint:SingleHeatingOrCooling. Natural ventilation is not allowed.", - hybridVentMgr.AirLoopName)); + std::format("Hybrid ventilation control: {}: The zone temperature control type is " + "ThermostatSetpoint:SingleHeatingOrCooling. Natural ventilation is not allowed.", + hybridVentMgr.AirLoopName)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd( @@ -4794,9 +4777,8 @@ namespace Avail { if (hybridVentMgr.DewPointNoRHErrCount < 2) { ShowWarningError( state, - EnergyPlus::format( - "Hybrid ventilation control: Dew point control mode is selected, but no ZoneControl:Humidistat object={}", - hybridVentMgr.AirLoopName)); + std::format("Hybrid ventilation control: Dew point control mode is selected, but no ZoneControl:Humidistat object={}", + hybridVentMgr.AirLoopName)); ShowContinueError(state, "The hybrid ventilation control is triggered by outdoor min and max dewpoint only."); ShowContinueError(state, "HVAC system may turn off when outdoor dewpoint is between min and max dewpoint."); ShowContinueErrorTimeStamp(state, ""); @@ -4861,12 +4843,12 @@ namespace Avail { if (hybridVentMgr.DewPointErrCount < 2) { ShowWarningError( state, - EnergyPlus::format("Hybrid ventilation control: The zone for dew point control mode is different from the zone for " - "ZoneControl:Humidistat={}", - hybridVentMgr.AirLoopName)); + std::format("Hybrid ventilation control: The zone for dew point control mode is different from the zone for " + "ZoneControl:Humidistat={}", + hybridVentMgr.AirLoopName)); ShowContinueError(state, - EnergyPlus::format("The Zone name for hybrid control is {}. Humidistat has no impact", - state.dataHeatBal->Zone(ZoneNum).Name)); + std::format("The Zone name for hybrid control is {}. Humidistat has no impact", + state.dataHeatBal->Zone(ZoneNum).Name)); ShowContinueError(state, "HVAC system may turn off when outdoor dewpoint is between min and max dewpoint."); ShowContinueErrorTimeStamp(state, ""); } else { diff --git a/src/EnergyPlus/SystemReports.cc b/src/EnergyPlus/SystemReports.cc index 0d9b81258d9..741e96e2b8a 100644 --- a/src/EnergyPlus/SystemReports.cc +++ b/src/EnergyPlus/SystemReports.cc @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -5052,23 +5053,23 @@ void reportAirLoopToplogy(EnergyPlusData &state) thisSupplyPath.ComponentName(spCompNum)); } OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirDemandName, EnergyPlus::format("{}", rowCounter), thisAtoZInfo.AirLoopName); + state, orp->pdchTopAirDemandName, std::format("{}", rowCounter), thisAtoZInfo.AirLoopName); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyBranchName, EnergyPlus::format("{}", rowCounter), thisBranch.Name); + state, orp->pdchTopAirSupplyBranchName, std::format("{}", rowCounter), thisBranch.Name); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirSupplyDuctType, - EnergyPlus::format("{}", rowCounter), + std::format("{}", rowCounter), HVAC::airDuctTypeNames[(int)thisBranch.DuctType]); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirZoneName, EnergyPlus::format("{}", rowCounter), thisZoneEquipConfig.ZoneName); + state, orp->pdchTopAirZoneName, std::format("{}", rowCounter), thisZoneEquipConfig.ZoneName); auto &aduIndex = zel.EquipIndex(thisCoolADU.AirDistUnitIndex); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirTermUnitType, - EnergyPlus::format("{}", rowCounter), + std::format("{}", rowCounter), state.dataDefineEquipment->AirDistUnit(aduIndex).EquipType(1)); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirTermUnitName, - EnergyPlus::format("{}", rowCounter), + std::format("{}", rowCounter), state.dataDefineEquipment->AirDistUnit(aduIndex).EquipName(1)); if (thisAtoZInfo.ReturnAirPathNum(1) > 0) { auto &thisReturnPath = state.dataZoneEquip->ReturnAirPath(thisAtoZInfo.ReturnAirPathNum(1)); @@ -5078,11 +5079,11 @@ void reportAirLoopToplogy(EnergyPlusData &state) if (retPathCompNum > 0) { OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirReturnPCompType, - EnergyPlus::format("{}", rowCounter), + std::format("{}", rowCounter), thisReturnPath.ComponentType(retPathCompNum)); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirReturnPCompName, - EnergyPlus::format("{}", rowCounter), + std::format("{}", rowCounter), thisReturnPath.ComponentName(retPathCompNum)); } break; @@ -5105,33 +5106,29 @@ void reportAirLoopToplogy(EnergyPlusData &state) } if (thisHeatADU.SupplyAirPathExists) { int spCompNum = thisSupplyPath.OutletNodeSupplyPathCompNum(thisHeatADU.SupplyAirPathOutNodeIndex); - OutputReportPredefined::PreDefTableEntry(state, - orp->pdchTopAirSupplyPCompType, - EnergyPlus::format("{}", rowCounter), - thisSupplyPath.ComponentType(spCompNum)); - OutputReportPredefined::PreDefTableEntry(state, - orp->pdchTopAirSupplyPCompName, - EnergyPlus::format("{}", rowCounter), - thisSupplyPath.ComponentName(spCompNum)); + OutputReportPredefined::PreDefTableEntry( + state, orp->pdchTopAirSupplyPCompType, std::format("{}", rowCounter), thisSupplyPath.ComponentType(spCompNum)); + OutputReportPredefined::PreDefTableEntry( + state, orp->pdchTopAirSupplyPCompName, std::format("{}", rowCounter), thisSupplyPath.ComponentName(spCompNum)); } OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirDemandName, EnergyPlus::format("{}", rowCounter), thisAtoZInfo.AirLoopName); + state, orp->pdchTopAirDemandName, std::format("{}", rowCounter), thisAtoZInfo.AirLoopName); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyBranchName, EnergyPlus::format("{}", rowCounter), thisBranch.Name); + state, orp->pdchTopAirSupplyBranchName, std::format("{}", rowCounter), thisBranch.Name); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirSupplyDuctType, - EnergyPlus::format("{}", rowCounter), + std::format("{}", rowCounter), HVAC::airDuctTypeNames[(int)thisBranch.DuctType]); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirZoneName, EnergyPlus::format("{}", rowCounter), thisZoneEquipConfig.ZoneName); + state, orp->pdchTopAirZoneName, std::format("{}", rowCounter), thisZoneEquipConfig.ZoneName); auto &aduIndex = zel.EquipIndex(thisHeatADU.AirDistUnitIndex); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirTermUnitType, - EnergyPlus::format("{}", rowCounter), + std::format("{}", rowCounter), state.dataDefineEquipment->AirDistUnit(aduIndex).EquipType(1)); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirTermUnitName, - EnergyPlus::format("{}", rowCounter), + std::format("{}", rowCounter), state.dataDefineEquipment->AirDistUnit(aduIndex).EquipName(1)); if (thisAtoZInfo.ReturnAirPathNum(1) > 0) { auto &thisReturnPath = state.dataZoneEquip->ReturnAirPath(thisAtoZInfo.ReturnAirPathNum(1)); @@ -5140,11 +5137,11 @@ void reportAirLoopToplogy(EnergyPlusData &state) if (retPathCompNum > 0) { OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirReturnPCompType, - EnergyPlus::format("{}", rowCounter), + std::format("{}", rowCounter), thisReturnPath.ComponentType(retPathCompNum)); OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirReturnPCompName, - EnergyPlus::format("{}", rowCounter), + std::format("{}", rowCounter), thisReturnPath.ComponentName(retPathCompNum)); } } @@ -5155,31 +5152,27 @@ void reportAirLoopToplogy(EnergyPlusData &state) } } else { + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirDemandName, std::format("{}", rowCounter), thisAtoZInfo.AirLoopName); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirSupplyBranchName, std::format("{}", rowCounter), thisBranch.Name); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirDemandName, EnergyPlus::format("{}", rowCounter), thisAtoZInfo.AirLoopName); - OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyBranchName, EnergyPlus::format("{}", rowCounter), thisBranch.Name); - OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyDuctType, EnergyPlus::format("{}", rowCounter), HVAC::airDuctTypeNames[(int)thisBranch.DuctType]); + state, orp->pdchTopAirSupplyDuctType, std::format("{}", rowCounter), HVAC::airDuctTypeNames[(int)thisBranch.DuctType]); ++rowCounter; } } if (thisAtoZInfo.ReturnAirPathNum(1) > 0) { auto &thisReturnPath = state.dataZoneEquip->ReturnAirPath(thisAtoZInfo.ReturnAirPathNum(1)); for (int compNum = 1; compNum <= thisReturnPath.NumOfComponents; ++compNum) { - OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirDemandName, EnergyPlus::format("{}", rowCounter), thisAtoZInfo.AirLoopName); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirDemandName, std::format("{}", rowCounter), thisAtoZInfo.AirLoopName); if (compNum == thisReturnPath.OutletRetPathCompNum) { auto &thisBranch = pas.Branch(pas.InletBranchNum[0]); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirSupplyBranchName, std::format("{}", rowCounter), thisBranch.Name); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyBranchName, EnergyPlus::format("{}", rowCounter), thisBranch.Name); - OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyDuctType, EnergyPlus::format("{}", rowCounter), HVAC::airDuctTypeNames[(int)thisBranch.DuctType]); + state, orp->pdchTopAirSupplyDuctType, std::format("{}", rowCounter), HVAC::airDuctTypeNames[(int)thisBranch.DuctType]); } OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirReturnPCompType, EnergyPlus::format("{}", rowCounter), thisReturnPath.ComponentType(compNum)); + state, orp->pdchTopAirReturnPCompType, std::format("{}", rowCounter), thisReturnPath.ComponentType(compNum)); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirReturnPCompName, EnergyPlus::format("{}", rowCounter), thisReturnPath.ComponentName(compNum)); + state, orp->pdchTopAirReturnPCompName, std::format("{}", rowCounter), thisReturnPath.ComponentName(compNum)); ++rowCounter; } } @@ -5199,12 +5192,12 @@ void fillAirloopToplogyComponentRow(EnergyPlusData &state, // s->pdchTopAirBranchName = newPreDefColumn(state, s->pdstTopAirLoop, "Branch Name"); // s->pdchTopAirCompType = newPreDefColumn(state, s->pdstTopAirLoop, "Component Type"); // s->pdchTopAirCompName = newPreDefColumn(state, s->pdstTopAirLoop, "Component Name"); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirLoopName, EnergyPlus::format("{}", rowCounter), loopName); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirBranchName, EnergyPlus::format("{}", rowCounter), branchName); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirLoopName, std::format("{}", rowCounter), loopName); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirBranchName, std::format("{}", rowCounter), branchName); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopAirSupplyBranchType, EnergyPlus::format("{}", rowCounter), HVAC::airDuctTypeNames[(int)ductType]); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirCompType, EnergyPlus::format("{}", rowCounter), compType); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirCompName, EnergyPlus::format("{}", rowCounter), compName); + state, orp->pdchTopAirSupplyBranchType, std::format("{}", rowCounter), HVAC::airDuctTypeNames[(int)ductType]); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirCompType, std::format("{}", rowCounter), compType); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopAirCompName, std::format("{}", rowCounter), compName); ++rowCounter; } @@ -5223,7 +5216,7 @@ void reportZoneEquipmentToplogy(EnergyPlusData &state) int rowCounter = 1; for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) { const std::string_view zoneName = state.dataHeatBal->Zone(zoneNum).Name; - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopZnEqpName, EnergyPlus::format("{}", rowCounter), zoneName); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopZnEqpName, std::format("{}", rowCounter), zoneName); ++rowCounter; if (!state.dataZoneEquip->ZoneEquipConfig(zoneNum).IsControlled) { continue; @@ -5234,21 +5227,19 @@ void reportZoneEquipmentToplogy(EnergyPlusData &state) fillZoneEquipToplogyComponentRow(state, zoneName, zelEquipData.TypeOf, zelEquipData.Name, rowCounter); for (int SubCompNum = 1; SubCompNum <= zelEquipData.NumSubEquip; ++SubCompNum) { auto &zelSubEquipData = zelEquipData.SubEquipData(SubCompNum); - OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopZnEqpSubCompType, EnergyPlus::format("{}", rowCounter), zelSubEquipData.TypeOf); - OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopZnEqpSubCompName, EnergyPlus::format("{}", rowCounter), zelSubEquipData.Name); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopZnEqpSubCompType, std::format("{}", rowCounter), zelSubEquipData.TypeOf); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopZnEqpSubCompName, std::format("{}", rowCounter), zelSubEquipData.Name); fillZoneEquipToplogyComponentRow(state, zoneName, zelEquipData.TypeOf, zelEquipData.Name, rowCounter); for (int SubSubCompNum = 1; SubSubCompNum <= zelSubEquipData.NumSubSubEquip; ++SubSubCompNum) { auto &zelSubSubEquipData = zelSubEquipData.SubSubEquipData(SubSubCompNum); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopZnEqpSubCompType, EnergyPlus::format("{}", rowCounter), zelSubEquipData.TypeOf); + state, orp->pdchTopZnEqpSubCompType, std::format("{}", rowCounter), zelSubEquipData.TypeOf); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopZnEqpSubCompName, EnergyPlus::format("{}", rowCounter), zelSubEquipData.Name); + state, orp->pdchTopZnEqpSubCompName, std::format("{}", rowCounter), zelSubEquipData.Name); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopZnEqpSubSubCompType, EnergyPlus::format("{}", rowCounter), zelSubSubEquipData.TypeOf); + state, orp->pdchTopZnEqpSubSubCompType, std::format("{}", rowCounter), zelSubSubEquipData.TypeOf); OutputReportPredefined::PreDefTableEntry( - state, orp->pdchTopZnEqpSubSubCompName, EnergyPlus::format("{}", rowCounter), zelSubSubEquipData.Name); + state, orp->pdchTopZnEqpSubSubCompName, std::format("{}", rowCounter), zelSubSubEquipData.Name); fillZoneEquipToplogyComponentRow(state, zoneName, zelEquipData.TypeOf, zelEquipData.Name, rowCounter); } } @@ -5264,9 +5255,9 @@ void fillZoneEquipToplogyComponentRow( // s->pdchTopZnEqpName = newPreDefColumn(state, s->pdstTopZnEqp, "Zone Name"); // s->pdchTopZnEqpCompType = newPreDefColumn(state, s->pdstTopZnEqp, "Component Type"); // s->pdchTopZnEqpCompName = newPreDefColumn(state, s->pdstTopZnEqp, "Component Name"); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopZnEqpName, EnergyPlus::format("{}", rowCounter), zoneName); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopZnEqpCompType, EnergyPlus::format("{}", rowCounter), compType); - OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopZnEqpCompName, EnergyPlus::format("{}", rowCounter), compName); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopZnEqpName, std::format("{}", rowCounter), zoneName); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopZnEqpCompType, std::format("{}", rowCounter), compType); + OutputReportPredefined::PreDefTableEntry(state, orp->pdchTopZnEqpCompName, std::format("{}", rowCounter), compName); ++rowCounter; } diff --git a/src/EnergyPlus/TARCOGArgs.cc b/src/EnergyPlus/TARCOGArgs.cc index 491baf97ac5..8f26447b17e 100644 --- a/src/EnergyPlus/TARCOGArgs.cc +++ b/src/EnergyPlus/TARCOGArgs.cc @@ -45,9 +45,8 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#include - // EnergyPlus Headers +#include #include #include #include diff --git a/src/EnergyPlus/ThermalComfort.cc b/src/EnergyPlus/ThermalComfort.cc index d3a8af57f2d..0ae17630c0f 100644 --- a/src/EnergyPlus/ThermalComfort.cc +++ b/src/EnergyPlus/ThermalComfort.cc @@ -47,13 +47,16 @@ // C++ Headers #include -#include #include #include +#include // ObjexxFCL Headers #include +// Third Party Headers +#include + // EnergyPlus Headers #include #include @@ -611,12 +614,11 @@ namespace ThermalComfort { state.dataThermalComforts->CloUnit = people.clothingSched->getCurrentVal(); ShowWarningError( state, - EnergyPlus::format("PEOPLE=\"{}\", Scheduled clothing value will be used rather than clothing calculation method.", - people.Name)); + std::format("PEOPLE=\"{}\", Scheduled clothing value will be used rather than clothing calculation method.", people.Name)); } break; default: - ShowSevereError(state, EnergyPlus::format("PEOPLE=\"{}\", Incorrect Clothing Type", people.Name)); + ShowSevereError(state, std::format("PEOPLE=\"{}\", Incorrect Clothing Type", people.Name)); } if (state.dataRoomAir->anyNonMixingRoomAirModel && state.dataRoomAir->IsZoneCrossVent(state.dataThermalComforts->ZoneNum)) { @@ -634,8 +636,8 @@ namespace ThermalComfort { if (people.AirVelErrIndex == 0) { ShowWarningMessage( state, - EnergyPlus::format("PEOPLE=\"{}\", Air velocity is beyond the reasonable range (0.1,0.5) for thermal comfort control.", - people.Name)); + std::format("PEOPLE=\"{}\", Air velocity is beyond the reasonable range (0.1,0.5) for thermal comfort control.", + people.Name)); ShowContinueErrorTimeStamp(state, ""); } ShowRecurringWarningErrorAtEnd(state, @@ -1529,12 +1531,11 @@ namespace ThermalComfort { state.dataThermalComforts->CloUnit = people.clothingSched->getCurrentVal(); ShowWarningError( state, - EnergyPlus::format("PEOPLE=\"{}\", Scheduled clothing value will be used rather than clothing calculation method.", - people.Name)); + std::format("PEOPLE=\"{}\", Scheduled clothing value will be used rather than clothing calculation method.", people.Name)); } } break; default: - ShowSevereError(state, EnergyPlus::format("PEOPLE=\"{}\", Incorrect Clothing Type", people.Name)); + ShowSevereError(state, std::format("PEOPLE=\"{}\", Incorrect Clothing Type", people.Name)); } state.dataThermalComforts->AirVel = people.airVelocitySched->getCurrentVal(); @@ -1986,16 +1987,16 @@ namespace ThermalComfort { // Error trap for surfaces that do not exist or surfaces not in the zone if (thisAngFacList.SurfacePtr(SurfNum) == 0) { ShowSevereError(state, - EnergyPlus::format("{}: invalid {}, entered value={}", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaFieldNames(SurfNum + 1), - state.dataIPShortCut->cAlphaArgs(SurfNum + 1))); + std::format("{}: invalid {}, entered value={}", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaFieldNames(SurfNum + 1), + state.dataIPShortCut->cAlphaArgs(SurfNum + 1))); ShowContinueError(state, - EnergyPlus::format("ref {}={} not found in {}={}", - state.dataIPShortCut->cAlphaFieldNames(1), - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2))); + std::format("ref {}={} not found in {}={}", + state.dataIPShortCut->cAlphaFieldNames(1), + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(2), + state.dataIPShortCut->cAlphaArgs(2))); ErrorsFound = true; } else { // Found Surface, is it in same enclosure? @@ -2005,18 +2006,18 @@ namespace ThermalComfort { } if (thisAngFacList.EnclosurePtr != thisSurf.RadEnclIndex) { ShowWarningError(state, - EnergyPlus::format("{}: For {}=\"{}\", surfaces are not all in the same radiant enclosure.", - routineName, - cCurrentModuleObject, - thisAngFacList.Name)); + std::format("{}: For {}=\"{}\", surfaces are not all in the same radiant enclosure.", + routineName, + cCurrentModuleObject, + thisAngFacList.Name)); ShowContinueError(state, - EnergyPlus::format("... Surface=\"{}\" is in enclosure=\"{}\"", - state.dataSurface->Surface(thisAngFacList.SurfacePtr(1)).Name, - state.dataViewFactor->EnclRadInfo(thisAngFacList.EnclosurePtr).Name)); + std::format("... Surface=\"{}\" is in enclosure=\"{}\"", + state.dataSurface->Surface(thisAngFacList.SurfacePtr(1)).Name, + state.dataViewFactor->EnclRadInfo(thisAngFacList.EnclosurePtr).Name)); ShowContinueError(state, - EnergyPlus::format("... Surface=\"{}\" is in enclosure=\"{}\"", - thisSurf.Name, - state.dataViewFactor->EnclRadInfo(thisSurf.RadEnclIndex).Name)); + std::format("... Surface=\"{}\" is in enclosure=\"{}\"", + thisSurf.Name, + state.dataViewFactor->EnclRadInfo(thisSurf.RadEnclIndex).Name)); } } @@ -2024,8 +2025,8 @@ namespace ThermalComfort { } if (std::abs(AllAngleFacSummed - 1.0) > AngleFacLimit) { - ShowSevereError( - state, EnergyPlus::format("{}=\"{}\", invalid - Sum[AngleFactors]", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + std::format("{}=\"{}\", invalid - Sum[AngleFactors]", cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError( state, EnergyPlus::format("...Sum of Angle Factors [{:.3R}] should not deviate from expected sum [1.0] by more than limit [{:.3R}].", @@ -2047,22 +2048,21 @@ namespace ThermalComfort { thisPeople.AngleFactorListPtr = Util::FindItemInList(thisPeople.AngleFactorListName, state.dataThermalComforts->AngleFactorList); int WhichAFList = thisPeople.AngleFactorListPtr; if (WhichAFList == 0 && (thisPeople.Fanger || thisPeople.Pierce || thisPeople.KSU)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", routineName, cCurrentModuleObject, thisPeople.AngleFactorListName)); - ShowContinueError(state, EnergyPlus::format("... Angle Factor List Name not found for PEOPLE=\"{}\"", thisPeople.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", routineName, cCurrentModuleObject, thisPeople.AngleFactorListName)); + ShowContinueError(state, std::format("... Angle Factor List Name not found for PEOPLE=\"{}\"", thisPeople.Name)); ErrorsFound = true; } else { auto &thisAngFacList = state.dataThermalComforts->AngleFactorList(WhichAFList); if (state.dataHeatBal->space(thisPeople.spaceIndex).radiantEnclosureNum != thisAngFacList.EnclosurePtr && (thisPeople.Fanger || thisPeople.Pierce || thisPeople.KSU)) { - ShowWarningError( + ShowWarningError(state, + std::format("{}{}=\"{}\", radiant enclosure mismatch.", routineName, cCurrentModuleObject, thisAngFacList.Name)); + ShowContinueError( state, - EnergyPlus::format("{}{}=\"{}\", radiant enclosure mismatch.", routineName, cCurrentModuleObject, thisAngFacList.Name)); - ShowContinueError(state, - EnergyPlus::format( - "...Enclosure=\"{}\" doe not match enclosure=\"{}\" for PEOPLE=\"{}\"", - state.dataViewFactor->EnclRadInfo(thisAngFacList.EnclosurePtr).Name, - state.dataViewFactor->EnclRadInfo(state.dataHeatBal->space(thisPeople.spaceIndex).radiantEnclosureNum).Name, - thisPeople.Name)); + std::format("...Enclosure=\"{}\" doe not match enclosure=\"{}\" for PEOPLE=\"{}\"", + state.dataViewFactor->EnclRadInfo(thisAngFacList.EnclosurePtr).Name, + state.dataViewFactor->EnclRadInfo(state.dataHeatBal->space(thisPeople.spaceIndex).radiantEnclosureNum).Name, + thisPeople.Name)); } } } @@ -2178,15 +2178,13 @@ namespace ThermalComfort { } else { if (state.dataThermalComforts->FirstTimeError) { int spaceNum = thisSurface.spaceNum; - ShowWarningError( - state, - EnergyPlus::format("CalcSurfaceWeightedMRT: Areas*Inside surface emissivities are summing to zero for Enclosure=\"{}\"", - thisRadEnclosure.Name)); - ShowContinueError( - state, - EnergyPlus::format("As a result, the MAT for Space={} will be used for MRT when calculating the surface weighted MRT.", - state.dataHeatBal->space(spaceNum).Name)); - ShowContinueError(state, EnergyPlus::format("for Surface={}", thisSurface.Name)); + ShowWarningError(state, + std::format("CalcSurfaceWeightedMRT: Areas*Inside surface emissivities are summing to zero for Enclosure=\"{}\"", + thisRadEnclosure.Name)); + ShowContinueError(state, + std::format("As a result, the MAT for Space={} will be used for MRT when calculating the surface weighted MRT.", + state.dataHeatBal->space(spaceNum).Name)); + ShowContinueError(state, std::format("for Surface={}", thisSurface.Name)); state.dataThermalComforts->FirstTimeError = false; CalcSurfaceWeightedMRT = state.dataZoneTempPredictorCorrector->spaceHeatBalance(spaceNum).MAT; if (AverageWithSurface) { @@ -2439,13 +2437,12 @@ namespace ThermalComfort { ShowContinueError(state, "Based on ASHRAE 55-2004 graph (Section 5.2.1.1)"); if (state.dataEnvrn->RunPeriodEnvironment) { ShowContinueError( - state, - EnergyPlus::format("During Environment [{}]: {}", state.dataEnvrn->EnvironmentStartEnd, state.dataEnvrn->EnvironmentName)); + state, std::format("During Environment [{}]: {}", state.dataEnvrn->EnvironmentStartEnd, state.dataEnvrn->EnvironmentName)); } else { ShowContinueError(state, - EnergyPlus::format("During SizingPeriod Environment [{}]: {}", - state.dataEnvrn->EnvironmentStartEnd, - state.dataEnvrn->EnvironmentName)); + std::format("During SizingPeriod Environment [{}]: {}", + state.dataEnvrn->EnvironmentStartEnd, + state.dataEnvrn->EnvironmentName)); } for (int iZone = 1; iZone <= state.dataGlobal->NumOfZones; ++iZone) { if (state.dataThermalComforts->ThermalComfortInASH55(iZone).Enable55Warning) { diff --git a/src/EnergyPlus/Timer.cc b/src/EnergyPlus/Timer.cc index e3471416a29..326bb7bf64c 100644 --- a/src/EnergyPlus/Timer.cc +++ b/src/EnergyPlus/Timer.cc @@ -45,13 +45,17 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#include - -#include +// C++ Headers #ifndef NDEBUG # include #endif +// Third Party Headers +#include + +// EnergyPlus Headers +#include + namespace EnergyPlus { void Timer::tick() diff --git a/src/EnergyPlus/TranspiredCollector.cc b/src/EnergyPlus/TranspiredCollector.cc index 39d9c110eb0..65cf8748a86 100644 --- a/src/EnergyPlus/TranspiredCollector.cc +++ b/src/EnergyPlus/TranspiredCollector.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -670,17 +671,17 @@ namespace TranspiredCollector { SurfID = state.dataTranspiredCollector->UTSC(Item).SurfPtrs(ThisSurf); if (General::rotAzmDiffDeg(state.dataSurface->Surface(SurfID).Azimuth, AvgAzimuth) > 15.0) { ShowWarningError(state, - EnergyPlus::format("Surface {} has Azimuth different from others in the group associated with {} ={}", - state.dataSurface->Surface(SurfID).Name, - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + std::format("Surface {} has Azimuth different from others in the group associated with {} ={}", + state.dataSurface->Surface(SurfID).Name, + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); } if (std::abs(state.dataSurface->Surface(SurfID).Tilt - AvgTilt) > 10.0) { ShowWarningError(state, - EnergyPlus::format("Surface {} has Tilt different from others in the group associated with {} ={}", - state.dataSurface->Surface(SurfID).Name, - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + std::format("Surface {} has Tilt different from others in the group associated with {} ={}", + state.dataSurface->Surface(SurfID).Name, + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); } // test that there are no windows. Now allow windows @@ -716,9 +717,9 @@ namespace TranspiredCollector { state.dataTranspiredCollector->UTSC(Item).PlenGapThick = Numbers(6); if (state.dataTranspiredCollector->UTSC(Item).PlenGapThick <= 0.0) { ShowSevereError(state, - EnergyPlus::format("Plenum gap must be greater than Zero in {} ={}", - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + std::format("Plenum gap must be greater than Zero in {} ={}", + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); continue; } state.dataTranspiredCollector->UTSC(Item).PlenCrossArea = Numbers(7); @@ -734,9 +735,9 @@ namespace TranspiredCollector { state.dataTranspiredCollector->UTSC(Item).ProjArea = surfaceArea; if (state.dataTranspiredCollector->UTSC(Item).ProjArea == 0) { ShowSevereError(state, - EnergyPlus::format("Gross area of underlying surfaces is zero in {} ={}", - CurrentModuleObject, - state.dataTranspiredCollector->UTSC(Item).Name)); + std::format("Gross area of underlying surfaces is zero in {} ={}", + CurrentModuleObject, + state.dataTranspiredCollector->UTSC(Item).Name)); continue; } state.dataTranspiredCollector->UTSC(Item).ActualArea = @@ -939,9 +940,9 @@ namespace TranspiredCollector { if (ControlNode > 0) { if (state.dataLoopNodes->Node(ControlNode).TempSetPoint == Node::SensedNodeFlagValue) { if (!state.dataGlobal->AnyEnergyManagementSystemInModel) { - ShowSevereError(state, - EnergyPlus::format("Missing temperature setpoint for UTSC {}", - state.dataTranspiredCollector->UTSC(UTSCUnitNum).Name)); + ShowSevereError( + state, + std::format("Missing temperature setpoint for UTSC {}", state.dataTranspiredCollector->UTSC(UTSCUnitNum).Name)); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the unit control node."); state.dataHVACGlobal->SetPointErrorFlag = true; } else { @@ -949,8 +950,8 @@ namespace TranspiredCollector { CheckIfNodeSetPointManagedByEMS(state, ControlNode, HVAC::CtrlVarType::Temp, state.dataHVACGlobal->SetPointErrorFlag); if (state.dataHVACGlobal->SetPointErrorFlag) { ShowSevereError(state, - EnergyPlus::format("Missing temperature setpoint for UTSC {}", - state.dataTranspiredCollector->UTSC(UTSCUnitNum).Name)); + std::format("Missing temperature setpoint for UTSC {}", + state.dataTranspiredCollector->UTSC(UTSCUnitNum).Name)); ShowContinueError(state, " use a Setpoint Manager to establish a setpoint at the unit control node."); ShowContinueError(state, "Or add EMS Actuator to provide temperature setpoint at this node"); } @@ -1129,10 +1130,9 @@ namespace TranspiredCollector { if ((Vsuction < 0.001) || (Vsuction > 0.08)) { // warn that collector is not sized well if (state.dataTranspiredCollector->UTSC(UTSCNum).VsucErrIndex == 0) { - ShowWarningMessage( - state, - EnergyPlus::format("Solar Collector:Unglazed Transpired=\"{}\", Suction velocity is outside of range for a good design", - state.dataTranspiredCollector->UTSC(UTSCNum).Name)); + ShowWarningMessage(state, + std::format("Solar Collector:Unglazed Transpired=\"{}\", Suction velocity is outside of range for a good design", + state.dataTranspiredCollector->UTSC(UTSCNum).Name)); ShowContinueErrorTimeStamp(state, EnergyPlus::format("Suction velocity ={:.4R}", Vsuction)); if (Vsuction < 0.003) { ShowContinueError(state, "Velocity is low -- suggest decreasing area of transpired collector"); @@ -1575,9 +1575,9 @@ namespace TranspiredCollector { } if (SurfacePtr == 0) { - ShowFatalError(state, - EnergyPlus::format("Invalid surface passed to GetTranspiredCollectorIndex, Surface name = {}", - state.dataSurface->Surface(SurfacePtr).Name)); + ShowFatalError( + state, + std::format("Invalid surface passed to GetTranspiredCollectorIndex, Surface name = {}", state.dataSurface->Surface(SurfacePtr).Name)); } UTSCNum = 0; @@ -1593,8 +1593,8 @@ namespace TranspiredCollector { if (!Found) { ShowFatalError(state, - EnergyPlus::format("Did not find surface in UTSC description in GetTranspiredCollectorIndex, Surface name = {}", - state.dataSurface->Surface(SurfacePtr).Name)); + std::format("Did not find surface in UTSC description in GetTranspiredCollectorIndex, Surface name = {}", + state.dataSurface->Surface(SurfacePtr).Name)); } else { UTSCIndex = UTSCNum; @@ -1646,7 +1646,7 @@ namespace TranspiredCollector { if (WhichUTSC != 0) { NodeNum = state.dataTranspiredCollector->UTSC(WhichUTSC).InletNode(1); } else { - ShowSevereError(state, EnergyPlus::format("GetAirInletNodeNum: Could not find TranspiredCollector = \"{}\"", UTSCName)); + ShowSevereError(state, std::format("GetAirInletNodeNum: Could not find TranspiredCollector = \"{}\"", UTSCName)); ErrorsFound = true; NodeNum = 0; } @@ -1681,7 +1681,7 @@ namespace TranspiredCollector { if (WhichUTSC != 0) { NodeNum = state.dataTranspiredCollector->UTSC(WhichUTSC).OutletNode(1); } else { - ShowSevereError(state, EnergyPlus::format("GetAirOutletNodeNum: Could not find TranspiredCollector = \"{}\"", UTSCName)); + ShowSevereError(state, std::format("GetAirOutletNodeNum: Could not find TranspiredCollector = \"{}\"", UTSCName)); ErrorsFound = true; NodeNum = 0; } diff --git a/src/EnergyPlus/UnitHeater.cc b/src/EnergyPlus/UnitHeater.cc index 978c00b492d..e65b67a8897 100644 --- a/src/EnergyPlus/UnitHeater.cc +++ b/src/EnergyPlus/UnitHeater.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -320,7 +321,7 @@ namespace UnitHeater { ShowContinueError( state, EnergyPlus::format( - "...air flow rate ({:.7T}) in fan object {} is less than the unit heater maximum supply air flow rate ({:.7T}).", + "...air flow rate ({:.7f}) in fan object {} is less than the unit heater maximum supply air flow rate ({:.7f}).", FanVolFlow, unitHeat.FanName, unitHeat.MaxAirVolFlow)); @@ -479,8 +480,7 @@ namespace UnitHeater { CurrentModuleObject, unitHeat.Name)); ShowContinueError(state, "..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object."); - ShowContinueError(state, - EnergyPlus::format("..Unit heater air outlet node name = {}", state.dataLoopNodes->NodeID(unitHeat.AirOutNode))); + ShowContinueError(state, std::format("..Unit heater air outlet node name = {}", state.dataLoopNodes->NodeID(unitHeat.AirOutNode))); ErrorsFound = true; } @@ -512,7 +512,7 @@ namespace UnitHeater { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in input", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in input", RoutineName)); } // Setup Report variables for the Unit Heaters, CurrentModuleObject='ZoneHVAC:UnitHeater' @@ -641,8 +641,7 @@ namespace UnitHeater { _); if (errFlag) { ShowContinueError( - state, - EnergyPlus::format("Reference Unit=\"{}\", type=ZoneHVAC:UnitHeater", state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); + state, std::format("Reference Unit=\"{}\", type=ZoneHVAC:UnitHeater", state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); ShowFatalError(state, "InitUnitHeater: Program terminated due to previous condition(s)."); } @@ -660,10 +659,9 @@ namespace UnitHeater { if (DataZoneEquipment::CheckZoneEquipmentList(state, "ZoneHVAC:UnitHeater", state.dataUnitHeaters->UnitHeat(Loop).Name)) { continue; } - ShowSevereError( - state, - EnergyPlus::format("InitUnitHeater: Unit=[UNIT HEATER,{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - state.dataUnitHeaters->UnitHeat(Loop).Name)); + ShowSevereError(state, + std::format("InitUnitHeater: Unit=[UNIT HEATER,{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + state.dataUnitHeaters->UnitHeat(Loop).Name)); } } @@ -965,8 +963,7 @@ namespace UnitHeater { // If there is no heating Plant Sizing object and autosizing was requested, issue fatal error message ShowSevereError(state, "Autosizing of water coil requires a heating loop Sizing:Plant object"); ShowContinueError( - state, - EnergyPlus::format("Occurs in ZoneHVAC:UnitHeater Object={}", state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); + state, std::format("Occurs in ZoneHVAC:UnitHeater Object={}", state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); ErrorsFound = true; } } @@ -1050,8 +1047,8 @@ namespace UnitHeater { if ((std::abs(MaxVolHotWaterFlowDes - MaxVolHotWaterFlowUser) / MaxVolHotWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeUnitHeater: Potential issue with equipment sizing for ZoneHVAC:UnitHeater {}", - state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); + std::format("SizeUnitHeater: Potential issue with equipment sizing for ZoneHVAC:UnitHeater {}", + state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Hot Water Flow of {:.5R} [m3/s]", MaxVolHotWaterFlowUser)); ShowContinueError(state, @@ -1155,8 +1152,7 @@ namespace UnitHeater { } else { ShowSevereError(state, "Autosizing of Steam flow requires a heating loop Sizing:Plant object"); ShowContinueError( - state, - EnergyPlus::format("Occurs in ZoneHVAC:UnitHeater Object={}", state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); + state, std::format("Occurs in ZoneHVAC:UnitHeater Object={}", state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); ErrorsFound = true; } state.dataUnitHeaters->UnitHeat(UnitHeatNum).MaxVolHotSteamFlow = MaxVolHotSteamFlowDes; @@ -1179,8 +1175,8 @@ namespace UnitHeater { if ((std::abs(MaxVolHotSteamFlowDes - MaxVolHotSteamFlowUser) / MaxVolHotSteamFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeUnitHeater: Potential issue with equipment sizing for ZoneHVAC:UnitHeater {}", - state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); + std::format("SizeUnitHeater: Potential issue with equipment sizing for ZoneHVAC:UnitHeater {}", + state.dataUnitHeaters->UnitHeat(UnitHeatNum).Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowUser)); ShowContinueError( diff --git a/src/EnergyPlus/UnitVentilator.cc b/src/EnergyPlus/UnitVentilator.cc index 5c74669f5d9..9f2f47d01f4 100644 --- a/src/EnergyPlus/UnitVentilator.cc +++ b/src/EnergyPlus/UnitVentilator.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -407,8 +408,8 @@ namespace UnitVentilator { if (FanVolFlow != DataSizing::AutoSize && unitVent.MaxAirVolFlow != DataSizing::AutoSize && FanVolFlow < unitVent.MaxAirVolFlow) { ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); ShowContinueError(state, - EnergyPlus::format("...air flow rate [{:.7T}] in fan object {} is less than the unit ventilator maximum " - "supply air flow rate [{:.7T}].", + EnergyPlus::format("...air flow rate [{:.7f}] in fan object {} is less than the unit ventilator maximum " + "supply air flow rate [{:.7f}].", FanVolFlow, unitVent.FanName, unitVent.MaxAirVolFlow)); @@ -628,9 +629,8 @@ namespace UnitVentilator { unitVent.CoolingCoilType = DataPlant::PlantEquipmentType::CoilWaterDetailedFlatCooling; } else { ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); - ShowContinueError(state, EnergyPlus::format("For: {}=\"{}\".", cAlphaFields(17), Alphas(17))); - ShowContinueError(state, - EnergyPlus::format("Invalid Coil Type={}, Name={}", unitVent.CCoilPlantType, unitVent.CCoilPlantName)); + ShowContinueError(state, std::format("For: {}=\"{}\".", cAlphaFields(17), Alphas(17))); + ShowContinueError(state, std::format("Invalid Coil Type={}, Name={}", unitVent.CCoilPlantType, unitVent.CCoilPlantName)); ShowContinueError(state, "must be \"Coil:Cooling:Water\", \"Coil:Cooling:Water:DetailedGeometry\" or, " "\"CoilSystem:Cooling:Water:HeatExchangerAssisted\"."); @@ -643,7 +643,7 @@ namespace UnitVentilator { unitVent.CCoilName = Alphas(18); ValidateComponent(state, cCoolingCoilType, unitVent.CCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { - ShowContinueError(state, EnergyPlus::format("...specified in {} = \"{}\".", CurrentModuleObject, unitVent.Name)); + ShowContinueError(state, std::format("...specified in {} = \"{}\".", CurrentModuleObject, unitVent.Name)); ErrorsFound = true; } else { if (unitVent.coolCoilType != HVAC::CoilType::CoolingWaterHXAssisted) { @@ -663,7 +663,7 @@ namespace UnitVentilator { } // Other error checks should trap before it gets to this point in the code, but including just in case. if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...specified in {} = \"{}\".", CurrentModuleObject, unitVent.Name)); + ShowContinueError(state, std::format("...specified in {} = \"{}\".", CurrentModuleObject, unitVent.Name)); ErrorsFound = true; } } @@ -676,8 +676,8 @@ namespace UnitVentilator { unitVent.ColdControlOffset = 0.001; } } else { // Cooling Coil is required for this/these options - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); - ShowContinueError(state, EnergyPlus::format("a cooling coil is required for {}=\"{}\".", cAlphaFields(13), Alphas(13))); + ShowSevereError(state, std::format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); + ShowContinueError(state, std::format("a cooling coil is required for {}=\"{}\".", cAlphaFields(13), Alphas(13))); ErrorsFound = true; } // IF (.NOT. lAlphaBlanks(17)) THEN - from the start of cooling coil information } @@ -701,15 +701,14 @@ namespace UnitVentilator { if (!InletNodeFound) { ShowSevereError( state, - EnergyPlus::format("{} = \"{}\". Unit ventilator air inlet node name must be the same either as a zone exhaust node name " - "or an induce air node in ZoePlenum.", - CurrentModuleObject, - unitVent.Name)); + std::format("{} = \"{}\". Unit ventilator air inlet node name must be the same either as a zone exhaust node name " + "or an induce air node in ZoePlenum.", + CurrentModuleObject, + unitVent.Name)); ShowContinueError(state, "..Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object."); ShowContinueError(state, "..Induced Air Outlet Node name is specified in AirLoopHVAC:ReturnPlenum object."); ShowContinueError( - state, - EnergyPlus::format("..Unit ventilator unit air inlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirInNode))); + state, std::format("..Unit ventilator unit air inlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirInNode))); ErrorsFound = true; } } @@ -722,14 +721,13 @@ namespace UnitVentilator { } } if (ZoneNodeNotFound) { - ShowSevereError( - state, - EnergyPlus::format("{} = \"{}\". Unit ventilator air outlet node name must be the same as a zone inlet node name.", - CurrentModuleObject, - unitVent.Name)); + ShowSevereError(state, + std::format("{} = \"{}\". Unit ventilator air outlet node name must be the same as a zone inlet node name.", + CurrentModuleObject, + unitVent.Name)); ShowContinueError(state, "..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object."); - ShowContinueError( - state, EnergyPlus::format("..Unit ventilator air outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirOutNode))); + ShowContinueError(state, + std::format("..Unit ventilator air outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirOutNode))); ErrorsFound = true; } } else { @@ -743,15 +741,13 @@ namespace UnitVentilator { } } if (ZoneNodeNotFound) { - ShowSevereError( - state, - EnergyPlus::format("{} = \"{}\". Unit ventilator air outlet node name must be the same as a zone inlet node name.", - CurrentModuleObject, - unitVent.Name)); + ShowSevereError(state, + std::format("{} = \"{}\". Unit ventilator air outlet node name must be the same as a zone inlet node name.", + CurrentModuleObject, + unitVent.Name)); ShowContinueError(state, "..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object."); ShowContinueError( - state, - EnergyPlus::format("..Unit ventilator air outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirOutNode))); + state, std::format("..Unit ventilator air outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirOutNode))); ErrorsFound = true; } @@ -759,12 +755,12 @@ namespace UnitVentilator { if (unitVent.AirInNode != unitVent.ATMixerOutNode) { ShowSevereError( state, - EnergyPlus::format("{} = \"{}\". unit ventilator air inlet node name must be the same as the mixer outlet node name.", - CurrentModuleObject, - unitVent.Name)); + std::format("{} = \"{}\". unit ventilator air inlet node name must be the same as the mixer outlet node name.", + CurrentModuleObject, + unitVent.Name)); ShowContinueError(state, "..Air terminal mixer outlet node name is specified in AirTerminal:SingleDuct:Mixer object."); - ShowContinueError( - state, EnergyPlus::format("..Unit ventilator air inlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirInNode))); + ShowContinueError(state, + std::format("..Unit ventilator air inlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirInNode))); ErrorsFound = true; } } @@ -773,14 +769,13 @@ namespace UnitVentilator { if (unitVent.AirOutNode != unitVent.ATMixerSecNode) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = \"{}\". unit ventilator air outlet node name must be the same as the mixer secondary air inlet node name.", CurrentModuleObject, unitVent.Name)); ShowContinueError(state, "..Air terminal mixer secondary node name is specified in AirTerminal:SingleDuct:Mixer object."); ShowContinueError( - state, - EnergyPlus::format("..Unit ventilator air outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirOutNode))); + state, std::format("..Unit ventilator air outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirOutNode))); ErrorsFound = true; } @@ -794,13 +789,12 @@ namespace UnitVentilator { } if (ZoneNodeNotFound) { ShowSevereError(state, - EnergyPlus::format("{} = \"{}\". Air mixer outlet node name must be the same as a zone inlet node name.", - CurrentModuleObject, - unitVent.Name)); + std::format("{} = \"{}\". Air mixer outlet node name must be the same as a zone inlet node name.", + CurrentModuleObject, + unitVent.Name)); ShowContinueError(state, "..Zone inlet node name is specified in ZoneHVAC:EquipmentConnections object."); ShowContinueError( - state, - EnergyPlus::format("..Air terminal mixer outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.ATMixerOutNode))); + state, std::format("..Air terminal mixer outlet node name = {}", state.dataLoopNodes->NodeID(unitVent.ATMixerOutNode))); ErrorsFound = true; } else { bool ExhastNodeNotFound = true; @@ -822,7 +816,7 @@ namespace UnitVentilator { state.dataZoneEquip->ZoneEquipConfig(unitVent.ZonePtr).ReturnNode); } if (!InletNodeFound) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\".", RoutineName, CurrentModuleObject, unitVent.Name)); ShowContinueError( state, "..UnitVentilator inlet node name must be the same as either a zone exhaust node name or an induced " @@ -830,8 +824,7 @@ namespace UnitVentilator { ShowContinueError(state, "..Zone exhaust node name is specified in ZoneHVAC:EquipmentConnections object."); ShowContinueError(state, "..Induced Air Outlet Node name is specified in AirLoopHVAC:ReturnPlenum object."); ShowContinueError( - state, - EnergyPlus::format("..UnitVentilator inlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirInNode))); + state, std::format("..UnitVentilator inlet node name = {}", state.dataLoopNodes->NodeID(unitVent.AirInNode))); ErrorsFound = true; } } @@ -893,7 +886,7 @@ namespace UnitVentilator { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in input.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in input.", RoutineName)); } // Setup Report variables for the Unit Ventilators, CurrentModuleObject='ZoneHVAC:UnitVentilator' @@ -1048,7 +1041,7 @@ namespace UnitVentilator { PlantUtilities::ScanPlantLoopsForObject( state, unitVent.HCoilName, unitVent.HeatingCoilType, unitVent.HWplantLoc, errFlag, _, _, _, _, _); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Reference Unit=\"{}\", type=ZoneHVAC:UnitVentilator", unitVent.Name)); + ShowContinueError(state, std::format("Reference Unit=\"{}\", type=ZoneHVAC:UnitVentilator", unitVent.Name)); ShowFatalError(state, "InitUnitVentilator: Program terminated due to previous condition(s)."); } @@ -1060,15 +1053,14 @@ namespace UnitVentilator { PlantUtilities::ScanPlantLoopsForObject( state, unitVent.CCoilPlantName, unitVent.CoolingCoilType, unitVent.CWPlantLoc, errFlag, _, _, _, _, _); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Reference Unit=\"{}\", type=ZoneHVAC:UnitVentilator", unitVent.Name)); + ShowContinueError(state, std::format("Reference Unit=\"{}\", type=ZoneHVAC:UnitVentilator", unitVent.Name)); ShowFatalError(state, "InitUnitVentilator: Program terminated due to previous condition(s)."); } unitVent.ColdCoilOutNodeNum = DataPlant::CompData::getPlantComponent(state, unitVent.CWPlantLoc).NodeNumOut; } else { if (unitVent.CCoilPresent) { - ShowFatalError(state, - EnergyPlus::format("InitUnitVentilator: Unit={}, invalid cooling coil type. Program terminated.", unitVent.Name)); + ShowFatalError(state, std::format("InitUnitVentilator: Unit={}, invalid cooling coil type. Program terminated.", unitVent.Name)); } } state.dataUnitVentilators->MyPlantScanFlag(UnitVentNum) = false; @@ -1082,10 +1074,10 @@ namespace UnitVentilator { if (DataZoneEquipment::CheckZoneEquipmentList(state, "ZoneHVAC:UnitVentilator", state.dataUnitVentilators->UnitVent(Loop).Name)) { continue; } - ShowSevereError(state, - EnergyPlus::format( - "InitUnitVentilator: Unit=[UNIT VENTILATOR,{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - state.dataUnitVentilators->UnitVent(Loop).Name)); + ShowSevereError( + state, + std::format("InitUnitVentilator: Unit=[UNIT VENTILATOR,{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + state.dataUnitVentilators->UnitVent(Loop).Name)); } } @@ -1114,9 +1106,8 @@ namespace UnitVentilator { if (unitVent.OutAirMassFlow > unitVent.MaxAirMassFlow) { unitVent.OutAirMassFlow = unitVent.MaxAirMassFlow; unitVent.MinOutAirMassFlow = unitVent.OutAirMassFlow * (unitVent.MinOutAirVolFlow / unitVent.OutAirVolFlow); - ShowWarningError( - state, - EnergyPlus::format("Outdoor air mass flow rate higher than unit flow rate, reset to unit flow rate for {}", unitVent.Name)); + ShowWarningError(state, + std::format("Outdoor air mass flow rate higher than unit flow rate, reset to unit flow rate for {}", unitVent.Name)); } // set the node max and min mass flow rates @@ -1683,9 +1674,9 @@ namespace UnitVentilator { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(OutAirVolFlowDes - OutAirVolFlowUser) / OutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeUnitVentilator: Potential issue with equipment sizing for {} {}", - state.dataUnitVentilators->cMO_UnitVentilator, - unitVent.Name)); + std::format("SizeUnitVentilator: Potential issue with equipment sizing for {} {}", + state.dataUnitVentilators->cMO_UnitVentilator, + unitVent.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowUser)); ShowContinueError( @@ -1746,9 +1737,9 @@ namespace UnitVentilator { if ((std::abs(MinOutAirVolFlowDes - MinOutAirVolFlowUser) / MinOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeUnitVentilator: Potential issue with equipment sizing for {} = \"{}\".", - state.dataUnitVentilators->cMO_UnitVentilator, - unitVent.Name)); + std::format("SizeUnitVentilator: Potential issue with equipment sizing for {} = \"{}\".", + state.dataUnitVentilators->cMO_UnitVentilator, + unitVent.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Minimum Outdoor Air Flow Rate of {:.5R} [m3/s]", MinOutAirVolFlowUser)); ShowContinueError(state, @@ -1796,8 +1787,8 @@ namespace UnitVentilator { DoWaterCoilSizing = false; // If there is no heating Plant Sizing object and autosizing was requested, issue fatal error message ShowSevereError(state, "Autosizing of water flow requires a heating loop Sizing:Plant object"); - ShowContinueError( - state, EnergyPlus::format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); + ShowContinueError(state, + std::format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); ErrorsFound = true; } } @@ -1888,9 +1879,9 @@ namespace UnitVentilator { if ((std::abs(MaxVolHotWaterFlowDes - MaxVolHotWaterFlowUser) / MaxVolHotWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeUnitVentilator: Potential issue with equipment sizing for {} {}", - state.dataUnitVentilators->cMO_UnitVentilator, - unitVent.Name)); + std::format("SizeUnitVentilator: Potential issue with equipment sizing for {} {}", + state.dataUnitVentilators->cMO_UnitVentilator, + unitVent.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Hot Water Flow of {:.5R} [m3/s]", MaxVolHotWaterFlowUser)); ShowContinueError(state, @@ -1997,8 +1988,8 @@ namespace UnitVentilator { } } else { ShowSevereError(state, "Autosizing of Steam flow requires a heating loop Sizing:Plant object"); - ShowContinueError( - state, EnergyPlus::format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); + ShowContinueError(state, + std::format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); ErrorsFound = true; } unitVent.MaxVolHotSteamFlow = MaxVolHotSteamFlowDes; @@ -2021,9 +2012,9 @@ namespace UnitVentilator { if ((std::abs(MaxVolHotSteamFlowDes - MaxVolHotSteamFlowUser) / MaxVolHotSteamFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeUnitVentilator: Potential issue with equipment sizing for {} = \"{}\"", - state.dataUnitVentilators->cMO_UnitVentilator, - unitVent.Name)); + std::format("SizeUnitVentilator: Potential issue with equipment sizing for {} = \"{}\"", + state.dataUnitVentilators->cMO_UnitVentilator, + unitVent.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowUser)); ShowContinueError( @@ -2082,8 +2073,8 @@ namespace UnitVentilator { DoWaterCoilSizing = false; // If there is no cooling Plant Sizing object and autosizing was requested, issue fatal error message ShowSevereError(state, "Autosizing of water coil requires a cooling loop Sizing:Plant object"); - ShowContinueError( - state, EnergyPlus::format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); + ShowContinueError(state, + std::format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); ErrorsFound = true; } } @@ -2144,12 +2135,10 @@ namespace UnitVentilator { if (MaxVolColdWaterFlowDes < 0.0) { ShowWarningError(state, "Autosizing of water flow resulted in negative value."); ShowContinueError( - state, - EnergyPlus::format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); + state, std::format("Occurs in {} = \"{}\"", state.dataUnitVentilators->cMO_UnitVentilator, unitVent.Name)); ShowContinueError(state, "...Sizing information found during sizing simulation:"); - ShowContinueError(state, EnergyPlus::format("...Calculated coil design load = {:.3T} W", DesCoolingLoad)); - ShowContinueError(state, - EnergyPlus::format("...Calculated water flow rate = {:.3T} m3/s", MaxVolColdWaterFlowDes)); + ShowContinueError(state, std::format("...Calculated coil design load = {:.3f} W", DesCoolingLoad)); + ShowContinueError(state, std::format("...Calculated water flow rate = {:.3f} m3/s", MaxVolColdWaterFlowDes)); ShowContinueError(state, "...Water flow rate will be set to 0. Check sizing inputs for zone and plant, inputs for water " "cooling coil object, and design day specifications."); @@ -2180,9 +2169,9 @@ namespace UnitVentilator { if ((std::abs(MaxVolColdWaterFlowDes - MaxVolColdWaterFlowUser) / MaxVolColdWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeUnitVentilator: Potential issue with equipment sizing for {} = \"{}\"", - state.dataUnitVentilators->cMO_UnitVentilator, - unitVent.Name)); + std::format("SizeUnitVentilator: Potential issue with equipment sizing for {} = \"{}\"", + state.dataUnitVentilators->cMO_UnitVentilator, + unitVent.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Cold Water Flow of {:.5R} [m3/s]", MaxVolColdWaterFlowUser)); @@ -2483,9 +2472,8 @@ namespace UnitVentilator { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError( - state, - EnergyPlus::format("ZoneHVAC:UnitVentilator simulation control: illogical condition for {}", unitVent.Name)); + ShowFatalError(state, + std::format("ZoneHVAC:UnitVentilator simulation control: illogical condition for {}", unitVent.Name)); } } break; default: { @@ -2567,9 +2555,8 @@ namespace UnitVentilator { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError( - state, - EnergyPlus::format("ZoneHVAC:UnitVentilator simulation control: illogical condition for {}", unitVent.Name)); + ShowFatalError(state, + std::format("ZoneHVAC:UnitVentilator simulation control: illogical condition for {}", unitVent.Name)); } } break; default: { @@ -2724,9 +2711,8 @@ namespace UnitVentilator { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError( - state, - EnergyPlus::format("ZoneHVAC:UnitVentilator simulation control: illogical condition for {}", unitVent.Name)); + ShowFatalError(state, + std::format("ZoneHVAC:UnitVentilator simulation control: illogical condition for {}", unitVent.Name)); } } break; default: { @@ -2801,9 +2787,8 @@ namespace UnitVentilator { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError( - state, - EnergyPlus::format("ZoneHVAC:UnitVentilator simulation control: illogical condition for {}", unitVent.Name)); + ShowFatalError(state, + std::format("ZoneHVAC:UnitVentilator simulation control: illogical condition for {}", unitVent.Name)); } } break; default: { diff --git a/src/EnergyPlus/UnitarySystem.cc b/src/EnergyPlus/UnitarySystem.cc index 9f382b216e6..7644b8d1f16 100644 --- a/src/EnergyPlus/UnitarySystem.cc +++ b/src/EnergyPlus/UnitarySystem.cc @@ -45,11 +45,14 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -// C++ headers +// C++ Headers +#include #include -// EnergyPlus headers +// Third Party Headers #include + +// EnergyPlus Headers #include #include #include @@ -312,7 +315,7 @@ namespace UnitarySystems { ShowSevereError(state, EnergyPlus::format("{}: Error getting inputs for system named: {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, - EnergyPlus::format("Number of speed inputs ({:.0T} is less than number of speeds ({:.0T}).", + EnergyPlus::format("Number of speed inputs ({:.0f} is less than number of speeds ({:.0f}).", Real64(numSpeedInputs), Real64(maxSpeeds))); errorsFound = true; @@ -1881,7 +1884,7 @@ namespace UnitarySystems { EqSizing.DesHeatingLoad = HeatCapAtPeak; } else { // should never happen - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", RoutineName, CompType, CompName)); + ShowSevereError(state, std::format("{}: {} = {}", RoutineName, CompType, CompName)); ShowContinueError(state, "Illegal entry for Heating Supply Air Flow Rate Method."); } @@ -2215,7 +2218,7 @@ namespace UnitarySystems { this->m_DesignFanVolFlowRate = this->m_ActualFanVolFlowRate; } if (this->m_DesignFanVolFlowRate <= 0.0) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", RoutineName, CompType, CompName)); + ShowWarningError(state, std::format("{}: {} = {}", RoutineName, CompType, CompName)); ShowFatalError(state, "Unable to determine fan air flow rate."); } } @@ -2461,9 +2464,8 @@ namespace UnitarySystems { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(CoolOutAirVolFlowDes - CoolOutAirVolFlowUser) / CoolOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizePTUnit: Potential issue with equipment sizing for {} {}", this->UnitType, this->Name)); + ShowMessage(state, + std::format("SizePTUnit: Potential issue with equipment sizing for {} {}", this->UnitType, this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Outdoor Air Flow Rate During Cooling Operation of {:.5R} [m3/s]", CoolOutAirVolFlowUser)); @@ -2514,9 +2516,8 @@ namespace UnitarySystems { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(HeatOutAirVolFlowDes - HeatOutAirVolFlowUser) / HeatOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizePTUnit: Potential issue with equipment sizing for {} {}", this->UnitType, this->Name)); + ShowMessage(state, + std::format("SizePTUnit: Potential issue with equipment sizing for {} {}", this->UnitType, this->Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Outdoor Air Flow Rate During Heating Operation of {:.5R} [m3/s]", HeatOutAirVolFlowUser)); @@ -2571,9 +2572,8 @@ namespace UnitarySystems { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(NoCoolHeatOutAirVolFlowDes - NoCoolHeatOutAirVolFlowUser) / NoCoolHeatOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage( - state, - EnergyPlus::format("SizePTUnit: Potential issue with equipment sizing for {} {}", this->UnitType, this->Name)); + ShowMessage(state, + std::format("SizePTUnit: Potential issue with equipment sizing for {} {}", this->UnitType, this->Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Outdoor Air Flow Rate When No Cooling or Heating is Needed of {:.5R} [m3/s]", @@ -2684,12 +2684,12 @@ namespace UnitarySystems { 0.0, 0.0); // conduct the sizing operation in the VS WSHP if (this->m_NumOfSpeedCooling != state.dataVariableSpeedCoils->VarSpeedCoil(this->m_CoolingCoilIndex).NumOfSpeeds) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", RoutineName, CompType, CompName)); + ShowWarningError(state, std::format("{}: {} = {}", RoutineName, CompType, CompName)); ShowContinueError(state, "Number of cooling speeds does not match coil object."); ShowFatalError(state, - EnergyPlus::format("Cooling coil = {}: {}", - state.dataVariableSpeedCoils->VarSpeedCoil(this->m_CoolingCoilIndex).VarSpeedCoilType, - state.dataVariableSpeedCoils->VarSpeedCoil(this->m_CoolingCoilIndex).Name)); + std::format("Cooling coil = {}: {}", + state.dataVariableSpeedCoils->VarSpeedCoil(this->m_CoolingCoilIndex).VarSpeedCoilType, + state.dataVariableSpeedCoils->VarSpeedCoil(this->m_CoolingCoilIndex).Name)); } state.dataSize->DXCoolCap = VariableSpeedCoils::GetCoilCapacityVariableSpeed( state, HVAC::coilTypeNames[(int)this->m_coolCoilType], this->m_CoolingCoilName, ErrFound); @@ -2763,9 +2763,9 @@ namespace UnitarySystems { // TODO: Determine operating mode based on dehumidification stuff, using normalMode for now if (this->m_NumOfSpeedCooling != (int)newCoil.performance->numSpeeds()) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", RoutineName, CompType, CompName)); + ShowWarningError(state, std::format("{}: {} = {}", RoutineName, CompType, CompName)); ShowContinueError(state, "Number of cooling speeds does not match coil object."); - ShowFatalError(state, EnergyPlus::format("Cooling coil = Coil:Cooling:DX: {}", newCoil.name)); + ShowFatalError(state, std::format("Cooling coil = Coil:Cooling:DX: {}", newCoil.name)); } // Use discrete/continuous control algorithm regardless of number of speeds @@ -2844,9 +2844,9 @@ namespace UnitarySystems { auto &newCoil = state.dataCoilCoolingDX->coilCoolingDXs[this->m_CoolingCoilIndex]; // TODO: Determine operating mode based on dehumdification stuff, using normalMode for now if (this->m_NumOfSpeedCooling != (int)newCoil.performance->numSpeeds()) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", RoutineName, CompType, CompName)); + ShowWarningError(state, std::format("{}: {} = {}", RoutineName, CompType, CompName)); ShowContinueError(state, "Number of cooling speeds does not match coil object."); - ShowFatalError(state, EnergyPlus::format("Cooling coil = Coil:Cooling:DX: {}", newCoil.name)); + ShowFatalError(state, std::format("Cooling coil = Coil:Cooling:DX: {}", newCoil.name)); } // Use discrete/continuous control algorithm regardless of number of speeds @@ -3018,16 +3018,15 @@ namespace UnitarySystems { this->m_heatCoilType == HVAC::CoilType::HeatingGasMultiStage) { if (state.dataUnitarySystems->designSpecMSHP[MSHPIndex].heatingVolFlowRatio[Iter - 1] < 1.0 && this->m_ControlType == UnitarySysCtrlType::Setpoint) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", RoutineName, CompType, CompName)); + ShowWarningError(state, std::format("{}: {} = {}", RoutineName, CompType, CompName)); ShowContinueError( - state, - EnergyPlus::format("Design specification object = {}", state.dataUnitarySystems->designSpecMSHP[MSHPIndex].name)); + state, std::format("Design specification object = {}", state.dataUnitarySystems->designSpecMSHP[MSHPIndex].name)); ShowContinueError(state, "When control type = SetPointBased the outlet air temperature must change with coil capacity, if " "air flow also changes outlet air temperature will be relatively constant."); ShowContinueError( state, - EnergyPlus::format( + std::format( "Speed {} Supply Air Flow Ratio During Heating Operation will be set = 1.0 and the simulation continues", Iter)); state.dataUnitarySystems->designSpecMSHP[MSHPIndex].heatingVolFlowRatio[Iter - 1] = 1.0; @@ -3086,12 +3085,12 @@ namespace UnitarySystems { 0.0); // conduct the sizing operation in the VS WSHP if (this->m_NumOfSpeedHeating != state.dataVariableSpeedCoils->VarSpeedCoil(this->m_HeatingCoilIndex).NumOfSpeeds) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", RoutineName, CompType, CompName)); + ShowWarningError(state, std::format("{}: {} = {}", RoutineName, CompType, CompName)); ShowContinueError(state, "Number of heating speeds does not match coil object."); ShowFatalError(state, - EnergyPlus::format("Heating coil = {}: {}", - state.dataVariableSpeedCoils->VarSpeedCoil(this->m_HeatingCoilIndex).VarSpeedCoilType, - state.dataVariableSpeedCoils->VarSpeedCoil(this->m_HeatingCoilIndex).Name)); + std::format("Heating coil = {}: {}", + state.dataVariableSpeedCoils->VarSpeedCoil(this->m_HeatingCoilIndex).VarSpeedCoilType, + state.dataVariableSpeedCoils->VarSpeedCoil(this->m_HeatingCoilIndex).Name)); } if (this->m_NumOfSpeedHeating > 0) { @@ -3620,7 +3619,7 @@ namespace UnitarySystems { this->ControlZoneMassFlowFrac = state.dataUnitarySystems->initLoadBasedControlCntrlZoneTerminalUnitMassFlowRateMax / SumOfMassFlowRateMax; } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", this->UnitType, this->Name)); + ShowSevereError(state, std::format("{} = {}", this->UnitType, this->Name)); ShowContinueError(state, " The Fraction of Supply Air Flow That Goes Through the Controlling Zone is set to 1."); this->ControlZoneMassFlowFrac = 1.0; } @@ -3678,7 +3677,7 @@ namespace UnitarySystems { // check that MaxNoCoolHeatAirVolFlow is less than both MaxCoolAirVolFlow and MaxHeatAirVolFlow if (this->m_ControlType == UnitarySysCtrlType::CCMASHRAE) { if (this->m_MaxNoCoolHeatAirVolFlow >= this->m_MaxCoolAirVolFlow || this->m_MaxNoCoolHeatAirVolFlow >= this->m_MaxHeatAirVolFlow) { - ShowSevereError(state, EnergyPlus::format("{} = {}", this->UnitType, this->Name)); + ShowSevereError(state, std::format("{} = {}", this->UnitType, this->Name)); ShowContinueError( state, " For SingleZoneVAV control the No Load Supply Air Flow Rate must be less than both the cooling and heating supply " @@ -3686,8 +3685,8 @@ namespace UnitarySystems { this->m_MaxNoCoolHeatAirVolFlow = min(this->m_MaxCoolAirVolFlow, this->m_MaxHeatAirVolFlow) - 0.01; ShowContinueError( state, - EnergyPlus::format(" The SingleZoneVAV control No Load Supply Air Flow Rate is reset to {:.5T} and the simulation continues.", - this->m_MaxNoCoolHeatAirVolFlow)); + std::format(" The SingleZoneVAV control No Load Supply Air Flow Rate is reset to {:.5f} and the simulation continues.", + this->m_MaxNoCoolHeatAirVolFlow)); } } } @@ -3879,7 +3878,7 @@ namespace UnitarySystems { this->m_coolCoilType = HVAC::CoilType::CoolingDX; this->m_CoolingCoilIndex = CoilCoolingDX::factory(state, this->m_CoolingCoilName); if (this->m_CoolingCoilIndex == -1) { - ShowFatalError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowFatalError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); } else { // set variable speed coil flag as necessary auto &newCoil = state.dataCoilCoolingDX->coilCoolingDXs[this->m_CoolingCoilIndex]; @@ -3929,7 +3928,7 @@ namespace UnitarySystems { this->OAMixerIndex = MixedAir::GetOAMixerIndex(state, input_data.oa_mixer_name); ValidateComponent(state, input_data.oa_mixer_type, input_data.oa_mixer_name, errFlag, cCurrentModuleObject); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("specified in {} = \"{}\".", cCurrentModuleObject, input_data.oa_mixer_name)); + ShowContinueError(state, std::format("specified in {} = \"{}\".", cCurrentModuleObject, input_data.oa_mixer_name)); errorsFound = true; errFlag = false; } else { @@ -3937,7 +3936,7 @@ namespace UnitarySystems { // OANodeNums = outside air mixer node numbers, OANodeNums(4) = outside air mixer mixed air node Array1D_int OANodeNums = MixedAir::GetOAMixerNodeNumbers(state, input_data.oa_mixer_name, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("that was specified in {} = {}", cCurrentModuleObject, input_data.oa_mixer_name)); + ShowContinueError(state, std::format("that was specified in {} = {}", cCurrentModuleObject, input_data.oa_mixer_name)); ShowContinueError(state, "..OutdoorAir:Mixer is required. Enter an OutdoorAir:Mixer object with this name."); errorsFound = true; errFlag = false; @@ -3950,9 +3949,9 @@ namespace UnitarySystems { } } else if ((input_data.oa_mixer_type.empty() && !input_data.oa_mixer_name.empty()) || (!input_data.oa_mixer_type.empty() && input_data.oa_mixer_name.empty())) { - ShowSevereError(state, EnergyPlus::format("Missing one of {} Outdoor Air Mixer inputs.", cCurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("..OutdoorAir:Mixer type = {}", input_data.oa_mixer_type)); - ShowContinueError(state, EnergyPlus::format("..OutdoorAir:Mixer name = {}", input_data.oa_mixer_name)); + ShowSevereError(state, std::format("Missing one of {} Outdoor Air Mixer inputs.", cCurrentModuleObject)); + ShowContinueError(state, std::format("..OutdoorAir:Mixer type = {}", input_data.oa_mixer_type)); + ShowContinueError(state, std::format("..OutdoorAir:Mixer name = {}", input_data.oa_mixer_name)); errorsFound = true; } this->m_HeatConvTol = input_data.heat_conv_tol; @@ -4020,7 +4019,7 @@ namespace UnitarySystems { this->ControlZoneNum = Util::FindItemInList(input_data.controlling_zone_or_thermostat_location, state.dataHeatBal->Zone); } else if (this->m_ControlType == UnitarySysCtrlType::Load || this->m_ControlType == UnitarySysCtrlType::CCMASHRAE) { if (this->m_sysType == SysType::Unitary) { - ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Controlling Zone or Thermostat Location cannot be blank when Control Type = Load or SingleZoneVAV"); errorsFound = true; } @@ -4031,11 +4030,11 @@ namespace UnitarySystems { // bypass this error for PTUnits if (this->ControlZoneNum == 0 && (this->m_sysType == SysType::Unitary || this->m_sysType == SysType::CoilCoolingDX || this->m_sysType == SysType::CoilCoolingWater)) { - ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "When Control Type = Load or SingleZoneVAV"); ShowContinueError(state, - EnergyPlus::format(" Controlling Zone or Thermostat Location must be a valid zone name, zone name = {}", - input_data.controlling_zone_or_thermostat_location)); + std::format(" Controlling Zone or Thermostat Location must be a valid zone name, zone name = {}", + input_data.controlling_zone_or_thermostat_location)); errorsFound = true; } } @@ -4059,11 +4058,11 @@ namespace UnitarySystems { AirNodeFound = true; } if (!AirNodeFound && this->ControlZoneNum > 0) { - ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Did not find Air Node (Zone with Humidistat)."); - ShowContinueError(state, - EnergyPlus::format("specified Controlling Zone or Thermostat Location name = {}", - input_data.controlling_zone_or_thermostat_location)); + ShowContinueError( + state, + std::format("specified Controlling Zone or Thermostat Location name = {}", input_data.controlling_zone_or_thermostat_location)); errorsFound = true; } } @@ -4092,9 +4091,8 @@ namespace UnitarySystems { // check that heat pump doesn't have local outside air and DOA if (this->ATMixerExists && this->m_OAMixerNodes[0] > 0 && (input_data.cooling_oa_flow_rate != 0.0 || input_data.heating_oa_flow_rate != 0.0 || input_data.no_load_oa_flow_rate != 0.0)) { - ShowSevereError( - state, - EnergyPlus::format("{} = \"{}\". System has local as well as central outdoor air specified", cCurrentModuleObject, this->Name)); + ShowSevereError(state, + std::format("{} = \"{}\". System has local as well as central outdoor air specified", cCurrentModuleObject, this->Name)); errorsFound = true; } @@ -4185,16 +4183,15 @@ namespace UnitarySystems { } if (!ZoneExhaustNodeFound && !InducedNodeFound) { // Exhaust Node was not found - ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, - EnergyPlus::format("Incorrect or misspelled Air Inlet Node Name or Exhaust Node Name or Induced Node Name. = {}", - input_data.air_inlet_node_name)); + std::format("Incorrect or misspelled Air Inlet Node Name or Exhaust Node Name or Induced Node Name. = {}", + input_data.air_inlet_node_name)); ShowContinueError( state, - EnergyPlus::format( - "Air Inlet Node {} name does not match any controlled zone exhaust node name. Check ZoneHVAC:EquipmentConnections " - "object inputs.", - input_data.air_inlet_node_name)); + std::format("Air Inlet Node {} name does not match any controlled zone exhaust node name. Check ZoneHVAC:EquipmentConnections " + "object inputs.", + input_data.air_inlet_node_name)); ShowContinueError(state, "or Induced Air Outlet Node Name specified in AirLoopHVAC:ReturnPlenum object."); errorsFound = true; } else if (!ZoneInletNodeFound) { @@ -4203,9 +4200,8 @@ namespace UnitarySystems { int ZoneInletNum = 0; ZoneInletNodeExists = searchZoneInletNodes(state, this->AirOutNode, InletControlledZoneNum, ZoneInletNum); if (!ZoneInletNodeExists) { - ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, - EnergyPlus::format("Incorrect or misspelled Air Outlet Node Name = {}", input_data.air_outlet_node_name)); + ShowSevereError(state, std::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Incorrect or misspelled Air Outlet Node Name = {}", input_data.air_outlet_node_name)); ShowContinueError(state, "Node name does not match any controlled zone inlet node name. Check ZoneHVAC:EquipmentConnections " "object inputs."); @@ -4243,11 +4239,11 @@ namespace UnitarySystems { AirNodeFound = true; } if (!AirNodeFound && this->ControlZoneNum > 0) { - ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Did not find Air Node (Zone with Thermostat or Thermal Comfort Thermostat)."); ShowContinueError(state, - EnergyPlus::format("specified Controlling Zone or Thermostat Location name = {}", - input_data.controlling_zone_or_thermostat_location)); + std::format("specified Controlling Zone or Thermostat Location name = {}", + input_data.controlling_zone_or_thermostat_location)); errorsFound = true; } @@ -4276,11 +4272,11 @@ namespace UnitarySystems { AirNodeFound = true; } if (!AirNodeFound && this->ControlZoneNum > 0) { - ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Did not find Air Node (Zone with Thermostat or Thermal Comfort Thermostat)."); ShowContinueError(state, - EnergyPlus::format("specified Controlling Zone or Thermostat Location name = {}", - input_data.controlling_zone_or_thermostat_location)); + std::format("specified Controlling Zone or Thermostat Location name = {}", + input_data.controlling_zone_or_thermostat_location)); errorsFound = true; } } @@ -4308,11 +4304,11 @@ namespace UnitarySystems { if (zoneName.empty() && this->ControlZoneNum > 0) { zoneName = state.dataHeatBal->Zone(this->ControlZoneNum).Name; } - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Did not find proper connections for AirLoopHVAC or ZoneHVAC system."); - ShowContinueError(state, EnergyPlus::format("specified Controlling Zone or Thermostat Location name = {}", zoneName)); + ShowContinueError(state, std::format("specified Controlling Zone or Thermostat Location name = {}", zoneName)); if (!AirNodeFound && !ZoneEquipmentFound) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Did not find air node (zone with thermostat)."); // ShowContinueError(state, format("specified {} = {}", cAlphaFields(iControlZoneAlphaNum), Alphas(iControlZoneAlphaNum))); ShowContinueError(state, @@ -4337,9 +4333,9 @@ namespace UnitarySystems { this->m_HVACSizingIndex = Util::FindItemInList(input_data.design_spec_zonehvac_sizing_object_name, state.dataSize->ZoneHVACSizing); if (this->m_HVACSizingIndex == 0) { ShowSevereError(state, - EnergyPlus::format("Design Specification ZoneHVAC Sizing Object Name = {} not found.", - input_data.design_spec_zonehvac_sizing_object_name)); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, this->Name)); + std::format("Design Specification ZoneHVAC Sizing Object Name = {} not found.", + input_data.design_spec_zonehvac_sizing_object_name)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, this->Name)); errorsFound = true; } } @@ -4379,8 +4375,8 @@ namespace UnitarySystems { this->m_FanExists = true; this->m_FanName = loc_m_FanName; } else if (!loc_m_FanName.empty() || !loc_fanType.empty()) { - ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Invalid Fan Type or Name: Fan Name = {}, Fan Type = {}", loc_m_FanName, loc_fanType)); + ShowSevereError(state, std::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Invalid Fan Type or Name: Fan Name = {}, Fan Type = {}", loc_m_FanName, loc_fanType)); errorsFound = true; } @@ -4398,8 +4394,8 @@ namespace UnitarySystems { this->m_FanPlace = static_cast(getEnumValue(HVAC::fanPlaceNamesUC, Util::makeUPPER(input_data.fan_placement))); if (this->m_FanPlace == HVAC::FanPlace::Invalid && this->m_FanExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Fan Placement = {}", input_data.fan_placement)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Fan Placement = {}", input_data.fan_placement)); errorsFound = true; } @@ -4451,7 +4447,7 @@ namespace UnitarySystems { ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from DX heating coil @@ -4459,7 +4455,7 @@ namespace UnitarySystems { // Get DX heating coil index DXCoils::GetDXCoilIndex(state, this->m_HeatingCoilName, this->m_HeatingCoilIndex, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -4486,13 +4482,13 @@ namespace UnitarySystems { ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { this->m_HeatingCoilIndex = VariableSpeedCoils::GetCoilIndexVariableSpeed(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -4518,12 +4514,12 @@ namespace UnitarySystems { this->m_DXHeatingCoil = true; ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { DXCoils::GetDXCoilIndex(state, this->m_HeatingCoilName, this->m_HeatingCoilIndex, errFlag, this->m_HeatingCoilTypeName); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -4542,12 +4538,12 @@ namespace UnitarySystems { this->m_heatCoilType == HVAC::CoilType::HeatingGasMultiStage) { ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { HeatingCoils::GetCoilIndex(state, this->m_HeatingCoilName, this->m_HeatingCoilIndex, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -4565,12 +4561,12 @@ namespace UnitarySystems { this->m_heatCoilType == HVAC::CoilType::HeatingDesuperheater) { ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from heating coil HeatingCoils::GetCoilIndex(state, this->m_HeatingCoilName, this->m_HeatingCoilIndex, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -4593,12 +4589,12 @@ namespace UnitarySystems { } else if (this->m_heatCoilType == HVAC::CoilType::HeatingWater) { ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from heating coil object this->m_HeatingCoilIndex = WaterCoils::GetWaterCoilIndex(state, "COIL:HEATING:WATER", this->m_HeatingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -4618,13 +4614,13 @@ namespace UnitarySystems { } else if (this->m_heatCoilType == HVAC::CoilType::HeatingSteam) { ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from heating coil object this->m_HeatingCoilIndex = SteamCoils::GetSteamCoilIndex(state, "COIL:HEATING:STEAM", this->m_HeatingCoilName, errFlag); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); errorsFound = true; errFlag = false; } else { @@ -4654,14 +4650,14 @@ namespace UnitarySystems { this->m_DXHeatingCoil = true; ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from heating coil object this->m_HeatingCoilIndex = WaterToAirHeatPumpSimple::GetCoilIndex(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, errFlag); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); errorsFound = true; errFlag = false; } else { @@ -4681,13 +4677,13 @@ namespace UnitarySystems { this->m_DXHeatingCoil = true; ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from heating coil object this->m_HeatingCoilIndex = WaterToAirHeatPump::GetCoilIndex(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, errFlag); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); errorsFound = true; errFlag = false; } else { @@ -4702,14 +4698,14 @@ namespace UnitarySystems { } else if (this->m_heatCoilType == HVAC::CoilType::UserDefined) { ValidateComponent(state, this->m_HeatingCoilTypeName, this->m_HeatingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from Heating coil object UserDefinedComponents::GetUserDefinedCoilIndex( state, this->m_HeatingCoilName, this->m_HeatingCoilIndex, errFlag, cCurrentModuleObject); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Heating Coil Name = {}", this->m_HeatingCoilName)); errorsFound = true; errFlag = false; } else { @@ -4724,8 +4720,8 @@ namespace UnitarySystems { } } else if (this->m_HeatCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Heating Coil Object Type = {}", this->m_HeatingCoilTypeName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Heating Coil Object Type = {}", this->m_HeatingCoilTypeName)); errorsFound = true; } // IF (this->m_heatCoilType == Coil_HeatingGasOrOtherFuel .OR. &, etc. if (this->m_DXHeatingCoil) { @@ -4767,7 +4763,7 @@ namespace UnitarySystems { if (this->m_coolCoilType == HVAC::CoilType::CoolingDXSingleSpeed || this->m_coolCoilType == HVAC::CoilType::CoolingDXTwoSpeed) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from DX cooling coil @@ -4783,7 +4779,7 @@ namespace UnitarySystems { // Get DX cooling coil index DXCoils::GetDXCoilIndex(state, this->m_CoolingCoilName, this->m_CoolingCoilIndex, isNotOK); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { if (state.dataGlobal->DoCoilDirectSolutions && this->m_coolCoilType == HVAC::CoilType::CoolingDXSingleSpeed) { @@ -4836,14 +4832,14 @@ namespace UnitarySystems { } else if (this->m_coolCoilType == HVAC::CoilType::CoolingDX) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // // call CoilCoolingDX constructor this->m_CoolingCoilIndex = CoilCoolingDX::factory(state, this->m_CoolingCoilName); if (this->m_CoolingCoilIndex == -1) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { @@ -4875,7 +4871,7 @@ namespace UnitarySystems { this->SpeedSHR.resize(this->m_NumOfSpeedCooling + 1); } if (this->m_ControlType == UnitarySysCtrlType::Setpoint) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Setpoint control is not available for SubcoolReheat cooling coil. Load control is forced. " "Simulation continues."); @@ -4915,7 +4911,7 @@ namespace UnitarySystems { } else if (this->m_coolCoilType == HVAC::CoilType::CoolingDXTwoStageWHumControl) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from DX cooling coil @@ -4923,7 +4919,7 @@ namespace UnitarySystems { // Get DX cooling coil index DXCoils::GetDXCoilIndex(state, this->m_CoolingCoilName, this->m_CoolingCoilIndex, isNotOK); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { auto &thisCoolCoil = state.dataDXCoils->DXCoil(this->m_CoolingCoilIndex); @@ -4960,7 +4956,7 @@ namespace UnitarySystems { } else if (this->m_coolCoilType == HVAC::CoilType::CoolingDXHXAssisted) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from heat exchanger assisted cooling coil @@ -4968,7 +4964,7 @@ namespace UnitarySystems { // Get DX heat exchanger assisted cooling coil index HVACHXAssistedCoolingCoil::GetHXDXCoilIndex(state, this->m_CoolingCoilName, this->m_CoolingCoilIndex, isNotOK); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } @@ -4977,7 +4973,7 @@ namespace UnitarySystems { std::string ChildCoolingCoilType = HVACHXAssistedCoolingCoil::GetHXDXCoilType(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } @@ -4985,7 +4981,7 @@ namespace UnitarySystems { int childCCIndex = CoilCoolingDX::factory(state, ChildCoolingCoilName); if (childCCIndex < 0) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } @@ -5007,7 +5003,7 @@ namespace UnitarySystems { this->m_coolingCoilAvailSched = DXCoils::GetDXCoilAvailSched(state, ChildCoolingCoilType, ChildCoolingCoilName, errFlag); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } @@ -5017,7 +5013,7 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5030,7 +5026,7 @@ namespace UnitarySystems { errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5040,13 +5036,13 @@ namespace UnitarySystems { this->m_MaxCoolAirVolFlow = VariableSpeedCoils::GetCoilAirFlowRateVariableSpeed(state, ChildCoolingCoilType, ChildCoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } this->m_CondenserNodeNum = VariableSpeedCoils::GetVSCoilCondenserInletNode(state, ChildCoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5059,7 +5055,7 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5070,7 +5066,7 @@ namespace UnitarySystems { CoolingCoilOutletNode = HVACHXAssistedCoolingCoil::GetCoilOutletNode(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5103,7 +5099,7 @@ namespace UnitarySystems { } else if (this->m_coolCoilType == HVAC::CoilType::CoolingWaterHXAssisted) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from heat exchanger assisted cooling coil @@ -5114,7 +5110,7 @@ namespace UnitarySystems { HVACHXAssistedCoolingCoil::GetHXDXCoilName(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5122,7 +5118,7 @@ namespace UnitarySystems { // Get DX heat exchanger assisted cooling coil index HVACHXAssistedCoolingCoil::GetHXDXCoilIndex(state, this->m_CoolingCoilName, this->m_CoolingCoilIndex, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5135,7 +5131,7 @@ namespace UnitarySystems { this->CoolCoilFluidInletNode = WaterCoils::GetCoilWaterInletNode(state, HVAC::coilTypeNames[(int)ActualCoolCoilType], HXCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5146,7 +5142,7 @@ namespace UnitarySystems { CoolingCoilOutletNode = HVACHXAssistedCoolingCoil::GetCoilOutletNode(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5158,7 +5154,7 @@ namespace UnitarySystems { this->m_DesignCoolingCapacity = DataSizing::AutoSize; } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errFlag = false; errorsFound = true; } @@ -5182,13 +5178,13 @@ namespace UnitarySystems { this->m_coolCoilType == HVAC::CoilType::CoolingWAHPVariableSpeedEquationFit) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { this->m_CoolingCoilIndex = VariableSpeedCoils::GetCoilIndexVariableSpeed(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -5233,12 +5229,12 @@ namespace UnitarySystems { } else if (this->m_coolCoilType == HVAC::CoilType::CoolingDXMultiSpeed) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { DXCoils::GetDXCoilIndex(state, this->m_CoolingCoilName, this->m_CoolingCoilIndex, errFlag, input_data.cooling_coil_object_type); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -5270,14 +5266,14 @@ namespace UnitarySystems { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from Cooling coil object this->m_CoolingCoilIndex = WaterCoils::GetWaterCoilIndex(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, errFlag); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); errorsFound = true; errFlag = false; } else { @@ -5299,14 +5295,14 @@ namespace UnitarySystems { } else if (this->m_coolCoilType == HVAC::CoilType::CoolingWAHPSimple) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from Cooling coil object this->m_CoolingCoilIndex = WaterToAirHeatPumpSimple::GetCoilIndex(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, errFlag); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); errorsFound = true; errFlag = false; } else { @@ -5349,14 +5345,14 @@ namespace UnitarySystems { } else if (this->m_coolCoilType == HVAC::CoilType::CoolingWAHP) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from Cooling coil object this->m_CoolingCoilIndex = WaterToAirHeatPump::GetCoilIndex(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, errFlag); if (this->m_CoolingCoilIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); errorsFound = true; errFlag = false; } else { @@ -5380,14 +5376,14 @@ namespace UnitarySystems { } else if (this->m_coolCoilType == HVAC::CoilType::UserDefined) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from Cooling coil object UserDefinedComponents::GetUserDefinedCoilIndex( state, this->m_CoolingCoilName, this->m_CoolingCoilIndex, errFlag, cCurrentModuleObject); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); errorsFound = true; errFlag = false; } else { @@ -5404,14 +5400,14 @@ namespace UnitarySystems { } else if (this->m_coolCoilType == HVAC::CoilType::CoolingDXPackagedThermalStorage) { ValidateComponent(state, input_data.cooling_coil_object_type, this->m_CoolingCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from Cooling coil object PackagedThermalStorageCoil::GetTESCoilIndex( state, this->m_CoolingCoilName, this->m_CoolingCoilIndex, errFlag, cCurrentModuleObject); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Cooling Coil Name = {}", this->m_CoolingCoilName)); errorsFound = true; errFlag = false; } else { @@ -5433,7 +5429,7 @@ namespace UnitarySystems { } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } @@ -5507,7 +5503,7 @@ namespace UnitarySystems { if (Util::SameString(input_data.use_doas_dx_cooling_coil, "Yes")) { this->m_ISHundredPercentDOASDXCoil = true; if (this->m_coolCoilType == HVAC::CoilType::CoolingDXVariableSpeed) { - ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Variable DX Cooling Coil is not supported as 100% DOAS DX coil."); ShowContinueError(state, "Variable DX Cooling Coil resets Use DOAS DX Cooling Coil = No and the simulation continues."); this->m_ISHundredPercentDOASDXCoil = false; @@ -5534,14 +5530,14 @@ namespace UnitarySystems { if (this->m_ControlType != UnitarySysCtrlType::CCMASHRAE && this->DesignMinOutletTemp == DataSizing::AutoSize) { // skip error for PTUnits if (this->m_sysType == SysType::Unitary || this->m_sysType == SysType::CoilCoolingDX || this->m_sysType == SysType::CoilCoolingWater) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Invalid entry for Minimum Supply Air Temperature = AutoSize."); ShowContinueError(state, "AutoSizing not allowed when Control Type = Load or Setpoint"); errorsFound = true; } } if (this->m_ControlType != UnitarySysCtrlType::CCMASHRAE && this->DesignMinOutletTemp > 7.5) { - ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, EnergyPlus::format("Invalid entry for Minimum Supply Air Temperature = {:.4R}", this->DesignMinOutletTemp)); ShowContinueError(state, "The minimum supply air temperature will be limited to 7.5C and the simulation continues."); this->DesignMinOutletTemp = 7.5; @@ -5566,18 +5562,18 @@ namespace UnitarySystems { } if (this->m_DehumidControlType_Num == DehumCtrlType::CoolReheat || this->m_DehumidControlType_Num == DehumCtrlType::Multimode) { if (!this->m_RunOnLatentLoad && !this->m_RunOnLatentOnlyWithSensible && this->m_ControlType == UnitarySysCtrlType::Load) { - ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Inconsistent moisture control inputs."); - ShowContinueError(state, EnergyPlus::format("Dehumidification Control Type = {}", input_data.dehumidification_control_type)); - ShowContinueError(state, EnergyPlus::format("Latent Load Control = {}", input_data.latent_load_control)); + ShowContinueError(state, std::format("Dehumidification Control Type = {}", input_data.dehumidification_control_type)); + ShowContinueError(state, std::format("Latent Load Control = {}", input_data.latent_load_control)); ShowContinueError(state, "Humidity/Moisture may not be controlled with these settings."); } } else { if ((this->m_RunOnLatentLoad || this->m_RunOnLatentOnlyWithSensible) && this->m_ControlType == UnitarySysCtrlType::Load) { - ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Inconsistent moisture control inputs."); - ShowContinueError(state, EnergyPlus::format("Dehumidification Control Type = {}", input_data.dehumidification_control_type)); - ShowContinueError(state, EnergyPlus::format("Latent Load Control = {}", input_data.latent_load_control)); + ShowContinueError(state, std::format("Dehumidification Control Type = {}", input_data.dehumidification_control_type)); + ShowContinueError(state, std::format("Latent Load Control = {}", input_data.latent_load_control)); ShowContinueError(state, "Humidity/Moisture will not be controlled with these settings."); this->m_RunOnLatentLoad = false; this->m_RunOnLatentOnlyWithSensible = false; @@ -5609,14 +5605,14 @@ namespace UnitarySystems { ValidateComponent(state, this->m_SuppHeatCoilTypeName, this->m_SuppHeatCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from reheat coil this->m_SuppHeatCoilIndex = HeatingCoils::GetHeatingCoilIndex(state, this->m_SuppHeatCoilTypeName, this->m_SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -5642,12 +5638,12 @@ namespace UnitarySystems { ValidateComponent(state, this->m_SuppHeatCoilTypeName, this->m_SuppHeatCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from heating coil object this->m_SuppHeatCoilIndex = WaterCoils::GetWaterCoilIndex(state, "COIL:HEATING:WATER", this->m_SuppHeatCoilName, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } else { @@ -5669,13 +5665,13 @@ namespace UnitarySystems { ValidateComponent(state, this->m_SuppHeatCoilTypeName, this->m_SuppHeatCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from heating coil object this->m_SuppHeatCoilIndex = SteamCoils::GetSteamCoilIndex(state, "COIL:HEATING:STEAM", this->m_SuppHeatCoilName, errFlag); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Supplemental Heating Coil Name = {}", this->m_SuppHeatCoilName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Supplemental Heating Coil Name = {}", this->m_SuppHeatCoilName)); errorsFound = true; errFlag = false; } else { @@ -5701,14 +5697,14 @@ namespace UnitarySystems { } else if (this->m_suppHeatCoilType == HVAC::CoilType::UserDefined) { ValidateComponent(state, this->m_SuppHeatCoilTypeName, this->m_SuppHeatCoilName, isNotOK, cCurrentModuleObject); if (isNotOK) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; } else { // mine data from Heating coil object UserDefinedComponents::GetUserDefinedCoilIndex( state, this->m_SuppHeatCoilName, this->m_SuppHeatCoilIndex, errFlag, cCurrentModuleObject); if (errFlag) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Supplemental Heating Coil Name = {}", this->m_SuppHeatCoilName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Supplemental Heating Coil Name = {}", this->m_SuppHeatCoilName)); errorsFound = true; errFlag = false; } else { @@ -5721,8 +5717,8 @@ namespace UnitarySystems { } } else { // Illegal reheating coil type - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Supplemental Heating Coil Type = {}", this->m_SuppHeatCoilTypeName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Supplemental Heating Coil Type = {}", this->m_SuppHeatCoilTypeName)); errorsFound = true; } // IF (this->SuppHeatCoilType_Num == Coil_HeatingGasOrOtherFuel .OR. &, etc. @@ -5898,7 +5894,7 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; } else { if (this->m_MaxCoolAirVolFlow <= HVAC::SmallAirVolFlow && this->m_CoolCoilExists) { - ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Cooling Supply Air Flow Rate Method = SupplyAirFlowRate."); ShowContinueError(state, EnergyPlus::format("Suspicious Cooling Supply Air Flow Rate = {:.7R} when cooling coil is present.", @@ -5910,7 +5906,7 @@ namespace UnitarySystems { } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Cooling Supply Air Flow Rate Method = SupplyAirFlowRate."); ShowContinueError(state, "Blank field not allowed for Cooling Supply Air Flow Rate."); errorsFound = true; @@ -5922,7 +5918,7 @@ namespace UnitarySystems { this->m_MaxCoolAirVolFlow = loc_m_CoolingSAFMethod_SAFlowPerFloorArea; if (this->m_MaxCoolAirVolFlow != DataSizing::AutoSize) { if (this->m_MaxCoolAirVolFlow <= 0.0001 && this->m_CoolCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Cooling Supply Air Flow Rate Method = FlowPerFloorArea."); ShowContinueError( state, @@ -5937,13 +5933,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Cooling Supply Air Flow Rate Method = FlowPerFloorArea."); ShowContinueError(state, "Illegal Cooling Supply Air Flow Rate Per Floor Area = Autosize"); errorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Cooling Supply Air Flow Rate Method = FlowPerFloorArea."); ShowContinueError(state, "Blank field not allowed for Cooling Supply Air Flow Rate Per Floor Area."); errorsFound = true; @@ -5955,7 +5951,7 @@ namespace UnitarySystems { this->m_MaxCoolAirVolFlow = loc_m_CoolingSAFMethod_FracOfAutosizedCoolingSAFlow; if (this->m_MaxCoolAirVolFlow != DataSizing::AutoSize) { if (this->m_MaxCoolAirVolFlow <= HVAC::SmallAirVolFlow && this->m_CoolCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Cooling Supply Air Flow Rate Method = FractionOfAutosizedCoolingValue."); ShowContinueError( state, @@ -5969,13 +5965,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Cooling Supply Air Flow Rate Method = FractionOfAutosizedCoolingValue."); ShowContinueError(state, "Illegal Cooling Fraction of Autosized Cooling Supply Air Flow Rate = Autosize"); errorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Cooling Supply Air Flow Rate Method = FractionOfAutosizedCoolingValue."); ShowContinueError(state, "Blank field not allowed for Cooling Fraction of Autosized Cooling Supply Air Flow Rate."); errorsFound = true; @@ -5987,7 +5983,7 @@ namespace UnitarySystems { this->m_MaxCoolAirVolFlow = loc_m_CoolingSAFMethod_FlowPerCoolingCapacity; if (this->m_MaxCoolAirVolFlow != DataSizing::AutoSize) { if (this->m_MaxCoolAirVolFlow <= 0.00001 && this->m_CoolCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Cooling Supply Air Flow Rate Method = FlowPerCoolingCapacity."); ShowContinueError(state, EnergyPlus::format("Suspicious Cooling Supply Air Flow Rate Per Unit of Capacity = {:.7R} [m3/s/W] when " @@ -6000,13 +5996,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Cooling Supply Air Flow Rate Method = FlowPerCoolingCapacity."); ShowContinueError(state, "Illegal Cooling Supply Air Flow Rate Per Unit of Capacity = Autosize"); errorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Cooling Supply Air Flow Rate Method = FlowPerCoolingCapacity."); ShowContinueError(state, "Blank field not allowed for Cooling Supply Air Flow Rate Per Unit of Capacity."); errorsFound = true; @@ -6015,7 +6011,7 @@ namespace UnitarySystems { } else if (Util::SameString(loc_m_CoolingSAFMethod, "None") || loc_m_CoolingSAFMethod.empty()) { this->m_CoolingSAFMethod = DataSizing::None; if (this->m_CoolCoilExists && this->m_MaxCoolAirVolFlow == 0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); if (this->m_HeatCoilExists) { ShowContinueError(state, "Blank field not allowed for this coil type when heating coil air flow rate is not AutoSized."); } else { @@ -6034,7 +6030,7 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; } else { if (this->m_MaxHeatAirVolFlow <= HVAC::SmallAirVolFlow && this->m_HeatCoilExists) { - ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method = SupplyAirFlowRate."); ShowContinueError(state, EnergyPlus::format("Suspicious Heating Supply Air Flow Rate = {:.7R} when heating coil is present.", @@ -6045,7 +6041,7 @@ namespace UnitarySystems { } } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method = SupplyAirFlowRate."); ShowContinueError(state, "Blank field not allowed for Heating Supply Air Flow Rate."); errorsFound = true; @@ -6056,7 +6052,7 @@ namespace UnitarySystems { this->m_MaxHeatAirVolFlow = loc_m_HeatingSAFMethod_SAFlowPerFloorArea; if (this->m_MaxHeatAirVolFlow != DataSizing::AutoSize) { if (this->m_MaxHeatAirVolFlow <= 0.0001 && this->m_HeatCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method = FlowPerFloorArea."); ShowContinueError( state, @@ -6071,13 +6067,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; } else { // AutoSized input is not allowed - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method = FlowPerFloorArea."); ShowContinueError(state, "Illegal Heating Supply Air Flow Rate Per Floor Area = Autosize"); errorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method = FlowPerFloorArea."); ShowContinueError(state, "Blank field not allowed for Heating Supply Air Flow Rate Per Floor Area."); errorsFound = true; @@ -6088,7 +6084,7 @@ namespace UnitarySystems { this->m_MaxHeatAirVolFlow = loc_m_HeatingSAFMethod_FracOfAutosizedHeatingSAFlow; if (this->m_MaxHeatAirVolFlow != DataSizing::AutoSize) { if (this->m_MaxHeatAirVolFlow <= HVAC::SmallAirVolFlow && this->m_HeatCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method = FractionOfAutosizedHeatingValue."); ShowContinueError( state, @@ -6102,13 +6098,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method = FractionOfAutosizedHeatingValue"); ShowContinueError(state, "Illegal input for Heating Fraction of Autosized Heating Supply Air Flow Rate = Autosize"); errorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method = FractionOfAutosizedHeatingValue"); ShowContinueError(state, "Blank field not allowed for Heating Fraction of Autosized Heating Supply Air Flow Rate"); errorsFound = true; @@ -6119,7 +6115,7 @@ namespace UnitarySystems { this->m_MaxHeatAirVolFlow = loc_m_HeatingSAFMethod_FlowPerHeatingCapacity; if (this->m_MaxHeatAirVolFlow != DataSizing::AutoSize) { if (this->m_MaxHeatAirVolFlow <= 0.00001 && this->m_HeatCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method = FlowPerHeatingCapacity."); ShowContinueError(state, EnergyPlus::format("Suspicious Heating Supply Air Flow Rate Per Unit of Capacity = {:.7R} [m3/s/W] when " @@ -6132,13 +6128,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method = FlowPerHeatingCapacity."); ShowContinueError(state, "Illegal Heating Supply Air Flow Rate Per Unit of Capacity = Autosize"); errorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method = FlowPerHeatingCapacity"); ShowContinueError(state, "Blank field not allowed for Heating Supply Air Flow Rate Per Unit of Capacity"); errorsFound = true; @@ -6146,7 +6142,7 @@ namespace UnitarySystems { } else if (Util::SameString(loc_m_HeatingSAFMethod, "None") || loc_m_HeatingSAFMethod.empty()) { this->m_HeatingSAFMethod = DataSizing::None; if (this->m_HeatCoilExists && this->m_MaxHeatAirVolFlow == 0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); if (loc_m_HeatingSAFMethod.empty()) { ShowContinueError(state, "Input for Heating Supply Air Flow Rate Method is blank."); } else { @@ -6170,7 +6166,7 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; } else { if (this->m_MaxNoCoolHeatAirVolFlow < 0.0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = SupplyAirFlowRate"); ShowContinueError(state, EnergyPlus::format("Illegal No Load Supply Air Flow Rate = {:.7R}", this->m_MaxNoCoolHeatAirVolFlow)); @@ -6179,7 +6175,7 @@ namespace UnitarySystems { } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = SupplyAirFlowRate"); ShowContinueError(state, "Blank field not allowed for No Load Supply Air Flow Rate"); errorsFound = true; @@ -6190,7 +6186,7 @@ namespace UnitarySystems { this->m_MaxNoCoolHeatAirVolFlow = loc_m_NoCoolHeatSAFMethod_SAFlowPerFloorArea; if (this->m_MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize) { if (this->m_MaxNoCoolHeatAirVolFlow <= 0.0001) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FlowPerFloorArea."); ShowContinueError(state, EnergyPlus::format("Suspicious No Load Supply Air Flow Rate Per Floor Area = {:.7R} [m3/s/m2]", @@ -6203,13 +6199,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; } else { // AutoSized input is not allowed - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FlowPerFloorArea."); ShowContinueError(state, "Illegal No Load Supply Air Flow Rate Per Floor Area = Autosize"); errorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FlowPerFloorArea."); ShowContinueError(state, "Blank field not allowed for No Load Supply Air Flow Rate Per Floor Area"); errorsFound = true; @@ -6220,7 +6216,7 @@ namespace UnitarySystems { this->m_MaxNoCoolHeatAirVolFlow = loc_m_NoCoolHeatSAFMethod_FracOfAutosizedCoolingSAFlow; if (this->m_MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize) { if (this->m_MaxNoCoolHeatAirVolFlow <= HVAC::SmallAirVolFlow) { - ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FractionOfAutosizedCoolingValue."); ShowContinueError( state, @@ -6234,14 +6230,14 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FractionOfAutosizedCoolingValue"); ShowContinueError(state, "Illegal input for No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation = Autosize"); errorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FractionOfAutosizedCoolingValue."); ShowContinueError(state, "Blank field not allowed for No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation"); errorsFound = true; @@ -6252,7 +6248,7 @@ namespace UnitarySystems { this->m_MaxNoCoolHeatAirVolFlow = loc_m_NoCoolHeatSAFMethod_FracOfAutosizedHeatingSAFlow; if (this->m_MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize) { if (this->m_MaxNoCoolHeatAirVolFlow <= HVAC::SmallAirVolFlow) { - ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FractionOfAutosizedHeatingValue."); ShowContinueError( state, @@ -6266,14 +6262,14 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FractionOfAutosizedHeatingValue"); ShowContinueError(state, "Illegal input for No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation = Autosize"); errorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FractionOfAutosizedHeatingValue."); ShowContinueError(state, "Blank field not allowed for No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation"); errorsFound = true; @@ -6284,7 +6280,7 @@ namespace UnitarySystems { this->m_MaxNoCoolHeatAirVolFlow = loc_m_NoCoolHeatSAFMethod_FlowPerCoolingCapacity; if (this->m_MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize) { if (this->m_MaxNoCoolHeatAirVolFlow <= 0.00001 && this->m_CoolCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FlowPerCoolingCapacity."); ShowContinueError( state, @@ -6298,13 +6294,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FlowPerCoolingCapacity."); ShowContinueError(state, "Illegal No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation = Autosize"); errorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FlowPerCoolingCapacity."); ShowContinueError(state, "Blank field not allowed for No Load Supply Air Flow Rate Per Unit of Capacity During Cooling Operation"); errorsFound = true; @@ -6315,7 +6311,7 @@ namespace UnitarySystems { this->m_MaxNoCoolHeatAirVolFlow = loc_m_NoCoolHeatSAFMethod_FlowPerHeatingCapacity; if (this->m_MaxNoCoolHeatAirVolFlow != DataSizing::AutoSize) { if (this->m_MaxNoCoolHeatAirVolFlow <= 0.00001 && this->m_HeatCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FlowPerHeatingCapacity."); ShowContinueError( state, @@ -6329,13 +6325,13 @@ namespace UnitarySystems { this->m_RequestAutoSize = true; // AutoSized input is not allowed } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FlowPerHeatingCapacity."); ShowContinueError(state, "Illegal No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation = Autosize"); errorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate Method = FlowPerHeatingCapacity."); ShowContinueError(state, "Blank field not allowed for No Load Supply Air Flow Rate Per Unit of Capacity During Heating Operation"); errorsFound = true; @@ -6349,13 +6345,13 @@ namespace UnitarySystems { } else if (loc_m_NoCoolHeatSAFMethod_SAFlow == -999.0) { // no load air flow is blank this->m_MaxNoCoolHeatAirVolFlow = DataSizing::AutoSize; this->m_RequestAutoSize = true; - ShowWarningError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Control Type = {}", input_data.control_type)); + ShowWarningError(state, std::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Control Type = {}", input_data.control_type)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate cannot be blank."); ShowContinueError(state, "Input for No Load Supply Air Flow Rate has been set to AutoSize and the simulation continues."); } else if (loc_m_NoCoolHeatSAFMethod_SAFlow == 0.0) { // no load air flow for SZVAV cannot be 0 - ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Control Type = {}", input_data.control_type)); + ShowSevereError(state, std::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Control Type = {}", input_data.control_type)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate cannot be 0."); errorsFound = true; } @@ -6369,7 +6365,7 @@ namespace UnitarySystems { if (this->m_FanExists) { if (this->m_CoolCoilExists) { if (loc_m_CoolingSAFMethod.empty()) { - ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Method used to determine the cooling supply air flow rate is not specified when cooling coil is present."); // check if all cooling flow calc method fields are blank @@ -6394,7 +6390,7 @@ namespace UnitarySystems { } if (this->m_HeatCoilExists) { if (loc_m_HeatingSAFMethod.empty()) { - ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "Method used to determine the heating supply air flow rate is not specified when heating coil is present."); // check if all heating flow calc method fields are blank @@ -6439,19 +6435,19 @@ namespace UnitarySystems { if (this->m_coolCoilType == HVAC::CoilType::CoolingDX && this->m_DehumidControlType_Num == DehumCtrlType::Multimode) { int numCoolingCoilModes = state.dataCoilCoolingDX->coilCoolingDXs[this->m_CoolingCoilIndex].getNumModes(); if (numCoolingCoilModes == 1) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Dehumidification Control Type = {}", input_data.dehumidification_control_type)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Dehumidification Control Type = {}", input_data.dehumidification_control_type)); ShowContinueError(state, "Multimode control must be used with a Heat Exchanger Assisted or Multimode Cooling Coil."); - ShowContinueError(state, - EnergyPlus::format("Cooling coil named: {} has only one mode", - state.dataCoilCoolingDX->coilCoolingDXs[this->m_CoolingCoilIndex].name)); + ShowContinueError( + state, + std::format("Cooling coil named: {} has only one mode", state.dataCoilCoolingDX->coilCoolingDXs[this->m_CoolingCoilIndex].name)); ShowFatalError(state, "Multimode cooling coil error causes program termination"); } } else if (this->m_coolCoilType != HVAC::CoilType::CoolingDXHXAssisted && this->m_coolCoilType != HVAC::CoilType::CoolingDXTwoStageWHumControl && this->m_coolCoilType != HVAC::CoilType::CoolingWaterHXAssisted && this->m_DehumidControlType_Num == DehumCtrlType::Multimode) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Illegal Dehumidification Control Type = {}", input_data.dehumidification_control_type)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Illegal Dehumidification Control Type = {}", input_data.dehumidification_control_type)); ShowContinueError(state, "Multimode control must be used with a Heat Exchanger Assisted or Multimode Cooling Coil."); if (this->m_SuppHeatCoilName.empty() && this->m_SuppHeatCoilTypeName.empty()) { } else { @@ -6482,10 +6478,10 @@ namespace UnitarySystems { this->m_CoolingCoilUpstream = false; } if (ZoneEquipmentFound) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "ZoneHVAC equipment must contain a fan object."); - ShowContinueError(state, EnergyPlus::format("specified Supply Fan Object Type = {}", loc_fanType)); - ShowContinueError(state, EnergyPlus::format("specified Supply Fan Name = {}", loc_m_FanName)); + ShowContinueError(state, std::format("specified Supply Fan Object Type = {}", loc_fanType)); + ShowContinueError(state, std::format("specified Supply Fan Name = {}", loc_m_FanName)); errorsFound = true; } } @@ -6498,98 +6494,90 @@ namespace UnitarySystems { tmpAirInletNode = this->m_OAMixerNodes[3]; // mixed air node } if (FanInletNode != tmpAirInletNode) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); if (this->OAMixerExists) { ShowContinueError(state, "When a blow through fan is specified, the fan inlet node name must be the same as the outdoor " "air mixer mixed air node name."); - ShowContinueError(state, - EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); - ShowContinueError(state, - EnergyPlus::format("...UnitarySystem mixed air node name = {}", state.dataLoopNodes->NodeID(tmpAirInletNode))); + ShowContinueError(state, std::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError(state, std::format("...UnitarySystem mixed air node name = {}", state.dataLoopNodes->NodeID(tmpAirInletNode))); } else { ShowContinueError(state, "When a blow through fan is specified, the fan inlet node name must be the same as the unitary system " "inlet node name."); - ShowContinueError(state, EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); - ShowContinueError(state, - EnergyPlus::format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(this->AirInNode))); + ShowContinueError(state, std::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError(state, std::format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(this->AirInNode))); } errorsFound = true; } if (this->m_CoolingCoilUpstream) { if (FanOutletNode != CoolingCoilInletNode && this->m_CoolCoilExists && this->m_FanExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "When a blow through fan is specified, the fan outlet node name must be the same as the cooling coil " "inlet node name."); - ShowContinueError(state, EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, - EnergyPlus::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + ShowContinueError(state, std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); + ShowContinueError(state, std::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); errorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode && this->m_CoolCoilExists && this->m_HeatCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "The cooling coil outlet node name must be the same as the heating coil inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + std::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); errorsFound = true; } if (this->m_SuppCoilExists) { if (SupHeatCoilOutletNode != this->AirOutNode) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "The reheat coil outlet node name must be the same as the unitary system outlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); + ShowContinueError(state, + std::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); + ShowContinueError(state, + std::format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); errorsFound = true; } } else { // IF((this->m_Humidistat ... // Heating coil outlet node name must be the same as the Unitary system outlet node name if (this->m_HeatCoilExists && HeatingCoilOutletNode != this->AirOutNode) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "When a blow through fan is specified, the heating coil outlet node name must be the same as the " "unitary system outlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...Unitary system outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); + ShowContinueError(state, + std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, + std::format("...Unitary system outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); errorsFound = true; } } } else { // IF(this->CoolingCoilUpstream)THEN if (FanOutletNode != HeatingCoilInletNode && this->m_FanExists && this->m_HeatCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "When a blow through fan is specified, the fan outlet node name must be the same as the heating coil " "inlet node name."); - ShowContinueError(state, EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, - EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + ShowContinueError(state, std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); + ShowContinueError(state, std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); errorsFound = true; } if (HeatingCoilOutletNode != CoolingCoilInletNode && this->m_CoolCoilExists && this->m_HeatCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "The heating coil outlet node name must be the same as the cooling coil inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, std::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); errorsFound = true; } if (CoolingCoilOutletNode != this->AirOutNode && this->m_CoolCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "When a blow through fan is specified, the cooling coil outlet node name must be the same as the unitary " "system outlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); + std::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, std::format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); errorsFound = true; } } @@ -6603,131 +6591,121 @@ namespace UnitarySystems { if (this->m_CoolingCoilUpstream) { if (CoolingCoilInletNode != tmpAirInletNode && CoolingCoilInletNode != 0 && this->m_FanExists) { if (this->OAMixerExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "When a draw through fan is specified, the cooling coil inlet node name must be the same as the outdoor " "air mixer mixed air node name."); ShowContinueError( - state, - EnergyPlus::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); - ShowContinueError( - state, EnergyPlus::format("...UnitarySystem mixed air node name = {}", state.dataLoopNodes->NodeID(tmpAirInletNode))); + state, std::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + ShowContinueError(state, + std::format("...UnitarySystem mixed air node name = {}", state.dataLoopNodes->NodeID(tmpAirInletNode))); } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "When a draw through fan is specified, the cooling coil inlet node name must be the same as the unitary " "system inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); ShowContinueError(state, - EnergyPlus::format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(this->AirInNode))); + std::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + ShowContinueError(state, std::format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(this->AirInNode))); } errorsFound = true; } if (CoolingCoilOutletNode != HeatingCoilInletNode && this->m_CoolCoilExists && this->m_HeatCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "The cooling coil outlet node name must be the same as the heating coil inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + std::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); errorsFound = true; } if (HeatingCoilOutletNode != FanInletNode && this->m_HeatCoilExists && this->m_FanExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "When a draw through fan is specified, the heating coil outlet node name must be the same as the fan " "inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); - ShowContinueError(state, EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError(state, + std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, std::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); errorsFound = true; } if (this->m_SuppCoilExists) { if (FanOutletNode != SupHeatCoilInletNode && this->m_FanExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "When a draw through fan is specified, the fan outlet node name must be the same as the reheat coil " "inlet node name."); + ShowContinueError(state, std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...Reheat coil inlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); + std::format("...Reheat coil inlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilInletNode))); errorsFound = true; } if (SupHeatCoilOutletNode != this->AirOutNode) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "The reheat coil outlet node name must be the same as the unitary system outlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); + ShowContinueError(state, + std::format("...Reheat coil outlet node name = {}", state.dataLoopNodes->NodeID(SupHeatCoilOutletNode))); + ShowContinueError(state, + std::format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); errorsFound = true; } } else { if (FanOutletNode != this->AirOutNode && this->m_FanExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "When a draw through fan is specified, the fan outlet node name must be the same as the unitary system " "outlet node name."); + ShowContinueError(state, std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError( - state, EnergyPlus::format("...Unitary system outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); + std::format("...Unitary system outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); errorsFound = true; } } } else { // IF(this->CoolingCoilUpstream)THEN if (HeatingCoilInletNode != tmpAirInletNode && HeatingCoilInletNode != 0 && this->m_FanExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); if (this->OAMixerExists) { ShowContinueError(state, "When a draw through fan is specified, the heating coil inlet node name must be the same as the unitary " "system mixer mixed air node name."); ShowContinueError( - state, - EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); - ShowContinueError( - state, EnergyPlus::format("...UnitarySystem mixed air node name = {}", state.dataLoopNodes->NodeID(tmpAirInletNode))); + state, std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + ShowContinueError(state, + std::format("...UnitarySystem mixed air node name = {}", state.dataLoopNodes->NodeID(tmpAirInletNode))); } else { ShowContinueError(state, "When a draw through fan is specified, the heating coil inlet node name must be the same as the unitary " "system inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); ShowContinueError(state, - EnergyPlus::format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(this->AirInNode))); + std::format("...Heating coil inlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilInletNode))); + ShowContinueError(state, std::format("...UnitarySystem inlet node name = {}", state.dataLoopNodes->NodeID(this->AirInNode))); } errorsFound = true; } if (HeatingCoilOutletNode != CoolingCoilInletNode && this->m_HeatCoilExists && this->m_CoolCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "The heating coil outlet node name must be the same as the cooling coil inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); ShowContinueError(state, - EnergyPlus::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); + std::format("...Heating coil outlet node name = {}", state.dataLoopNodes->NodeID(HeatingCoilOutletNode))); + ShowContinueError(state, std::format("...Cooling coil inlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilInletNode))); errorsFound = true; } if (CoolingCoilOutletNode != FanInletNode && this->m_CoolCoilExists && this->m_FanExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "When a draw through fan is specified, the cooling coil outlet node name must be the same as the fan " "inlet node name."); - ShowContinueError( - state, EnergyPlus::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); - ShowContinueError(state, EnergyPlus::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); + ShowContinueError(state, + std::format("...Cooling coil outlet node name = {}", state.dataLoopNodes->NodeID(CoolingCoilOutletNode))); + ShowContinueError(state, std::format("...Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNode))); errorsFound = true; } if (FanOutletNode != this->AirOutNode && this->m_FanExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "When a draw through fan is specified, the fan outlet node name must be the same as the unitary system " "outlet node name."); - ShowContinueError(state, - EnergyPlus::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); - ShowContinueError(state, - EnergyPlus::format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); + ShowContinueError(state, std::format("...Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNode))); + ShowContinueError(state, std::format("...UnitarySystem outlet node name = {}", state.dataLoopNodes->NodeID(this->AirOutNode))); errorsFound = true; } } @@ -6794,7 +6772,7 @@ namespace UnitarySystems { } else { if (this->m_heatCoilType != HVAC::CoilType::HeatingDXSingleSpeed && this->m_heatCoilType != HVAC::CoilType::HeatingDXMultiSpeed && this->m_heatCoilType != HVAC::CoilType::HeatingDXVariableSpeed) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "When non-DX heating coils are specified, the heating air flow rate must be entered in Heating " "Supply Air Flow Rate Method"); @@ -6802,7 +6780,7 @@ namespace UnitarySystems { } } } else if (this->m_MaxHeatAirVolFlow == 0.0 && !this->m_FanExists && !this->m_CoolCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "When non-DX heating coils are specified, the heating air flow rate must be entered in Heating " "Supply Air Flow Rate Method"); @@ -6811,25 +6789,23 @@ namespace UnitarySystems { if (FanVolFlowRate != DataSizing::AutoSize && this->m_FanExists) { if (FanVolFlowRate < this->m_MaxCoolAirVolFlow && this->m_MaxCoolAirVolFlow != DataSizing::AutoSize && this->m_CoolCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError( state, - EnergyPlus::format( - "... air flow rate = {:.7T} in fan object {} is less than the maximum HVAC system air flow rate in cooling mode.", - FanVolFlowRate, - this->m_FanName)); + std::format("... air flow rate = {:.7f} in fan object {} is less than the maximum HVAC system air flow rate in cooling mode.", + FanVolFlowRate, + this->m_FanName)); ShowContinueError(state, " The Cooling Supply Air Flow Rate is reset to the fan flow rate and the simulation continues."); this->m_MaxCoolAirVolFlow = FanVolFlowRate; this->m_DesignFanVolFlowRate = FanVolFlowRate; } if (FanVolFlowRate < this->m_MaxHeatAirVolFlow && this->m_MaxHeatAirVolFlow != DataSizing::AutoSize && this->m_HeatCoilExists) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError( state, - EnergyPlus::format( - "... air flow rate = {:.7T} in fan object {} is less than the maximum HVAC system air flow rate in heating mode.", - FanVolFlowRate, - this->m_FanName)); + std::format("... air flow rate = {:.7f} in fan object {} is less than the maximum HVAC system air flow rate in heating mode.", + FanVolFlowRate, + this->m_FanName)); ShowContinueError(state, " The Heating Supply Air Flow Rate is reset to the fan flow rate and the simulation continues."); this->m_MaxHeatAirVolFlow = FanVolFlowRate; this->m_DesignFanVolFlowRate = FanVolFlowRate; @@ -6869,7 +6845,7 @@ namespace UnitarySystems { this->m_MinOATCompressorCooling = -1000.0; } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } @@ -6884,7 +6860,7 @@ namespace UnitarySystems { this->m_MinOATCompressorHeating = -1000.0; } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } @@ -6917,7 +6893,7 @@ namespace UnitarySystems { } } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; errFlag = false; } @@ -6962,16 +6938,16 @@ namespace UnitarySystems { DXCoils::SetMSHPDXCoilHeatRecoveryFlag(state, this->m_HeatingCoilIndex); } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Occurs in {} = {}", cCurrentModuleObject, thisObjectName)); errorsFound = true; // errFlag = false; // not used after this point, uncomment if needed } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError( - state, EnergyPlus::format("Illegal Heat Recovery Water Inlet Node Name = {}", input_data.heat_recovery_water_inlet_node_name)); - ShowContinueError( - state, EnergyPlus::format("Illegal Heat Recovery Water Outlet Node Name = {}", input_data.heat_recovery_water_outlet_node_name)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, + std::format("Illegal Heat Recovery Water Inlet Node Name = {}", input_data.heat_recovery_water_inlet_node_name)); + ShowContinueError(state, + std::format("Illegal Heat Recovery Water Outlet Node Name = {}", input_data.heat_recovery_water_outlet_node_name)); ShowContinueError(state, "... heat recovery nodes must be specified when Design Heat Recovery Water Flow Rate" " is greater than 0."); @@ -7013,11 +6989,10 @@ namespace UnitarySystems { int NumOfSpeed = VariableSpeedCoils::GetVSCoilNumOfSpeeds(state, this->m_HeatingCoilName, errorsFound); if (errorsFound) { ShowSevereError( - state, - EnergyPlus::format("{} = {} is not found. Please check the input.", cCurrentModuleObject, this->m_HeatingCoilName)); + state, std::format("{} = {} is not found. Please check the input.", cCurrentModuleObject, this->m_HeatingCoilName)); } if (NumOfSpeed != this->m_NumOfSpeedHeating) { - ShowWarningError(state, EnergyPlus::format("{} = {}.", cCurrentModuleObject, this->m_HeatingCoilName)); + ShowWarningError(state, std::format("{} = {}.", cCurrentModuleObject, this->m_HeatingCoilName)); ShowContinueError(state, EnergyPlus::format("... The number of heating coil speeds in the {} = {:.0R}", MultispeedType, @@ -7027,8 +7002,7 @@ namespace UnitarySystems { EnergyPlus::format( "... The number of heating coil speeds in Coil:Heating:WaterToAirHeatPump:VariableSpeedEquationFit = {:.0R}", double(NumOfSpeed))); - ShowContinueError(state, - EnergyPlus::format("... The number of heating coil speeds in the {} will be used.", MultispeedType)); + ShowContinueError(state, std::format("... The number of heating coil speeds in the {} will be used.", MultispeedType)); } } } break; @@ -7063,11 +7037,10 @@ namespace UnitarySystems { int NumOfSpeed = VariableSpeedCoils::GetVSCoilNumOfSpeeds(state, this->m_CoolingCoilName, errorsFound); if (errorsFound) { ShowSevereError( - state, - EnergyPlus::format("{} = {} is not found. Please check the input.", cCurrentModuleObject, this->m_CoolingCoilName)); + state, std::format("{} = {} is not found. Please check the input.", cCurrentModuleObject, this->m_CoolingCoilName)); } if (NumOfSpeed != this->m_NumOfSpeedCooling) { - ShowWarningError(state, EnergyPlus::format("{} = {}.", cCurrentModuleObject, this->m_CoolingCoilName)); + ShowWarningError(state, std::format("{} = {}.", cCurrentModuleObject, this->m_CoolingCoilName)); ShowContinueError(state, EnergyPlus::format("... The number of Cooling coil speeds in the {} = {:.0R}", MultispeedType, @@ -7077,8 +7050,7 @@ namespace UnitarySystems { EnergyPlus::format( "... The number of heating coil speeds in Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit = {:.0R}", double(NumOfSpeed))); - ShowContinueError(state, - EnergyPlus::format("... The number of Cooling coil speeds in the {} will be used.", MultispeedType)); + ShowContinueError(state, std::format("... The number of Cooling coil speeds in the {} will be used.", MultispeedType)); } } } break; @@ -7088,12 +7060,10 @@ namespace UnitarySystems { } // switch() } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "... one or both of the following inputs are invalid."); - ShowContinueError(state, - EnergyPlus::format("Field Design Specification Multispeed Object Type = {}", this->m_DesignSpecMultispeedHPType)); - ShowContinueError(state, - EnergyPlus::format("Field Design Specification Multispeed Object Name = {}", this->m_DesignSpecMultispeedHPName)); + ShowContinueError(state, std::format("Field Design Specification Multispeed Object Type = {}", this->m_DesignSpecMultispeedHPType)); + ShowContinueError(state, std::format("Field Design Specification Multispeed Object Name = {}", this->m_DesignSpecMultispeedHPName)); errorsFound = true; } @@ -7160,10 +7130,10 @@ namespace UnitarySystems { this->m_heatCoilType == HVAC::CoilType::HeatingWAHPVariableSpeedEquationFit) && this->m_sysType == SysType::PackagedWSHP)) { ShowWarningError(state, - EnergyPlus::format("{} = {} with Fan:SystemModel is used in \"{}\"", - cCurrentModuleObject, - this->Name, - this->input_specs.supply_fan_name)); + std::format("{} = {} with Fan:SystemModel is used in \"{}\"", + cCurrentModuleObject, + this->Name, + this->input_specs.supply_fan_name)); ShowContinueError(state, EnergyPlus::format("...The number of speed = {:.0R}.", double(fanSystem->numSpeeds))); ShowContinueError(state, "...Multiple speed fan will be applied to this unit. The speed number is determined by load."); } @@ -7172,23 +7142,20 @@ namespace UnitarySystems { } } else if ((this->m_DesignSpecMultispeedHPType.empty() && !this->m_DesignSpecMultispeedHPName.empty()) || (!this->m_DesignSpecMultispeedHPType.empty() && this->m_DesignSpecMultispeedHPName.empty())) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "... one or both of the following inputs are invalid."); - ShowContinueError(state, - EnergyPlus::format("Field Design Specification Multispeed Object Type = {}", this->m_DesignSpecMultispeedHPType)); - ShowContinueError(state, - EnergyPlus::format("Field Design Specification Multispeed Object Name = {}", this->m_DesignSpecMultispeedHPName)); + ShowContinueError(state, std::format("Field Design Specification Multispeed Object Type = {}", this->m_DesignSpecMultispeedHPType)); + ShowContinueError(state, std::format("Field Design Specification Multispeed Object Name = {}", this->m_DesignSpecMultispeedHPName)); errorsFound = true; } if (this->m_DiscreteSpeedCoolingCoil) { if (this->m_NumOfSpeedCooling == 0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError( - state, - EnergyPlus::format("... Cooling coil object type requires valid {} for cooling to be specified with number of speeds > 0", - unitarySysHeatPumpPerformanceObjectType)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, + std::format("... Cooling coil object type requires valid {} for cooling to be specified with number of speeds > 0", + unitarySysHeatPumpPerformanceObjectType)); errorsFound = true; } } @@ -7199,11 +7166,10 @@ namespace UnitarySystems { } if (this->m_NumOfSpeedHeating == 0) { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError( - state, - EnergyPlus::format("... Heating coil object type requires valid {} for heating to be specified with number of speeds > 0", - unitarySysHeatPumpPerformanceObjectType)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, + std::format("... Heating coil object type requires valid {} for heating to be specified with number of speeds > 0", + unitarySysHeatPumpPerformanceObjectType)); errorsFound = true; } } @@ -7222,14 +7188,14 @@ namespace UnitarySystems { } else { if (this->m_DesignSpecMSHPIndex > -1) { if (this->m_CompPointerMSHP->m_SingleModeFlag) { - ShowSevereError(state, EnergyPlus::format("{}: {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{}: {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "In order to perform Single Mode Operation, the valid cooling coil type is Coil:Cooling:DX:MultiSpeed " "or Coil:Cooling:DX and the valid heating is Coil:Heating:DX:MultiSpeed or Coil:Heating:Fuel."); ShowContinueError(state, - EnergyPlus::format("The input cooling coil type = {} and the input heating coil type = {}", - input_data.cooling_coil_object_type, - this->m_HeatingCoilTypeName)); + std::format("The input cooling coil type = {} and the input heating coil type = {}", + input_data.cooling_coil_object_type, + this->m_HeatingCoilTypeName)); } } } @@ -7290,15 +7256,14 @@ namespace UnitarySystems { this->m_coolCoilType != HVAC::CoilType::CoolingWaterDetailed && this->m_coolCoilType != HVAC::CoilType::CoolingDXSingleSpeed && this->m_coolCoilType != HVAC::CoilType::CoolingDXVariableSpeed) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, EnergyPlus::format("{}: {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, std::format("{}: {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "ASHRAE90.1 control method requires specific cooling coil types."); ShowContinueError(state, "Valid cooling coil types are Coil:Cooling:Water, Coil:Cooling:Water:DetailedGeometry and " "Coil:Cooling:DX:SingleSpeed."); - ShowContinueError( - state, - EnergyPlus::format("The input cooling coil type = {}. This coil will not be modeled using the ASHRAE 90.1 algorithm.", - input_data.cooling_coil_object_type)); + ShowContinueError(state, + std::format("The input cooling coil type = {}. This coil will not be modeled using the ASHRAE 90.1 algorithm.", + input_data.cooling_coil_object_type)); } // mark this coil as non-ASHRAE90 type this->m_ValidASHRAECoolCoil = false; @@ -7308,31 +7273,30 @@ namespace UnitarySystems { this->m_heatCoilType != HVAC::CoilType::HeatingGasOrOtherFuel && this->m_heatCoilType != HVAC::CoilType::HeatingElectric && this->m_heatCoilType != HVAC::CoilType::HeatingDXSingleSpeed && this->m_heatCoilType != HVAC::CoilType::HeatingDXVariableSpeed) { if (state.dataGlobal->DisplayExtraWarnings) { - ShowWarningError(state, EnergyPlus::format("{}: {}", cCurrentModuleObject, thisObjectName)); + ShowWarningError(state, std::format("{}: {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "ASHRAE90.1 control method requires specific heating coil types."); ShowContinueError(state, "Valid heating coil types are Coil:Heating:Water, Coil:Heating:Fuel, Coil:Heating:Electric and " "Coil:Heating:DX:SingleSpeed."); - ShowContinueError( - state, - EnergyPlus::format("The input heating coil type = {}. This coil will not be modeled using the ASHRAE 90.1 algorithm.", - this->m_HeatingCoilTypeName)); + ShowContinueError(state, + std::format("The input heating coil type = {}. This coil will not be modeled using the ASHRAE 90.1 algorithm.", + this->m_HeatingCoilTypeName)); } // mark this coil as non-ASHRAE90 type this->m_ValidASHRAEHeatCoil = false; } if (this->m_DehumidControlType_Num == DehumCtrlType::Multimode || this->m_DehumidControlType_Num == DehumCtrlType::CoolReheat) { - ShowWarningError(state, EnergyPlus::format("{}: {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError( - state, EnergyPlus::format("Invalid entry for Dehumidification Control Type = {}", input_data.dehumidification_control_type)); + ShowWarningError(state, std::format("{}: {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, + std::format("Invalid entry for Dehumidification Control Type = {}", input_data.dehumidification_control_type)); ShowContinueError(state, "ASHRAE90.1 control method does not support dehumidification at this time. Dehumidification control type is " "assumed to be None."); this->m_DehumidControlType_Num = DehumCtrlType::None; } if (this->m_RunOnLatentLoad) { - ShowWarningError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Invalid entry for Latent Load Control: {}", input_data.latent_load_control)); + ShowWarningError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Invalid entry for Latent Load Control: {}", input_data.latent_load_control)); ShowContinueError(state, "ASHRAE90.1 control method does not support latent load control at this time. This input must be selected as " "SensibleOnlyLoadControl."); @@ -7341,8 +7305,8 @@ namespace UnitarySystems { this->m_RunOnLatentOnlyWithSensible = false; } if (this->m_MaxNoCoolHeatAirVolFlow == 0.0) { // 0 min air flow not allowed for SZVAV - ShowSevereError(state, EnergyPlus::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); - ShowContinueError(state, EnergyPlus::format("Control Type = {}", input_data.control_type)); + ShowSevereError(state, std::format("Input errors for {}:{}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("Control Type = {}", input_data.control_type)); ShowContinueError(state, "Input for No Load Supply Air Flow Rate cannot be 0."); errorsFound = true; } @@ -7766,10 +7730,9 @@ namespace UnitarySystems { WaterCoils::SetWaterCoilData(state, HRCoilIndex, errFound, _, _, heatRecoveryCoil); if (errFound) { if (HRCoilIndex == 0) { - ShowContinueError(state, - EnergyPlus::format("...cooling coil {} must be of type Coil:Cooling:Water.", HRWaterCoolingCoilName)); + ShowContinueError(state, std::format("...cooling coil {} must be of type Coil:Cooling:Water.", HRWaterCoolingCoilName)); } - ShowContinueError(state, EnergyPlus::format("...occurs in {} = {}", cCurrentModuleObject, thisObjectName)); + ShowContinueError(state, std::format("...occurs in {} = {}", cCurrentModuleObject, thisObjectName)); } errorsFound = errorsFound || errFound; } @@ -7790,10 +7753,9 @@ namespace UnitarySystems { } if (errorsFound) { - ShowFatalError(state, - EnergyPlus::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", - routineName, - cCurrentModuleObject)); + ShowFatalError( + state, + std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", routineName, cCurrentModuleObject)); } } } @@ -8470,7 +8432,7 @@ namespace UnitarySystems { case UnitarySysCtrlType::Load: case UnitarySysCtrlType::CCMASHRAE: { if (AirLoopNum == -1) { // This IF-THEN routine is just for ZoneHVAC:OutdoorAirUnit - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", this->UnitType, this->Name)); + ShowWarningError(state, std::format("{} \"{}\"", this->UnitType, this->Name)); ShowFatalError(state, "...Load based control is not allowed when used with ZoneHVAC:OutdoorAirUnit"); } @@ -9960,15 +9922,14 @@ namespace UnitarySystems { if (SolFlag == -1) { if (std::abs(ZoneLoad - TempSensOutput) > HVAC::SmallLoad) { if (this->MaxIterIndex == 0) { - ShowWarningMessage( - state, EnergyPlus::format("Coil control failed to converge for {}:{}", this->UnitType, this->Name)); + ShowWarningMessage(state, + std::format("Coil control failed to converge for {}:{}", this->UnitType, this->Name)); ShowContinueError(state, " Iteration limit exceeded in calculating system sensible part-load ratio."); - ShowContinueErrorTimeStamp( - state, - EnergyPlus::format("Sensible load to be met = {:.2T} (watts), sensible output = {:.2T} " - "(watts), and the simulation continues.", - ZoneLoad, - TempSensOutput)); + ShowContinueErrorTimeStamp(state, + std::format("Sensible load to be met = {:.2f} (watts), sensible output = {:.2f} " + "(watts), and the simulation continues.", + ZoneLoad, + TempSensOutput)); } ShowRecurringWarningErrorAtEnd(state, this->UnitType + " \"" + this->Name + @@ -9980,11 +9941,10 @@ namespace UnitarySystems { } } else if (SolFlag == -2) { if (this->RegulaFalsiFailedIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("Coil control failed for {}:{}", this->UnitType, this->Name)); + ShowWarningMessage(state, std::format("Coil control failed for {}:{}", this->UnitType, this->Name)); ShowContinueError(state, " sensible part-load ratio determined to be outside the range of 0-1."); ShowContinueErrorTimeStamp( - state, - EnergyPlus::format("Sensible load to be met = {:.2T} (watts), and the simulation continues.", ZoneLoad)); + state, std::format("Sensible load to be met = {:.2f} (watts), and the simulation continues.", ZoneLoad)); } ShowRecurringWarningErrorAtEnd( state, @@ -10017,11 +9977,10 @@ namespace UnitarySystems { (state.dataUnitarySystems->CoolingLoad && ZoneLoad < SensOutputOff)) { // if this is still true then print valid warnings if (this->RegulaFalsiFailedIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("Coil control failed for {}:{}", this->UnitType, this->Name)); + ShowWarningMessage(state, std::format("Coil control failed for {}:{}", this->UnitType, this->Name)); ShowContinueError(state, " sensible part-load ratio determined to be outside the range of 0-1."); ShowContinueErrorTimeStamp( - state, - EnergyPlus::format("Sensible load to be met = {:.2T} (watts), and the simulation continues.", ZoneLoad)); + state, std::format("Sensible load to be met = {:.2f} (watts), and the simulation continues.", ZoneLoad)); } ShowRecurringWarningErrorAtEnd( state, @@ -10436,14 +10395,13 @@ namespace UnitarySystems { if (SolFlagLat == -1) { if (std::abs(state.dataUnitarySystems->MoistureLoad - TempLatOutput) > HVAC::SmallLoad) { if (this->warnIndex.m_LatMaxIterIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("Coil control failed to converge for {}:{}", this->UnitType, this->Name)); + ShowWarningMessage(state, std::format("Coil control failed to converge for {}:{}", this->UnitType, this->Name)); ShowContinueError(state, " Iteration limit exceeded in calculating system Latent part-load ratio."); ShowContinueErrorTimeStamp( state, - EnergyPlus::format( - "Latent load to be met = {:.2T} (watts), Latent output = {:.2T} (watts), and the simulation continues.", - state.dataUnitarySystems->MoistureLoad, - TempLatOutput)); + std::format("Latent load to be met = {:.2f} (watts), Latent output = {:.2f} (watts), and the simulation continues.", + state.dataUnitarySystems->MoistureLoad, + TempLatOutput)); } ShowRecurringWarningErrorAtEnd( state, @@ -10455,11 +10413,11 @@ namespace UnitarySystems { } } else if (SolFlagLat == -2) { if (this->warnIndex.m_LatRegulaFalsiFailedIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("Coil control failed for {}:{}", this->UnitType, this->Name)); + ShowWarningMessage(state, std::format("Coil control failed for {}:{}", this->UnitType, this->Name)); ShowContinueError(state, " Latent part-load ratio determined to be outside the range of 0-1."); - ShowContinueErrorTimeStamp(state, - EnergyPlus::format("Latent load to be met = {:.2T} (watts), and the simulation continues.", - state.dataUnitarySystems->MoistureLoad)); + ShowContinueErrorTimeStamp( + state, + std::format("Latent load to be met = {:.2f} (watts), and the simulation continues.", state.dataUnitarySystems->MoistureLoad)); } ShowRecurringWarningErrorAtEnd(state, this->UnitType + " \"" + this->Name + @@ -10470,11 +10428,11 @@ namespace UnitarySystems { } } else if (SolFlagLat == -2) { if (this->warnIndex.m_LatRegulaFalsiFailedIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("Coil control failed for {}:{}", this->UnitType, this->Name)); + ShowWarningMessage(state, std::format("Coil control failed for {}:{}", this->UnitType, this->Name)); ShowContinueError(state, " Latent part-load ratio determined to be outside the range of 0-1."); - ShowContinueErrorTimeStamp(state, - EnergyPlus::format("Latent load to be met = {:.2T} (watts), and the simulation continues.", - state.dataUnitarySystems->MoistureLoad)); + ShowContinueErrorTimeStamp( + state, + std::format("Latent load to be met = {:.2f} (watts), and the simulation continues.", state.dataUnitarySystems->MoistureLoad)); } ShowRecurringWarningErrorAtEnd(state, this->UnitType + " \"" + this->Name + @@ -10624,29 +10582,28 @@ namespace UnitarySystems { } this->m_MyCheckFlag = false; if (this->m_ZoneSequenceCoolingNum == 0 || this->m_ZoneSequenceHeatingNum == 0) { - ShowSevereError( + ShowSevereError(state, + std::format("{} \"{}\": Airloop air terminal in the zone equipment list for zone = {} not it or is not allowed " + "Zone Equipment Cooling or Heating Sequence = 0.", + this->UnitType, + this->Name, + state.dataHeatBal->Zone(this->ControlZoneNum).Name)); + ShowFatalError( state, - EnergyPlus::format("{} \"{}\": Airloop air terminal in the zone equipment list for zone = {} not it or is not allowed " - "Zone Equipment Cooling or Heating Sequence = 0.", - this->UnitType, - this->Name, - state.dataHeatBal->Zone(this->ControlZoneNum).Name)); - ShowFatalError(state, - EnergyPlus::format( - "Subroutine InitLoadBasedControl: Errors it in getting {} input. Preceding condition(s) causes termination.", - this->UnitType)); + std::format("Subroutine InitLoadBasedControl: Errors it in getting {} input. Preceding condition(s) causes termination.", + this->UnitType)); } } if (this->m_ZoneInletNode == 0) { ShowSevereError(state, - EnergyPlus::format("{} \"{}\": The zone inlet node in the controlled zone ({}) is not found.", - this->UnitType, - this->Name, - state.dataHeatBal->Zone(this->ControlZoneNum).Name)); - ShowFatalError(state, - EnergyPlus::format( - "Subroutine InitLoadBasedControl: Errors found in getting {} input. Preceding condition(s) causes termination.", - this->UnitType)); + std::format("{} \"{}\": The zone inlet node in the controlled zone ({}) is not found.", + this->UnitType, + this->Name, + state.dataHeatBal->Zone(this->ControlZoneNum).Name)); + ShowFatalError( + state, + std::format("Subroutine InitLoadBasedControl: Errors found in getting {} input. Preceding condition(s) causes termination.", + this->UnitType)); } } @@ -10936,7 +10893,7 @@ namespace UnitarySystems { ShowWarningError(state, "ZoneControl:Thermostat:StagedDualSetpoint is found, but is not applied to this UnitarySystem " "object with UnitarySystemPerformance:Multispeed type = "); - ShowContinueError(state, EnergyPlus::format("{}. Please make correction. Simulation continues...", this->Name)); + ShowContinueError(state, std::format("{}. Please make correction. Simulation continues...", this->Name)); this->m_MyStagedFlag = false; } } @@ -12494,9 +12451,9 @@ namespace UnitarySystems { this->m_HeatCompPartLoadRatio = PartLoadRatio * double(CompressorOn); } break; default: { - ShowFatalError(state, - EnergyPlus::format("CalcUnitaryHeatingSystem: Invalid Unitary System coil type = {}", - HVAC::coilTypeNames[(int)this->m_heatCoilType])); + ShowFatalError( + state, + std::format("CalcUnitaryHeatingSystem: Invalid Unitary System coil type = {}", HVAC::coilTypeNames[(int)this->m_heatCoilType])); } break; } @@ -12654,9 +12611,9 @@ namespace UnitarySystems { if (useMaxedSpeed) { this->m_CoilSpeedErrIdx++; ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("Wrong coil speed EMS override value, for unit=\"{}\". Exceeding maximum coil speed " - "level. Speed level is set to the maximum coil speed level allowed.", - this->m_SuppHeatCoilName), + std::format("Wrong coil speed EMS override value, for unit=\"{}\". Exceeding maximum coil speed " + "level. Speed level is set to the maximum coil speed level allowed.", + this->m_SuppHeatCoilName), this->m_CoilSpeedErrIdx, this->m_EMSOverrideSuppCoilSpeedNumValue, this->m_EMSOverrideSuppCoilSpeedNumValue, @@ -12875,8 +12832,7 @@ namespace UnitarySystems { this->m_SpeedNum = this->m_NumOfSpeedCooling; useMaxedSpeed = true; if (this->m_CoilSpeedErrIdx == 0) { - ShowWarningMessage(state, - EnergyPlus::format("Wrong coil speed EMS override value, for unit=\"{}", this->m_CoolingCoilName)); + ShowWarningMessage(state, std::format("Wrong coil speed EMS override value, for unit=\"{}", this->m_CoolingCoilName)); ShowContinueError(state, " Exceeding maximum coil speed level. Speed level is set to the maximum coil speed level allowed."); } @@ -12896,8 +12852,7 @@ namespace UnitarySystems { this->m_CoolingSpeedNum = 0; this->m_SpeedNum = 0; if (this->m_CoilSpeedErrIdx == 0) { - ShowWarningMessage(state, - EnergyPlus::format("Wrong coil speed EMS override value, for unit=\"{}", this->m_CoolingCoilName)); + ShowWarningMessage(state, std::format("Wrong coil speed EMS override value, for unit=\"{}", this->m_CoolingCoilName)); ShowContinueError(state, " Input speed value is below zero. Speed level is set to zero."); } ShowRecurringWarningErrorAtEnd(state, @@ -13456,7 +13411,7 @@ namespace UnitarySystems { ++this->warnIndex.m_HXAssistedSensPLRIter; ShowWarningError( state, - EnergyPlus::format( + std::format( "{} - Iteration limit exceeded calculating DX unit sensible part-load ratio for unit = {}", this->UnitType, this->Name)); @@ -13480,12 +13435,11 @@ namespace UnitarySystems { if (!state.dataGlobal->WarmupFlag) { if (this->warnIndex.m_HXAssistedSensPLRFail < 1) { ++this->warnIndex.m_HXAssistedSensPLRFail; - ShowWarningError( - state, - EnergyPlus::format("{} - DX unit sensible part-load ratio calculation unexpectedly failed: " - "part-load ratio limits exceeded, for unit = {}", - this->UnitType, - this->Name)); + ShowWarningError(state, + std::format("{} - DX unit sensible part-load ratio calculation unexpectedly failed: " + "part-load ratio limits exceeded, for unit = {}", + this->UnitType, + this->Name)); ShowContinueError(state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); ShowContinueErrorTimeStamp( state, "The estimated part-load ratio will be used and the simulation continues. Occurrence info:"); @@ -13507,10 +13461,10 @@ namespace UnitarySystems { ++this->warnIndex.m_HXAssistedSensPLRFail2; ShowWarningError( state, - EnergyPlus::format("{} - DX unit sensible part-load ratio calculation failed: part-load ratio limits " - "exceeded, for unit = {}", - this->UnitType, - this->Name)); + std::format("{} - DX unit sensible part-load ratio calculation failed: part-load ratio limits " + "exceeded, for unit = {}", + this->UnitType, + this->Name)); ShowContinueError(state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); ShowContinueErrorTimeStamp( state, "The estimated part-load ratio will be used and the simulation continues. Occurrence info:"); @@ -13720,10 +13674,10 @@ namespace UnitarySystems { }; General::SolveRoot(state, Acc, MaxIte, SolFla, PartLoadFrac, f, 0.0, 1.0); } else { - ShowMessage(state, EnergyPlus::format(" For :{}=\"{}\"", this->UnitType, this->Name)); + ShowMessage(state, std::format(" For :{}=\"{}\"", this->UnitType, this->Name)); ShowFatalError(state, - EnergyPlus::format("ControlCoolingSystemToSP: Invalid cooling coil type = {}", - HVAC::coilTypeNames[(int)this->m_coolCoilType])); + std::format("ControlCoolingSystemToSP: Invalid cooling coil type = {}", + HVAC::coilTypeNames[(int)this->m_coolCoilType])); } } } @@ -14025,10 +13979,9 @@ namespace UnitarySystems { ++this->warnIndex.m_HXAssistedCRLatPLRIter; ShowWarningError( state, - EnergyPlus::format( - "{} - Iteration limit exceeded calculating DX unit latent part-load ratio for unit = {}", - this->UnitType, - this->Name)); + std::format("{} - Iteration limit exceeded calculating DX unit latent part-load ratio for unit = {}", + this->UnitType, + this->Name)); ShowContinueError( state, EnergyPlus::format("Estimated latent part-load ratio = {:.3R}", (ReqOutput / FullOutput))); ShowContinueError(state, EnergyPlus::format("Calculated latent part-load ratio = {:.3R}", PartLoadFrac)); @@ -14054,10 +14007,10 @@ namespace UnitarySystems { ++this->warnIndex.m_HXAssistedCRLatPLRFail; ShowWarningError( state, - EnergyPlus::format("{} - DX unit latent part-load ratio calculation failed unexpectedly: part-load " - "ratio limits exceeded, for unit = {}", - this->UnitType, - this->Name)); + std::format("{} - DX unit latent part-load ratio calculation failed unexpectedly: part-load " + "ratio limits exceeded, for unit = {}", + this->UnitType, + this->Name)); ShowContinueError(state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); ShowContinueErrorTimeStamp( state, "The estimated part-load ratio will be used and the simulation continues. Occurrence info:"); @@ -14077,12 +14030,11 @@ namespace UnitarySystems { if (!state.dataGlobal->WarmupFlag) { if (this->warnIndex.m_HXAssistedCRLatPLRFail2 < 1) { ++this->warnIndex.m_HXAssistedCRLatPLRFail2; - ShowWarningError( - state, - EnergyPlus::format("{} - DX unit latent part-load ratio calculation failed: part-load ratio limits " - "exceeded, for unit = {}", - this->UnitType, - this->Name)); + ShowWarningError(state, + std::format("{} - DX unit latent part-load ratio calculation failed: part-load ratio limits " + "exceeded, for unit = {}", + this->UnitType, + this->Name)); ShowContinueError(state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); ShowContinueErrorTimeStamp( state, "The estimated part-load ratio will be used and the simulation continues. Occurrence info:"); @@ -14427,8 +14379,7 @@ namespace UnitarySystems { if (this->warnIndex.m_SensPLRIter < 1) { ++this->warnIndex.m_SensPLRIter; ShowWarningError( - state, - EnergyPlus::format("{} - Iteration limit exceeded calculating part-load ratio for unit = {}", this->UnitType, this->Name)); + state, std::format("{} - Iteration limit exceeded calculating part-load ratio for unit = {}", this->UnitType, this->Name)); ShowContinueError( state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", (FullOutput != 0 ? (ReqOutput / FullOutput) : PartLoadFrac))); @@ -14451,11 +14402,10 @@ namespace UnitarySystems { if (!state.dataGlobal->WarmupFlag) { if (this->warnIndex.m_SensPLRFail < 1) { ++this->warnIndex.m_SensPLRFail; - ShowWarningError( - state, - EnergyPlus::format("{} - sensible part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", - this->UnitType, - this->Name)); + ShowWarningError(state, + std::format("{} - sensible part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", + this->UnitType, + this->Name)); ShowContinueError(state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); ShowContinueErrorTimeStamp(state, "The estimated part-load ratio will be used and the simulation continues. Occurrence info:"); } else { @@ -14474,10 +14424,9 @@ namespace UnitarySystems { if (!state.dataGlobal->WarmupFlag) { if (this->warnIndex.m_LatPLRIter < 1) { ++this->warnIndex.m_LatPLRIter; - ShowWarningError(state, - EnergyPlus::format("{} - Iteration limit exceeded calculating latent part-load ratio for unit = {}", - this->UnitType, - this->Name)); + ShowWarningError( + state, + std::format("{} - Iteration limit exceeded calculating latent part-load ratio for unit = {}", this->UnitType, this->Name)); ShowContinueError( state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", (FullOutput != 0 ? (ReqOutput / FullOutput) : PartLoadFrac))); @@ -14502,11 +14451,10 @@ namespace UnitarySystems { if (!state.dataGlobal->WarmupFlag) { if (this->warnIndex.m_LatPLRFail < 1) { ++this->warnIndex.m_LatPLRFail; - ShowWarningError( - state, - EnergyPlus::format("{} - latent part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", - this->UnitType, - this->Name)); + ShowWarningError(state, + std::format("{} - latent part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", + this->UnitType, + this->Name)); ShowContinueError(state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); ShowContinueErrorTimeStamp(state, "The estimated part-load ratio will be used and the simulation continues. Occurrence info:"); } @@ -15150,10 +15098,10 @@ namespace UnitarySystems { // should never get here, user defined coil cannot be controlled and has already been simulated } break; default: { - ShowMessage(state, EnergyPlus::format(" For :{}=\"{}\"", this->UnitType, this->Name)); + ShowMessage(state, std::format(" For :{}=\"{}\"", this->UnitType, this->Name)); ShowFatalError(state, - EnergyPlus::format("ControlHeatingSystemToSP: Invalid heating coil type = {}", - HVAC::coilTypeNames[(int)this->m_heatCoilType])); + std::format("ControlHeatingSystemToSP: Invalid heating coil type = {}", + HVAC::coilTypeNames[(int)this->m_heatCoilType])); } break; } } @@ -15173,9 +15121,9 @@ namespace UnitarySystems { if (this->warnIndex.m_HeatCoilSensPLRIter < 1) { ++this->warnIndex.m_HeatCoilSensPLRIter; ShowWarningError(state, - EnergyPlus::format("{} - Iteration limit exceeded calculating sensible part-load ratio for unit = {}", - this->UnitType, - this->Name)); + std::format("{} - Iteration limit exceeded calculating sensible part-load ratio for unit = {}", + this->UnitType, + this->Name)); ShowContinueError(state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", (ReqOutput / FullOutput))); ShowContinueError(state, EnergyPlus::format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); ShowContinueErrorTimeStamp(state, @@ -15197,9 +15145,9 @@ namespace UnitarySystems { ++this->warnIndex.m_HeatCoilSensPLRFail; ShowWarningError( state, - EnergyPlus::format("{} - sensible part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", - this->UnitType, - this->Name)); + std::format("{} - sensible part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", + this->UnitType, + this->Name)); ShowContinueError(state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); ShowContinueErrorTimeStamp(state, "The estimated part-load ratio will be used and the simulation continues. Occurrence info:"); @@ -15575,11 +15523,10 @@ namespace UnitarySystems { Psychrometrics::PsyDeltaHSenFnTdb2W2Tdb1W1(outletNode.Temp, outletNode.HumRat, inletNode.Temp, inletNode.HumRat); ++this->warnIndex.m_SuppHeatCoilSensPLRIter; - ShowWarningError( - state, - EnergyPlus::format("{} - Iteration limit exceeded calculating sensible part-load ratio for unit = {}", - this->UnitType, - this->Name)); + ShowWarningError(state, + std::format("{} - Iteration limit exceeded calculating sensible part-load ratio for unit = {}", + this->UnitType, + this->Name)); ShowContinueError(state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", (ReqOutput / FullOutput))); ShowContinueError(state, EnergyPlus::format("Calculated part-load ratio = {:.3R}", PartLoadFrac)); ShowContinueErrorTimeStamp( @@ -15587,10 +15534,10 @@ namespace UnitarySystems { } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{} \"{}\" - Iteration limit exceeded calculating sensible part-load ratio " - "error continues. Sensible PLR statistics follow.", - this->UnitType, - this->Name), + std::format("{} \"{}\" - Iteration limit exceeded calculating sensible part-load ratio " + "error continues. Sensible PLR statistics follow.", + this->UnitType, + this->Name), this->warnIndex.m_SuppHeatCoilSensPLRIterIndex, PartLoadFrac, PartLoadFrac); @@ -15608,17 +15555,16 @@ namespace UnitarySystems { ++this->warnIndex.m_SuppHeatCoilSensPLRFail; ShowWarningError( state, - EnergyPlus::format( - "{} - sensible part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", - this->UnitType, - this->Name)); + std::format("{} - sensible part-load ratio calculation failed: part-load ratio limits exceeded, for unit = {}", + this->UnitType, + this->Name)); ShowContinueError(state, EnergyPlus::format("Estimated part-load ratio = {:.3R}", PartLoadFrac)); ShowContinueErrorTimeStamp( state, "The estimated part-load ratio will be used and the simulation continues. Occurrence info:"); } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\" - sensible part-load ratio calculation failed error continues. Sensible PLR statistics follow.", this->UnitType, this->Name), @@ -17148,10 +17094,10 @@ namespace UnitarySystems { } } if (!UnitarySysFound) { - ShowSevereError(state, EnergyPlus::format("{}System not found = UnitarySystem \"{}\"", RoutineName, UnitarySysName)); + ShowSevereError(state, std::format("{}System not found = UnitarySystem \"{}\"", RoutineName, UnitarySysName)); } } else { - ShowSevereError(state, EnergyPlus::format("{}System not found = UnitarySystem \"{}\"", RoutineName, UnitarySysName)); + ShowSevereError(state, std::format("{}System not found = UnitarySystem \"{}\"", RoutineName, UnitarySysName)); } } diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index f363e7f7b60..cc140648e6b 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // EnergyPlus Headers #include @@ -1129,8 +1130,8 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserCoil(CompLoop).initCallbackIndex = state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(3)); if (state.dataUserDefinedComponents->UserCoil(CompLoop).initCallbackIndex == -1) { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); + ShowContinueError(state, std::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError( state, "Program Manager Name not found as an EMS Program Manager, API callback or a Python Plugin Instance object."); @@ -1353,9 +1354,9 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserCoil(CompLoop).Zone.ZoneNum = Util::FindItemInList(cAlphaArgs(13), state.dataHeatBal->Zone); if (state.dataUserDefinedComponents->UserCoil(CompLoop).Zone.ZoneNum == 0) { - ShowSevereError(state, - EnergyPlus::format( - "{} = {}: Ambient Zone Name not found = {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(13))); + ShowSevereError( + state, + std::format("{} = {}: Ambient Zone Name not found = {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(13))); ErrorsFound = true; } else { state.dataUserDefinedComponents->UserCoil(CompLoop).Zone.DeviceHasInternalGains = true; @@ -1428,7 +1429,7 @@ namespace UserDefinedComponents { } // NumUserCoils > 0 if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("GetUserDefinedComponents: Errors found in processing {} input.", cCurrentModuleObject)); + ShowFatalError(state, std::format("GetUserDefinedComponents: Errors found in processing {} input.", cCurrentModuleObject)); } } @@ -1497,8 +1498,8 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).simCallbackIndex = state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(2)); if (state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).simCallbackIndex == -1) { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowContinueError(state, std::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError( state, "Program Manager Name not found as an EMS Program Manager, API callback or a Python Plugin Instance object."); @@ -1520,8 +1521,8 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).initCallbackIndex = state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(3)); if (state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).initCallbackIndex == -1) { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); + ShowContinueError(state, std::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError( state, "Program Manager Name not found as an EMS Program Manager, API callback or a Python Plugin Instance object."); @@ -1833,8 +1834,7 @@ namespace UserDefinedComponents { Util::FindItemInList(cAlphaArgs(16), state.dataHeatBal->Zone); if (state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).Zone.ZoneNum == 0) { ShowSevereError( - state, - EnergyPlus::format("{} = {}: Ambient Zone Name not found = {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(16))); + state, std::format("{} = {}: Ambient Zone Name not found = {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(16))); ErrorsFound = true; } else { state.dataUserDefinedComponents->UserZoneAirHVAC(CompLoop).Zone.DeviceHasInternalGains = true; @@ -1905,7 +1905,7 @@ namespace UserDefinedComponents { } // NumUserZoneAir > 0 if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("GetUserDefinedComponents: Errors found in processing {} input.", cCurrentModuleObject)); + ShowFatalError(state, std::format("GetUserDefinedComponents: Errors found in processing {} input.", cCurrentModuleObject)); } } @@ -1970,8 +1970,8 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserAirTerminal(CompLoop).simCallbackIndex = state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(2)); if (state.dataUserDefinedComponents->UserAirTerminal(CompLoop).simCallbackIndex == -1) { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", cAlphaFieldNames(2), cAlphaArgs(2))); + ShowContinueError(state, std::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError( state, "Program Manager Name not found as an EMS Program Manager, API callback or a Python Plugin Instance object."); @@ -1993,8 +1993,8 @@ namespace UserDefinedComponents { state.dataUserDefinedComponents->UserAirTerminal(CompLoop).initCallbackIndex = state.dataPluginManager->pluginManager->getUserDefinedCallbackIndex(state, cAlphaArgs(3)); if (state.dataUserDefinedComponents->UserAirTerminal(CompLoop).initCallbackIndex == -1) { - ShowSevereError(state, EnergyPlus::format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); - ShowContinueError(state, EnergyPlus::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); + ShowSevereError(state, std::format("Invalid {}={}", cAlphaFieldNames(3), cAlphaArgs(3))); + ShowContinueError(state, std::format("Entered in {}={}", cCurrentModuleObject, cAlphaArgs(1))); ShowContinueError( state, "Program Manager Name not found as an EMS Program Manager, API callback or a Python Plugin Instance object."); @@ -2110,14 +2110,13 @@ namespace UserDefinedComponents { // one assumes if there isn't one assigned, it's an error? if (state.dataUserDefinedComponents->UserAirTerminal(CompLoop).ADUNum == 0) { ShowSevereError(state, - EnergyPlus::format("GetUserDefinedComponents: No matching Air Distribution Unit for {} = {}", - cCurrentModuleObject, - state.dataUserDefinedComponents->UserAirTerminal(CompLoop).Name)); - ShowContinueError( - state, - EnergyPlus::format( - "...should have outlet node={}", - state.dataLoopNodes->NodeID(state.dataUserDefinedComponents->UserAirTerminal(CompLoop).AirConnection.OutletNodeNum))); + std::format("GetUserDefinedComponents: No matching Air Distribution Unit for {} = {}", + cCurrentModuleObject, + state.dataUserDefinedComponents->UserAirTerminal(CompLoop).Name)); + ShowContinueError(state, + std::format("...should have outlet node={}", + state.dataLoopNodes->NodeID( + state.dataUserDefinedComponents->UserAirTerminal(CompLoop).AirConnection.OutletNodeNum))); // ErrorsFound=.TRUE. } @@ -2133,14 +2132,13 @@ namespace UserDefinedComponents { ShowSevereError(state, "Error in connecting a terminal unit to a zone"); ShowContinueError( state, - EnergyPlus::format( - "{} already connects to another zone", - state.dataLoopNodes->NodeID( - state.dataUserDefinedComponents->UserAirTerminal(CompLoop).AirConnection.OutletNodeNum))); + std::format("{} already connects to another zone", + state.dataLoopNodes->NodeID( + state.dataUserDefinedComponents->UserAirTerminal(CompLoop).AirConnection.OutletNodeNum))); ShowContinueError(state, - EnergyPlus::format("Occurs for terminal unit {} = {}", - cCurrentModuleObject, - state.dataUserDefinedComponents->UserAirTerminal(CompLoop).Name)); + std::format("Occurs for terminal unit {} = {}", + cCurrentModuleObject, + state.dataUserDefinedComponents->UserAirTerminal(CompLoop).Name)); ShowContinueError(state, "Check terminal unit node names for errors"); ErrorsFound = true; } else { @@ -2374,8 +2372,7 @@ namespace UserDefinedComponents { Util::FindItemInList(cAlphaArgs(14), state.dataHeatBal->Zone); if (state.dataUserDefinedComponents->UserAirTerminal(CompLoop).Zone.ZoneNum == 0) { ShowSevereError( - state, - EnergyPlus::format("{} = {}: Ambient Zone Name not found = {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(14))); + state, std::format("{} = {}: Ambient Zone Name not found = {}", cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(14))); ErrorsFound = true; } else { state.dataUserDefinedComponents->UserAirTerminal(CompLoop).Zone.DeviceHasInternalGains = true; @@ -2446,7 +2443,7 @@ namespace UserDefinedComponents { } // NumUserZoneAir > 0 if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("GetUserDefinedComponents: Errors found in processing {} input.", cCurrentModuleObject)); + ShowFatalError(state, std::format("GetUserDefinedComponents: Errors found in processing {} input.", cCurrentModuleObject)); } } @@ -2966,8 +2963,7 @@ namespace UserDefinedComponents { } if (CoilIndex == 0) { - ShowSevereError(state, - EnergyPlus::format("{}, GetUserDefinedCoilIndex: User Defined Cooling Coil not found={}", CurrentModuleObject, CoilName)); + ShowSevereError(state, std::format("{}, GetUserDefinedCoilIndex: User Defined Cooling Coil not found={}", CurrentModuleObject, CoilName)); ErrorsFound = true; } } @@ -3001,7 +2997,7 @@ namespace UserDefinedComponents { } if (CoilIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{}, GetTESCoilIndex: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); + ShowSevereError(state, std::format("{}, GetTESCoilIndex: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); ErrorsFound = true; CoilAirInletNode = 0; } else { @@ -3038,7 +3034,7 @@ namespace UserDefinedComponents { } if (CoilIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{}, GetTESCoilIndex: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); + ShowSevereError(state, std::format("{}, GetTESCoilIndex: TES Cooling Coil not found={}", CurrentModuleObject, CoilName)); ErrorsFound = true; CoilAirOutletNode = 0; } else { diff --git a/src/EnergyPlus/UtilityRoutines.cc b/src/EnergyPlus/UtilityRoutines.cc index ca36e25a8dc..430f62221fe 100644 --- a/src/EnergyPlus/UtilityRoutines.cc +++ b/src/EnergyPlus/UtilityRoutines.cc @@ -45,13 +45,9 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -// FMI-Related Headers -extern "C" { -#include -} - // C++ Headers #include +#include #include // ObjexxFCL Headers @@ -60,6 +56,12 @@ extern "C" { #include #include +// Third Party Headers +extern "C" { +#include +} +#include + // EnergyPlus Headers #include #include @@ -84,9 +86,6 @@ extern "C" { #include #include -// Third Party Headers -#include - namespace EnergyPlus { namespace Util { @@ -327,7 +326,7 @@ namespace Util { if (!fsPerfLog) { ShowFatalError(state, EnergyPlus::format("appendPerfLog: Could not open file \"{}\" for output (write).", - state.dataStrGlobals->outputPerfLogFilePath)); + state.dataStrGlobals->outputPerfLogFilePath.string())); } fsPerfLog << state.dataUtilityRoutines->appendPerfLog_headerRow << std::endl; fsPerfLog << state.dataUtilityRoutines->appendPerfLog_valuesRow << std::endl; @@ -338,7 +337,7 @@ namespace Util { if (!fsPerfLog) { ShowFatalError(state, EnergyPlus::format("appendPerfLog: Could not open file \"{}\" for output (append).", - state.dataStrGlobals->outputPerfLogFilePath)); + state.dataStrGlobals->outputPerfLogFilePath.string())); } fsPerfLog << state.dataUtilityRoutines->appendPerfLog_valuesRow << std::endl; } @@ -453,7 +452,7 @@ int AbortEnergyPlus(EnergyPlusData &state) auto tempfl = state.files.endFile.try_open(state.files.outputControl.end); if (!tempfl.good()) { - DisplayString(state, fmt::format("AbortEnergyPlus: Could not open file {} for output (write).", tempfl.filePath)); + DisplayString(state, EnergyPlus::format("AbortEnergyPlus: Could not open file {} for output (write).", tempfl.filePath.string())); } print( tempfl, "EnergyPlus Terminated--Fatal Error Detected. {} Warning; {} Severe Errors; Elapsed Time={}\n", NumWarnings, NumSevere, Elapsed); @@ -573,7 +572,7 @@ int EndEnergyPlus(EnergyPlusData &state) { auto tempfl = state.files.endFile.try_open(state.files.outputControl.end); if (!tempfl.good()) { - DisplayString(state, fmt::format("EndEnergyPlus: Could not open file {} for output (write).", tempfl.filePath)); + DisplayString(state, EnergyPlus::format("EndEnergyPlus: Could not open file {} for output (write).", tempfl.filePath.string())); } print(tempfl, "EnergyPlus Completed Successfully-- {} Warning; {} Severe Errors; Elapsed Time={}\n", NumWarnings, NumSevere, Elapsed); } @@ -919,14 +918,14 @@ void ShowContinueErrorTimeStamp(EnergyPlusData &state, std::string const &Messag } if (len(Message) < 50) { - const std::string m = EnergyPlus::format("{}{}{}, at Simulation time={} {}", - Message, - cEnvHeader, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); - - ShowErrorMessage(state, EnergyPlus::format(" ** ~~~ ** {}", m), OutUnit1, OutUnit2); + const std::string m = std::format("{}{}{}, at Simulation time={} {}", + Message, + cEnvHeader, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state)); + + ShowErrorMessage(state, std::format(" ** ~~~ ** {}", m), OutUnit1, OutUnit2); if (state.dataSQLiteProcedures->sqlite) { state.dataSQLiteProcedures->sqlite->updateSQLiteErrorRecord(m); } @@ -934,13 +933,13 @@ void ShowContinueErrorTimeStamp(EnergyPlusData &state, std::string const &Messag state.dataGlobal->errorCallback(Error::Continue, m); } } else { - const std::string postfix = EnergyPlus::format("{}{}, at Simulation time={} {}", - cEnvHeader, - state.dataEnvrn->EnvironmentName, - state.dataEnvrn->CurMnDy, - General::CreateSysTimeIntervalString(state)); - ShowErrorMessage(state, EnergyPlus::format(" ** ~~~ ** {}", Message)); - ShowErrorMessage(state, EnergyPlus::format(" ** ~~~ ** {}", postfix), OutUnit1, OutUnit2); + const std::string postfix = std::format("{}{}, at Simulation time={} {}", + cEnvHeader, + state.dataEnvrn->EnvironmentName, + state.dataEnvrn->CurMnDy, + General::CreateSysTimeIntervalString(state)); + ShowErrorMessage(state, std::format(" ** ~~~ ** {}", Message)); + ShowErrorMessage(state, std::format(" ** ~~~ ** {}", postfix), OutUnit1, OutUnit2); if (state.dataSQLiteProcedures->sqlite) { state.dataSQLiteProcedures->sqlite->updateSQLiteErrorRecord(Message); } @@ -967,7 +966,7 @@ void ShowMessage(EnergyPlusData &state, std::string const &Message, OptionalOutp if (Message.empty()) { ShowErrorMessage(state, " *************", OutUnit1, OutUnit2); } else { - ShowErrorMessage(state, EnergyPlus::format(" ************* {}", Message), OutUnit1, OutUnit2); + ShowErrorMessage(state, std::format(" ************* {}", Message), OutUnit1, OutUnit2); if (state.dataSQLiteProcedures->sqlite) { state.dataSQLiteProcedures->sqlite->createSQLiteErrorRecord(1, -1, Message, 0); } @@ -1005,7 +1004,7 @@ void ShowWarningError(EnergyPlusData &state, std::string const &ErrorMessage, Op if (state.dataGlobal->DoingSizing) { ++state.dataErrTracking->TotalWarningErrorsDuringSizing; } - ShowErrorMessage(state, EnergyPlus::format(" ** Warning ** {}", ErrorMessage), OutUnit1, OutUnit2); + ShowErrorMessage(state, std::format(" ** Warning ** {}", ErrorMessage), OutUnit1, OutUnit2); if (state.dataSQLiteProcedures->sqlite) { state.dataSQLiteProcedures->sqlite->createSQLiteErrorRecord(1, 0, ErrorMessage, 1); @@ -1037,7 +1036,7 @@ void ShowWarningMessage(EnergyPlusData &state, std::string const &ErrorMessage, } } - ShowErrorMessage(state, EnergyPlus::format(" ** Warning ** {}", ErrorMessage), OutUnit1, OutUnit2); + ShowErrorMessage(state, std::format(" ** Warning ** {}", ErrorMessage), OutUnit1, OutUnit2); if (state.dataSQLiteProcedures->sqlite) { state.dataSQLiteProcedures->sqlite->createSQLiteErrorRecord(1, 0, ErrorMessage, 0); } @@ -1449,7 +1448,7 @@ void SummarizeErrors(EnergyPlusData &state) EndC = len(thisMoreDetails) - 1; while (EndC != std::string::npos) { EndC = index(thisMoreDetails.substr(StartC), "") { break; } @@ -1497,9 +1496,9 @@ void ShowRecurringErrors(EnergyPlusData &state) ShowMessage(state, ""); ShowMessage(state, error.Message); - ShowMessage(state, EnergyPlus::format("{} This error occurred {} total times;", StatMessageStart, error.Count)); - ShowMessage(state, EnergyPlus::format("{} during Warmup {} times;", StatMessageStart, error.WarmupCount)); - ShowMessage(state, EnergyPlus::format("{} during Sizing {} times.", StatMessageStart, error.SizingCount)); + ShowMessage(state, std::format("{} This error occurred {} total times;", StatMessageStart, error.Count)); + ShowMessage(state, std::format("{} during Warmup {} times;", StatMessageStart, error.WarmupCount)); + ShowMessage(state, std::format("{} during Sizing {} times.", StatMessageStart, error.SizingCount)); if (state.dataSQLiteProcedures->sqlite) { if (warning) { state.dataSQLiteProcedures->sqlite->createSQLiteErrorRecord(1, 0, error.Message.substr(15), error.Count); @@ -1518,28 +1517,28 @@ void ShowRecurringErrors(EnergyPlusData &state) } std::string StatMessage; if (error.ReportMax) { - std::string MaxOut = EnergyPlus::format("{:.6f}", error.MaxValue); + std::string MaxOut = std::format("{:.6f}", error.MaxValue); StatMessage += " Max=" + MaxOut; if (!error.MaxUnits.empty()) { StatMessage += ' ' + error.MaxUnits; } } if (error.ReportMin) { - std::string MinOut = EnergyPlus::format("{:.6f}", error.MinValue); + std::string MinOut = std::format("{:.6f}", error.MinValue); StatMessage += " Min=" + MinOut; if (!error.MinUnits.empty()) { StatMessage += ' ' + error.MinUnits; } } if (error.ReportSum) { - std::string SumOut = EnergyPlus::format("{:.6f}", error.SumValue); + std::string SumOut = std::format("{:.6f}", error.SumValue); StatMessage += " Sum=" + SumOut; if (!error.SumUnits.empty()) { StatMessage += ' ' + error.SumUnits; } } if (error.ReportMax || error.ReportMin || error.ReportSum) { - ShowMessage(state, EnergyPlus::format("{}{}", StatMessageStart, StatMessage)); + ShowMessage(state, std::format("{}{}", StatMessageStart, StatMessage)); } } ShowMessage(state, ""); @@ -1548,49 +1547,47 @@ void ShowRecurringErrors(EnergyPlusData &state) void ShowSevereDuplicateName(EnergyPlusData &state, ErrorObjectHeader const &eoh) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}, duplicate name.", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowSevereError(state, std::format("{}: {} = {}, duplicate name.", eoh.routineName, eoh.objectType, eoh.objectName)); } void ShowSevereEmptyField( EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view depFieldName, std::string_view depFieldVal) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, - EnergyPlus::format("{} cannot be empty{}.", - fieldName, - depFieldName.empty() ? "" : EnergyPlus::format(" when {} = {}", depFieldName, depFieldVal))); + ShowSevereError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError( + state, + std::format("{} cannot be empty{}.", fieldName, depFieldName.empty() ? "" : EnergyPlus::format(" when {} = {}", depFieldName, depFieldVal))); } void ShowSevereItemNotFound(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("{} = {}, item not found.", fieldName, fieldVal)); + ShowSevereError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("{} = {}, item not found.", fieldName, fieldVal)); } void ShowDetailedSevereItemNotFound(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}, item not found.", eoh.routineName, fieldName, fieldVal)); - ShowContinueError(state, EnergyPlus::format("{} = {}, item not found.", fieldName, fieldVal)); + ShowSevereError(state, std::format("{}: {} = {}, item not found.", eoh.routineName, fieldName, fieldVal)); + ShowContinueError(state, std::format("{} = {}, item not found.", fieldName, fieldVal)); } void ShowSevereItemNotFoundAudit(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal) { - ShowSevereError( - state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName), OptionalOutputFileRef{state.files.audit}); - ShowContinueError(state, EnergyPlus::format("{} = {}, item not found.", fieldName, fieldVal), OptionalOutputFileRef{state.files.audit}); + ShowSevereError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName), OptionalOutputFileRef{state.files.audit}); + ShowContinueError(state, std::format("{} = {}, item not found.", fieldName, fieldVal), OptionalOutputFileRef{state.files.audit}); } void ShowSevereDuplicateAssignment( EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal, std::string_view prevVal) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("{} = {}, field previously assigned to {}.", fieldName, fieldVal, prevVal)); + ShowSevereError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("{} = {}, field previously assigned to {}.", fieldName, fieldVal, prevVal)); } void ShowSevereInvalidKey( EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal, std::string_view msg) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("{} = {}, invalid key.", fieldName, fieldVal)); + ShowSevereError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("{} = {}, invalid key.", fieldName, fieldVal)); if (!msg.empty()) { ShowContinueError(state, EnergyPlus::format(msg)); } @@ -1598,28 +1595,27 @@ void ShowSevereInvalidKey( void ShowSevereInvalidBool(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("{} = {}, invalid boolean (\"Yes\"/\"No\").", fieldName, fieldVal)); + ShowSevereError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("{} = {}, invalid boolean (\"Yes\"/\"No\").", fieldName, fieldVal)); } void ShowSevereCustom(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view msg) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("{}", msg)); + ShowSevereError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("{}", msg)); } void ShowSevereCustomAudit(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view msg) { - ShowSevereError( - state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName), OptionalOutputFileRef{state.files.audit}); - ShowContinueError(state, EnergyPlus::format("{}", msg), OptionalOutputFileRef{state.files.audit}); + ShowSevereError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName), OptionalOutputFileRef{state.files.audit}); + ShowContinueError(state, std::format("{}", msg), OptionalOutputFileRef{state.files.audit}); } void ShowSevereCustomField( EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldValue, std::string_view msg) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("{} = {}, {}", fieldName, fieldValue, msg)); + ShowSevereError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("{} = {}, {}", fieldName, fieldValue, msg)); } void ShowSevereBadMin(EnergyPlusData &state, @@ -1630,10 +1626,10 @@ void ShowSevereBadMin(EnergyPlusData &state, Real64 minVal, std::string_view msg) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("{} = {}, but must be {} {}", fieldName, fieldVal, cluMin == Clusive::In ? ">=" : ">", minVal)); + ShowSevereError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("{} = {}, but must be {} {}", fieldName, fieldVal, cluMin == Clusive::In ? ">=" : ">", minVal)); if (!msg.empty()) { - ShowContinueError(state, EnergyPlus::format("{}", msg)); + ShowContinueError(state, std::format("{}", msg)); } } @@ -1645,10 +1641,10 @@ void ShowSevereBadMax(EnergyPlusData &state, Real64 maxVal, std::string_view msg) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("{} = {}, but must be {} {}", fieldName, fieldVal, cluMax == Clusive::In ? "<=" : "<", maxVal)); + ShowSevereError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("{} = {}, but must be {} {}", fieldName, fieldVal, cluMax == Clusive::In ? "<=" : "<", maxVal)); if (!msg.empty()) { - ShowContinueError(state, EnergyPlus::format("{}", msg)); + ShowContinueError(state, std::format("{}", msg)); } } @@ -1662,37 +1658,37 @@ void ShowSevereBadMinMax(EnergyPlusData &state, Real64 maxVal, std::string_view msg) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowSevereError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError(state, - EnergyPlus::format("{} = {}, but must be {} {} and {} {}", - fieldName, - fieldVal, - cluMin == Clusive::In ? ">=" : ">", - minVal, - cluMax == Clusive::In ? "<=" : "<", - maxVal)); + std::format("{} = {}, but must be {} {} and {} {}", + fieldName, + fieldVal, + cluMin == Clusive::In ? ">=" : ">", + minVal, + cluMax == Clusive::In ? "<=" : "<", + maxVal)); if (!msg.empty()) { - ShowContinueError(state, EnergyPlus::format("{}", msg)); + ShowContinueError(state, std::format("{}", msg)); } } void ShowWarningItemNotFound(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("{} = {}, item not found", fieldName, fieldVal)); + ShowWarningError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("{} = {}, item not found", fieldName, fieldVal)); } void ShowWarningCustom(EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view msg) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("{}", msg)); + ShowWarningError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("{}", msg)); } void ShowWarningCustomField( EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldValue, std::string_view msg) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("{} = {}, {}", fieldName, fieldValue, msg)); + ShowWarningError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("{} = {}, {}", fieldName, fieldValue, msg)); } void ShowWarningInvalidKey(EnergyPlusData &state, @@ -1702,8 +1698,8 @@ void ShowWarningInvalidKey(EnergyPlusData &state, std::string_view defaultVal, std::string_view msg) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("{} = {}, invalid key, {} will be used.", fieldName, fieldVal, defaultVal)); + ShowWarningError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("{} = {}, invalid key, {} will be used.", fieldName, fieldVal, defaultVal)); if (!msg.empty()) { ShowContinueError(state, EnergyPlus::format(msg)); } @@ -1712,8 +1708,8 @@ void ShowWarningInvalidKey(EnergyPlusData &state, void ShowWarningInvalidBool( EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal, std::string_view defaultVal) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("{} = {}, invalid boolean (\"Yes\"/\"No\"), {} will be used.", fieldName, fieldVal, defaultVal)); + ShowWarningError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("{} = {}, invalid boolean (\"Yes\"/\"No\"), {} will be used.", fieldName, fieldVal, defaultVal)); } void ShowWarningEmptyField(EnergyPlusData &state, @@ -1723,35 +1719,35 @@ void ShowWarningEmptyField(EnergyPlusData &state, std::string_view depFieldName, std::string_view depFieldVal) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("{} is empty.", fieldName)); + ShowWarningError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("{} is empty.", fieldName)); if (!depFieldName.empty()) { - ShowContinueError(state, EnergyPlus::format("Cannot be empty when {} = {}", depFieldName, depFieldVal)); + ShowContinueError(state, std::format("Cannot be empty when {} = {}", depFieldName, depFieldVal)); } if (!defaultVal.empty()) { - ShowContinueError(state, EnergyPlus::format("{} will be used.", defaultVal)); + ShowContinueError(state, std::format("{} will be used.", defaultVal)); } } void ShowWarningNonEmptyField( EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view depFieldName, std::string_view depFieldValue) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); - ShowContinueError(state, EnergyPlus::format("{} is not empty.", fieldName)); + ShowWarningError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowContinueError(state, std::format("{} is not empty.", fieldName)); if (!depFieldName.empty()) { - ShowContinueError(state, EnergyPlus::format("{} is ignored when {} = {}.", fieldName, depFieldName, depFieldValue)); + ShowContinueError(state, std::format("{} is ignored when {} = {}.", fieldName, depFieldName, depFieldValue)); } } void ShowWarningItemNotFound( EnergyPlusData &state, ErrorObjectHeader const &eoh, std::string_view fieldName, std::string_view fieldVal, std::string_view defaultVal) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowWarningError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); if (defaultVal.empty()) { - ShowContinueError(state, EnergyPlus::format("{} = {}, item not found.", fieldName, fieldVal)); + ShowContinueError(state, std::format("{} = {}, item not found.", fieldName, fieldVal)); } else { - ShowContinueError(state, EnergyPlus::format("{} = {}, item not found, {} will be used.", fieldName, fieldVal, defaultVal)); + ShowContinueError(state, std::format("{} = {}, item not found, {} will be used.", fieldName, fieldVal, defaultVal)); } } @@ -1763,11 +1759,11 @@ void ShowWarningBadMin(EnergyPlusData &state, Real64 minVal, std::string_view msg) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowWarningError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError(state, EnergyPlus::format("{} = {:.2R}, but must be {} {:.2R}", fieldName, fieldVal, cluMin == Clusive::In ? ">=" : ">", minVal)); if (!msg.empty()) { - ShowContinueError(state, EnergyPlus::format("{}", msg)); + ShowContinueError(state, std::format("{}", msg)); } } @@ -1779,11 +1775,11 @@ void ShowWarningBadMax(EnergyPlusData &state, Real64 maxVal, std::string_view msg) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowWarningError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError(state, EnergyPlus::format("{} = {:.2R}, but must be {} {:.2R}", fieldName, fieldVal, cluMax == Clusive::In ? "<=" : "<", maxVal)); if (!msg.empty()) { - ShowContinueError(state, EnergyPlus::format("{}", msg)); + ShowContinueError(state, std::format("{}", msg)); } } @@ -1797,17 +1793,17 @@ void ShowWarningBadMinMax(EnergyPlusData &state, Real64 maxVal, std::string_view msg) { - ShowWarningError(state, EnergyPlus::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); + ShowWarningError(state, std::format("{}: {} = {}", eoh.routineName, eoh.objectType, eoh.objectName)); ShowContinueError(state, - EnergyPlus::format("{} = {}, but must be {} {} and {} {}", - fieldName, - fieldVal, - cluMin == Clusive::In ? ">=" : ">", - minVal, - cluMax == Clusive::In ? "<=" : "<", - maxVal)); + std::format("{} = {}, but must be {} {} and {} {}", + fieldName, + fieldVal, + cluMin == Clusive::In ? ">=" : ">", + minVal, + cluMax == Clusive::In ? "<=" : "<", + maxVal)); if (!msg.empty()) { - ShowContinueError(state, EnergyPlus::format("{}", msg)); + ShowContinueError(state, std::format("{}", msg)); } } diff --git a/src/EnergyPlus/VariableSpeedCoils.cc b/src/EnergyPlus/VariableSpeedCoils.cc index 862e9eff0e6..0410b6a502b 100644 --- a/src/EnergyPlus/VariableSpeedCoils.cc +++ b/src/EnergyPlus/VariableSpeedCoils.cc @@ -46,13 +46,15 @@ // POSSIBILITY OF SUCH DAMAGE. // C++ Headers +#include // ObjexxFCL Headers #include -// EnergyPlus Headers +// Local Headers #include "AirflowNetwork/Solver.hpp" +// EnergyPlus Headers #include #include #include @@ -353,8 +355,7 @@ namespace VariableSpeedCoils { cFieldName = "Number of Speeds"; if (varSpeedCoil.NumOfSpeeds < 1) { ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} must be >= 1. entered number is {:.0T}", cFieldName, varSpeedCoil.NumOfSpeeds)); + ShowContinueError(state, EnergyPlus::format("...{} must be >= 1. entered number is {}", cFieldName, varSpeedCoil.NumOfSpeeds)); ErrorsFound = true; } @@ -365,8 +366,7 @@ namespace VariableSpeedCoils { if ((varSpeedCoil.NormSpedLevel > varSpeedCoil.NumOfSpeeds) || (varSpeedCoil.NormSpedLevel <= 0)) { ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} must be valid speed level entered number is {:.0T}", cFieldName, varSpeedCoil.NormSpedLevel)); + state, EnergyPlus::format("...{} must be valid speed level entered number is {}", cFieldName, varSpeedCoil.NormSpedLevel)); ErrorsFound = true; } @@ -385,7 +385,7 @@ namespace VariableSpeedCoils { ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError(state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } @@ -429,20 +429,18 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(I), RatedInletWetBulbTemp, RatedInletWaterTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + state, std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - fieldValue = - EnergyPlus::format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_air_flow_fraction_curve_name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_air_flow_fraction_curve_name"); cFieldName_curve = - EnergyPlus::format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Air Flow Fraction Curve Name"); + std::format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Air Flow Fraction Curve Name"); std::string const coolCapFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (coolCapFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -463,20 +461,18 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + state, std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - fieldValue = - EnergyPlus::format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_water_flow_fraction_curve_name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_water_flow_fraction_curve_name"); cFieldName_curve = - EnergyPlus::format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Water Flow Fraction Curve Name"); + std::format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Water Flow Fraction Curve Name"); std::string const coolCapWFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (coolCapWFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -497,18 +493,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapWaterFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + state, std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - fieldValue = EnergyPlus::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_temperature_curve_name"); - cFieldName_curve = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Temperature Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_temperature_curve_name"); + cFieldName_curve = std::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Temperature Curve Name"); std::string const coolEIRFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (coolEIRFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -529,19 +524,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRFTemp(I), RatedInletWetBulbTemp, RatedInletWaterTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + state, std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - fieldValue = EnergyPlus::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_air_flow_fraction_curve_name"); - cFieldName_curve = - EnergyPlus::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Air Flow Fraction Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_air_flow_fraction_curve_name"); + cFieldName_curve = std::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Air Flow Fraction Curve Name"); std::string const coolEIRFFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (coolEIRFFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -562,20 +555,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + state, std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - fieldValue = - EnergyPlus::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_water_flow_fraction_curve_name"); - cFieldName_curve = - EnergyPlus::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Water Flow Fraction Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_water_flow_fraction_curve_name"); + cFieldName_curve = std::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Water Flow Fraction Curve Name"); std::string const coolEIRWFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (coolEIRWFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -596,19 +586,18 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRWaterFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + state, std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } // Read waste heat modifier curve name - fieldValue = EnergyPlus::format("speed_{}{}", std::to_string(I), "_waste_heat_function_of_temperature_curve_name"); - cFieldName_curve = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Waste Heat Function of Temperature Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_waste_heat_function_of_temperature_curve_name"); + cFieldName_curve = std::format("Speed_{}{}", std::to_string(I), " Waste Heat Function of Temperature Curve Name"); std::string const wasteHFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (wasteHFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -629,12 +618,11 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSWasteHeat(I), RatedInletWaterTemp, RatedInletAirTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + state, std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } @@ -776,9 +764,8 @@ namespace VariableSpeedCoils { cFieldName = "Number of Speeds"; if (varSpeedCoil.NumOfSpeeds < 1) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} must be >= 1. entered number is {:.0T}", cFieldName, varSpeedCoil.NumOfSpeeds)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} must be >= 1. entered number is {}", cFieldName, varSpeedCoil.NumOfSpeeds)); ErrorsFound = true; } if (varSpeedCoil.NormSpedLevel > varSpeedCoil.NumOfSpeeds) { @@ -786,10 +773,9 @@ namespace VariableSpeedCoils { } cFieldName = "Nominal Speed Level"; if ((varSpeedCoil.NormSpedLevel > varSpeedCoil.NumOfSpeeds) || (varSpeedCoil.NormSpedLevel <= 0)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, - EnergyPlus::format("...{} must be valid speed level entered number is {:.0T}", cFieldName, varSpeedCoil.NormSpedLevel)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} must be valid speed level entered number is {}", cFieldName, varSpeedCoil.NormSpedLevel)); ErrorsFound = true; } @@ -805,10 +791,9 @@ namespace VariableSpeedCoils { } else { CurveVal = Curve::CurveValue(state, varSpeedCoil.PLFFPLR, 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } @@ -829,12 +814,11 @@ namespace VariableSpeedCoils { Node::ObjectIsNotParent); // std::string cAlphaField10 = "Basin Heater Operating Schedule Name"; if (!OutAirNodeManager::CheckOutAirNodeNumber(state, varSpeedCoil.CondenserInletNodeNum)) { - ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowWarningError(state, std::format("{}{}=\"{}\", may be invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError(state, - EnergyPlus::format("{}=\"{}\", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", - cFieldName, - condenserAirInletNodeName)); + std::format("{}=\"{}\", node does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node.", + cFieldName, + condenserAirInletNodeName)); ShowContinueError( state, "This node needs to be included in an air system or the coil model will not be valid, and the simulation continues"); @@ -849,8 +833,8 @@ namespace VariableSpeedCoils { varSpeedCoil.CondenserType = DataHeatBalance::RefrigCondenserType::Evap; varSpeedCoil.ReportEvapCondVars = true; } else { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{}=\"{}\":", cFieldName, condenserType)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{}=\"{}\":", cFieldName, condenserType)); ShowContinueError(state, "...must be AirCooled or EvaporativelyCooled."); ErrorsFound = true; } @@ -865,9 +849,9 @@ namespace VariableSpeedCoils { } if (varSpeedCoil.EvapCondPumpElecNomPower != DataSizing::AutoSize) { if (varSpeedCoil.EvapCondPumpElecNomPower < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", varSpeedCoil.EvapCondPumpElecNomPower)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0.", cFieldName)); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", varSpeedCoil.EvapCondPumpElecNomPower)); ErrorsFound = true; } } @@ -876,9 +860,9 @@ namespace VariableSpeedCoils { cFieldName = "Crankcase Heater Capacity"; // cNumericFields(11) varSpeedCoil.CrankcaseHeaterCapacity = s_ip->getRealFieldValue(fields, schemaProps, "crankcase_heater_capacity"); // NumArray(11); if (varSpeedCoil.CrankcaseHeaterCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", varSpeedCoil.CrankcaseHeaterCapacity)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0.", cFieldName)); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", varSpeedCoil.CrankcaseHeaterCapacity)); ErrorsFound = true; } @@ -897,7 +881,7 @@ namespace VariableSpeedCoils { if (varSpeedCoil.CrankcaseHeaterCapacityCurveIndex == 0) { // can't find the curve ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = {}: {} not found = {}", CurrentModuleObject, varSpeedCoil.Name, cFieldName, crankcaseHeaterCapCurveName)); ErrorsFound = true; } else { @@ -948,9 +932,9 @@ namespace VariableSpeedCoils { cFieldName = "Basin Heater Capacity"; // cNumericFields(14) varSpeedCoil.BasinHeaterPowerFTempDiff = s_ip->getRealFieldValue(fields, schemaProps, "basin_heater_capacity"); // NumArray(14); if (varSpeedCoil.BasinHeaterPowerFTempDiff < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be >= 0.0.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", varSpeedCoil.BasinHeaterPowerFTempDiff)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} must be >= 0.0.", cFieldName)); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", varSpeedCoil.BasinHeaterPowerFTempDiff)); ErrorsFound = true; } @@ -959,10 +943,9 @@ namespace VariableSpeedCoils { s_ip->getRealFieldValue(fields, schemaProps, "basin_heater_setpoint_temperature"); // NumArray(15); if (varSpeedCoil.BasinHeaterPowerFTempDiff > 0.0) { if (varSpeedCoil.BasinHeaterSetPointTemp < 2.0) { - ShowWarningError(state, - EnergyPlus::format("{}{}=\"{}\", freeze possible", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} is < 2 {{C}}. Freezing could occur.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", varSpeedCoil.BasinHeaterSetPointTemp)); + ShowWarningError(state, std::format("{}{}=\"{}\", freeze possible", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} is < 2 {{C}}. Freezing could occur.", cFieldName)); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", varSpeedCoil.BasinHeaterSetPointTemp)); } } @@ -977,36 +960,36 @@ namespace VariableSpeedCoils { for (int I = 1; I <= varSpeedCoil.NumOfSpeeds; ++I) { std::string fieldName; - fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_total_cooling_capacity"); + fieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_total_cooling_capacity"); varSpeedCoil.MSRatedTotCap(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_sensible_heat_ratio"); + fieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_sensible_heat_ratio"); varSpeedCoil.MSRatedSHR(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_cooling_cop"); + fieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_cooling_cop"); varSpeedCoil.MSRatedCOP(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); + fieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); varSpeedCoil.MSRatedAirVolFlowRate(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = EnergyPlus::format("2017_speed_{}{}", std::to_string(I), "_rated_evaporator_fan_power_per_volume_flow_rate"); + fieldName = std::format("2017_speed_{}{}", std::to_string(I), "_rated_evaporator_fan_power_per_volume_flow_rate"); varSpeedCoil.MSRatedEvaporatorFanPowerPerVolumeFlowRate2017(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = EnergyPlus::format("2023_speed_{}{}", std::to_string(I), "_rated_evaporator_fan_power_per_volume_flow_rate"); + fieldName = std::format("2023_speed_{}{}", std::to_string(I), "_rated_evaporator_fan_power_per_volume_flow_rate"); varSpeedCoil.MSRatedEvaporatorFanPowerPerVolumeFlowRate2023(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_condenser_air_flow_rate"); + fieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_condenser_air_flow_rate"); varSpeedCoil.EvapCondAirFlow(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_pad_effectiveness_of_evap_precooling"); + fieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_pad_effectiveness_of_evap_precooling"); varSpeedCoil.EvapCondEffect(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); if (varSpeedCoil.EvapCondEffect(I) < 0.0 || varSpeedCoil.EvapCondEffect(I) > 1.0) { std::string const FieldName = - EnergyPlus::format("Speed_{}{}", std::to_string(I), " Reference Unit Rated Pad Effectiveness of Evap Precooling"); - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0 or > 1.0.", FieldName)); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", varSpeedCoil.EvapCondEffect(I))); + std::format("Speed_{}{}", std::to_string(I), " Reference Unit Rated Pad Effectiveness of Evap Precooling"); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0 or > 1.0.", FieldName)); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", varSpeedCoil.EvapCondEffect(I))); ErrorsFound = true; } std::string fieldValue = - EnergyPlus::format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_temperature_curve_name"); + std::format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_temperature_curve_name"); std::string cFieldName_curve = - EnergyPlus::format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Temperature Curve Name"); + std::format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Temperature Curve Name"); std::string const cCapFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (cCapFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -1027,20 +1010,18 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(I), RatedInletWetBulbTemp, RatedAmbAirTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + state, std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - fieldValue = - EnergyPlus::format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_air_flow_fraction_curve_name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_total_cooling_capacity_function_of_air_flow_fraction_curve_name"); cFieldName_curve = - EnergyPlus::format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Air Flow Fraction Curve Name"); + std::format("Speed_{}{}", std::to_string(I), " Total Cooling Capacity Function of Air Flow Fraction Curve Name"); std::string const cCapFFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (cCapFFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -1061,18 +1042,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + state, std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - fieldValue = EnergyPlus::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_temperature_curve_name"); - cFieldName_curve = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Temperature Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_temperature_curve_name"); + cFieldName_curve = std::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Temperature Curve Name"); std::string const cEIRFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (cEIRFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -1093,19 +1073,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRFTemp(I), RatedInletWetBulbTemp, RatedAmbAirTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + state, std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - fieldValue = EnergyPlus::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_air_flow_fraction_curve_name"); - cFieldName_curve = - EnergyPlus::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Air Flow Fraction Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_air_flow_fraction_curve_name"); + cFieldName_curve = std::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Air Flow Fraction Curve Name"); std::string const cEIRFFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (cEIRFFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName_curve, "Required field is blank."); @@ -1126,12 +1104,11 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + state, std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName_curve)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } @@ -1285,9 +1262,8 @@ namespace VariableSpeedCoils { cFieldName = "Number of Speeds"; // If (VarSpeedCoil(DXCoilNum)%NumOfSpeeds .LT. 2) Then if (varSpeedCoil.NumOfSpeeds < 1) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} must be >= 1. entered number is {:.0T}", cFieldName, varSpeedCoil.NumOfSpeeds)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} must be >= 1. entered number is {}", cFieldName, varSpeedCoil.NumOfSpeeds)); ErrorsFound = true; } @@ -1296,10 +1272,9 @@ namespace VariableSpeedCoils { } cFieldName = "Nominal Speed Level"; if ((varSpeedCoil.NormSpedLevel > varSpeedCoil.NumOfSpeeds) || (varSpeedCoil.NormSpedLevel <= 0)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, - EnergyPlus::format("...{} must be valid speed level entered number is {:.0T}", cFieldName, varSpeedCoil.NormSpedLevel)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} must be valid speed level entered number is {}", cFieldName, varSpeedCoil.NormSpedLevel)); ErrorsFound = true; } // part load curve @@ -1314,30 +1289,29 @@ namespace VariableSpeedCoils { } else { CurveVal = Curve::CurveValue(state, varSpeedCoil.PLFFPLR, 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } for (int I = 1; I <= varSpeedCoil.NumOfSpeeds; ++I) { std::string fieldName; std::string fieldValue; - fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_capacity"); + fieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_capacity"); varSpeedCoil.MSRatedTotCap(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_cop"); + fieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_cop"); varSpeedCoil.MSRatedCOP(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); + fieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); varSpeedCoil.MSRatedAirVolFlowRate(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_water_flow_rate"); + fieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_water_flow_rate"); varSpeedCoil.MSRatedWaterVolFlowRate(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); fieldName = - EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_waste_heat_fraction_of_input_power_at_rated_conditions"); + std::format("speed_{}{}", std::to_string(I), "_reference_unit_waste_heat_fraction_of_input_power_at_rated_conditions"); varSpeedCoil.MSWasteHeatFrac(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldValue = EnergyPlus::format("speed_{}{}", std::to_string(I), "_heating_capacity_function_of_temperature_curve_name"); - cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Heating Capacity Function of Temperature Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_heating_capacity_function_of_temperature_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " Heating Capacity Function of Temperature Curve Name"); std::string const heatCapFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (heatCapFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1358,19 +1332,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(I), RatedInletAirTempHeat, RatedInletWaterTempHeat); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - fieldValue = - EnergyPlus::format("speed_{}{}", std::to_string(I), "_total_heating_capacity_function_of_air_flow_fraction_curve_name"); - cFieldName = - EnergyPlus::format("Speed_{}{}", std::to_string(I), " Total Heating Capacity Function of Air Flow Fraction Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_total_heating_capacity_function_of_air_flow_fraction_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " Total Heating Capacity Function of Air Flow Fraction Curve Name"); std::string const heatCapFFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (heatCapFFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1391,17 +1363,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - fieldValue = EnergyPlus::format("speed_{}{}", std::to_string(I), "_heating_capacity_function_of_water_flow_fraction_curve_name"); - cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Heating Capacity Function of Water Flow Fraction Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_heating_capacity_function_of_water_flow_fraction_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " Heating Capacity Function of Water Flow Fraction Curve Name"); std::string const heatCapWFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (heatCapWFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1422,17 +1394,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapWaterFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - fieldValue = EnergyPlus::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_temperature_curve_name"); - cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Temperature Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_temperature_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Temperature Curve Name"); std::string const heatEIRFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (heatEIRFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1453,17 +1425,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRFTemp(I), RatedInletAirTempHeat, RatedInletWaterTempHeat); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - fieldValue = EnergyPlus::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_air_flow_fraction_curve_name"); - cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Air Flow Fraction Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_air_flow_fraction_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Air Flow Fraction Curve Name"); std::string const heatEIRFFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (heatEIRFFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1484,19 +1456,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - fieldValue = - EnergyPlus::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_water_flow_fraction_curve_name"); - cFieldName = - EnergyPlus::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Water Flow Fraction Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_water_flow_fraction_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Water Flow Fraction Curve Name"); std::string const heatEIRWFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (heatEIRWFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1517,18 +1487,18 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRWaterFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } // Read waste heat modifier curve name - fieldValue = EnergyPlus::format("speed_{}{}", std::to_string(I), "_waste_heat_function_of_temperature_curve_name"); - cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Waste Heat Function of Temperature Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_waste_heat_function_of_temperature_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " Waste Heat Function of Temperature Curve Name"); std::string const heatWHFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (heatWHFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1549,11 +1519,11 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSWasteHeat(I), RatedInletWaterTemp, RatedInletAirTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } @@ -1680,9 +1650,8 @@ namespace VariableSpeedCoils { Node::TestCompSet(state, CurrentModuleObject, varSpeedCoil.Name, airInletNodeName, airOutletNodeName, "Air Nodes"); cFieldName = "Number of Speeds"; if (varSpeedCoil.NumOfSpeeds < 1) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} must be >= 1. entered number is {:.0T}", cFieldName, varSpeedCoil.NumOfSpeeds)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} must be >= 1. entered number is {}", cFieldName, varSpeedCoil.NumOfSpeeds)); ErrorsFound = true; } @@ -1691,10 +1660,9 @@ namespace VariableSpeedCoils { } cFieldName = "Nominal Speed Level"; if ((varSpeedCoil.NormSpedLevel > varSpeedCoil.NumOfSpeeds) || (varSpeedCoil.NormSpedLevel <= 0)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, - EnergyPlus::format("...{} must be valid speed level entered number is {:.0T}", cFieldName, varSpeedCoil.NormSpedLevel)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} must be valid speed level entered number is {}", cFieldName, varSpeedCoil.NormSpedLevel)); ErrorsFound = true; } @@ -1710,10 +1678,9 @@ namespace VariableSpeedCoils { } else { CurveVal = Curve::CurveValue(state, varSpeedCoil.PLFFPLR, 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } @@ -1731,7 +1698,7 @@ namespace VariableSpeedCoils { if (varSpeedCoil.CrankcaseHeaterCapacityCurveIndex == 0) { // can't find the curve ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = {}: {} not found = {}", CurrentModuleObject, varSpeedCoil.Name, cFieldName, crankcaseHeaterCapCurveName)); ErrorsFound = true; } else { @@ -1752,9 +1719,9 @@ namespace VariableSpeedCoils { if (varSpeedCoil.DefrostStrategy == StandardRatings::DefrostStrat::ReverseCycle) { if (varSpeedCoil.DefrostEIRFT == 0) { if (defrostEIRFTCurveName.empty()) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...required {} is blank.", defrostEIRFTFieldName)); - ShowContinueError(state, EnergyPlus::format("...field is required because {} is \"ReverseCycle\".", cFieldName)); + ShowSevereError(state, std::format("{}{}=\"{}\", missing", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...required {} is blank.", defrostEIRFTFieldName)); + ShowContinueError(state, std::format("...field is required because {} is \"ReverseCycle\".", cFieldName)); } else { ShowSevereInvalidBool(state, eoh, cFieldName, defrostEIRFTCurveName); } @@ -1798,9 +1765,9 @@ namespace VariableSpeedCoils { cFieldName = "Crankcase Heater Capacity"; // cNumericFields(8) varSpeedCoil.CrankcaseHeaterCapacity = s_ip->getRealFieldValue(fields, schemaProps, "crankcase_heater_capacity"); if (varSpeedCoil.CrankcaseHeaterCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} cannot be < 0.0.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...entered value=[{:.2T}].", varSpeedCoil.CrankcaseHeaterCapacity)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} cannot be < 0.0.", cFieldName)); + ShowContinueError(state, std::format("...entered value=[{:.2f}].", varSpeedCoil.CrankcaseHeaterCapacity)); ErrorsFound = true; } // Set crankcase heater cutout temperature @@ -1811,8 +1778,8 @@ namespace VariableSpeedCoils { cFieldName = "Defrost Time Period Fraction"; // cNumericFields(10) varSpeedCoil.DefrostTime = s_ip->getRealFieldValue(fields, schemaProps, "defrost_time_period_fraction"); if (varSpeedCoil.DefrostTime == 0.0 && varSpeedCoil.DefrostControl == StandardRatings::HPdefrostControl::Timed) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} = 0.0 for defrost control = TIMED.", cFieldName)); + ShowWarningError(state, std::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} = 0.0 for defrost control = TIMED.", cFieldName)); } // Set defrost capacity (for resistive defrost), @@ -1825,33 +1792,33 @@ namespace VariableSpeedCoils { : dCap.get(); } if (varSpeedCoil.DefrostCapacity == 0.0 && varSpeedCoil.DefrostStrategy == StandardRatings::DefrostStrat::Resistive) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} = 0.0 for defrost strategy = RESISTIVE.", cFieldName)); + ShowWarningError(state, std::format("{}{}=\"{}\", ", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} = 0.0 for defrost strategy = RESISTIVE.", cFieldName)); } for (int I = 1; I <= varSpeedCoil.NumOfSpeeds; ++I) { std::string fieldValue; std::string fieldName; - fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_capacity"); + fieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_capacity"); varSpeedCoil.MSRatedTotCap(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); if (varSpeedCoil.MSRatedTotCap(I) < 1.e-10) { - cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Reference Unit Gross Rated Heating Capacity"); - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid value", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " Reference Unit Gross Rated Heating Capacity"); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid value", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError(state, EnergyPlus::format("...too small {}=[{:.2R}].", cFieldName, varSpeedCoil.MSRatedTotCap(I))); ErrorsFound = true; } - fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_cop"); + fieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_gross_rated_heating_cop"); varSpeedCoil.MSRatedCOP(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); + fieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); varSpeedCoil.MSRatedAirVolFlowRate(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = EnergyPlus::format("2017_speed_{}{}", std::to_string(I), "_rated_supply_air_fan_power_per_volume_flow_rate"); + fieldName = std::format("2017_speed_{}{}", std::to_string(I), "_rated_supply_air_fan_power_per_volume_flow_rate"); varSpeedCoil.MSRatedEvaporatorFanPowerPerVolumeFlowRate2017(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); - fieldName = EnergyPlus::format("2023_speed_{}{}", std::to_string(I), "_rated_supply_air_fan_power_per_volume_flow_rate"); + fieldName = std::format("2023_speed_{}{}", std::to_string(I), "_rated_supply_air_fan_power_per_volume_flow_rate"); varSpeedCoil.MSRatedEvaporatorFanPowerPerVolumeFlowRate2023(I) = s_ip->getRealFieldValue(fields, schemaProps, fieldName); // Speed 1 Reference Unit Gross Rated Total Cooling Capacity - fieldValue = EnergyPlus::format("speed_{}{}", std::to_string(I), "_heating_capacity_function_of_temperature_curve_name"); - cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Heating Capacity Function of Temperature Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_heating_capacity_function_of_temperature_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " Heating Capacity Function of Temperature Curve Name"); std::string const hCapFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (hCapFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1872,20 +1839,18 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(I), RatedInletAirTempHeat, RatedAmbAirTempHeat); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } // Speed 1 Total Heating Capacity Function of Air Flow Fraction Curve Name - fieldValue = - EnergyPlus::format("speed_{}{}", std::to_string(I), "_total_heating_capacity_function_of_air_flow_fraction_curve_name"); - cFieldName = - EnergyPlus::format("Speed_{}{}", std::to_string(I), " Total Heating Capacity Function of Air Flow Fraction Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_total_heating_capacity_function_of_air_flow_fraction_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " Total Heating Capacity Function of Air Flow Fraction Curve Name"); std::string const hCapFFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (hCapFFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1906,18 +1871,18 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } // Speed 1 Energy Input Ratio Function of Temperature Curve Name - fieldValue = EnergyPlus::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_temperature_curve_name"); - cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Temperature Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_temperature_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Temperature Curve Name"); std::string const hEIRFTCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (hEIRFTCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1938,18 +1903,18 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRFTemp(I), RatedInletAirTempHeat, RatedAmbAirTempHeat); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } // Speed 1 Energy Input Ratio Function of Air Flow Fraction Curve Name - fieldValue = EnergyPlus::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_air_flow_fraction_curve_name"); - cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Air Flow Fraction Curve Name"); + fieldValue = std::format("speed_{}{}", std::to_string(I), "_energy_input_ratio_function_of_air_flow_fraction_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " Energy Input Ratio Function of Air Flow Fraction Curve Name"); std::string const hEIRFFFCurveName = s_ip->getAlphaFieldValue(fields, schemaProps, fieldValue); if (hEIRFFFCurveName.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -1970,11 +1935,11 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } @@ -2066,9 +2031,8 @@ namespace VariableSpeedCoils { varSpeedCoil.NormSpedLevel = s_ip->getIntFieldValue(fields, schemaProps, "nominal_speed_level"); cFieldName = "Number of Speeds"; if (varSpeedCoil.NumOfSpeeds < 1) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} must be >= 1. entered number is {:.0T}", cFieldName, varSpeedCoil.NumOfSpeeds)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} must be >= 1. entered number is {}", cFieldName, varSpeedCoil.NumOfSpeeds)); ErrorsFound = true; } if (varSpeedCoil.NormSpedLevel > varSpeedCoil.NumOfSpeeds) { @@ -2076,17 +2040,16 @@ namespace VariableSpeedCoils { } cFieldName = "Nominal Speed Level"; if ((varSpeedCoil.NormSpedLevel > varSpeedCoil.NumOfSpeeds) || (varSpeedCoil.NormSpedLevel <= 0)) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, - EnergyPlus::format("...{} must be valid speed level entered number is {:.0T}", cFieldName, varSpeedCoil.NormSpedLevel)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} must be valid speed level entered number is {}", cFieldName, varSpeedCoil.NormSpedLevel)); ErrorsFound = true; } cFieldName = "Rated Water Heating Capacity"; varSpeedCoil.RatedCapWH = s_ip->getRealFieldValue(fields, schemaProps, "rated_water_heating_capacity"); // NumArray(3); if (varSpeedCoil.RatedCapWH <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be > 0.0, entered value=[{:.2T}].", cFieldName, varSpeedCoil.RatedCapWH)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} must be > 0.0, entered value=[{:.2f}].", cFieldName, varSpeedCoil.RatedCapWH)); ErrorsFound = true; } varSpeedCoil.WHRatedInletDBTemp = @@ -2100,9 +2063,9 @@ namespace VariableSpeedCoils { varSpeedCoil.RatedAirVolFlowRate = s_ip->getRealFieldValue(fields, schemaProps, "rated_evaporator_air_flow_rate"); // NumArray(7); if (varSpeedCoil.RatedAirVolFlowRate != Constant::AutoCalculate) { if (varSpeedCoil.RatedAirVolFlowRate <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} must be > 0.0. entered value=[{:.3T}].", cFieldName, varSpeedCoil.RatedAirVolFlowRate)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} must be > 0.0. entered value=[{:.3f}].", cFieldName, varSpeedCoil.RatedAirVolFlowRate)); ErrorsFound = true; } } @@ -2111,10 +2074,9 @@ namespace VariableSpeedCoils { varSpeedCoil.RatedWaterVolFlowRate = s_ip->getRealFieldValue(fields, schemaProps, "rated_condenser_water_flow_rate"); // NumArray(8); if (varSpeedCoil.RatedWaterVolFlowRate != Constant::AutoCalculate) { if (varSpeedCoil.RatedWaterVolFlowRate <= 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} must be > 0.0 entered value=[{:.3T}].", cFieldName, varSpeedCoil.RatedWaterVolFlowRate)); + state, std::format("...{} must be > 0.0 entered value=[{:.3f}].", cFieldName, varSpeedCoil.RatedWaterVolFlowRate)); ErrorsFound = true; } } @@ -2151,10 +2113,10 @@ namespace VariableSpeedCoils { varSpeedCoil.HPWHCondPumpFracToWater = s_ip->getRealFieldValue(fields, schemaProps, "fraction_of_condenser_pump_heat_to_water"); // NumArray(9); if (varSpeedCoil.HPWHCondPumpFracToWater <= 0.0 || varSpeedCoil.HPWHCondPumpFracToWater > 1.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - EnergyPlus::format( - "...{} must be >= 0 and <= 1. entered value=[{:.3T}].", cFieldName, varSpeedCoil.HPWHCondPumpFracToWater)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError( + state, + std::format("...{} must be >= 0 and <= 1. entered value=[{:.3f}].", cFieldName, varSpeedCoil.HPWHCondPumpFracToWater)); ErrorsFound = true; } if (!varSpeedCoil.CondPumpHeatInCapacity) { @@ -2218,9 +2180,9 @@ namespace VariableSpeedCoils { cFieldName = "Crankcase Heater Capacity"; varSpeedCoil.CrankcaseHeaterCapacity = s_ip->getRealFieldValue(fields, schemaProps, "crankcase_heater_capacity"); // NumArray(10); if (varSpeedCoil.CrankcaseHeaterCapacity < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} must be >= 0.0 entered value=[{:.1T}].", cFieldName, varSpeedCoil.CrankcaseHeaterCapacity)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} must be >= 0.0 entered value=[{:.1f}].", cFieldName, varSpeedCoil.CrankcaseHeaterCapacity)); ErrorsFound = true; } @@ -2228,10 +2190,9 @@ namespace VariableSpeedCoils { varSpeedCoil.MaxOATCrankcaseHeater = s_ip->getRealFieldValue(fields, schemaProps, "maximum_ambient_temperature_for_crankcase_heater_operation"); // NumArray(11); if (varSpeedCoil.MaxOATCrankcaseHeater < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); ShowContinueError( - state, - EnergyPlus::format("...{} must be >= 0 {{C}}. entered value=[{:.1T}].", cFieldName, varSpeedCoil.MaxOATCrankcaseHeater)); + state, std::format("...{} must be >= 0 {{C}}. entered value=[{:.1f}].", cFieldName, varSpeedCoil.MaxOATCrankcaseHeater)); ErrorsFound = true; } @@ -2258,9 +2219,9 @@ namespace VariableSpeedCoils { varSpeedCoil.InletAirTemperatureType = static_cast(getEnumValue(HVAC::oatTypeNamesUC, Util::makeUPPER(fieldValue))); if (varSpeedCoil.InletAirTemperatureType == HVAC::OATType::Invalid) { // wrong temperature type selection - ShowSevereError(state, EnergyPlus::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, EnergyPlus::format("...{} must be DryBulbTemperature or WetBulbTemperature.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...entered value=\"{}\".", fieldValue)); + ShowSevereError(state, std::format("{}{}=\"{}\", invalid", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} must be DryBulbTemperature or WetBulbTemperature.", cFieldName)); + ShowContinueError(state, std::format("...entered value=\"{}\".", fieldValue)); ErrorsFound = true; } @@ -2285,30 +2246,29 @@ namespace VariableSpeedCoils { } else { CurveVal = Curve::CurveValue(state, varSpeedCoil.PLFFPLR, 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError(state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } for (int I = 1; I <= varSpeedCoil.NumOfSpeeds; ++I) { std::string jfieldName; - jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_rated_water_heating_capacity"); + jfieldName = std::format("speed_{}{}", std::to_string(I), "_rated_water_heating_capacity"); varSpeedCoil.MSRatedTotCap(I) = s_ip->getRealFieldValue(fields, schemaProps, jfieldName); - jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_rated_water_heating_cop"); + jfieldName = std::format("speed_{}{}", std::to_string(I), "_rated_water_heating_cop"); varSpeedCoil.MSRatedCOP(I) = s_ip->getRealFieldValue(fields, schemaProps, jfieldName); - jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_rated_sensible_heat_ratio"); + jfieldName = std::format("speed_{}{}", std::to_string(I), "_rated_sensible_heat_ratio"); varSpeedCoil.MSRatedSHR(I) = s_ip->getRealFieldValue(fields, schemaProps, jfieldName); - jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); + jfieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_air_flow_rate"); varSpeedCoil.MSRatedAirVolFlowRate(I) = s_ip->getRealFieldValue(fields, schemaProps, jfieldName); - jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_water_flow_rate"); + jfieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_rated_water_flow_rate"); varSpeedCoil.MSRatedWaterVolFlowRate(I) = s_ip->getRealFieldValue(fields, schemaProps, jfieldName); - jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_reference_unit_water_pump_input_power_at_rated_conditions"); + jfieldName = std::format("speed_{}{}", std::to_string(I), "_reference_unit_water_pump_input_power_at_rated_conditions"); varSpeedCoil.MSWHPumpPower(I) = s_ip->getRealFieldValue(fields, schemaProps, jfieldName); - cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Total WH Capacity Function of Temperature Curve Name"); - jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_total_wh_capacity_function_of_temperature_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " Total WH Capacity Function of Temperature Curve Name"); + jfieldName = std::format("speed_{}{}", std::to_string(I), "_total_wh_capacity_function_of_temperature_curve_name"); fieldValue = s_ip->getAlphaFieldValue(fields, schemaProps, jfieldName); if (fieldValue.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -2329,17 +2289,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapFTemp(I), WHInletAirTemp, WHInletWaterTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Total WH Capacity Function of Air Flow Fraction Curve Name"); - jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_total_wh_capacity_function_of_air_flow_fraction_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " Total WH Capacity Function of Air Flow Fraction Curve Name"); + jfieldName = std::format("speed_{}{}", std::to_string(I), "_total_wh_capacity_function_of_air_flow_fraction_curve_name"); fieldValue = s_ip->getAlphaFieldValue(fields, schemaProps, jfieldName); if (fieldValue.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -2360,17 +2320,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " Total WH Capacity Function of Water Flow Fraction Curve Name"); - jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_total_wh_capacity_function_of_water_flow_fraction_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " Total WH Capacity Function of Water Flow Fraction Curve Name"); + jfieldName = std::format("speed_{}{}", std::to_string(I), "_total_wh_capacity_function_of_water_flow_fraction_curve_name"); fieldValue = s_ip->getAlphaFieldValue(fields, schemaProps, jfieldName); if (fieldValue.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -2391,17 +2351,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSCCapWaterFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " COP Function of Temperature Curve Name"); - jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_cop_function_of_temperature_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " COP Function of Temperature Curve Name"); + jfieldName = std::format("speed_{}{}", std::to_string(I), "_cop_function_of_temperature_curve_name"); fieldValue = s_ip->getAlphaFieldValue(fields, schemaProps, jfieldName); if (fieldValue.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -2422,17 +2382,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRFTemp(I), WHInletAirTemp, WHInletWaterTemp); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " COP Function of Air Flow Fraction Curve Name"); - jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_cop_function_of_air_flow_fraction_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " COP Function of Air Flow Fraction Curve Name"); + jfieldName = std::format("speed_{}{}", std::to_string(I), "_cop_function_of_air_flow_fraction_curve_name"); fieldValue = s_ip->getAlphaFieldValue(fields, schemaProps, jfieldName); if (fieldValue.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -2453,17 +2413,17 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRAirFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } - cFieldName = EnergyPlus::format("Speed_{}{}", std::to_string(I), " COP Function of Water Flow Fraction Curve Name"); - jfieldName = EnergyPlus::format("speed_{}{}", std::to_string(I), "_cop_function_of_water_flow_fraction_curve_name"); + cFieldName = std::format("Speed_{}{}", std::to_string(I), " COP Function of Water Flow Fraction Curve Name"); + jfieldName = std::format("speed_{}{}", std::to_string(I), "_cop_function_of_water_flow_fraction_curve_name"); fieldValue = s_ip->getAlphaFieldValue(fields, schemaProps, jfieldName); if (fieldValue.empty()) { ShowWarningEmptyField(state, eoh, cFieldName, "Required field is blank."); @@ -2484,11 +2444,11 @@ namespace VariableSpeedCoils { if (!ErrorsFound) { CurveVal = Curve::CurveValue(state, varSpeedCoil.MSEIRWaterFFlow(I), 1.0); if (CurveVal > 1.10 || CurveVal < 0.90) { - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); - ShowContinueError(state, EnergyPlus::format("...Curve output at rated conditions = {:.3T}", CurveVal)); + ShowWarningError(state, + std::format("{}{}=\"{}\", curve values", RoutineName, CurrentModuleObject, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...{} output is not equal to 1.0 (+ or - 10%) at rated conditions.", cFieldName)); + ShowContinueError(state, std::format("...Curve output at rated conditions = {:.3f}", CurveVal)); } } } @@ -2564,7 +2524,7 @@ namespace VariableSpeedCoils { } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found getting input. Program terminates.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found getting input. Program terminates.", RoutineName)); } for (DXCoilNum = 1; DXCoilNum <= state.dataVariableSpeedCoils->NumVarSpeedCoils; ++DXCoilNum) { @@ -3330,9 +3290,9 @@ namespace VariableSpeedCoils { } if (ErrorsFound) { - ShowFatalError(state, - EnergyPlus::format( - "{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); + ShowFatalError( + state, + std::format("{}Errors found in getting {} input. Preceding condition(s) causes termination.", RoutineName, CurrentModuleObject)); } } @@ -3401,7 +3361,7 @@ namespace VariableSpeedCoils { ErrorsFound = false; SizeVarSpeedCoil(state, DXCoilNum, ErrorsFound); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}: Failed to size variable speed coil.", RoutineName)); + ShowFatalError(state, std::format("{}: Failed to size variable speed coil.", RoutineName)); } // get rated coil bypass factor excluding fan heat @@ -3487,7 +3447,7 @@ namespace VariableSpeedCoils { ErrorsFound = false; SizeVarSpeedCoil(state, DXCoilNum, ErrorsFound); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}: Failed to size variable speed coil.", RoutineName)); + ShowFatalError(state, std::format("{}: Failed to size variable speed coil.", RoutineName)); } state.dataVariableSpeedCoils->MySizeFlag(DXCoilNum) = false; @@ -3503,14 +3463,14 @@ namespace VariableSpeedCoils { if (varSpeedCoil.MSRatedTotCap(Mode) <= 0.0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "Sizing: {} {} has zero rated total capacity at speed {}", varSpeedCoil.VarSpeedCoilType, varSpeedCoil.Name, Mode)); ErrorsFound = true; } if (varSpeedCoil.MSRatedAirVolFlowRate(Mode) <= 0.0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "Sizing: {} {} has zero rated air flow rate at speed {}", varSpeedCoil.VarSpeedCoilType, varSpeedCoil.Name, Mode)); ErrorsFound = true; } @@ -4031,13 +3991,13 @@ namespace VariableSpeedCoils { HardSizeNoDesRunAirFlow = true; if (varSpeedCoil.RatedAirVolFlowRate > 0.0) { BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "User-Specified Rated Air Flow Rate [m3/s]", varSpeedCoil.RatedAirVolFlowRate); } } else { - CheckSysSizing(state, EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name); + CheckSysSizing(state, std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name); if (state.dataSize->CurOASysNum > 0 && state.dataAirLoop->OutsideAirSys(state.dataSize->CurOASysNum).AirLoopDOASNum > -1) { auto const &thisAirloopDOAS = state.dataAirLoopHVACDOAS->airloopDOAS[state.dataAirLoop->OutsideAirSys(state.dataSize->CurOASysNum).AirLoopDOASNum]; @@ -4057,13 +4017,13 @@ namespace VariableSpeedCoils { HardSizeNoDesRunAirFlow = true; if (varSpeedCoil.RatedAirVolFlowRate > 0.0) { BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "User-Specified Rated Air Flow Rate [m3/s]", varSpeedCoil.RatedAirVolFlowRate); } } else { - CheckZoneSizing(state, EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name); + CheckZoneSizing(state, std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name); RatedAirVolFlowRateDes = max(state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum).DesCoolVolFlow, state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum).DesHeatVolFlow); if (RatedAirVolFlowRateDes < HVAC::SmallAirVolFlow) { @@ -4093,13 +4053,13 @@ namespace VariableSpeedCoils { HardSizeNoDesRun = true; if (varSpeedCoil.RatedCapCoolTotal > 0.0) { BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "User-Specified Rated Total Cooling Capacity [W]", varSpeedCoil.RatedCapCoolTotal); } } else { - CheckSysSizing(state, EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name); + CheckSysSizing(state, std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name); if (state.dataSize->CurOASysNum > 0 && state.dataAirLoop->OutsideAirSys(state.dataSize->CurOASysNum).AirLoopDOASNum > -1) { auto const &thisAirloopDOAS = state.dataAirLoopHVACDOAS->airloopDOAS[state.dataAirLoop->OutsideAirSys(state.dataSize->CurOASysNum).AirLoopDOASNum]; @@ -4174,7 +4134,7 @@ namespace VariableSpeedCoils { if (CoolCapAtPeak < 0) { // This conditional will also catch the initialization value, -999.0 ShowWarningError( state, - EnergyPlus::format( + std::format( "In calculating capacity for coil {} on design day {}, the air state would yield negative coil capacity sizing.", varSpeedCoil.Name, state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).CoolDesDay)); @@ -4207,13 +4167,13 @@ namespace VariableSpeedCoils { HardSizeNoDesRun = true; if (varSpeedCoil.RatedCapCoolTotal > 0.0) { BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "User-Specified Rated Total Cooling Capacity [W]", varSpeedCoil.RatedCapCoolTotal); } } else { - CheckZoneSizing(state, EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name); + CheckZoneSizing(state, std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name); auto const &finalZoneSizing = state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum); VolFlowRate = varSpeedCoil.RatedAirVolFlowRate; if (VolFlowRate >= HVAC::SmallAirVolFlow) { @@ -4290,7 +4250,7 @@ namespace VariableSpeedCoils { if (RatedCapCoolTotalAutoSized) { varSpeedCoil.RatedCapCoolTotal = RatedCapCoolTotalDes; BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Total Cooling Capacity [W]", varSpeedCoil.RatedCapCoolTotal); @@ -4319,7 +4279,7 @@ namespace VariableSpeedCoils { if (varSpeedCoil.RatedCapCoolTotal > 0.0 && RatedCapCoolTotalDes > 0.0) { RatedCapCoolTotalUser = varSpeedCoil.RatedCapCoolTotal; BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Total Cooling Capacity [W]", RatedCapCoolTotalDes, @@ -4329,10 +4289,10 @@ namespace VariableSpeedCoils { if ((std::abs(RatedCapCoolTotalDes - RatedCapCoolTotalUser) / RatedCapCoolTotalUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", - varSpeedCoil.CoolHeatType, - CurrentObjSubfix)); - ShowContinueError(state, EnergyPlus::format("Coil Name = {}", varSpeedCoil.Name)); + std::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", + varSpeedCoil.CoolHeatType, + CurrentObjSubfix)); + ShowContinueError(state, std::format("Coil Name = {}", varSpeedCoil.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Rated Total Cooling Capacity of {:.2R} [W]", RatedCapCoolTotalUser)); ShowContinueError( @@ -4399,12 +4359,11 @@ namespace VariableSpeedCoils { // END IF if (RatedCapHeatAutoSized) { if (RatedCapHeatDes == DataSizing::AutoSize) { - ShowWarningError(state, - EnergyPlus::format( - "COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); - ShowContinueError( + ShowWarningError( state, - EnergyPlus::format("{}: Heating coil could not be autosized since cooling coil was not previously sized.", RoutineName)); + std::format("COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); + ShowContinueError( + state, std::format("{}: Heating coil could not be autosized since cooling coil was not previously sized.", RoutineName)); ShowContinueError(state, "... Cooling coil must be upstream of heating coil."); ShowContinueError(state, "... Manually sizing this heating coil will be required."); } @@ -4427,7 +4386,7 @@ namespace VariableSpeedCoils { if (RatedCapHeatAutoSized) { varSpeedCoil.RatedCapHeat = RatedCapHeatDes; BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Nominal Heating Capacity [W]", RatedCapHeatDes); @@ -4447,7 +4406,7 @@ namespace VariableSpeedCoils { if (varSpeedCoil.RatedCapHeat > 0.0 && RatedCapHeatDes > 0.0) { RatedCapHeatUser = varSpeedCoil.RatedCapHeat; BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Nominal Heating Capacity [W]", RatedCapHeatDes, @@ -4456,10 +4415,10 @@ namespace VariableSpeedCoils { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(RatedCapHeatDes - RatedCapHeatUser) / RatedCapHeatUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", - varSpeedCoil.CoolHeatType, - CurrentObjSubfix)); - ShowContinueError(state, EnergyPlus::format("Coil Name = {}", varSpeedCoil.Name)); + std::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", + varSpeedCoil.CoolHeatType, + CurrentObjSubfix)); + ShowContinueError(state, std::format("Coil Name = {}", varSpeedCoil.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Rated Total Heating Capacity of {:.2R} [W]", RatedCapHeatUser)); ShowContinueError(state, EnergyPlus::format("differs from Design Size Rated Total Heating Capacity of {:.2R} [W]", RatedCapHeatDes)); @@ -4482,7 +4441,7 @@ namespace VariableSpeedCoils { if (RatedAirFlowAutoSized) { varSpeedCoil.RatedAirVolFlowRate = RatedAirVolFlowRateDes; BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Air Flow Rate [m3/s]", RatedAirVolFlowRateDes); @@ -4490,7 +4449,7 @@ namespace VariableSpeedCoils { if (varSpeedCoil.RatedAirVolFlowRate > 0.0 && RatedAirVolFlowRateDes > 0.0) { RatedAirVolFlowRateUser = varSpeedCoil.RatedAirVolFlowRate; BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Air Flow Rate [m3/s]", RatedAirVolFlowRateDes, @@ -4500,10 +4459,10 @@ namespace VariableSpeedCoils { if ((std::abs(RatedAirVolFlowRateDes - RatedAirVolFlowRateUser) / RatedAirVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", - varSpeedCoil.CoolHeatType, - CurrentObjSubfix)); - ShowContinueError(state, EnergyPlus::format("Coil Name = {}", varSpeedCoil.Name)); + std::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", + varSpeedCoil.CoolHeatType, + CurrentObjSubfix)); + ShowContinueError(state, std::format("Coil Name = {}", varSpeedCoil.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Rated Air Flow Rate of {:.5R} [m3/s]", RatedAirVolFlowRateUser)); ShowContinueError( @@ -4529,20 +4488,19 @@ namespace VariableSpeedCoils { state.dataVariableSpeedCoils->VarSpeedCoil(varSpeedCoil.CompanionCoolingCoilNum).RatedCapCoolTotal > 0.2) { - ShowWarningError(state, - EnergyPlus::format( - "COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); - ShowContinueError( + ShowWarningError( state, - EnergyPlus::format("...used with COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", - state.dataVariableSpeedCoils->VarSpeedCoil(varSpeedCoil.CompanionCoolingCoilNum).CoolHeatType, - state.dataVariableSpeedCoils->VarSpeedCoil(varSpeedCoil.CompanionCoolingCoilNum).Name)); + std::format("COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("...used with COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", + state.dataVariableSpeedCoils->VarSpeedCoil(varSpeedCoil.CompanionCoolingCoilNum).CoolHeatType, + state.dataVariableSpeedCoils->VarSpeedCoil(varSpeedCoil.CompanionCoolingCoilNum).Name)); ShowContinueError(state, "...heating capacity is disproportionate (> 20% different) to total cooling capacity"); - ShowContinueError(state, EnergyPlus::format("...heating capacity = {:.3T} W", varSpeedCoil.RatedCapHeat)); + ShowContinueError(state, std::format("...heating capacity = {:.3f} W", varSpeedCoil.RatedCapHeat)); ShowContinueError( state, - EnergyPlus::format("...cooling capacity = {:.3T} W", - state.dataVariableSpeedCoils->VarSpeedCoil(varSpeedCoil.CompanionCoolingCoilNum).RatedCapCoolTotal)); + std::format("...cooling capacity = {:.3f} W", + state.dataVariableSpeedCoils->VarSpeedCoil(varSpeedCoil.CompanionCoolingCoilNum).RatedCapCoolTotal)); } } } @@ -4583,11 +4541,11 @@ namespace VariableSpeedCoils { varSpeedCoil.coilType == HVAC::CoilType::CoolingDXVariableSpeed) { if (state.dataUnitarySystems->designSpecMSHP[varSpeedCoil.MSHPDesignSpecIndex].numOfSpeedCooling != varSpeedCoil.NumOfSpeeds) { ShowFatalError(state, - EnergyPlus::format("COIL:{} = {}{} number of speeds not equal to number of speed specified in " - "UnitarySystemPerformance:Multispeed object.", - varSpeedCoil.CoolHeatType, - CurrentObjSubfix, - varSpeedCoil.Name)); + std::format("COIL:{} = {}{} number of speeds not equal to number of speed specified in " + "UnitarySystemPerformance:Multispeed object.", + varSpeedCoil.CoolHeatType, + CurrentObjSubfix, + varSpeedCoil.Name)); } else { for (Mode = varSpeedCoil.NumOfSpeeds; Mode >= 1; --Mode) { varSpeedCoil.MSRatedAirVolFlowRate(Mode) = @@ -4605,11 +4563,11 @@ namespace VariableSpeedCoils { varSpeedCoil.coilType == HVAC::CoilType::HeatingDXVariableSpeed) { if (state.dataUnitarySystems->designSpecMSHP[varSpeedCoil.MSHPDesignSpecIndex].numOfSpeedHeating != varSpeedCoil.NumOfSpeeds) { ShowFatalError(state, - EnergyPlus::format("COIL:{}{} = \"{}\" number of speeds not equal to number of speed specified in " - "UnitarySystemPerformance:Multispeed object.", - varSpeedCoil.CoolHeatType, - CurrentObjSubfix, - varSpeedCoil.Name)); + std::format("COIL:{}{} = \"{}\" number of speeds not equal to number of speed specified in " + "UnitarySystemPerformance:Multispeed object.", + varSpeedCoil.CoolHeatType, + CurrentObjSubfix, + varSpeedCoil.Name)); } else { for (Mode = varSpeedCoil.NumOfSpeeds; Mode >= 1; --Mode) { varSpeedCoil.MSRatedAirVolFlowRate(Mode) = @@ -4669,7 +4627,7 @@ namespace VariableSpeedCoils { if (RatedWaterFlowAutoSized) { if (varSpeedCoil.CondenserType == DataHeatBalance::RefrigCondenserType::Water) { PltSizNum = PlantUtilities::MyPlantSizingIndex(state, - EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, varSpeedCoil.WaterInletNodeNum, varSpeedCoil.WaterOutletNodeNum, @@ -4721,8 +4679,8 @@ namespace VariableSpeedCoils { } else { ShowSevereError(state, "Autosizing of water flow requires a loop Sizing:Plant object"); ShowContinueError(state, "Autosizing also requires physical connection to a plant or condenser loop."); - ShowContinueError( - state, EnergyPlus::format("Occurs in COIL:{}{} Object = {}", varSpeedCoil.CoolHeatType, CurrentObjSubfix, varSpeedCoil.Name)); + ShowContinueError(state, + std::format("Occurs in COIL:{}{} Object = {}", varSpeedCoil.CoolHeatType, CurrentObjSubfix, varSpeedCoil.Name)); ErrorsFound = true; } @@ -4742,7 +4700,7 @@ namespace VariableSpeedCoils { varSpeedCoil.plantLoc.loopNum); varSpeedCoil.RatedWaterVolFlowRate = RatedWaterVolFlowRateDes; BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Water Flow Rate [m3/s]", RatedWaterVolFlowRateDes); @@ -4752,12 +4710,11 @@ namespace VariableSpeedCoils { if (varSpeedCoil.MSRatedWaterVolFlowRate(Mode) > varSpeedCoil.MSRatedWaterVolFlowRate(Mode + 1) * 1.05) { ShowWarningError( state, - EnergyPlus::format( - "SizeDXCoil: {} {}, Speed {} Rated Air Flow Rate must be less than or equal to Speed {} Rated Air Flow Rate.", - varSpeedCoil.VarSpeedCoilType, - varSpeedCoil.Name, - Mode, - Mode + 1)); + std::format("SizeDXCoil: {} {}, Speed {} Rated Air Flow Rate must be less than or equal to Speed {} Rated Air Flow Rate.", + varSpeedCoil.VarSpeedCoilType, + varSpeedCoil.Name, + Mode, + Mode + 1)); ShowContinueError(state, EnergyPlus::format("Instead, {:.2R} > {:.2R}", varSpeedCoil.MSRatedAirVolFlowRate(Mode), @@ -4769,7 +4726,7 @@ namespace VariableSpeedCoils { if (varSpeedCoil.RatedWaterVolFlowRate > 0.0 && RatedWaterVolFlowRateDes > 0.0) { RatedWaterVolFlowRateUser = varSpeedCoil.RatedWaterVolFlowRate; BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Water Flow Rate [m3/s]", RatedWaterVolFlowRateDes, @@ -4779,10 +4736,10 @@ namespace VariableSpeedCoils { if ((std::abs(RatedWaterVolFlowRateDes - RatedWaterVolFlowRateUser) / RatedWaterVolFlowRateUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", - varSpeedCoil.CoolHeatType, - CurrentObjSubfix)); - ShowContinueError(state, EnergyPlus::format("Coil Name = {}", varSpeedCoil.Name)); + std::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", + varSpeedCoil.CoolHeatType, + CurrentObjSubfix)); + ShowContinueError(state, std::format("Coil Name = {}", varSpeedCoil.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Rated Water Flow Rate of {:.5R} [m3/s]", RatedWaterVolFlowRateUser)); ShowContinueError( @@ -4834,11 +4791,11 @@ namespace VariableSpeedCoils { if (varSpeedCoil.MSRatedAirVolFlowRate(Mode) > varSpeedCoil.MSRatedAirVolFlowRate(Mode + 1)) { ShowWarningError( state, - EnergyPlus::format("SizeDXCoil: {} {}, Speed {} Rated Air Flow Rate must be less than or equal to Speed {} Rated Air Flow Rate.", - varSpeedCoil.VarSpeedCoilType, - varSpeedCoil.Name, - Mode, - Mode + 1)); + std::format("SizeDXCoil: {} {}, Speed {} Rated Air Flow Rate must be less than or equal to Speed {} Rated Air Flow Rate.", + varSpeedCoil.VarSpeedCoilType, + varSpeedCoil.Name, + Mode, + Mode + 1)); ShowContinueError(state, EnergyPlus::format("Instead, {:.2R} > {:.2R}", varSpeedCoil.MSRatedAirVolFlowRate(Mode), @@ -4852,12 +4809,12 @@ namespace VariableSpeedCoils { if (varSpeedCoil.MSRatedTotCap(Mode) > varSpeedCoil.MSRatedTotCap(Mode + 1)) { ShowWarningError( state, - EnergyPlus::format("SizeDXCoil: {} {}, Speed {} Rated Total Cooling Capacity must be less than or equal to Speed {} Rated Total " - "Cooling Capacity.", - varSpeedCoil.VarSpeedCoilType, - varSpeedCoil.Name, - Mode, - Mode + 1)); + std::format("SizeDXCoil: {} {}, Speed {} Rated Total Cooling Capacity must be less than or equal to Speed {} Rated Total " + "Cooling Capacity.", + varSpeedCoil.VarSpeedCoilType, + varSpeedCoil.Name, + Mode, + Mode + 1)); ShowContinueError( state, EnergyPlus::format("Instead, {:.2R} > {:.2R}", varSpeedCoil.MSRatedTotCap(Mode), varSpeedCoil.MSRatedTotCap(Mode + 1))); ShowFatalError(state, "Preceding conditions cause termination."); @@ -5001,7 +4958,7 @@ namespace VariableSpeedCoils { if (RatedCapCoolTotalAutoSized) { varSpeedCoil.RatedCapCoolSens = RatedCapCoolSensDes; BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Sensible Cooling Capacity [W]", varSpeedCoil.RatedCapCoolSens); @@ -5011,7 +4968,7 @@ namespace VariableSpeedCoils { if (RatedCapCoolSensDes > 0.0) { varSpeedCoil.RatedCapCoolSens = RatedCapCoolSensDes; BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), + std::format("COIL:{}{}", varSpeedCoil.CoolHeatType, CurrentObjSubfix), varSpeedCoil.Name, "Design Size Rated Sensible Cooling Capacity [W]", RatedCapCoolSensDes); //, & @@ -5070,10 +5027,10 @@ namespace VariableSpeedCoils { if ((std::abs(EvapCondPumpElecNomPowerDes - EvapCondPumpElecNomPowerUser) / EvapCondPumpElecNomPowerUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", - varSpeedCoil.CoolHeatType, - CurrentObjSubfix)); - ShowContinueError(state, EnergyPlus::format("Coil Name = {}", varSpeedCoil.Name)); + std::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", + varSpeedCoil.CoolHeatType, + CurrentObjSubfix)); + ShowContinueError(state, std::format("Coil Name = {}", varSpeedCoil.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Evaporative Condenser Pump Rated Power Consumption of {:.2R} [W]", EvapCondPumpElecNomPowerUser)); @@ -5120,10 +5077,10 @@ namespace VariableSpeedCoils { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(DefrostCapacityDes - DefrostCapacityUser) / DefrostCapacityUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage(state, - EnergyPlus::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", - varSpeedCoil.CoolHeatType, - CurrentObjSubfix)); - ShowContinueError(state, EnergyPlus::format("Coil Name = {}", varSpeedCoil.Name)); + std::format("SizeVarSpeedCoil: Potential issue with equipment sizing for {} {}", + varSpeedCoil.CoolHeatType, + CurrentObjSubfix)); + ShowContinueError(state, std::format("Coil Name = {}", varSpeedCoil.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Resistive Defrost Heater Capacity of {:.2R} [W]", DefrostCapacityUser)); ShowContinueError( @@ -5142,25 +5099,24 @@ namespace VariableSpeedCoils { if (RatedCapCoolSensAutoSized && RatedCapCoolTotalAutoSized) { if (varSpeedCoil.RatedCapCoolSens > varSpeedCoil.RatedCapCoolTotal) { ShowWarningError( - state, - EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); - ShowContinueError(state, EnergyPlus::format("{}: Rated Sensible Cooling Capacity > Rated Total Cooling Capacity", RoutineName)); + state, std::format("COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); + ShowContinueError(state, std::format("{}: Rated Sensible Cooling Capacity > Rated Total Cooling Capacity", RoutineName)); ShowContinueError(state, "Each of these capacity inputs have been autosized."); - ShowContinueError(state, EnergyPlus::format("Rated Sensible Cooling Capacity = {:.2T} W", varSpeedCoil.RatedCapCoolSens)); - ShowContinueError(state, EnergyPlus::format("Rated Total Cooling Capacity = {:.2T} W", varSpeedCoil.RatedCapCoolTotal)); + ShowContinueError(state, std::format("Rated Sensible Cooling Capacity = {:.2f} W", varSpeedCoil.RatedCapCoolSens)); + ShowContinueError(state, std::format("Rated Total Cooling Capacity = {:.2f} W", varSpeedCoil.RatedCapCoolTotal)); ShowContinueError(state, "See eio file for further details."); ShowContinueError(state, "Check Total and Sensible Cooling Capacity Coefficients to ensure they are accurate."); ShowContinueError(state, "Check Zone and System Sizing objects to verify sizing inputs."); ShowContinueError(state, "Sizing statistics:"); - ShowContinueError(state, EnergyPlus::format("Entering Air Dry-Bulb Temperature = {:.3T} C", MixTemp)); - ShowContinueError(state, EnergyPlus::format("Entering Air Wet-Bulb Temperature = {:.3T} C", MixWetBulb)); + ShowContinueError(state, std::format("Entering Air Dry-Bulb Temperature = {:.3f} C", MixTemp)); + ShowContinueError(state, std::format("Entering Air Wet-Bulb Temperature = {:.3f} C", MixWetBulb)); ShowContinueError(state, "Entering Condenser Water Temperature used = 24.4444 C"); ShowContinueError(state, "Used design air and water flow rates (i.e., used 1 for ratioVL and ratioVS)"); - ShowContinueError(state, EnergyPlus::format("ratioTDB = {:.3T}", ((MixTemp + 283.15) / 273.15))); - ShowContinueError(state, EnergyPlus::format("ratioTWB = {:.3T}", ((MixWetBulb + 283.15) / 273.15))); - ShowContinueError(state, EnergyPlus::format("ratioTS = {:.3T}", ((85.0 + 283.15) / 273.15))); + ShowContinueError(state, std::format("ratioTDB = {:.3f}", ((MixTemp + 283.15) / 273.15))); + ShowContinueError(state, std::format("ratioTWB = {:.3f}", ((MixWetBulb + 283.15) / 273.15))); + ShowContinueError(state, std::format("ratioTS = {:.3f}", ((85.0 + 283.15) / 273.15))); ShowContinueError(state, "Rated Sensible Cooling Capacity = Rated Total Cooling Capacity * Sensible Heat Ratio"); - ShowContinueError(state, EnergyPlus::format("Total Cooling Capacity Modifier = {:.5T}", TotCapTempModFac)); + ShowContinueError(state, std::format("Total Cooling Capacity Modifier = {:.5f}", TotCapTempModFac)); ShowContinueError(state, "...Rated Total Cooling Capacity = Total Design Load / Total Cooling Capacity Modifier"); ShowContinueError(state, "Carefully review the Load Side Total, Sensible, and Latent heat transfer rates"); ShowContinueError(state, "... to ensure they meet the expected manufacturers performance specifications."); @@ -5168,21 +5124,20 @@ namespace VariableSpeedCoils { } else if (RatedCapCoolTotalAutoSized) { if (varSpeedCoil.RatedCapCoolSens > varSpeedCoil.RatedCapCoolTotal) { ShowWarningError( - state, - EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); - ShowContinueError(state, EnergyPlus::format("{}: Rated Sensible Cooling Capacity > Rated Total Cooling Capacity", RoutineName)); + state, std::format("COIL:{}:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT \"{}\"", varSpeedCoil.CoolHeatType, varSpeedCoil.Name)); + ShowContinueError(state, std::format("{}: Rated Sensible Cooling Capacity > Rated Total Cooling Capacity", RoutineName)); ShowContinueError(state, "Only the rated total capacity input is autosized, consider autosizing both inputs."); - ShowContinueError(state, EnergyPlus::format("Rated Sensible Cooling Capacity = {:.2T} W", varSpeedCoil.RatedCapCoolSens)); - ShowContinueError(state, EnergyPlus::format("Rated Total Cooling Capacity = {:.2T} W", varSpeedCoil.RatedCapCoolTotal)); + ShowContinueError(state, std::format("Rated Sensible Cooling Capacity = {:.2f} W", varSpeedCoil.RatedCapCoolSens)); + ShowContinueError(state, std::format("Rated Total Cooling Capacity = {:.2f} W", varSpeedCoil.RatedCapCoolTotal)); ShowContinueError(state, "See eio file for further details."); ShowContinueError(state, "Check Total and Sensible Cooling Capacity Coefficients to ensure they are accurate."); ShowContinueError(state, "Check Zone and System Sizing objects to verify sizing inputs."); ShowContinueError(state, "Sizing statistics for Total Cooling Capacity:"); - ShowContinueError(state, EnergyPlus::format("Entering Air Wet-Bulb Temperature = {:.3T} C", MixWetBulb)); + ShowContinueError(state, std::format("Entering Air Wet-Bulb Temperature = {:.3f} C", MixWetBulb)); ShowContinueError(state, "Entering Condenser Water Temperature used = 24.4444 C"); ShowContinueError(state, "Used design air and water flow rates (i.e., used 1 for ratioVL and ratioVS)"); - ShowContinueError(state, EnergyPlus::format("ratioTWB = {:.3T}", ((MixWetBulb + 283.15) / 273.15))); - ShowContinueError(state, EnergyPlus::format("ratioTS = {:.3T}", ((85.0 + 283.15) / 273.15))); + ShowContinueError(state, std::format("ratioTWB = {:.3f}", ((MixWetBulb + 283.15) / 273.15))); + ShowContinueError(state, std::format("ratioTS = {:.3f}", ((85.0 + 283.15) / 273.15))); ShowContinueError(state, "Rated Sensible Cooling Capacity = Rated Total Cooling Capacity * Sensible Heat Ratio"); ShowContinueError(state, "Carefully review the Load Side Total, Sensible, and Latent heat transfer rates"); ShowContinueError(state, "... to ensure they meet the expected manufacturers performance specifications."); @@ -6810,9 +6765,9 @@ namespace VariableSpeedCoils { varSpeedCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { ShowWarningMessage( state, - EnergyPlus::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " - "actuator must be both provided for DX heating coil {}", - varSpeedCoil.Name)); + std::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " + "actuator must be both provided for DX heating coil {}", + varSpeedCoil.Name)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -6828,9 +6783,9 @@ namespace VariableSpeedCoils { if (varSpeedCoil.FrostHeatingCapacityMultiplierEMSOverrideOn || varSpeedCoil.FrostHeatingInputPowerMultiplierEMSOverrideOn) { ShowWarningMessage( state, - EnergyPlus::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " - "actuator must be both provided for DX heating coil {}", - varSpeedCoil.Name)); + std::format("The Frost Heating Capacity Multiplier actuator and the Frost Heating Input Power Multiplier " + "actuator must be both provided for DX heating coil {}", + varSpeedCoil.Name)); ShowContinueError(state, "EMS actuators are ignored. Simulation is continuing."); } } @@ -7007,8 +6962,7 @@ namespace VariableSpeedCoils { } if (WhichCoil == 0) { - ShowSevereError(state, - EnergyPlus::format("GetCoilCapacityVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilCapacityVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; CoilCapacity = -1000.0; } @@ -7043,8 +6997,7 @@ namespace VariableSpeedCoils { IndexNum = Util::FindItemInList(CoilName, state.dataVariableSpeedCoils->VarSpeedCoil); if (IndexNum == 0) { - ShowSevereError(state, - EnergyPlus::format("GetCoilIndexVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilIndexVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } @@ -7099,8 +7052,8 @@ namespace VariableSpeedCoils { } if (WhichCoil == 0) { - ShowSevereError( - state, EnergyPlus::format("GetCoilAirFlowRateVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, + std::format("GetCoilAirFlowRateVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; CoilAirFlowRate = -1000.0; } @@ -7141,7 +7094,7 @@ namespace VariableSpeedCoils { } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format("GetVSCoilPLFFPLR: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetVSCoilPLFFPLR: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; PLRNumber = 0; } @@ -7217,8 +7170,7 @@ namespace VariableSpeedCoils { } if (WhichCoil == 0) { - ShowSevereError(state, - EnergyPlus::format("GetCoilInletNodeVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilInletNodeVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -7259,8 +7211,8 @@ namespace VariableSpeedCoils { } if (WhichCoil == 0) { - ShowSevereError( - state, EnergyPlus::format("GetCoilOutletNodeVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, + std::format("GetCoilOutletNodeVariableSpeed: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -7298,7 +7250,7 @@ namespace VariableSpeedCoils { if (WhichCoil != 0) { CondNode = state.dataVariableSpeedCoils->VarSpeedCoil(WhichCoil).CondenserInletNodeNum; } else { - ShowSevereError(state, EnergyPlus::format("GetCoilCondenserInletNode: Invalid VS DX Coil, Type= VS DX Cooling Name=\"{}\"", CoilName)); + ShowSevereError(state, std::format("GetCoilCondenserInletNode: Invalid VS DX Coil, Type= VS DX Cooling Name=\"{}\"", CoilName)); ErrorsFound = true; CondNode = 0; } @@ -7381,9 +7333,9 @@ namespace VariableSpeedCoils { } else { // ErrorFound, Coil:Heating:DX:VariableSpeed is used in wrong type of parent object (should never get here) ShowSevereError(state, - EnergyPlus::format("Configuration error in {} \"{}\"", - Node::ConnectionObjectTypeNames[static_cast(CompSetsParentType)], - CompSetsParentName)); + std::format("Configuration error in {} \"{}\"", + Node::ConnectionObjectTypeNames[static_cast(CompSetsParentType)], + CompSetsParentName)); ShowContinueError(state, "DX heating coil not allowed in this configuration."); ShowFatalError(state, "Preceding condition(s) causes termination."); } @@ -7398,13 +7350,12 @@ namespace VariableSpeedCoils { if (thisDXCoolingCoil.CrankcaseHeaterCapacity != thisDXHeatingCoil.CrankcaseHeaterCapacity || thisDXCoolingCoil.MaxOATCrankcaseHeater != thisDXHeatingCoil.MaxOATCrankcaseHeater) { ShowWarningError(state, "Crankcase heater capacity or max outdoor temp for crankcase heater operation specified in"); - ShowContinueError(state, EnergyPlus::format("{} = {}", thisDXCoolingCoil.VarSpeedCoilType, thisDXCoolingCoil.Name)); - ShowContinueError(state, - EnergyPlus::format("is different than that specified in Coil:Heating:DX:SingleSpeed = {}.", HeatingCoilName)); + ShowContinueError(state, std::format("{} = {}", thisDXCoolingCoil.VarSpeedCoilType, thisDXCoolingCoil.Name)); + ShowContinueError(state, std::format("is different than that specified in Coil:Heating:DX:SingleSpeed = {}.", HeatingCoilName)); ShowContinueError(state, - EnergyPlus::format("Both of these DX coils are part of {}={}.", - Node::ConnectionObjectTypeNames[static_cast(CompSetsParentType)], - CompSetsParentName)); + std::format("Both of these DX coils are part of {}={}.", + Node::ConnectionObjectTypeNames[static_cast(CompSetsParentType)], + CompSetsParentName)); ShowContinueError(state, "The value specified in the DX heating coil will be used and the simulation continues..."); } } @@ -7444,7 +7395,7 @@ namespace VariableSpeedCoils { if (WhichCoil != 0) { state.dataVariableSpeedCoils->VarSpeedCoil(WhichCoil).FindCompanionUpStreamCoil = false; } else { - ShowSevereError(state, EnergyPlus::format("SetCoilSystemHeatingDXFlag: Could not find Coil, Type=\"{}\"Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("SetCoilSystemHeatingDXFlag: Could not find Coil, Type=\"{}\"Name=\"{}\"", CoilType, CoilName)); } } @@ -7475,7 +7426,7 @@ namespace VariableSpeedCoils { if (WhichCoil != 0) { Speeds = state.dataVariableSpeedCoils->VarSpeedCoil(WhichCoil).NumOfSpeeds; } else { - ShowSevereError(state, EnergyPlus::format("GetVSCoilNumOfSpeeds: Invalid VS DX Coil, Type= VS DX Coil Name=\"{}\"", CoilName)); + ShowSevereError(state, std::format("GetVSCoilNumOfSpeeds: Invalid VS DX Coil, Type= VS DX Coil Name=\"{}\"", CoilName)); ErrorsFound = true; Speeds = 0; } @@ -7533,9 +7484,9 @@ namespace VariableSpeedCoils { if (WSHPNum <= 0 || WSHPNum > state.dataVariableSpeedCoils->NumVarSpeedCoils) { ShowSevereError(state, - EnergyPlus::format("SetVarSpeedCoilData: called with VS WSHP Coil Number out of range={} should be >0 and <{}", - WSHPNum, - state.dataVariableSpeedCoils->NumVarSpeedCoils)); + std::format("SetVarSpeedCoilData: called with VS WSHP Coil Number out of range={} should be >0 and <{}", + WSHPNum, + state.dataVariableSpeedCoils->NumVarSpeedCoils)); ErrorsFound = true; return; } @@ -7979,7 +7930,7 @@ namespace VariableSpeedCoils { if (WhichCoil != 0) { state.dataVariableSpeedCoils->VarSpeedCoil(WhichCoil).AirLoopNum = AirLoopNum; } else { - ShowSevereError(state, EnergyPlus::format("SetVarSpeedDXCoilAirLoopNumber: Could not find Coil \"Name=\"{}\"", CoilName)); + ShowSevereError(state, std::format("SetVarSpeedDXCoilAirLoopNumber: Could not find Coil \"Name=\"{}\"", CoilName)); } } diff --git a/src/EnergyPlus/VentilatedSlab.cc b/src/EnergyPlus/VentilatedSlab.cc index 3d4d7edb3c8..507fb1a3240 100644 --- a/src/EnergyPlus/VentilatedSlab.cc +++ b/src/EnergyPlus/VentilatedSlab.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -570,7 +571,7 @@ namespace VentilatedSlab { if (ventSlab.controlType == ControlType::Invalid) { ShowSevereError( state, - EnergyPlus::format( + std::format( R"({}="{}" invalid {}="{}".)", CurrentModuleObject, ventSlab.Name, cAlphaFields(9), state.dataIPShortCut->cAlphaArgs(9))); ShowContinueError(state, "Control reset to ODB control."); ventSlab.controlType = ControlType::OutdoorDryBulbTemp; @@ -825,19 +826,19 @@ namespace VentilatedSlab { if (ventSlab.SysConfg == VentilatedSlabConfig::SlabOnly) { if (!lAlphaBlanks(20)) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\" {}=\"{}\" not needed - ignored.", - CurrentModuleObject, - ventSlab.Name, - cAlphaFields(20), - state.dataIPShortCut->cAlphaArgs(20))); + std::format("{}=\"{}\" {}=\"{}\" not needed - ignored.", + CurrentModuleObject, + ventSlab.Name, + cAlphaFields(20), + state.dataIPShortCut->cAlphaArgs(20))); ShowContinueError(state, "It is used for \"SlabAndZone\" only"); } } else if (ventSlab.SysConfg == VentilatedSlabConfig::SlabAndZone) { if (lAlphaBlanks(20)) { - ShowSevereError(state, - EnergyPlus::format( - "{}=\"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, ventSlab.Name, cAlphaFields(20))); + ShowSevereError( + state, + std::format("{}=\"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, ventSlab.Name, cAlphaFields(20))); ErrorsFound = true; } @@ -878,7 +879,7 @@ namespace VentilatedSlab { if (!IsValid) { ShowWarningError( state, - EnergyPlus::format( + std::format( "{}=\"{}\", Adding OutdoorAir:Node={}", CurrentModuleObject, ventSlab.Name, state.dataIPShortCut->cAlphaArgs(21))); } } @@ -904,9 +905,9 @@ namespace VentilatedSlab { if (ventSlab.fanType != HVAC::FanType::Constant && ventSlab.fanType != HVAC::FanType::SystemModel) { ShowSevereCustom(state, eoh, - EnergyPlus::format("Only fans of type Fan:ConstantVolume and Fan:SystemModel are supported. {} is of type {}", - ventSlab.FanName, - HVAC::fanTypeNames[(int)ventSlab.fanType])); + std::format("Only fans of type Fan:ConstantVolume and Fan:SystemModel are supported. {} is of type {}", + ventSlab.FanName, + HVAC::fanTypeNames[(int)ventSlab.fanType])); ErrorsFound = true; } } @@ -963,7 +964,7 @@ namespace VentilatedSlab { ventSlab.heatingCoilType = DataPlant::PlantEquipmentType::CoilSteamAirHeating; ventSlab.heatingCoil_fluid = Fluid::GetSteam(state); if (ventSlab.heatingCoil_fluid == nullptr) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}Steam Properties not found.", CurrentModuleObject, ventSlab.Name)); + ShowSevereError(state, std::format("{}=\"{}Steam Properties not found.", CurrentModuleObject, ventSlab.Name)); if (SteamMessageNeeded) { ShowContinueError(state, "Steam Fluid Properties should have been included in the input file."); } @@ -987,13 +988,13 @@ namespace VentilatedSlab { ValidateComponent(state, state.dataIPShortCut->cAlphaArgs(27), ventSlab.heatingCoilName, IsNotOK, CurrentModuleObject); if (IsNotOK) { ShowContinueError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\".", - CurrentModuleObject, - ventSlab.Name, - cAlphaFields(28), - state.dataIPShortCut->cAlphaArgs(28))); - ShowContinueError( - state, EnergyPlus::format("... not valid for {}=\"{}\".", cAlphaFields(27), state.dataIPShortCut->cAlphaArgs(27))); + std::format("{}=\"{}\" invalid {}=\"{}\".", + CurrentModuleObject, + ventSlab.Name, + cAlphaFields(28), + state.dataIPShortCut->cAlphaArgs(28))); + ShowContinueError(state, + std::format("... not valid for {}=\"{}\".", cAlphaFields(27), state.dataIPShortCut->cAlphaArgs(27))); ErrorsFound = true; } } @@ -1006,18 +1007,18 @@ namespace VentilatedSlab { if (ventSlab.heatCoilType == HVAC::CoilType::HeatingGasOrOtherFuel || ventSlab.heatCoilType == HVAC::CoilType::HeatingElectric) { if (!lAlphaBlanks(29)) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\" {}=\"{}\" not needed - ignored.", - CurrentModuleObject, - ventSlab.Name, - cAlphaFields(29), - state.dataIPShortCut->cAlphaArgs(29))); + std::format("{}=\"{}\" {}=\"{}\" not needed - ignored.", + CurrentModuleObject, + ventSlab.Name, + cAlphaFields(29), + state.dataIPShortCut->cAlphaArgs(29))); ShowContinueError(state, "..It is used for hot water coils only."); } } else { if (lAlphaBlanks(29)) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}=\"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, ventSlab.Name, cAlphaFields(29))); ErrorsFound = true; } @@ -1042,10 +1043,9 @@ namespace VentilatedSlab { } } else { // no heating coil - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" missing heating coil.", CurrentModuleObject, ventSlab.Name)); + ShowSevereError(state, std::format("{}=\"{}\" missing heating coil.", CurrentModuleObject, ventSlab.Name)); ShowContinueError( - state, - EnergyPlus::format("a heating coil is required for {}=\"{}\".", cAlphaFields(26), state.dataIPShortCut->cAlphaArgs(26))); + state, std::format("a heating coil is required for {}=\"{}\".", cAlphaFields(26), state.dataIPShortCut->cAlphaArgs(26))); ErrorsFound = true; } } @@ -1090,12 +1090,10 @@ namespace VentilatedSlab { } else if (Util::SameString(ventSlab.coolingCoilPlantType, "Coil:Cooling:Water:DetailedGeometry")) { ventSlab.coolingCoilType = DataPlant::PlantEquipmentType::CoilWaterDetailedFlatCooling; } else { - ShowSevereError(state, - EnergyPlus::format("GetVentilatedSlabInput: {}=\"{}\", invalid", CurrentModuleObject, ventSlab.Name)); - ShowContinueError(state, EnergyPlus::format("For: {}=\"{}\".", cAlphaFields(30), state.dataIPShortCut->cAlphaArgs(30))); + ShowSevereError(state, std::format("GetVentilatedSlabInput: {}=\"{}\", invalid", CurrentModuleObject, ventSlab.Name)); + ShowContinueError(state, std::format("For: {}=\"{}\".", cAlphaFields(30), state.dataIPShortCut->cAlphaArgs(30))); ShowContinueError( - state, - EnergyPlus::format("Invalid Coil Type={}, Name={}", ventSlab.coolingCoilPlantType, ventSlab.coolingCoilPlantName)); + state, std::format("Invalid Coil Type={}, Name={}", ventSlab.coolingCoilPlantType, ventSlab.coolingCoilPlantName)); ShowContinueError(state, R"(must be "Coil:Cooling:Water" or "Coil:Cooling:Water:DetailedGeometry")"); ErrorsFound = true; } @@ -1103,11 +1101,11 @@ namespace VentilatedSlab { } default: { ShowSevereError(state, - EnergyPlus::format(R"({}="{}" invalid {}="{}".)", - CurrentModuleObject, - ventSlab.Name, - cAlphaFields(29), - state.dataIPShortCut->cAlphaArgs(29))); + std::format(R"({}="{}" invalid {}="{}".)", + CurrentModuleObject, + ventSlab.Name, + cAlphaFields(29), + state.dataIPShortCut->cAlphaArgs(29))); ErrorsFound = true; errFlag = true; break; @@ -1119,13 +1117,13 @@ namespace VentilatedSlab { ValidateComponent(state, state.dataIPShortCut->cAlphaArgs(30), ventSlab.coolingCoilName, IsNotOK, "ZoneHVAC:VentilatedSlab "); if (IsNotOK) { ShowContinueError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\".", - CurrentModuleObject, - ventSlab.Name, - cAlphaFields(31), - state.dataIPShortCut->cAlphaArgs(31))); - ShowContinueError( - state, EnergyPlus::format("... not valid for {}=\"{}\".", cAlphaFields(30), state.dataIPShortCut->cAlphaArgs(30))); + std::format("{}=\"{}\" invalid {}=\"{}\".", + CurrentModuleObject, + ventSlab.Name, + cAlphaFields(31), + state.dataIPShortCut->cAlphaArgs(31))); + ShowContinueError(state, + std::format("... not valid for {}=\"{}\".", cAlphaFields(30), state.dataIPShortCut->cAlphaArgs(30))); ErrorsFound = true; } } @@ -1145,8 +1143,7 @@ namespace VentilatedSlab { if (lAlphaBlanks(32)) { ShowSevereError( state, - EnergyPlus::format( - "{}=\"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, ventSlab.Name, cAlphaFields(32))); + std::format("{}=\"{}\" invalid {} is blank and must be entered.", CurrentModuleObject, ventSlab.Name, cAlphaFields(32))); ErrorsFound = true; } @@ -1163,10 +1160,9 @@ namespace VentilatedSlab { } } else { // No Cooling Coil - ShowSevereError(state, EnergyPlus::format("{}=\"{}\" missing cooling coil.", CurrentModuleObject, ventSlab.Name)); + ShowSevereError(state, std::format("{}=\"{}\" missing cooling coil.", CurrentModuleObject, ventSlab.Name)); ShowContinueError( - state, - EnergyPlus::format("a cooling coil is required for {}=\"{}\".", cAlphaFields(26), state.dataIPShortCut->cAlphaArgs(26))); + state, std::format("a cooling coil is required for {}=\"{}\".", cAlphaFields(26), state.dataIPShortCut->cAlphaArgs(26))); ErrorsFound = true; } } @@ -1175,8 +1171,8 @@ namespace VentilatedSlab { if (!lAlphaBlanks(34)) { ventSlab.HVACSizingIndex = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(34), state.dataSize->ZoneHVACSizing); if (ventSlab.HVACSizingIndex == 0) { - ShowSevereError(state, EnergyPlus::format("{} = {} not found.", cAlphaFields(34), state.dataIPShortCut->cAlphaArgs(34))); - ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", cMO_VentilatedSlab, ventSlab.Name)); + ShowSevereError(state, std::format("{} = {} not found.", cAlphaFields(34), state.dataIPShortCut->cAlphaArgs(34))); + ShowContinueError(state, std::format("Occurs in {} = {}", cMO_VentilatedSlab, ventSlab.Name)); ErrorsFound = true; } } @@ -1239,7 +1235,7 @@ namespace VentilatedSlab { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{} errors occurred in input. Program terminates.", CurrentModuleObject)); + ShowFatalError(state, std::format("{} errors occurred in input. Program terminates.", CurrentModuleObject)); } // Setup Report variables for the VENTILATED SLAB @@ -1472,7 +1468,7 @@ namespace VentilatedSlab { PlantUtilities::ScanPlantLoopsForObject( state, ventSlab.heatingCoilName, ventSlab.heatingCoilType, ventSlab.HWPlantLoc, errFlag, _, _, _, _, _); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Reference Unit=\"{}\", type=ZoneHVAC:VentilatedSlab", ventSlab.Name)); + ShowContinueError(state, std::format("Reference Unit=\"{}\", type=ZoneHVAC:VentilatedSlab", ventSlab.Name)); ShowFatalError(state, "InitVentilatedSlab: Program terminated due to previous condition(s)."); } @@ -1483,14 +1479,13 @@ namespace VentilatedSlab { bool errFlag = false; PlantUtilities::ScanPlantLoopsForObject(state, ventSlab.coolingCoilPlantName, ventSlab.coolingCoilType, ventSlab.CWPlantLoc, errFlag); if (errFlag) { - ShowContinueError(state, EnergyPlus::format("Reference Unit=\"{}\", type=ZoneHVAC:VentilatedSlab", ventSlab.Name)); + ShowContinueError(state, std::format("Reference Unit=\"{}\", type=ZoneHVAC:VentilatedSlab", ventSlab.Name)); ShowFatalError(state, "InitVentilatedSlab: Program terminated due to previous condition(s)."); } ventSlab.ColdCoilOutNodeNum = DataPlant::CompData::getPlantComponent(state, ventSlab.CWPlantLoc).NodeNumOut; } else { if (ventSlab.coolingCoilPresent) { - ShowFatalError(state, - EnergyPlus::format("InitVentilatedSlab: Unit={}, invalid cooling coil type. Program terminated.", ventSlab.Name)); + ShowFatalError(state, std::format("InitVentilatedSlab: Unit={}, invalid cooling coil type. Program terminated.", ventSlab.Name)); } } state.dataVentilatedSlab->MyPlantScanFlag(Item) = false; @@ -1507,10 +1502,9 @@ namespace VentilatedSlab { } ShowSevereError( state, - EnergyPlus::format( - "InitVentilatedSlab: Ventilated Slab Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - cMO_VentilatedSlab, - state.dataVentilatedSlab->VentSlab(RadNum).Name)); + std::format("InitVentilatedSlab: Ventilated Slab Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + cMO_VentilatedSlab, + state.dataVentilatedSlab->VentSlab(RadNum).Name)); } } @@ -1554,9 +1548,8 @@ namespace VentilatedSlab { if (ventSlab.OutAirMassFlow > ventSlab.MaxAirMassFlow) { ventSlab.OutAirMassFlow = ventSlab.MaxAirMassFlow; ventSlab.MinOutAirMassFlow = ventSlab.OutAirMassFlow * (ventSlab.MinOutAirVolFlow / ventSlab.OutAirVolFlow); - ShowWarningError( - state, - EnergyPlus::format("Outdoor air mass flow rate higher than unit flow rate, reset to unit flow rate for {}", ventSlab.Name)); + ShowWarningError(state, + std::format("Outdoor air mass flow rate higher than unit flow rate, reset to unit flow rate for {}", ventSlab.Name)); } // set the node max and min mass flow rates @@ -1904,9 +1897,9 @@ namespace VentilatedSlab { OutAirVolFlowUser); if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(OutAirVolFlowDes - OutAirVolFlowUser) / OutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", + ShowMessage( + state, + std::format("SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", ventSlab.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Outdoor Air Flow Rate of {:.5R} [m3/s]", OutAirVolFlowUser)); @@ -1955,9 +1948,9 @@ namespace VentilatedSlab { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MinOutAirVolFlowDes - MinOutAirVolFlowUser) / MinOutAirVolFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", + ShowMessage( + state, + std::format("SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", ventSlab.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Minimum Outdoor Air Flow Rate of {:.5R} [m3/s]", MinOutAirVolFlowUser)); @@ -2005,7 +1998,7 @@ namespace VentilatedSlab { DoWaterCoilSizing = false; // If there is no heating Plant Sizing object and autosizing was requested, issue fatal error message ShowSevereError(state, "Autosizing of water flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in {} Object={}", cMO_VentilatedSlab, ventSlab.Name)); + ShowContinueError(state, std::format("Occurs in {} Object={}", cMO_VentilatedSlab, ventSlab.Name)); ErrorsFound = true; } } @@ -2079,9 +2072,9 @@ namespace VentilatedSlab { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxVolHotWaterFlowDes - MaxVolHotWaterFlowUser) / MaxVolHotWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", + ShowMessage( + state, + std::format("SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", ventSlab.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Hot Water Flow of {:.5R} [m3/s]", MaxVolHotWaterFlowUser)); @@ -2184,7 +2177,7 @@ namespace VentilatedSlab { } } else { ShowSevereError(state, "Autosizing of Steam flow requires a heating loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in ZoneHVAC:VentilatedSlab Object={}", ventSlab.Name)); + ShowContinueError(state, std::format("Occurs in ZoneHVAC:VentilatedSlab Object={}", ventSlab.Name)); ErrorsFound = true; } ventSlab.MaxVolHotSteamFlow = MaxVolHotSteamFlowDes; @@ -2203,9 +2196,9 @@ namespace VentilatedSlab { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxVolHotSteamFlowDes - MaxVolHotSteamFlowUser) / MaxVolHotSteamFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", + ShowMessage( + state, + std::format("SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", ventSlab.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Steam Flow of {:.5R} [m3/s]", MaxVolHotSteamFlowUser)); @@ -2262,7 +2255,7 @@ namespace VentilatedSlab { DoWaterCoilSizing = false; // If there is no cooling Plant Sizing object and autosizing was requested, issue fatal error message ShowSevereError(state, "Autosizing of water flow requires a cooling loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in {} Object={}", cMO_VentilatedSlab, ventSlab.Name)); + ShowContinueError(state, std::format("Occurs in {} Object={}", cMO_VentilatedSlab, ventSlab.Name)); ErrorsFound = true; } } @@ -2337,9 +2330,9 @@ namespace VentilatedSlab { if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(MaxVolColdWaterFlowDes - MaxVolColdWaterFlowUser) / MaxVolColdWaterFlowUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", + ShowMessage( + state, + std::format("SizeVentilatedSlab: Potential issue with equipment sizing for ZoneHVAC:VentilatedSlab = \"{}\".", ventSlab.Name)); ShowContinueError( state, EnergyPlus::format("User-Specified Maximum Cold Water Flow of {:.5R} [m3/s]", MaxVolColdWaterFlowUser)); @@ -2626,7 +2619,7 @@ namespace VentilatedSlab { } default: { // Should never get here SetPointTemp = 0.0; // Suppress uninitialized warning - ShowSevereError(state, EnergyPlus::format("Illegal control type in low temperature radiant system: {}", ventSlab.Name)); + ShowSevereError(state, std::format("Illegal control type in low temperature radiant system: {}", ventSlab.Name)); ShowFatalError(state, "Preceding condition causes termination."); } break; } // switch (ctrlType) @@ -2713,7 +2706,7 @@ namespace VentilatedSlab { SetPointTempHi = ventSlab.hotCtrlHiTempSched->getCurrentVal(); SetPointTempLo = ventSlab.hotCtrlLoTempSched->getCurrentVal(); if (SetPointTempHi < SetPointTempLo) { - ShowSevereError(state, EnergyPlus::format("Heating setpoint temperature mismatch in{}", ventSlab.Name)); + ShowSevereError(state, std::format("Heating setpoint temperature mismatch in{}", ventSlab.Name)); ShowContinueError(state, "High setpoint temperature is less than low setpoint temperature--check your schedule input"); ShowFatalError(state, "Preceding condition causes termination."); } @@ -2722,7 +2715,7 @@ namespace VentilatedSlab { AirTempLo = ventSlab.hotAirLoTempSched->getCurrentVal(); if (AirTempHi < AirTempLo) { - ShowSevereError(state, EnergyPlus::format("Heating Air temperature mismatch in{}", ventSlab.Name)); + ShowSevereError(state, std::format("Heating Air temperature mismatch in{}", ventSlab.Name)); ShowContinueError(state, "High Air temperature is less than low Air temperature--check your schedule input"); ShowFatalError(state, "Preceding condition causes termination."); } @@ -2847,8 +2840,7 @@ namespace VentilatedSlab { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError(state, - EnergyPlus::format("Ventilated Slab simulation control: illogical condition for {}", ventSlab.Name)); + ShowFatalError(state, std::format("Ventilated Slab simulation control: illogical condition for {}", ventSlab.Name)); } break; } @@ -2917,8 +2909,7 @@ namespace VentilatedSlab { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError(state, - EnergyPlus::format("Ventilated Slab simulation control: illogical condition for {}", ventSlab.Name)); + ShowFatalError(state, std::format("Ventilated Slab simulation control: illogical condition for {}", ventSlab.Name)); } break; } @@ -2979,7 +2970,7 @@ namespace VentilatedSlab { SetPointTempHi = ventSlab.coldCtrlHiTempSched->getCurrentVal(); SetPointTempLo = ventSlab.coldCtrlLoTempSched->getCurrentVal(); if (SetPointTempHi < SetPointTempLo) { - ShowSevereError(state, EnergyPlus::format("Cooling setpoint temperature mismatch in{}", ventSlab.Name)); + ShowSevereError(state, std::format("Cooling setpoint temperature mismatch in{}", ventSlab.Name)); ShowContinueError(state, "High setpoint temperature is less than low setpoint temperature--check your schedule input"); ShowFatalError(state, "Preceding condition causes termination."); } @@ -2987,7 +2978,7 @@ namespace VentilatedSlab { AirTempHi = ventSlab.coldAirHiTempSched->getCurrentVal(); AirTempLo = ventSlab.coldAirLoTempSched->getCurrentVal(); if (AirTempHi < AirTempLo) { - ShowSevereError(state, EnergyPlus::format("Cooling Air temperature mismatch in{}", ventSlab.Name)); + ShowSevereError(state, std::format("Cooling Air temperature mismatch in{}", ventSlab.Name)); ShowContinueError(state, "High Air temperature is less than low Air temperature--check your schedule input"); ShowFatalError(state, "Preceding condition causes termination."); } @@ -3105,8 +3096,8 @@ namespace VentilatedSlab { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError( - state, EnergyPlus::format("{} simulation control: illogical condition for {}", cMO_VentilatedSlab, ventSlab.Name)); + ShowFatalError(state, + std::format("{} simulation control: illogical condition for {}", cMO_VentilatedSlab, ventSlab.Name)); } break; } @@ -3179,8 +3170,8 @@ namespace VentilatedSlab { } } else { // It should NEVER get to this point, but just in case... - ShowFatalError( - state, EnergyPlus::format("{} simulation control: illogical condition for {}", cMO_VentilatedSlab, ventSlab.Name)); + ShowFatalError(state, + std::format("{} simulation control: illogical condition for {}", cMO_VentilatedSlab, ventSlab.Name)); } break; } @@ -3684,12 +3675,11 @@ namespace VentilatedSlab { ++state.dataVentilatedSlab->CondensationErrorCount; if (ventSlab.CondErrIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); + ShowWarningMessage(state, std::format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); ShowContinueError( state, - EnergyPlus::format( - "Surface [{}] temperature below dew-point temperature--potential for condensation exists", - state.dataSurface->Surface(ventSlab.SurfacePtr(RadSurfNum2)).Name)); + std::format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", + state.dataSurface->Surface(ventSlab.SurfacePtr(RadSurfNum2)).Name)); ShowContinueError(state, "Flow to the ventilated slab system will be shut-off to avoid condensation"); ShowContinueError( state, @@ -3744,7 +3734,7 @@ namespace VentilatedSlab { if (!state.dataGlobal->WarmupFlag) { ++state.dataVentilatedSlab->EnergyImbalanceErrorCount; if (ventSlab.EnrgyImbalErrIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); + ShowWarningMessage(state, std::format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); ShowContinueError(state, "Ventilated Slab (slab only type) air outlet temperature calculation mismatch."); ShowContinueError(state, "This should not happen as it indicates a potential energy imbalance in the calculations."); @@ -3784,7 +3774,7 @@ namespace VentilatedSlab { if (!state.dataGlobal->WarmupFlag) { ++state.dataVentilatedSlab->EnergyImbalanceErrorCount; if (ventSlab.EnrgyImbalErrIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); + ShowWarningMessage(state, std::format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); ShowContinueError(state, "Ventilated Slab (slab only type) air outlet temperature calculation mismatch."); ShowContinueError(state, "This should not happen as it indicates a potential energy imbalance in the calculations."); @@ -3949,12 +3939,11 @@ namespace VentilatedSlab { if (!state.dataGlobal->WarmupFlag) { ++state.dataVentilatedSlab->CondensationErrorCount; if (ventSlab.CondErrIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); + ShowWarningMessage(state, std::format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); ShowContinueError( state, - EnergyPlus::format( - "Surface [{}] temperature below dew-point temperature--potential for condensation exists", - state.dataSurface->Surface(ventSlab.SurfacePtr(RadSurfNum2)).Name)); + std::format("Surface [{}] temperature below dew-point temperature--potential for condensation exists", + state.dataSurface->Surface(ventSlab.SurfacePtr(RadSurfNum2)).Name)); ShowContinueError(state, "Flow to the ventilated slab system will be shut-off to avoid condensation"); ShowContinueError( state, @@ -4055,7 +4044,7 @@ namespace VentilatedSlab { if (!state.dataGlobal->WarmupFlag) { ++state.dataVentilatedSlab->EnergyImbalanceErrorCount; if (ventSlab.EnrgyImbalErrIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); + ShowWarningMessage(state, std::format("{} [{}]", cMO_VentilatedSlab, ventSlab.Name)); ShowContinueError(state, "Ventilated Slab (slab only type) air outlet temperature calculation mismatch."); ShowContinueError(state, "This should not happen as it indicates a potential energy imbalance in the calculations."); ShowContinueError(state, "However, it could also result from improper input for the ventilated slab or"); diff --git a/src/EnergyPlus/WaterCoils.cc b/src/EnergyPlus/WaterCoils.cc index dd596100a45..c85970a2ecb 100644 --- a/src/EnergyPlus/WaterCoils.cc +++ b/src/EnergyPlus/WaterCoils.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -1512,7 +1513,7 @@ void InitWaterCoil(EnergyPlusData &state, int const CoilNum, bool const FirstHVA // if the numerical inversion failed, issue error messages. if (SolFlag == General::SOLVEROOT_ERROR_ITER) { - ShowSevereError(state, EnergyPlus::format("Calculation of cooling coil design UA failed for coil {}", waterCoil.Name)); + ShowSevereError(state, std::format("Calculation of cooling coil design UA failed for coil {}", waterCoil.Name)); ShowContinueError(state, " Iteration limit exceeded in calculating coil UA"); waterCoil.UACoilExternal = UA0 * 10.0; waterCoil.UACoilInternal = waterCoil.UACoilExternal * 3.3; @@ -1523,7 +1524,7 @@ void InitWaterCoil(EnergyPlusData &state, int const CoilNum, bool const FirstHVA waterCoil.UADryExtPerUnitArea = waterCoil.UAWetExtPerUnitArea; ShowContinueError(state, EnergyPlus::format(" Coil design UA set to {:.6R} [W/C]", waterCoil.UACoilTotal)); } else if (SolFlag == General::SOLVEROOT_ERROR_INIT) { - ShowSevereError(state, EnergyPlus::format("Calculation of cooling coil design UA failed for coil {}", waterCoil.Name)); + ShowSevereError(state, std::format("Calculation of cooling coil design UA failed for coil {}", waterCoil.Name)); ShowContinueError(state, " Bad starting values for UA"); waterCoil.UACoilExternal = UA0 * 10.0; waterCoil.UACoilInternal = waterCoil.UACoilExternal * 3.3; @@ -2202,7 +2203,7 @@ void SizeWaterCoil(EnergyPlusData &state, int const CoilNum) waterCoil.DesInletWaterTemp = sizerCWDesWaterInTemp.size(state, TempSize, ErrorsFound); if ((waterCoil.DesInletWaterTemp > state.dataSize->DataDesOutletAirTemp) && state.dataSize->DataDesOutletAirTemp > 0.0) { - ShowWarningError(state, EnergyPlus::format("Invalid design inlet water temperature for {} = {}", CompType, CompName)); + ShowWarningError(state, std::format("Invalid design inlet water temperature for {} = {}", CompType, CompName)); ShowContinueError(state, EnergyPlus::format("...design inlet water temperature = {:.3R} C", waterCoil.DesInletWaterTemp)); ShowContinueError(state, EnergyPlus::format("...design outlet air temperature = {:.3R} C", state.dataSize->DataDesOutletAirTemp)); ShowContinueError(state, "...design inlet water temperature should be less than the design outlet air temperature"); @@ -2307,7 +2308,7 @@ void SizeWaterCoil(EnergyPlusData &state, int const CoilNum) if (waterCoil.DesAirVolFlowRate <= 0.0) { waterCoil.DesAirVolFlowRate = 0.0; - ShowWarningError(state, EnergyPlus::format("The design air flow rate is zero for {} = {}", CompType, CompName)); + ShowWarningError(state, std::format("The design air flow rate is zero for {} = {}", CompType, CompName)); ShowContinueError(state, "The autosize value for max air volume flow rate is zero"); } @@ -2346,9 +2347,9 @@ void SizeWaterCoil(EnergyPlusData &state, int const CoilNum) waterCoil.MinAirFlowArea = sizerMinAirFlowArea.size(state, TempSize, ErrorsFound); if (waterCoil.MinAirFlowArea <= 0.0) { - ShowSevereError(state, EnergyPlus::format("Coil:Cooling:Water:DetailedGeometry: \"{}\"", waterCoil.Name)); - ShowContinueError( - state, EnergyPlus::format("Coil Minimum Airflow Area must be greater than 0. Coil area = {:.6T}", waterCoil.MinAirFlowArea)); + ShowSevereError(state, std::format("Coil:Cooling:Water:DetailedGeometry: \"{}\"", waterCoil.Name)); + ShowContinueError(state, + std::format("Coil Minimum Airflow Area must be greater than 0. Coil area = {:.6f}", waterCoil.MinAirFlowArea)); ErrorsFound = true; } @@ -2389,12 +2390,11 @@ void SizeWaterCoil(EnergyPlusData &state, int const CoilNum) waterCoil.TubeOutsideSurfArea = sizerTubeOutsideArea.size(state, TempSize, ErrorsFound); if ((waterCoil.FinSurfArea + waterCoil.TubeOutsideSurfArea) <= 0.0) { - ShowSevereError(state, EnergyPlus::format("Coil:Cooling:Water:DetailedGeometry: \"{}\"", waterCoil.Name)); + ShowSevereError(state, std::format("Coil:Cooling:Water:DetailedGeometry: \"{}\"", waterCoil.Name)); ShowContinueError( state, - EnergyPlus::format( - "Coil Fin Surface Area plus Coil Tube Outside Surface Area must be greater than 0. Total surface area = {:.6T}", - (waterCoil.FinSurfArea + waterCoil.TubeOutsideSurfArea))); + std::format("Coil Fin Surface Area plus Coil Tube Outside Surface Area must be greater than 0. Total surface area = {:.6f}", + (waterCoil.FinSurfArea + waterCoil.TubeOutsideSurfArea))); ErrorsFound = true; } @@ -2428,7 +2428,7 @@ void SizeWaterCoil(EnergyPlusData &state, int const CoilNum) // If there is no cooling Plant Sizing object and autosizing was requested, issue fatal error message if (waterCoil.RequestingAutoSize) { ShowSevereError(state, "Autosizing of water coil requires a cooling loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in water coil object= {}", waterCoil.Name)); + ShowContinueError(state, std::format("Occurs in water coil object= {}", waterCoil.Name)); ErrorsFound = true; } } @@ -2582,7 +2582,7 @@ void SizeWaterCoil(EnergyPlusData &state, int const CoilNum) state.dataSize->DataFractionUsedForSizing = 0.0; if (waterCoil.MaxWaterVolFlowRate <= 0.0) { // MaxWaterVolFlowRateDes = 0.0; - ShowWarningError(state, EnergyPlus::format("The design coil load is zero for Coil:Heating:Water {}", waterCoil.Name)); + ShowWarningError(state, std::format("The design coil load is zero for Coil:Heating:Water {}", waterCoil.Name)); ShowContinueError(state, "The autosize value for maximum water flow rate is zero"); ShowContinueError(state, "To change this, input a value for UA, change the heating design day, or raise the"); ShowContinueError(state, " system heating design supply air temperature. Also check to make sure the Preheat"); @@ -2682,14 +2682,13 @@ void SizeWaterCoil(EnergyPlusData &state, int const CoilNum) sizerHWCoilUA.initializeWithinEP(state, CompType, CompName, bPRINT, RoutineName); waterCoil.UACoil = sizerHWCoilUA.size(state, TempSize, ErrorsFound); if (DesCoilWaterInTempSaved < HVAC::DesCoilHWInletTempMin) { - ShowWarningError(state, EnergyPlus::format("Autosizing of heating coil UA for Coil:Heating:Water \"{}\"", CompName)); + ShowWarningError(state, std::format("Autosizing of heating coil UA for Coil:Heating:Water \"{}\"", CompName)); ShowContinueError(state, - EnergyPlus::format(" Plant design loop exit temperature = {:.2T} C", - state.dataSize->PlantSizData(state.dataSize->DataPltSizHeatNum).ExitTemp)); + std::format(" Plant design loop exit temperature = {:.2f} C", + state.dataSize->PlantSizData(state.dataSize->DataPltSizHeatNum).ExitTemp)); ShowContinueError(state, " Plant design loop exit temperature is low for design load and leaving air temperature anticipated."); ShowContinueError( - state, - EnergyPlus::format(" Heating coil UA-value is sized using coil water inlet temperature = {:.2T} C", DesCoilInletWaterTempUsed)); + state, std::format(" Heating coil UA-value is sized using coil water inlet temperature = {:.2f} C", DesCoilInletWaterTempUsed)); state.dataWaterCoils->WaterCoil(state.dataSize->DataCoilNum).InletWaterTemp = DesCoilWaterInTempSaved; // reset the Design Coil Inlet Water Temperature } @@ -2726,7 +2725,7 @@ void SizeWaterCoil(EnergyPlusData &state, int const CoilNum) // if there is no heating Plant Sizing object and autosizng was requested, issue an error message if (waterCoil.RequestingAutoSize) { ShowSevereError(state, "Autosizing of water coil requires a heating loop Sizing:Plant object"); - ShowContinueError(state, EnergyPlus::format("Occurs in water coil object= {}", waterCoil.Name)); + ShowContinueError(state, std::format("Occurs in water coil object= {}", waterCoil.Name)); ErrorsFound = true; } } @@ -2853,7 +2852,7 @@ void CalcSimpleHeatingCoil(EnergyPlusData &state, state.dataWaterCoils->MyUAAndFlowCalcFlag(CoilNum) || waterCoil.availSched->getCurrentVal() > 0.0)) { if (UA <= 0.0) { - ShowFatalError(state, EnergyPlus::format("UA is zero for COIL:Heating:Water {}", waterCoil.Name)); + ShowFatalError(state, std::format("UA is zero for COIL:Heating:Water {}", waterCoil.Name)); } NTU = UA / CapacitanceMin; ETA = std::pow(NTU, 0.22); @@ -3080,24 +3079,24 @@ void CalcDetailFlatFinCoolingCoil(EnergyPlusData &state, // Warning and error messages for large flow rates for the given user input geometry AirDensity = PsyRhoAirFnPbTdbW(state, state.dataEnvrn->OutBaroPress, TempAirIn, InletAirHumRat, RoutineName); if (AirMassFlow > (5.0 * waterCoil.MinAirFlowArea / AirDensity) && state.dataWaterCoils->CoilWarningOnceFlag(CoilNum)) { - ShowWarningError(state, EnergyPlus::format("Coil:Cooling:Water:DetailedGeometry in Coil ={}", waterCoil.Name)); + ShowWarningError(state, std::format("Coil:Cooling:Water:DetailedGeometry in Coil ={}", waterCoil.Name)); ShowContinueError(state, "Air Flow Rate Velocity has greatly exceeded upper design guidelines of ~2.5 m/s"); - ShowContinueError(state, EnergyPlus::format("Air Mass Flow Rate[kg/s]={:.6T}", AirMassFlow)); + ShowContinueError(state, std::format("Air Mass Flow Rate[kg/s]={:.6f}", AirMassFlow)); // [m/s] = [kg/s] / ([m2] * [kg/m3]) AirVelocity = AirMassFlow / (waterCoil.MinAirFlowArea * AirDensity); - ShowContinueError(state, EnergyPlus::format("Air Face Velocity[m/s]={:.6T}", AirVelocity)); - ShowContinueError( - state, EnergyPlus::format("Approximate Mass Flow Rate limit for Face Area[kg/s]={:.6T}", 2.5 * waterCoil.MinAirFlowArea * AirDensity)); + ShowContinueError(state, std::format("Air Face Velocity[m/s]={:.6f}", AirVelocity)); + ShowContinueError(state, + std::format("Approximate Mass Flow Rate limit for Face Area[kg/s]={:.6f}", 2.5 * waterCoil.MinAirFlowArea * AirDensity)); ShowContinueError(state, "Coil:Cooling:Water:DetailedGeometry could be resized/autosized to handle capacity"); state.dataWaterCoils->CoilWarningOnceFlag(CoilNum) = false; } else if (AirMassFlow > (44.7 * waterCoil.MinAirFlowArea * AirDensity)) { - ShowSevereError(state, EnergyPlus::format("Coil:Cooling:Water:DetailedGeometry in Coil ={}", waterCoil.Name)); + ShowSevereError(state, std::format("Coil:Cooling:Water:DetailedGeometry in Coil ={}", waterCoil.Name)); ShowContinueError(state, "Air Flow Rate Velocity is > 100MPH (44.7m/s) and simulation cannot continue"); - ShowContinueError(state, EnergyPlus::format("Air Mass Flow Rate[kg/s]={:.6T}", AirMassFlow)); + ShowContinueError(state, std::format("Air Mass Flow Rate[kg/s]={:.6f}", AirMassFlow)); AirVelocity = AirMassFlow / (waterCoil.MinAirFlowArea * AirDensity); - ShowContinueError(state, EnergyPlus::format("Air Face Velocity[m/s]={:.6T}", AirVelocity)); - ShowContinueError( - state, EnergyPlus::format("Approximate Mass Flow Rate limit for Face Area[kg/s]={:.6T}", 44.7 * waterCoil.MinAirFlowArea * AirDensity)); + ShowContinueError(state, std::format("Air Face Velocity[m/s]={:.6f}", AirVelocity)); + ShowContinueError(state, + std::format("Approximate Mass Flow Rate limit for Face Area[kg/s]={:.6f}", 44.7 * waterCoil.MinAirFlowArea * AirDensity)); ShowFatalError(state, "Coil:Cooling:Water:DetailedGeometry needs to be resized/autosized to handle capacity"); } @@ -4169,7 +4168,7 @@ void CoilPartWetPartDry(EnergyPlusData &state, // Wet Dry Interface temperature not converged after maximum specified iterations. // Print error message, set return error flag if ((itT > itmax) && (!state.dataGlobal->WarmupFlag)) { - ShowWarningError(state, EnergyPlus::format("For Coil:Cooling:Water {}", waterCoil.Name)); + ShowWarningError(state, std::format("For Coil:Cooling:Water {}", waterCoil.Name)); ShowContinueError(state, "CoilPartWetPartDry: Maximum iterations exceeded for Liq Temp, at Interface"); } @@ -4283,7 +4282,7 @@ Real64 CalcCoilUAbyEffectNTU(EnergyPlusData &state, auto const &waterCoil = state.dataWaterCoils->WaterCoil(CoilNum); // Error Message if ((std::abs(DesTotalHeatTransfer) - MaxHeatTransfer) / max(MaxHeatTransfer, SmallNo) > SmallNo) { - ShowWarningError(state, EnergyPlus::format("For Coil:Cooling:Water {}", waterCoil.Name)); + ShowWarningError(state, std::format("For Coil:Cooling:Water {}", waterCoil.Name)); ShowContinueError(state, "CalcCoilUAbyEffectNTU:Given Q impossible for given inlet states, proceeding with MaxHeat Transfer"); ShowContinueError(state, "Check the Sizing:System and Sizing:Zone cooling design supply air temperature and "); ShowContinueError(state, @@ -4330,7 +4329,7 @@ Real64 CalcCoilUAbyEffectNTU(EnergyPlusData &state, // If not converged after itmax iterations, return error code if ((iter > itmax) && (!state.dataGlobal->WarmupFlag)) { - ShowWarningError(state, EnergyPlus::format("For Coil:Cooling:Water {}", waterCoil.Name)); + ShowWarningError(state, std::format("For Coil:Cooling:Water {}", waterCoil.Name)); ShowContinueError(state, "CalcCoilUAbyEffectNTU: Maximum iterations exceeded:Coil UA calculation"); CalcCoilUAbyEffectNTU = 0.0; // Autodesk:Return Line added to set return value: Using non-converged CoilUA value may be preferred but // that was not happening @@ -5359,7 +5358,7 @@ void CheckWaterCoilSchedule(EnergyPlusData &state, std::string_view CompName, Re if (CompIndex == 0) { CoilNum = Util::FindItemInList(CompName, state.dataWaterCoils->WaterCoil); if (CoilNum == 0) { - ShowFatalError(state, EnergyPlus::format("CheckWaterCoilSchedule: Coil not found={}", CompName)); + ShowFatalError(state, std::format("CheckWaterCoilSchedule: Coil not found={}", CompName)); } CompIndex = CoilNum; Value = state.dataWaterCoils->WaterCoil(CoilNum).availSched->getCurrentVal(); // not scheduled? @@ -5367,18 +5366,18 @@ void CheckWaterCoilSchedule(EnergyPlusData &state, std::string_view CompName, Re CoilNum = CompIndex; if (CoilNum > state.dataWaterCoils->NumWaterCoils || CoilNum < 1) { ShowFatalError(state, - EnergyPlus::format("CheckWaterCoilSchedule: Invalid CompIndex passed={}, Number of Heating Coils={}, Coil name={}", - CoilNum, - state.dataWaterCoils->NumWaterCoils, - CompName)); + std::format("CheckWaterCoilSchedule: Invalid CompIndex passed={}, Number of Heating Coils={}, Coil name={}", + CoilNum, + state.dataWaterCoils->NumWaterCoils, + CompName)); } auto const &waterCoil = state.dataWaterCoils->WaterCoil(CoilNum); if (CompName != waterCoil.Name) { ShowFatalError(state, - EnergyPlus::format("CheckWaterCoilSchedule: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - CoilNum, - CompName, - waterCoil.Name)); + std::format("CheckWaterCoilSchedule: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + CoilNum, + CompName, + waterCoil.Name)); } Value = waterCoil.availSched->getCurrentVal(); // not scheduled? } @@ -5424,7 +5423,7 @@ Real64 GetCoilMaxWaterFlowRate(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ShowContinueError(state, "... Max Water Flow rate returned as -1000."); ErrorsFound = true; MaxWaterFlowRate = -1000.0; @@ -5468,7 +5467,7 @@ int GetCoilInletNode(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -5512,9 +5511,9 @@ int GetCoilOutletNode(EnergyPlusData &state, if (WhichCoil == 0) { ShowSevereError(state, - EnergyPlus::format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil outlet node number.", - CoilType, - CoilName)); + std::format("GetCoilOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\" when accessing coil outlet node number.", + CoilType, + CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -5557,7 +5556,7 @@ int GetCoilWaterInletNode(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format("GetCoilWaterInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilWaterInletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -5600,7 +5599,7 @@ int GetCoilWaterOutletNode(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format("GetCoilWaterOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilWaterOutletNode: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -5640,7 +5639,7 @@ void SetCoilDesFlow(EnergyPlusData &state, // WaterCoil(WhichCoil).DesAirVolFlowRate = CoilDesFlow; } } else { - ShowSevereError(state, EnergyPlus::format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilMaxWaterFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } } @@ -5674,13 +5673,11 @@ Real64 GetWaterCoilDesAirFlow(EnergyPlusData &state, if (WhichCoil != 0) { CoilDesAirFlow = state.dataWaterCoils->WaterCoil(WhichCoil).DesAirVolFlowRate; } else { - ShowSevereError(state, - EnergyPlus::format("GetWaterCoilDesAirFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetWaterCoilDesAirFlowRate: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } } else { - ShowSevereError(state, - EnergyPlus::format("GetWaterCoilDesAirFlowRate: Function not valid for Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetWaterCoilDesAirFlowRate: Function not valid for Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } @@ -5769,8 +5766,8 @@ void CheckForSensorAndSetPointNode(EnergyPlusData &state, if (!SetPointManager::NodeHasSPMCtrlVarType(state, SensorNodeNum, HVAC::CtrlVarType::Temp)) { std::string_view WaterCoilType = DataPlant::PlantEquipTypeNames[static_cast(state.dataWaterCoils->WaterCoil(WhichCoil).WaterCoilType)]; - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\". ", RoutineName, WaterCoilType, state.dataWaterCoils->WaterCoil(WhichCoil).Name)); + ShowWarningError(state, + std::format("{}{}=\"{}\". ", RoutineName, WaterCoilType, state.dataWaterCoils->WaterCoil(WhichCoil).Name)); ShowContinueError(state, " ..Temperature setpoint not found on coil air outlet node."); ShowContinueError(state, " ..The setpoint may have been placed on a node downstream of the coil or on an airloop outlet node."); @@ -5786,8 +5783,8 @@ void CheckForSensorAndSetPointNode(EnergyPlusData &state, if (!SetPointManager::NodeHasSPMCtrlVarType(state, SensorNodeNum, HVAC::CtrlVarType::MaxHumRat)) { std::string_view WaterCoilType = DataPlant::PlantEquipTypeNames[static_cast(state.dataWaterCoils->WaterCoil(WhichCoil).WaterCoilType)]; - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\". ", RoutineName, WaterCoilType, state.dataWaterCoils->WaterCoil(WhichCoil).Name)); + ShowWarningError(state, + std::format("{}{}=\"{}\". ", RoutineName, WaterCoilType, state.dataWaterCoils->WaterCoil(WhichCoil).Name)); ShowContinueError(state, " ..Humidity ratio setpoint not found on coil air outlet node."); ShowContinueError(state, " ..The setpoint may have been placed on a node downstream of the coil or on an airloop outlet node."); @@ -5803,8 +5800,8 @@ void CheckForSensorAndSetPointNode(EnergyPlusData &state, if (!SetPointManager::NodeHasSPMCtrlVarType(state, SensorNodeNum, HVAC::CtrlVarType::Temp)) { std::string_view WaterCoilType = DataPlant::PlantEquipTypeNames[static_cast(state.dataWaterCoils->WaterCoil(WhichCoil).WaterCoilType)]; - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\". ", RoutineName, WaterCoilType, state.dataWaterCoils->WaterCoil(WhichCoil).Name)); + ShowWarningError(state, + std::format("{}{}=\"{}\". ", RoutineName, WaterCoilType, state.dataWaterCoils->WaterCoil(WhichCoil).Name)); ShowContinueError(state, " ..Temperature setpoint not found on coil air outlet node."); ShowContinueError(state, " ..The setpoint may have been placed on a node downstream of the coil or on an airloop outlet node."); @@ -5818,8 +5815,8 @@ void CheckForSensorAndSetPointNode(EnergyPlusData &state, if (!SetPointManager::NodeHasSPMCtrlVarType(state, SensorNodeNum, HVAC::CtrlVarType::MaxHumRat)) { std::string_view WaterCoilType = DataPlant::PlantEquipTypeNames[static_cast(state.dataWaterCoils->WaterCoil(WhichCoil).WaterCoilType)]; - ShowWarningError( - state, EnergyPlus::format("{}{}=\"{}\". ", RoutineName, WaterCoilType, state.dataWaterCoils->WaterCoil(WhichCoil).Name)); + ShowWarningError(state, + std::format("{}{}=\"{}\". ", RoutineName, WaterCoilType, state.dataWaterCoils->WaterCoil(WhichCoil).Name)); ShowContinueError(state, " ..Humidity ratio setpoint not found on coil air outlet node."); ShowContinueError(state, " ..The setpoint may have been placed on a node downstream of the coil or on an airloop outlet node."); @@ -5966,7 +5963,7 @@ int GetWaterCoilIndex(EnergyPlusData &state, } if (IndexNum == 0) { - ShowSevereError(state, EnergyPlus::format("GetWaterCoilIndex: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetWaterCoilIndex: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } @@ -5986,8 +5983,7 @@ int GetCompIndex(EnergyPlusData &state, CoilModel compType, std::string_view con if (index == 0) { // may not find coil name ShowSevereError( - state, - EnergyPlus::format("GetWaterCoilIndex: Could not find CoilType = \"{}\" with Name = \"{}\"", CoilModelNamesUC[(int)compType], coilName)); + state, std::format("GetWaterCoilIndex: Could not find CoilType = \"{}\" with Name = \"{}\"", CoilModelNamesUC[(int)compType], coilName)); } return index; } @@ -6031,7 +6027,7 @@ Real64 GetWaterCoilCapacity(EnergyPlusData &state, } if (IndexNum == 0) { - ShowSevereError(state, EnergyPlus::format("GetWaterCoilCapacity: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetWaterCoilCapacity: Could not find CoilType=\"{}\" with Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; } @@ -6068,39 +6064,35 @@ void UpdateWaterToAirCoilPlantConnection(EnergyPlusData &state, if (CompIndex == 0) { CoilNum = Util::FindItemInList(CoilName, state.dataWaterCoils->WaterCoil); if (CoilNum == 0) { - ShowFatalError(state, - EnergyPlus::format("UpdateWaterToAirCoilPlantConnection: Specified Coil not one of Valid water coils={}", CoilName)); + ShowFatalError(state, std::format("UpdateWaterToAirCoilPlantConnection: Specified Coil not one of Valid water coils={}", CoilName)); } CompIndex = CoilNum; } else { CoilNum = CompIndex; if (CoilNum > state.dataWaterCoils->NumWaterCoils || CoilNum < 1) { - ShowFatalError( - state, - EnergyPlus::format("UpdateWaterToAirCoilPlantConnection: Invalid CompIndex passed={}, Number of Coils={}, Entered Coil name={}", - CoilNum, - state.dataWaterCoils->NumWaterCoils, - CoilName)); + ShowFatalError(state, + std::format("UpdateWaterToAirCoilPlantConnection: Invalid CompIndex passed={}, Number of Coils={}, Entered Coil name={}", + CoilNum, + state.dataWaterCoils->NumWaterCoils, + CoilName)); } auto const &waterCoil = state.dataWaterCoils->WaterCoil(CoilNum); if (state.dataGlobal->KickOffSimulation) { if (CoilName != waterCoil.Name) { ShowFatalError( state, - EnergyPlus::format( - "UpdateWaterToAirCoilPlantConnection: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - CoilNum, - CoilName, - waterCoil.Name)); + std::format("UpdateWaterToAirCoilPlantConnection: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + CoilNum, + CoilName, + waterCoil.Name)); } if (CoilType != waterCoil.WaterCoilType) { ShowFatalError( state, - EnergyPlus::format( - "UpdateWaterToAirCoilPlantConnection: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", - CoilNum, - CoilName, - DataPlant::PlantEquipTypeNames[static_cast(CoilType)])); + std::format("UpdateWaterToAirCoilPlantConnection: Invalid CompIndex passed={}, Coil name={}, stored Coil Name for that index={}", + CoilNum, + CoilName, + DataPlant::PlantEquipTypeNames[static_cast(CoilType)])); } } } @@ -6181,7 +6173,7 @@ Sched::Schedule *GetWaterCoilAvailSched(EnergyPlusData &state, } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format("GetCoilAvailScheduleIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); + ShowSevereError(state, std::format("GetCoilAvailScheduleIndex: Could not find Coil, Type=\"{}\" Name=\"{}\"", CoilType, CoilName)); ErrorsFound = true; return nullptr; } @@ -6211,9 +6203,9 @@ void SetWaterCoilData(EnergyPlusData &state, if (CoilNum <= 0 || CoilNum > state.dataWaterCoils->NumWaterCoils) { ShowSevereError(state, - EnergyPlus::format("SetHeatingCoilData: called with heating coil Number out of range={} should be >0 and <{}", - CoilNum, - state.dataWaterCoils->NumWaterCoils)); + std::format("SetHeatingCoilData: called with heating coil Number out of range={} should be >0 and <{}", + CoilNum, + state.dataWaterCoils->NumWaterCoils)); ErrorsFound = true; return; } @@ -6310,7 +6302,7 @@ void EstimateCoilInletWaterTemp(EnergyPlusData &state, if (((CapacitanceAir > 0.0) && (CapacitanceWater > 0.0))) { if (UA <= 0.0) { - ShowWarningError(state, EnergyPlus::format("UA is zero for COIL:Heating:Water {}", waterCoil.Name)); + ShowWarningError(state, std::format("UA is zero for COIL:Heating:Water {}", waterCoil.Name)); return; } NTU = UA / CapacitanceMin; diff --git a/src/EnergyPlus/WaterManager.cc b/src/EnergyPlus/WaterManager.cc index 3ced33e4a1b..372d98ccdf7 100644 --- a/src/EnergyPlus/WaterManager.cc +++ b/src/EnergyPlus/WaterManager.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -1269,8 +1270,8 @@ namespace WaterManager { TankIndex = Util::FindItemInList(TankName, state.dataWaterData->WaterStorage); if (TankIndex == 0) { - ShowSevereError( - state, EnergyPlus::format("WaterUse:Storage (Water Storage Tank) =\"{}\" not found in {} called {}", TankName, CompType, CompName)); + ShowSevereError(state, + std::format("WaterUse:Storage (Water Storage Tank) =\"{}\" not found in {} called {}", TankName, CompType, CompName)); ErrorsFound = true; return; // So we don't pass TankIndex=0 } @@ -1383,8 +1384,8 @@ namespace WaterManager { TankIndex = Util::FindItemInList(TankName, state.dataWaterData->WaterStorage); if (TankIndex == 0) { - ShowSevereError( - state, EnergyPlus::format("WaterUse:Storage (Water Storage Tank) =\"{}\" not found in {} called {}", TankName, CompType, CompName)); + ShowSevereError(state, + std::format("WaterUse:Storage (Water Storage Tank) =\"{}\" not found in {} called {}", TankName, CompType, CompName)); ErrorsFound = true; return; } @@ -1603,8 +1604,8 @@ namespace WaterManager { for (TankNum = 1; TankNum <= state.dataWaterData->NumWaterStorageTanks; ++TankNum) { if (state.dataWaterData->WaterStorage(TankNum).NumWaterDemands == 0) { ShowWarningError(state, "Found WaterUse:Storage that has nothing connected to draw water from it."); - ShowContinueError( - state, EnergyPlus::format("Occurs for WaterUse:Storage = {}", state.dataWaterData->WaterStorage(TankNum).Name)); + ShowContinueError(state, + std::format("Occurs for WaterUse:Storage = {}", state.dataWaterData->WaterStorage(TankNum).Name)); ShowContinueError(state, "Check that input for water consuming components specifies a water supply tank."); } } diff --git a/src/EnergyPlus/WaterThermalTanks.cc b/src/EnergyPlus/WaterThermalTanks.cc index fb548fd8088..062ecd008ee 100644 --- a/src/EnergyPlus/WaterThermalTanks.cc +++ b/src/EnergyPlus/WaterThermalTanks.cc @@ -45,6 +45,9 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + // ObjexxFCL Headers #include #include @@ -734,7 +737,7 @@ bool getDesuperHtrInput(EnergyPlusData &state) DesupHtr.DeadBandTempDiff = rNumericArgs(1); if (DesupHtr.DeadBandTempDiff <= 0.0 || DesupHtr.DeadBandTempDiff > 20.0) { ShowSevereError(state, - EnergyPlus::format("{} = {}: {} must be > 0 and <= 20. {} = {:.1T}", + EnergyPlus::format("{} = {}: {} must be > 0 and <= 20. {} = {:.1f}", cCurrentModuleObject, DesupHtr.Name, cNumericFieldNames(1), @@ -772,7 +775,7 @@ bool getDesuperHtrInput(EnergyPlusData &state) ShowWarningError(state, EnergyPlus::format("{}, \"{}\":", cCurrentModuleObject, DesupHtr.Name)); ShowContinueError(state, EnergyPlus::format("The {} should be normalized ", cAlphaFieldNames(4))); ShowContinueError( - state, EnergyPlus::format(" to 1.0 at the rating point. Curve output at the rating point = {:.3T}", HEffFTemp)); + state, EnergyPlus::format(" to 1.0 at the rating point. Curve output at the rating point = {:.3f}", HEffFTemp)); ShowContinueError(state, " The simulation continues using the user-specified curve."); } } @@ -829,7 +832,7 @@ bool getDesuperHtrInput(EnergyPlusData &state) DesupHtr.HeatReclaimRecoveryEff = rNumericArgs(2); if (DesupHtr.HeatReclaimRecoveryEff <= 0.0 || DesupHtr.HeatReclaimRecoveryEff > 0.9) { ShowSevereError(state, - EnergyPlus::format("{} = {}: {} must be > 0.0 and <= 0.9, Efficiency = {:.3T}", + EnergyPlus::format("{} = {}: {} must be > 0.0 and <= 0.9, Efficiency = {:.3f}", cCurrentModuleObject, DesupHtr.Name, cNumericFieldNames(2), @@ -844,12 +847,12 @@ bool getDesuperHtrInput(EnergyPlusData &state) DesupHtr.HeatReclaimRecoveryEff = rNumericArgs(2); if (DesupHtr.HeatReclaimRecoveryEff <= 0.0 || DesupHtr.HeatReclaimRecoveryEff > 0.3) { ShowSevereError(state, - EnergyPlus::format("{} = {}: {} must be > 0.0 and <= 0.3, {} = {:.3T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(2), - cNumericFieldNames(2), - DesupHtr.HeatReclaimRecoveryEff)); + std::format("{} = {}: {} must be > 0.0 and <= 0.3, {} = {:.3f}", + cCurrentModuleObject, + DesupHtr.Name, + cNumericFieldNames(2), + cNumericFieldNames(2), + DesupHtr.HeatReclaimRecoveryEff)); ErrorsFound = true; } } // Blank Num(2) @@ -880,11 +883,10 @@ bool getDesuperHtrInput(EnergyPlusData &state) if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - EnergyPlus::format( - "{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", - cCurrentModuleObject, - DesupHtr.Name, - DesupHtr.HeatingSourceName)); + std::format("{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", + cCurrentModuleObject, + DesupHtr.Name, + DesupHtr.HeatingSourceName)); ErrorsFound = true; } } @@ -913,11 +915,10 @@ bool getDesuperHtrInput(EnergyPlusData &state) if (HeatReclaim.ReclaimEfficiencyTotal > 0.9) { ShowSevereError( state, - EnergyPlus::format( - "{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.9", - cCurrentModuleObject, - DesupHtr.Name, - DesupHtr.HeatingSourceName)); + std::format("{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.9", + cCurrentModuleObject, + DesupHtr.Name, + DesupHtr.HeatingSourceName)); ErrorsFound = true; } } @@ -949,10 +950,10 @@ bool getDesuperHtrInput(EnergyPlusData &state) if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - EnergyPlus::format("{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", - cCurrentModuleObject, - DesupHtr.Name, - DesupHtr.HeatingSourceName)); + std::format("{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", + cCurrentModuleObject, + DesupHtr.Name, + DesupHtr.HeatingSourceName)); ErrorsFound = true; } } @@ -978,10 +979,10 @@ bool getDesuperHtrInput(EnergyPlusData &state) if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - EnergyPlus::format("{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", - cCurrentModuleObject, - DesupHtr.Name, - DesupHtr.HeatingSourceName)); + std::format("{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", + cCurrentModuleObject, + DesupHtr.Name, + DesupHtr.HeatingSourceName)); ErrorsFound = true; } } @@ -1002,10 +1003,10 @@ bool getDesuperHtrInput(EnergyPlusData &state) if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { ShowSevereError( state, - EnergyPlus::format("{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", - cCurrentModuleObject, - DesupHtr.Name, - DesupHtr.HeatingSourceName)); + std::format("{} = {}: sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", + cCurrentModuleObject, + DesupHtr.Name, + DesupHtr.HeatingSourceName)); ErrorsFound = true; } } @@ -1015,7 +1016,7 @@ bool getDesuperHtrInput(EnergyPlusData &state) if (DesupHtr.ReclaimHeatingSourceIndexNum < 0) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{}={}, could not find desuperheater coil {}={}", cCurrentModuleObject, DesupHtr.Name, cAlphaArgs(9), cAlphaArgs(10))); ErrorsFound = true; } else { @@ -1030,17 +1031,17 @@ bool getDesuperHtrInput(EnergyPlusData &state) DesupHtr.ValidSourceType = true; HeatReclaim.ReclaimEfficiencyTotal += DesupHtr.HeatReclaimRecoveryEff; if (HeatReclaim.ReclaimEfficiencyTotal > 0.3) { - ShowSevereError(state, - EnergyPlus::format( - "{}, \"{}\" sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", - cCurrentModuleObject, - DesupHtr.Name, - DesupHtr.HeatingSourceName)); + ShowSevereError( + state, + std::format("{}, \"{}\" sum of heat reclaim recovery efficiencies from the same source coil: \"{}\" cannot be over 0.3", + cCurrentModuleObject, + DesupHtr.Name, + DesupHtr.HeatingSourceName)); ErrorsFound = true; } } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}:", cCurrentModuleObject, DesupHtr.Name)); + ShowSevereError(state, std::format("{} = {}:", cCurrentModuleObject, DesupHtr.Name)); ShowContinueError(state, " desuperheater can only be used with Coil:Cooling:DX:SingleSpeed, "); ShowContinueError(state, " Coil:Cooling:DX:TwoSpeed, Coil:Cooling:DX:MultiSpeed, Coil:Cooling:DX:TwoStageWithHumidityControlMode, " @@ -1048,101 +1049,101 @@ bool getDesuperHtrInput(EnergyPlusData &state) "Coil:Cooling:WaterToAirHeatPump:EquationFit, Refrigeration:CompressorRack,"); ShowContinueError(state, " Refrigeration:Condenser:AirCooled ,Refrigeration:Condenser:EvaporativeCooled, "); ShowContinueError(state, " or Refrigeration:Condenser:WaterCooled."); - ShowContinueError(state, EnergyPlus::format(" Invalid desuperheater heat source object: {} \"{}\"", heatSourceObjType, cAlphaArgs(10))); + ShowContinueError(state, std::format(" Invalid desuperheater heat source object: {} \"{}\"", heatSourceObjType, cAlphaArgs(10))); ErrorsFound = true; } if (errFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {}={}", cCurrentModuleObject, DesupHtr.Name)); + ShowContinueError(state, std::format("...occurs in {}={}", cCurrentModuleObject, DesupHtr.Name)); ErrorsFound = true; } if (DesupHtr.ReclaimHeatingSourceIndexNum == 0 && DesupHtr.ReclaimHeatingSource != ReclaimHeatObjectType::CoilCoolingDX) { ShowSevereError(state, - EnergyPlus::format("{}, \"{}\" desuperheater heat source object not found: {} \"{}\"", - cCurrentModuleObject, - DesupHtr.Name, - heatSourceObjType, - cAlphaArgs(10))); + std::format("{}, \"{}\" desuperheater heat source object not found: {} \"{}\"", + cCurrentModuleObject, + DesupHtr.Name, + heatSourceObjType, + cAlphaArgs(10))); ErrorsFound = true; } DesupHtr.OperatingWaterFlowRate = rNumericArgs(6); if (DesupHtr.OperatingWaterFlowRate <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{} = {}: {} must be greater than 0. {} = {:.6T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(6), - cNumericFieldNames(6), - rNumericArgs(6))); + std::format("{} = {}: {} must be greater than 0. {} = {:.6f}", + cCurrentModuleObject, + DesupHtr.Name, + cNumericFieldNames(6), + cNumericFieldNames(6), + rNumericArgs(6))); ErrorsFound = true; } DesupHtr.PumpElecPower = rNumericArgs(7); if (DesupHtr.PumpElecPower < 0.0) { ShowSevereError(state, - EnergyPlus::format("{} = {}: {} must be >= 0. {} = {:.2T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(7), - cNumericFieldNames(7), - rNumericArgs(7))); + std::format("{} = {}: {} must be >= 0. {} = {:.2f}", + cCurrentModuleObject, + DesupHtr.Name, + cNumericFieldNames(7), + cNumericFieldNames(7), + rNumericArgs(7))); ErrorsFound = true; } if ((DesupHtr.PumpElecPower / DesupHtr.OperatingWaterFlowRate) > 7.9264e6) { ShowWarningError(state, - EnergyPlus::format("{} = {}: {} to {} ratio > 7.9264E6. {} to {} = {:.3T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(7), - cNumericFieldNames(6), - cNumericFieldNames(7), - cNumericFieldNames(6), - (DesupHtr.PumpElecPower / DesupHtr.OperatingWaterFlowRate))); - ShowContinueError(state, EnergyPlus::format(" Suggest reducing {} or increasing {}.", cNumericFieldNames(7), cNumericFieldNames(6))); + std::format("{} = {}: {} to {} ratio > 7.9264E6. {} to {} = {:.3f}", + cCurrentModuleObject, + DesupHtr.Name, + cNumericFieldNames(7), + cNumericFieldNames(6), + cNumericFieldNames(7), + cNumericFieldNames(6), + (DesupHtr.PumpElecPower / DesupHtr.OperatingWaterFlowRate))); + ShowContinueError(state, std::format(" Suggest reducing {} or increasing {}.", cNumericFieldNames(7), cNumericFieldNames(6))); ShowContinueError(state, " The simulation will continue using the user defined values."); } DesupHtr.PumpFracToWater = rNumericArgs(8); if (DesupHtr.PumpFracToWater < 0.0 || DesupHtr.PumpFracToWater > 1.0) { ShowSevereError(state, - EnergyPlus::format("{} = {}: {} must be >= 0 or <= 1. {} = {:.3T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(8), - cNumericFieldNames(8), - rNumericArgs(8))); + std::format("{} = {}: {} must be >= 0 or <= 1. {} = {:.3f}", + cCurrentModuleObject, + DesupHtr.Name, + cNumericFieldNames(8), + cNumericFieldNames(8), + rNumericArgs(8))); ErrorsFound = true; } DesupHtr.OnCycParaLoad = rNumericArgs(9); if (DesupHtr.OnCycParaLoad < 0.0) { ShowSevereError(state, - EnergyPlus::format("{} = {}: {} must be >= 0. {} = {:.2T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(9), - cNumericFieldNames(9), - rNumericArgs(9))); + std::format("{} = {}: {} must be >= 0. {} = {:.2f}", + cCurrentModuleObject, + DesupHtr.Name, + cNumericFieldNames(9), + cNumericFieldNames(9), + rNumericArgs(9))); ErrorsFound = true; } DesupHtr.OffCycParaLoad = rNumericArgs(10); if (DesupHtr.OffCycParaLoad < 0.0) { ShowSevereError(state, - EnergyPlus::format("{} = {}: {} must be >= 0. {} = {:.2T}", - cCurrentModuleObject, - DesupHtr.Name, - cNumericFieldNames(10), - cNumericFieldNames(10), - rNumericArgs(10))); + std::format("{} = {}: {} must be >= 0. {} = {:.2f}", + cCurrentModuleObject, + DesupHtr.Name, + cNumericFieldNames(10), + cNumericFieldNames(10), + rNumericArgs(10))); ErrorsFound = true; } } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("Errors found in getting {} input. Preceding condition causes termination.", cCurrentModuleObject)); + ShowFatalError(state, std::format("Errors found in getting {} input. Preceding condition causes termination.", cCurrentModuleObject)); } return ErrorsFound; @@ -1262,12 +1263,11 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) // Dead Band Temperature Difference HPWH.DeadBandTempDiff = hpwhNumeric[1 + nNumericOffset]; if (HPWH.DeadBandTempDiff <= 0.0 || HPWH.DeadBandTempDiff > 20.0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError( - state, - EnergyPlus::format("{}{}", - hpwhNumericFieldNames[1 + nNumericOffset], - EnergyPlus::format(" difference must be > 0 and <= 20. Dead band = {:.1T}", hpwhNumeric[1 + nNumericOffset]))); + ShowSevereError(state, std::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, + std::format("{}{}", + hpwhNumericFieldNames[1 + nNumericOffset], + std::format(" difference must be > 0 and <= 20. Dead band = {:.1f}", hpwhNumeric[1 + nNumericOffset]))); ErrorsFound = true; } @@ -1298,10 +1298,9 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) // Condenser Water Flow Rate HPWH.OperatingWaterFlowRate = hpwhNumeric[2]; if (HPWH.OperatingWaterFlowRate <= 0.0 && hpwhNumeric[2] != Constant::AutoCalculate) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError( - state, - EnergyPlus::format("{} must be greater than 0. Condenser water flow rate = {:.6T}", hpwhNumericFieldNames[2], hpwhNumeric[2])); + state, std::format("{} must be greater than 0. Condenser water flow rate = {:.6f}", hpwhNumericFieldNames[2], hpwhNumeric[2])); ErrorsFound = true; } @@ -1312,22 +1311,22 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) HPWH.WrappedCondenserTopLocation = hpwhNumeric[3 + nNumericOffset]; if (HPWH.WrappedCondenserBottomLocation < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, - EnergyPlus::format("{} must be greater than 0. Condenser bottom location = {:.6T}", - hpwhNumericFieldNames[2], - HPWH.WrappedCondenserBottomLocation)); + std::format("{} must be greater than 0. Condenser bottom location = {:.6f}", + hpwhNumericFieldNames[2], + HPWH.WrappedCondenserBottomLocation)); ErrorsFound = true; } if (HPWH.WrappedCondenserBottomLocation >= HPWH.WrappedCondenserTopLocation) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, - EnergyPlus::format("{} ({:.6T}) must be greater than {} ({:.6T}).", - HPWH.WrappedCondenserTopLocation, - hpwhNumericFieldNames[2], - hpwhNumericFieldNames[3], - HPWH.WrappedCondenserBottomLocation)); + std::format("{} ({:.6f}) must be greater than {} ({:.6f}).", + hpwhNumericFieldNames[3], + HPWH.WrappedCondenserTopLocation, + hpwhNumericFieldNames[2], + HPWH.WrappedCondenserBottomLocation)); ErrorsFound = true; } @@ -1342,12 +1341,12 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) // Evaporator Air Flow Rate HPWH.OperatingAirFlowRate = hpwhNumeric[3 + nNumericOffset]; if (HPWH.OperatingAirFlowRate <= 0.0 && hpwhNumeric[3 + nNumericOffset] != Constant::AutoCalculate) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, - EnergyPlus::format( - "{}{}", - hpwhNumericFieldNames[3 + nNumericOffset], - EnergyPlus::format(" must be greater than 0. Evaporator air flow rate = {:.6T}", hpwhNumeric[3 + nNumericOffset]))); + ShowSevereError(state, std::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError( + state, + std::format("{}{}", + hpwhNumericFieldNames[3 + nNumericOffset], + std::format(" must be greater than 0. Evaporator air flow rate = {:.6f}", hpwhNumeric[3 + nNumericOffset]))); ErrorsFound = true; } @@ -1386,13 +1385,13 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) if (!hpwhAlphaBlank[13 + nAlphaOffset]) { HPWH.AmbientTempZone = Util::FindItemInList(hpwhAlpha[13 + nAlphaOffset], state.dataHeatBal->Zone); if (HPWH.AmbientTempZone == 0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", not found", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, EnergyPlus::format("{}=\"{}\".", hpwhAlphaFieldNames[13 + nAlphaOffset], hpwhAlpha[13 + nAlphaOffset])); + ShowSevereError(state, std::format("{}=\"{}\", not found", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, std::format("{}=\"{}\".", hpwhAlphaFieldNames[13 + nAlphaOffset], hpwhAlpha[13 + nAlphaOffset])); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, EnergyPlus::format("required {} is blank.", hpwhAlphaFieldNames[13 + nAlphaOffset])); + ShowSevereError(state, std::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, std::format("required {} is blank.", hpwhAlphaFieldNames[13 + nAlphaOffset])); ErrorsFound = true; } break; @@ -1466,9 +1465,8 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) state, "Coil:WaterHeating:AirToWaterHeatPump:VariableSpeed", HPWH.DXCoilName, bVSCoilErrFlag); if (bVSCoilErrFlag) { - ShowContinueError(state, EnergyPlus::format("...occurs in {} ={}", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, - EnergyPlus::format("...could not find either DXCoils::DXCoil or Variable Speed Coil {}", HPWH.DXCoilName)); + ShowContinueError(state, std::format("...occurs in {} ={}", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, std::format("...could not find either DXCoils::DXCoil or Variable Speed Coil {}", HPWH.DXCoilName)); ErrorsFound = true; } } @@ -1487,10 +1485,9 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) // this is a single speed coil DXCoils::DXCoilData &Coil = state.dataDXCoils->DXCoil(HPWH.DXCoilNum); if (!Util::SameString(HPWH.DXCoilType, HVAC::coilTypeNames[(int)Coil.coilType])) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, EnergyPlus::format("specifies the coil {}=\"{}\".", HPWH.DXCoilType, HPWH.DXCoilName)); - ShowContinueError(state, - EnergyPlus::format("However, {} is a coil of type {}.", HPWH.DXCoilName, HVAC::coilTypeNames[(int)Coil.coilType])); + ShowSevereError(state, std::format("{}=\"{}\", ", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, std::format("specifies the coil {}=\"{}\".", HPWH.DXCoilType, HPWH.DXCoilName)); + ShowContinueError(state, std::format("However, {} is a coil of type {}.", HPWH.DXCoilName, HVAC::coilTypeNames[(int)Coil.coilType])); ErrorsFound = true; } HPWH.coilType = Coil.coilType; @@ -1500,7 +1497,7 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) // Make sure that the coil and tank are compatible. if (bIsVScoil) { if (HPWH.HPWHType != DataPlant::PlantEquipmentType::HeatPumpWtrHeaterPumped) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Coil:WaterHeating:AirToWaterHeatPump:VariableSpeed can only be used with a pumped condenser heat pump " "water heater."); @@ -1511,7 +1508,7 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) HPWH.HPWHType == DataPlant::PlantEquipmentType::HeatPumpWtrHeaterPumped) || (HPWH.coilType == HVAC::CoilType::WaterHeatingDXWrapped && HPWH.HPWHType == DataPlant::PlantEquipmentType::HeatPumpWtrHeaterWrapped))) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); std::string ExpectedCoilType; if (HPWH.HPWHType == DataPlant::PlantEquipmentType::HeatPumpWtrHeaterPumped) { ExpectedCoilType = HVAC::coilTypeNames[(int)HVAC::CoilType::WaterHeatingDXPumped]; @@ -1520,7 +1517,7 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) } else { assert(0); } - ShowContinueError(state, EnergyPlus::format("can only be used with {}", ExpectedCoilType)); + ShowContinueError(state, std::format("can only be used with {}", ExpectedCoilType)); ErrorsFound = true; } } @@ -1558,12 +1555,12 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) HPWH.MaxAirTempForHPOperation = hpwhNumeric[5 + nNumericOffset]; if (HPWH.MaxAirTempForHPOperation <= HPWH.MinAirTempForHPOperation) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\": maximum inlet air temperature for heat pump compressor operation", - state.dataIPShortCut->cCurrentModuleObject, - HPWH.Name)); + std::format("{}=\"{}\": maximum inlet air temperature for heat pump compressor operation", + state.dataIPShortCut->cCurrentModuleObject, + HPWH.Name)); ShowContinueError(state, "must be greater than the minimum inlet air temperature for heat pump compressor operation."); - ShowContinueError(state, EnergyPlus::format("...Minimum inlet air temperature = {:.1T}", HPWH.MinAirTempForHPOperation)); - ShowContinueError(state, EnergyPlus::format("...Maximum inlet air temperature = {:.1T}", HPWH.MaxAirTempForHPOperation)); + ShowContinueError(state, std::format("...Minimum inlet air temperature = {:.1f}", HPWH.MinAirTempForHPOperation)); + ShowContinueError(state, std::format("...Maximum inlet air temperature = {:.1f}", HPWH.MaxAirTempForHPOperation)); } // Compressor Location @@ -1584,32 +1581,32 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) case CrankcaseHeaterControlTemp::Zone: { if (HPWH.InletAirConfiguration == WTTAmbientTemp::OutsideAir || HPWH.InletAirConfiguration == WTTAmbientTemp::Schedule) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\": Inlet Air Configuration must be Zone Air Only or Zone And", - state.dataIPShortCut->cCurrentModuleObject, - HPWH.Name)); + std::format("{}=\"{}\": Inlet Air Configuration must be Zone Air Only or Zone And", + state.dataIPShortCut->cCurrentModuleObject, + HPWH.Name)); ShowContinueError(state, " Outdoor Air when compressor location equals ZONE."); ErrorsFound = true; } if (!hpwhAlphaBlank[21 + nAlphaOffset]) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\" {} was provided but will not be used based on compressor location input=\"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - HPWH.Name, - hpwhAlphaFieldNames[21 + nAlphaOffset], - hpwhAlpha[20 + nAlphaOffset])); + std::format("{}=\"{}\" {} was provided but will not be used based on compressor location input=\"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + HPWH.Name, + hpwhAlphaFieldNames[21 + nAlphaOffset], + hpwhAlpha[20 + nAlphaOffset])); } break; } case CrankcaseHeaterControlTemp::Outdoors: { if (!hpwhAlphaBlank[21 + nAlphaOffset]) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\" {} was provided but will not be used based on {}=\"{}\".", - state.dataIPShortCut->cCurrentModuleObject, - HPWH.Name, - hpwhAlphaFieldNames[21 + nAlphaOffset], - hpwhAlphaFieldNames[21 + nAlphaOffset], - hpwhAlpha[20 + nAlphaOffset])); + std::format("{}=\"{}\" {} was provided but will not be used based on {}=\"{}\".", + state.dataIPShortCut->cCurrentModuleObject, + HPWH.Name, + hpwhAlphaFieldNames[21 + nAlphaOffset], + hpwhAlphaFieldNames[21 + nAlphaOffset], + hpwhAlpha[20 + nAlphaOffset])); } break; } @@ -1647,17 +1644,14 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) if (errFlag) { ErrorsFound = true; } else if (HPWH.fanType != HVAC::FanType::OnOff && HPWH.fanType != HVAC::FanType::SystemModel) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\": illegal fan type specified.", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\": illegal fan type specified.", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError( state, - EnergyPlus::format(" The fan object ({}) type must be Fan:SystemModel or Fan:OnOff when used with a heat pump water heater.", - HPWH.FanName)); + std::format(" The fan object ({}) type must be Fan:SystemModel or Fan:OnOff when used with a heat pump water heater.", HPWH.FanName)); ErrorsFound = true; } else if (HPWH.fanType != HVAC::FanType::OnOff && HPWH.fanType != HVAC::FanType::SystemModel) { - ShowSevereError(state, - EnergyPlus::format("{}=\"{}\": illegal fan type specified.", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, EnergyPlus::format(" The {} must specify that the fan object", state.dataIPShortCut->cCurrentModuleObject)); + ShowSevereError(state, std::format("{}=\"{}\": illegal fan type specified.", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, std::format(" The {} must specify that the fan object", state.dataIPShortCut->cCurrentModuleObject)); ShowContinueError(state, " is of type FanSystemModel or Fan:OnOff in addition to the fan actually being of that type and defined elsewhere."); } @@ -1665,12 +1659,12 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) if (FanVolFlow != DataSizing::AutoSize && !errFlag) { if (FanVolFlow < HPWH.OperatingAirFlowRate) { ShowSevereError(state, - EnergyPlus::format("{} - air flow rate = {:.7T} in fan object {} is less than the HPWHs evaporator air flow rate.", - state.dataIPShortCut->cCurrentModuleObject, - FanVolFlow, - HPWH.FanName)); + std::format("{} - air flow rate = {:.7f} in fan object {} is less than the HPWHs evaporator air flow rate.", + state.dataIPShortCut->cCurrentModuleObject, + FanVolFlow, + HPWH.FanName)); ShowContinueError(state, " The fan flow rate must be >= to the HPWHs evaporator volumetric air flow rate."); - ShowContinueError(state, EnergyPlus::format(" Occurs in unit = {}", HPWH.Name)); + ShowContinueError(state, std::format(" Occurs in unit = {}", HPWH.Name)); ErrorsFound = true; } } @@ -1692,15 +1686,14 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) 0.1422) { ShowWarningError( state, - EnergyPlus::format( + std::format( "{}= {}{}", HVAC::coilTypeNames[(int)state.dataDXCoils->DXCoil(HPWH.DXCoilNum).coilType], state.dataDXCoils->DXCoil(HPWH.DXCoilNum).Name, - EnergyPlus::format( - ": Rated condenser pump power per watt of rated heating capacity has exceeded the recommended maximum of 0.1422 " - "W/W (41.67 watt/MBH). Condenser pump power per watt = {:.4T}", - (state.dataDXCoils->DXCoil(HPWH.DXCoilNum).HPWHCondPumpElecNomPower / - state.dataDXCoils->DXCoil(HPWH.DXCoilNum).RatedTotCap2)))); + std::format(": Rated condenser pump power per watt of rated heating capacity has exceeded the recommended maximum of 0.1422 " + "W/W (41.67 watt/MBH). Condenser pump power per watt = {:.4f}", + (state.dataDXCoils->DXCoil(HPWH.DXCoilNum).HPWHCondPumpElecNomPower / + state.dataDXCoils->DXCoil(HPWH.DXCoilNum).RatedTotCap2)))); } } else if ((HPWH.DXCoilNum > 0) && (bIsVScoil)) { @@ -1731,24 +1724,24 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) // On Cycle Parasitic Electric Load HPWH.OnCycParaLoad = hpwhNumeric[6 + nNumericOffset]; if (HPWH.OnCycParaLoad < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\",", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\",", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, - EnergyPlus::format("{} must be >= 0. {}{}", - hpwhNumericFieldNames[6 + nNumericOffset], - hpwhNumericFieldNames[6 + nNumericOffset], - EnergyPlus::format(" = {:.2T}", hpwhNumeric[6 + nNumericOffset]))); + std::format("{} must be >= 0. {}{}", + hpwhNumericFieldNames[6 + nNumericOffset], + hpwhNumericFieldNames[6 + nNumericOffset], + std::format(" = {:.2f}", hpwhNumeric[6 + nNumericOffset]))); ErrorsFound = true; } // Off Cycle Parasitic Electric Load HPWH.OffCycParaLoad = hpwhNumeric[7 + nNumericOffset]; if (HPWH.OffCycParaLoad < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\",", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\",", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, - EnergyPlus::format("{} must be >= 0. {}{}", - hpwhNumericFieldNames[7 + nNumericOffset], - hpwhNumericFieldNames[2 + nNumericOffset], - EnergyPlus::format(" = {:.2T}", hpwhNumeric[7 + nNumericOffset]))); + std::format("{} must be >= 0. {}{}", + hpwhNumericFieldNames[7 + nNumericOffset], + hpwhNumericFieldNames[2 + nNumericOffset], + std::format(" = {:.2f}", hpwhNumeric[7 + nNumericOffset]))); ErrorsFound = true; } @@ -1756,15 +1749,15 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) if (Util::SameString(hpwhAlpha[25 + nAlphaOffset], "Zone")) { HPWH.ParasiticTempIndicator = WTTAmbientTemp::TempZone; if (HPWH.InletAirConfiguration == WTTAmbientTemp::OutsideAir || HPWH.InletAirConfiguration == WTTAmbientTemp::Schedule) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\",", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, EnergyPlus::format("{} must be ZoneAirOnly or ZoneAndOutdoorAir", hpwhAlphaFieldNames[25 + nAlphaOffset])); + ShowSevereError(state, std::format("{}=\"{}\",", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, std::format("{} must be ZoneAirOnly or ZoneAndOutdoorAir", hpwhAlphaFieldNames[25 + nAlphaOffset])); ShowContinueError(state, " when parasitic heat rejection location equals Zone."); ErrorsFound = true; } } else if (Util::SameString(hpwhAlpha[25 + nAlphaOffset], "Outdoors")) { HPWH.ParasiticTempIndicator = WTTAmbientTemp::OutsideAir; } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, " parasitic heat rejection location must be either Zone or Outdoors."); ErrorsFound = true; } @@ -1784,13 +1777,13 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) Node::CompFluidStream::Primary, Node::ObjectIsNotParent); } else { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowWarningError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Inlet air mixer node name specified but only required when Inlet Air Configuration is selected as " "Zone and OutdoorAir. Node name disregarded and simulation continues."); } } else if (hpwhAlphaBlank[26 + nAlphaOffset] && HPWH.InletAirConfiguration == WTTAmbientTemp::ZoneAndOA) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Inlet air mixer node name required when Inlet Air Configuration is selected as ZoneAndOutdoorAir."); ErrorsFound = true; } @@ -1809,13 +1802,13 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) Node::CompFluidStream::Primary, Node::ObjectIsNotParent); } else { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowWarningError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Outlet air splitter node name specified but only required when Inlet Air Configuration is selected as " "ZoneAndOutdoorAir. Node name disregarded and simulation continues."); } } else if (hpwhAlphaBlank[27 + nAlphaOffset] && HPWH.InletAirConfiguration == WTTAmbientTemp::ZoneAndOA) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Outlet air splitter node name required when Inlet Air Configuration is selected as ZoneAndOutdoorAir."); ErrorsFound = true; } @@ -1858,10 +1851,10 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) OutAirNodeManager::CheckAndAddAirNodeNumber(state, HPWH.OutsideAirNode, Okay); if (!Okay) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\": Adding outdoor air node={}", - state.dataIPShortCut->cCurrentModuleObject, - HPWH.Name, - hpwhAlpha[9 + nAlphaOffset])); + std::format("{}=\"{}\": Adding outdoor air node={}", + state.dataIPShortCut->cCurrentModuleObject, + HPWH.Name, + hpwhAlpha[9 + nAlphaOffset])); } } @@ -1936,10 +1929,10 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) OutAirNodeManager::CheckAndAddAirNodeNumber(state, HPWH.OutsideAirNode, Okay); if (!Okay) { ShowWarningError(state, - EnergyPlus::format("{}=\"{}\": Adding outdoor air node ={}", - state.dataIPShortCut->cCurrentModuleObject, - HPWH.Name, - hpwhAlpha[9 + nAlphaOffset])); + std::format("{}=\"{}\": Adding outdoor air node ={}", + state.dataIPShortCut->cCurrentModuleObject, + HPWH.Name, + hpwhAlpha[9 + nAlphaOffset])); } } @@ -1958,37 +1951,34 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) // check that required node names are present if (HPWH.InletAirConfiguration == WTTAmbientTemp::Schedule || HPWH.InletAirConfiguration == WTTAmbientTemp::TempZone) { if (HPWH.HeatPumpAirInletNode == 0 || HPWH.HeatPumpAirOutletNode == 0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, EnergyPlus::format("When {}=\"{}\".", hpwhAlphaFieldNames[6 + nAlphaOffset], hpwhAlpha[6 + nAlphaOffset])); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, std::format("When {}=\"{}\".", hpwhAlphaFieldNames[6 + nAlphaOffset], hpwhAlpha[6 + nAlphaOffset])); ShowContinueError( - state, - EnergyPlus::format("{} and {} must be specified.", hpwhAlphaFieldNames[7 + nAlphaOffset], hpwhAlphaFieldNames[8 + nAlphaOffset])); + state, std::format("{} and {} must be specified.", hpwhAlphaFieldNames[7 + nAlphaOffset], hpwhAlphaFieldNames[8 + nAlphaOffset])); ErrorsFound = true; } } else if (HPWH.InletAirConfiguration == WTTAmbientTemp::OutsideAir) { if (HPWH.OutsideAirNode == 0 || HPWH.ExhaustAirNode == 0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, EnergyPlus::format("When {}=\"{}\".", hpwhAlphaFieldNames[6 + nAlphaOffset], hpwhAlpha[6 + nAlphaOffset])); - ShowContinueError(state, - EnergyPlus::format( - "{} and {} must be specified.", hpwhAlphaFieldNames[9 + nAlphaOffset], hpwhAlphaFieldNames[10 + nAlphaOffset])); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, std::format("When {}=\"{}\".", hpwhAlphaFieldNames[6 + nAlphaOffset], hpwhAlpha[6 + nAlphaOffset])); + ShowContinueError( + state, + std::format("{} and {} must be specified.", hpwhAlphaFieldNames[9 + nAlphaOffset], hpwhAlphaFieldNames[10 + nAlphaOffset])); ErrorsFound = true; } } else if (HPWH.InletAirMixerNode > 0 && HPWH.OutletAirSplitterNode > 0 && HPWH.InletAirConfiguration == WTTAmbientTemp::ZoneAndOA) { if (HPWH.HeatPumpAirInletNode == 0 || HPWH.HeatPumpAirOutletNode == 0 || HPWH.OutsideAirNode == 0 || HPWH.ExhaustAirNode == 0) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, EnergyPlus::format("When {}=\"{}\".", hpwhAlphaFieldNames[6 + nAlphaOffset], hpwhAlpha[6 + nAlphaOffset])); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, std::format("When {}=\"{}\".", hpwhAlphaFieldNames[6 + nAlphaOffset], hpwhAlpha[6 + nAlphaOffset])); if (HPWH.HeatPumpAirInletNode == 0 || HPWH.HeatPumpAirOutletNode == 0) { - ShowContinueError(state, - EnergyPlus::format("{} and {} must be specified.", - hpwhAlphaFieldNames[7 + nAlphaOffset], - hpwhAlphaFieldNames[8 + nAlphaOffset])); + ShowContinueError( + state, + std::format("{} and {} must be specified.", hpwhAlphaFieldNames[7 + nAlphaOffset], hpwhAlphaFieldNames[8 + nAlphaOffset])); } if (HPWH.OutsideAirNode == 0 || HPWH.ExhaustAirNode == 0) { - ShowContinueError(state, - EnergyPlus::format("{} and {} must be specified.", - hpwhAlphaFieldNames[9 + nAlphaOffset], - hpwhAlphaFieldNames[10 + nAlphaOffset])); + ShowContinueError( + state, + std::format("{} and {} must be specified.", hpwhAlphaFieldNames[9 + nAlphaOffset], hpwhAlphaFieldNames[10 + nAlphaOffset])); } ErrorsFound = true; } @@ -2016,28 +2006,26 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) FoundInletNode = true; } if (!FoundInletNode) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError( - state, - EnergyPlus::format("The HPWH's air inlet node name = {} was not properly specified ", hpwhAlpha[7 + nAlphaOffset])); + state, std::format("The HPWH's air inlet node name = {} was not properly specified ", hpwhAlpha[7 + nAlphaOffset])); ShowContinueError(state, - EnergyPlus::format("as an exhaust air node for zone = {} in a ZoneHVAC:EquipmentConnections object.", - hpwhAlpha[13 + nAlphaOffset])); + std::format("as an exhaust air node for zone = {} in a ZoneHVAC:EquipmentConnections object.", + hpwhAlpha[13 + nAlphaOffset])); ErrorsFound = true; } if (!FoundOutletNode) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError( - state, - EnergyPlus::format("The HPWH's air outlet node name = {} was not properly specified ", hpwhAlpha[8 + nAlphaOffset])); + state, std::format("The HPWH's air outlet node name = {} was not properly specified ", hpwhAlpha[8 + nAlphaOffset])); ShowContinueError(state, - EnergyPlus::format("as an inlet air node for zone = {} in a ZoneHVAC:EquipmentConnections object.", - hpwhAlpha[13 + nAlphaOffset])); + std::format("as an inlet air node for zone = {} in a ZoneHVAC:EquipmentConnections object.", + hpwhAlpha[13 + nAlphaOffset])); ErrorsFound = true; } } } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Heat pump water heater air inlet node name and air outlet node name must be listed in a " "ZoneHVAC:EquipmentConnections object when Inlet Air Configuration is equal to ZoneAirOnly or " @@ -2089,13 +2077,13 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) int FanOutletNodeNum = state.dataFans->fans(HPWH.FanNum)->outletNodeNum; if (FanOutletNodeNum != HPWH.FanOutletNode) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Heat pump water heater fan outlet node name does not match next connected component."); if (FanOutletNodeNum != 0) { - ShowContinueError(state, EnergyPlus::format("Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNodeNum))); + ShowContinueError(state, std::format("Fan outlet node name = {}", state.dataLoopNodes->NodeID(FanOutletNodeNum))); } if (HPWH.FanOutletNode != 0) { - ShowContinueError(state, EnergyPlus::format("Expected fan outlet node name = {}", state.dataLoopNodes->NodeID(HPWH.FanOutletNode))); + ShowContinueError(state, std::format("Expected fan outlet node name = {}", state.dataLoopNodes->NodeID(HPWH.FanOutletNode))); } ErrorsFound = true; } @@ -2113,14 +2101,13 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) } if (HPWH.fanPlace == HVAC::FanPlace::BlowThru) { if (FanInletNodeNum != HPWHFanInletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Heat pump water heater fan inlet node name does not match previous connected component."); if (FanOutletNodeNum != 0) { - ShowContinueError(state, EnergyPlus::format("Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNodeNum))); + ShowContinueError(state, std::format("Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNodeNum))); } if (HPWH.FanOutletNode != 0) { - ShowContinueError(state, - EnergyPlus::format("Expected fan inlet node name = {}", state.dataLoopNodes->NodeID(HPWHFanInletNodeNum))); + ShowContinueError(state, std::format("Expected fan inlet node name = {}", state.dataLoopNodes->NodeID(HPWHFanInletNodeNum))); } ErrorsFound = true; } @@ -2139,14 +2126,13 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) } if (HPWH.fanPlace == HVAC::FanPlace::DrawThru) { if (FanInletNodeNum != DXCoilAirOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Heat pump water heater fan inlet node name does not match previous connected component."); if (FanInletNodeNum != 0) { - ShowContinueError(state, EnergyPlus::format("Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNodeNum))); + ShowContinueError(state, std::format("Fan inlet node name = {}", state.dataLoopNodes->NodeID(FanInletNodeNum))); } if (DXCoilAirOutletNodeNum != 0) { - ShowContinueError(state, - EnergyPlus::format("Expected fan inlet node name = {}", state.dataLoopNodes->NodeID(DXCoilAirOutletNodeNum))); + ShowContinueError(state, std::format("Expected fan inlet node name = {}", state.dataLoopNodes->NodeID(DXCoilAirOutletNodeNum))); } ErrorsFound = true; } @@ -2162,14 +2148,13 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) } } if (DXCoilAirOutletNodeNum != HPWHCoilOutletNodeNum) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Heat pump water heater coil outlet node name does not match next connected component."); if (DXCoilAirOutletNodeNum != 0) { - ShowContinueError(state, EnergyPlus::format("Coil outlet node name = {}", state.dataLoopNodes->NodeID(DXCoilAirOutletNodeNum))); + ShowContinueError(state, std::format("Coil outlet node name = {}", state.dataLoopNodes->NodeID(DXCoilAirOutletNodeNum))); } if (HPWHCoilOutletNodeNum != 0) { - ShowContinueError(state, - EnergyPlus::format("Expected coil outlet node name = {}", state.dataLoopNodes->NodeID(HPWHCoilOutletNodeNum))); + ShowContinueError(state, std::format("Expected coil outlet node name = {}", state.dataLoopNodes->NodeID(HPWHCoilOutletNodeNum))); } ErrorsFound = true; } @@ -2251,8 +2236,8 @@ bool getHPWaterHeaterInput(EnergyPlusData &state) } else if (Util::SameString(CtrlLogicFlag, "MUTUALLYEXCLUSIVE")) { HPWH.AllowHeatingElementAndHeatPumpToRunAtSameTime = false; } else { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, EnergyPlus::format("{} is not a valid value for field Tank Element Control Logic.", CtrlLogicFlag)); + ShowSevereError(state, std::format("{}=\"{}\":", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, std::format("{} is not a valid value for field Tank Element Control Logic.", CtrlLogicFlag)); ErrorsFound = true; } @@ -2369,9 +2354,9 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) if ((state.dataIPShortCut->rNumericArgs(5) > Tank.MaxCapacity) && (!Tank.MaxCapacityWasAutoSized)) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Heater Minimum Capacity cannot be greater than Heater Maximum Capacity", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Heater Minimum Capacity cannot be greater than Heater Maximum Capacity", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else { Tank.MinCapacity = state.dataIPShortCut->rNumericArgs(5); @@ -2395,10 +2380,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) } default: { ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid Control Type entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + std::format("{} = {}: Invalid Control Type entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(3))); ErrorsFound = true; break; } @@ -2413,10 +2398,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) switch (Tank.FuelType) { case Constant::eFuel::Invalid: { ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid Heater Fuel Type entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(4))); + std::format("{} = {}: Invalid Heater Fuel Type entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(4))); // Set to Electric to avoid errors when setting up output variables Tank.FuelType = Constant::eFuel::Electricity; ErrorsFound = true; @@ -2430,7 +2415,7 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) Tank.Efficiency = state.dataIPShortCut->rNumericArgs(8); if (state.dataIPShortCut->rNumericArgs(8) > 1.0) { ShowWarningError(state, - fmt::format("{} = {}: {}={} should not typically be greater than 1.", + std::format("{} = {}: {}={} should not typically be greater than 1.", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1), state.dataIPShortCut->cNumericFieldNames(8), @@ -2438,9 +2423,9 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) } } else { ShowSevereError(state, - EnergyPlus::format("{} = {}: Heater Thermal Efficiency must be greater than zero", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Heater Thermal Efficiency must be greater than zero", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -2448,10 +2433,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) Tank.PLFCurve = Curve::GetCurveIndex(state, state.dataIPShortCut->cAlphaArgs(5)); if (Tank.PLFCurve == 0) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Part Load Factor curve not found = {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(5))); + std::format("{} = {}: Part Load Factor curve not found = {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(5))); ErrorsFound = true; } else { bool IsValid; @@ -2460,7 +2445,7 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) if (!IsValid) { ShowSevereError( state, - EnergyPlus::format( + std::format( "{} = {}: Part Load Factor curve failed to evaluate to greater than zero for all numbers in the domain of 0 to 1", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); @@ -2487,10 +2472,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) Tank.OffCycParaFuelType = Tank.FuelType; } else { // could have been an unsupported value ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid Off-Cycle Parasitic Fuel Type entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(6))); + std::format("{} = {}: Invalid Off-Cycle Parasitic Fuel Type entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(6))); // Set to Electric to avoid errors when setting up output variables Tank.OffCycParaFuelType = Constant::eFuel::Electricity; ErrorsFound = true; @@ -2512,10 +2497,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) Tank.OnCycParaFuelType = Tank.FuelType; } else { // could have been an unsupported value ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid On-Cycle Parasitic Fuel Type entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(7))); + std::format("{} = {}: Invalid On-Cycle Parasitic Fuel Type entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(7))); // Set to Electric to avoid errors when setting up output variables Tank.OnCycParaFuelType = Constant::eFuel::Electricity; ErrorsFound = true; @@ -2545,10 +2530,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) Tank.AmbientTempZone = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(10), state.dataHeatBal->Zone); if (Tank.AmbientTempZone == 0) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Ambient Temperature Zone not found = {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(10))); + std::format("{} = {}: Ambient Temperature Zone not found = {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(10))); ErrorsFound = true; } } break; @@ -2566,15 +2551,14 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) if (!state.dataIPShortCut->cAlphaArgs(11).empty()) { if (!OutAirNodeManager::CheckOutAirNodeNumber(state, Tank.AmbientTempOutsideAirNode)) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Outdoor Air Node not on OutdoorAir:NodeList or OutdoorAir:Node", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("...Referenced Node Name={}", state.dataIPShortCut->cAlphaArgs(11))); + std::format("{} = {}: Outdoor Air Node not on OutdoorAir:NodeList or OutdoorAir:Node", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("...Referenced Node Name={}", state.dataIPShortCut->cAlphaArgs(11))); ErrorsFound = true; } } else { - ShowSevereError(state, - EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "An Ambient Outdoor Air Node name must be used when the Ambient Temperature Indicator is Outdoors."); ErrorsFound = true; } @@ -2583,10 +2567,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) } default: { ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid Ambient Temperature Indicator entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(8))); + std::format("{} = {}: Invalid Ambient Temperature Indicator entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(8))); ShowContinueError(state, " Valid entries are SCHEDULE, ZONE, and OUTDOORS."); ErrorsFound = true; break; @@ -2620,9 +2604,9 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) if (NumNums > 17) { if ((state.dataIPShortCut->rNumericArgs(18) > 1) || (state.dataIPShortCut->rNumericArgs(18) < 0)) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Use Side Effectiveness is out of bounds (0 to 1)", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Use Side Effectiveness is out of bounds (0 to 1)", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } Tank.UseEffectiveness = state.dataIPShortCut->rNumericArgs(18); @@ -2633,9 +2617,9 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) if (NumNums > 18) { if ((state.dataIPShortCut->rNumericArgs(19) > 1) || (state.dataIPShortCut->rNumericArgs(19) <= 0)) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Source Side Effectiveness is out of bounds (>0 to 1)", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Source Side Effectiveness is out of bounds (>0 to 1)", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } Tank.SourceEffectiveness = state.dataIPShortCut->rNumericArgs(19); @@ -2699,23 +2683,23 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) if (state.dataIPShortCut->rNumericArgs(17) > 0) { ShowWarningError(state, - EnergyPlus::format("{} = {}: Use side nodes are specified; Peak Volumetric Use Flow Rate will not be used", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Use side nodes are specified; Peak Volumetric Use Flow Rate will not be used", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } if (Tank.flowRateSched != nullptr) { ShowWarningError(state, - EnergyPlus::format("{} = {}: Use side nodes are specified; Use Flow Rate Fraction Schedule will not be used", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Use side nodes are specified; Use Flow Rate Fraction Schedule will not be used", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } if (Tank.useInletTempSched != nullptr) { ShowWarningError(state, - EnergyPlus::format("{} = {}: Use side nodes are specified; Cold Water Supply Temperature Schedule will not be used", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Use side nodes are specified; Cold Water Supply Temperature Schedule will not be used", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } } @@ -2747,10 +2731,10 @@ bool getWaterHeaterMixedInputs(EnergyPlusData &state) static_cast(getEnumValue(SourceSideControlNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(18)))); if (Tank.SourceSideControlMode == SourceSideControl::Invalid) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid Control Mode entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(18))); + std::format("{} = {}: Invalid Control Mode entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(18))); ErrorsFound = true; } } else { @@ -2846,9 +2830,9 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) Tank.Perimeter = state.dataIPShortCut->rNumericArgs(3); } else { ShowSevereError(state, - EnergyPlus::format("{} = {}: Tank Perimeter must be greater than zero for Tank Shape=OTHER", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Tank Perimeter must be greater than zero for Tank Shape=OTHER", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -2856,10 +2840,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) } default: { ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid Tank Shape entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + std::format("{} = {}: Invalid Tank Shape entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(3))); Tank.Shape = TankShape::VertCylinder; ErrorsFound = true; break; @@ -2878,10 +2862,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) static_cast(getEnumValue(PriorityControlModeNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(4)))); if (Tank.StratifiedControlMode == PriorityControlMode::Invalid) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid Heater Priority Control entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(4))); + std::format("{} = {}: Invalid Heater Priority Control entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(4))); ErrorsFound = true; } @@ -2918,9 +2902,9 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) // Test if Heater height is within range if ((!Tank.HeightWasAutoSized) && (Tank.HeaterHeight1 > tankHeightForTesting)) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Heater 1 is located higher than overall tank height.", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Heater 1 is located higher than overall tank height.", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); ShowContinueError(state, @@ -2949,9 +2933,9 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) // Test if Heater height is within range if ((!Tank.HeightWasAutoSized) && (Tank.HeaterHeight2 > tankHeightForTesting)) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Heater 2 is located higher than overall tank height.", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Heater 2 is located higher than overall tank height.", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); ShowContinueError( @@ -2966,10 +2950,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) 7))); // returns all kinds of fuels including district heat and cool + steam, returns unassigned if unsupported if (Tank.FuelType == Constant::eFuel::Invalid) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid Heater Fuel Type entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(7))); + std::format("{} = {}: Invalid Heater Fuel Type entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(7))); // Set to Electric to avoid errors when setting up output variables Tank.FuelType = Constant::eFuel::Electricity; ErrorsFound = true; @@ -2979,7 +2963,7 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) Tank.Efficiency = state.dataIPShortCut->rNumericArgs(11); if (state.dataIPShortCut->rNumericArgs(11) > 1.0) { ShowWarningError(state, - fmt::format("{} = {}: {}={} should not typically be greater than 1.", + std::format("{} = {}: {}={} should not typically be greater than 1.", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1), state.dataIPShortCut->cNumericFieldNames(11), @@ -2987,9 +2971,9 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) } } else { ShowSevereError(state, - EnergyPlus::format("{} = {}: Heater Thermal Efficiency must be greater than zero", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Heater Thermal Efficiency must be greater than zero", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -3005,10 +2989,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) Tank.OffCycParaFuelType = Tank.FuelType; } else { ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid Off-Cycle Parasitic Fuel Type entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(8))); + std::format("{} = {}: Invalid Off-Cycle Parasitic Fuel Type entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(8))); // Set to Electric to avoid errors when setting up output variables Tank.OffCycParaFuelType = Constant::eFuel::Electricity; ErrorsFound = true; @@ -3030,10 +3014,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) Tank.OnCycParaFuelType = Tank.FuelType; } else { ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid On-Cycle Parasitic Fuel Type entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(9))); + std::format("{} = {}: Invalid On-Cycle Parasitic Fuel Type entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(9))); // Set to Electric to avoid errors when setting up output variables Tank.OnCycParaFuelType = Constant::eFuel::Electricity; ErrorsFound = true; @@ -3061,10 +3045,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) Tank.AmbientTempZone = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(12), state.dataHeatBal->Zone); if (Tank.AmbientTempZone == 0) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Ambient Temperature Zone not found = {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(12))); + std::format("{} = {}: Ambient Temperature Zone not found = {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(12))); ErrorsFound = true; } @@ -3083,15 +3067,14 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) if (!state.dataIPShortCut->cAlphaArgs(13).empty()) { if (!OutAirNodeManager::CheckOutAirNodeNumber(state, Tank.AmbientTempOutsideAirNode)) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Outdoor Air Node not on OutdoorAir:NodeList or OutdoorAir:Node", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("...Referenced Node Name={}", state.dataIPShortCut->cAlphaArgs(13))); + std::format("{} = {}: Outdoor Air Node not on OutdoorAir:NodeList or OutdoorAir:Node", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); + ShowContinueError(state, std::format("...Referenced Node Name={}", state.dataIPShortCut->cAlphaArgs(13))); ErrorsFound = true; } } else { - ShowSevereError(state, - EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "An Ambient Outdoor Air Node name must be used when the Ambient Temperature Indicator is Outdoors."); ErrorsFound = true; } @@ -3100,10 +3083,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) } default: { ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid Ambient Temperature Indicator entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(10))); + std::format("{} = {}: Invalid Ambient Temperature Indicator entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(10))); ShowContinueError(state, " Valid entries are Schedule, Zone, and Outdoors."); ErrorsFound = true; break; @@ -3148,9 +3131,9 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) } if ((!Tank.HeightWasAutoSized) && (Tank.UseInletHeight > Tank.Height)) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Use inlet is located higher than overall tank height.", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Use inlet is located higher than overall tank height.", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); ShowContinueError( @@ -3169,9 +3152,9 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) } if ((!Tank.HeightWasAutoSized) && (Tank.UseOutletHeight > Tank.Height)) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Use outlet is located higher than overall tank height.", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Use outlet is located higher than overall tank height.", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); ShowContinueError( @@ -3182,9 +3165,9 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) if (NumNums > 25) { if ((state.dataIPShortCut->rNumericArgs(26) > 1) || (state.dataIPShortCut->rNumericArgs(26) <= 0)) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Source Side Effectiveness is out of bounds (>0 to 1)", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Source Side Effectiveness is out of bounds (>0 to 1)", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } Tank.SourceEffectiveness = state.dataIPShortCut->rNumericArgs(26); @@ -3203,9 +3186,9 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) } if ((!Tank.HeightWasAutoSized) && (Tank.SourceInletHeight > Tank.Height)) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Source inlet is located higher than overall tank height.", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Source inlet is located higher than overall tank height.", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); ShowContinueError( @@ -3221,9 +3204,9 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) } if ((!Tank.HeightWasAutoSized) && (Tank.SourceOutletHeight > Tank.Height)) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Source outlet is located higher than overall tank height.", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Source outlet is located higher than overall tank height.", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, EnergyPlus::format("{} = {:.4R}", state.dataIPShortCut->cNumericFieldNames(2), state.dataIPShortCut->rNumericArgs(2))); ShowContinueError( @@ -3289,23 +3272,23 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) if (state.dataIPShortCut->rNumericArgs(22) > 0) { ShowWarningError(state, - EnergyPlus::format("{} = {}: Use side nodes are specified; Peak Volumetric Use Flow Rate will not be used", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Use side nodes are specified; Peak Volumetric Use Flow Rate will not be used", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } if (Tank.flowRateSched != nullptr) { ShowWarningError(state, - EnergyPlus::format("{} = {}: Use side nodes are specified; Use Flow Rate Fraction Schedule will not be used", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Use side nodes are specified; Use Flow Rate Fraction Schedule will not be used", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } if (Tank.useInletTempSched != nullptr) { ShowWarningError(state, - EnergyPlus::format("{} = {}: Use side nodes are specified; Cold Water Supply Temperature Schedule will not be used", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Use side nodes are specified; Cold Water Supply Temperature Schedule will not be used", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } } @@ -3360,10 +3343,9 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) if (specifiedNodes > Tank.Nodes) { ShowWarningError( state, - EnergyPlus::format( - "{} = {}: More Additional Loss Coefficients were entered than the number of nodes; extra coefficients will not be used", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: More Additional Loss Coefficients were entered than the number of nodes; extra coefficients will not be used", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } Tank.SetupStratifiedNodes(state); @@ -3373,10 +3355,10 @@ bool getWaterHeaterStratifiedInput(EnergyPlusData &state) static_cast(getEnumValue(SourceSideControlNamesUC, Util::makeUPPER(state.dataIPShortCut->cAlphaArgs(21)))); if (Tank.SourceSideControlMode == SourceSideControl::Invalid) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid Control Mode entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(21))); + std::format("{} = {}: Invalid Control Mode entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(21))); ErrorsFound = true; } } else { @@ -3511,10 +3493,10 @@ bool getWaterTankMixedInput(EnergyPlusData &state) case WTTAmbientTemp::TempZone: { Tank.AmbientTempZone = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(5), state.dataHeatBal->Zone); if (Tank.AmbientTempZone == 0) { - ShowSevereError( - state, EnergyPlus::format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); - ShowContinueError( - state, EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + std::format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(5), state.dataIPShortCut->cAlphaArgs(5))); + ShowContinueError(state, + std::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Zone was not found."); ErrorsFound = true; } @@ -3533,18 +3515,15 @@ bool getWaterTankMixedInput(EnergyPlusData &state) Node::ObjectIsNotParent); if (!state.dataIPShortCut->lAlphaFieldBlanks(6)) { if (!OutAirNodeManager::CheckOutAirNodeNumber(state, Tank.AmbientTempOutsideAirNode)) { - ShowSevereError( - state, - EnergyPlus::format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(6), state.dataIPShortCut->cAlphaArgs(6))); + ShowSevereError(state, + std::format("Invalid, {} = {}", state.dataIPShortCut->cAlphaFieldNames(6), state.dataIPShortCut->cAlphaArgs(6))); ShowContinueError( - state, - EnergyPlus::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + state, std::format("Entered in {} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "Outdoor Air Node not on OutdoorAir:NodeList or OutdoorAir:Node"); ErrorsFound = true; } } else { - ShowSevereError(state, - EnergyPlus::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, std::format("{} = {}", state.dataIPShortCut->cCurrentModuleObject, state.dataIPShortCut->cAlphaArgs(1))); ShowContinueError(state, "An Ambient Outdoor Air Node name must be used when the Ambient Temperature Indicator is Outdoors."); ErrorsFound = true; } @@ -3553,10 +3532,10 @@ bool getWaterTankMixedInput(EnergyPlusData &state) } default: { ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid Ambient Temperature Indicator entered={}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(3))); + std::format("{} = {}: Invalid Ambient Temperature Indicator entered={}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(3))); ShowContinueError(state, " Valid entries are Schedule, Zone, and Outdoors."); ErrorsFound = true; break; @@ -3579,18 +3558,18 @@ bool getWaterTankMixedInput(EnergyPlusData &state) if ((state.dataIPShortCut->rNumericArgs(6) > 1) || (state.dataIPShortCut->rNumericArgs(6) < 0)) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Use Side Effectiveness is out of bounds (0 to 1)", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Use Side Effectiveness is out of bounds (0 to 1)", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } Tank.UseEffectiveness = state.dataIPShortCut->rNumericArgs(6); if ((state.dataIPShortCut->rNumericArgs(8) > 1) || (state.dataIPShortCut->rNumericArgs(8) <= 0)) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Source Side Effectiveness is out of bounds (>0 to 1)", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} = {}: Source Side Effectiveness is out of bounds (>0 to 1)", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } Tank.SourceEffectiveness = state.dataIPShortCut->rNumericArgs(8); @@ -3766,19 +3745,19 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) if (Perimeter > 0.0) { Tank.Perimeter = Perimeter; } else { - ShowSevereError(state, - EnergyPlus::format( - "{} = {}: Tank Perimeter must be greater than zero for Tank Shape=OTHER", cCurrentModuleObject, thisObjectName)); + ShowSevereError( + state, + std::format("{} = {}: Tank Perimeter must be greater than zero for Tank Shape=OTHER", cCurrentModuleObject, thisObjectName)); ErrorsFound = true; } break; } default: { ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid Tank Shape entered={}", - cCurrentModuleObject, - thisObjectName, - Util::makeUPPER(fields.at("tank_shape").get()))); + std::format("{} = {}: Invalid Tank Shape entered={}", + cCurrentModuleObject, + thisObjectName, + Util::makeUPPER(fields.at("tank_shape").get()))); Tank.Shape = TankShape::VertCylinder; ErrorsFound = true; break; @@ -3870,8 +3849,8 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) Tank.DeadBandDeltaTemp = 0.0001; } - Tank.MaxCapacity = state.dataInputProcessing->inputProcessor->getRealFieldValue( - fields, schemaProps, EnergyPlus::format("nominal_{}_capacity", kwHeatingCooling)); + Tank.MaxCapacity = + state.dataInputProcessing->inputProcessor->getRealFieldValue(fields, schemaProps, std::format("nominal_{}_capacity", kwHeatingCooling)); if (Tank.MaxCapacity == DataSizing::AutoSize) { Tank.MaxCapacityWasAutoSized = true; } @@ -3912,8 +3891,8 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) auto const ambientTempZoneName = Util::makeUPPER(fields.at(fieldName).get()); Tank.AmbientTempZone = Util::FindItemInList(ambientTempZoneName, state.dataHeatBal->Zone); if (Tank.AmbientTempZone == 0) { - ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", "ambient_temperature_zone_name", ambientTempZoneName)); - ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", cCurrentModuleObject, Tank.Name)); + ShowSevereError(state, std::format("Invalid, {} = {}", "ambient_temperature_zone_name", ambientTempZoneName)); + ShowContinueError(state, std::format("Entered in {} = {}", cCurrentModuleObject, Tank.Name)); ShowContinueError(state, "Zone was not found."); ErrorsFound = true; } @@ -3936,13 +3915,13 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) Node::CompFluidStream::Primary, Node::ObjectIsNotParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(state, Tank.AmbientTempOutsideAirNode)) { - ShowSevereError(state, EnergyPlus::format("Invalid, {} = {}", fieldName, fieldValue)); - ShowContinueError(state, EnergyPlus::format("Entered in {} = {}", cCurrentModuleObject, fieldValue)); + ShowSevereError(state, std::format("Invalid, {} = {}", fieldName, fieldValue)); + ShowContinueError(state, std::format("Entered in {} = {}", cCurrentModuleObject, fieldValue)); ShowContinueError(state, "Outdoor Air Node not on OutdoorAir:NodeList or OutdoorAir:Node"); ErrorsFound = true; } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, std::format("{} = {}", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, "An Ambient Outdoor Air Node name must be used when the Ambient Temperature Indicator is Outdoors."); ErrorsFound = true; } @@ -3951,10 +3930,10 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) } default: { ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid Ambient Temperature Indicator entered={}", - cCurrentModuleObject, - thisObjectName, - Util::makeUPPER(fields.at("ambient_temperature_indicator").get()))); + std::format("{} = {}: Invalid Ambient Temperature Indicator entered={}", + cCurrentModuleObject, + thisObjectName, + Util::makeUPPER(fields.at("ambient_temperature_indicator").get()))); ShowContinueError(state, " Valid entries are Schedule, Zone, and Outdoors."); ErrorsFound = true; break; @@ -3976,8 +3955,8 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) Tank.SourceEffectiveness = state.dataInputProcessing->inputProcessor->getRealFieldValue(fields, schemaProps, "source_side_heat_transfer_effectiveness"); if ((Tank.SourceEffectiveness > 1) || (Tank.SourceEffectiveness <= 0)) { - ShowSevereError( - state, EnergyPlus::format("{} = {}: Source Side Effectiveness is out of bounds (>0 to 1)", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, + std::format("{} = {}: Source Side Effectiveness is out of bounds (>0 to 1)", cCurrentModuleObject, thisObjectName)); ErrorsFound = true; } @@ -3992,9 +3971,8 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) if (Tank.UseInletHeight == Constant::AutoCalculate) { Tank.UseInletHeight = Tank.Height; } else if (Tank.UseInletHeight > Tank.Height) { - ShowSevereError( - state, - EnergyPlus::format("{} = {}: Use inlet is located higher than overall tank height.", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, + std::format("{} = {}: Use inlet is located higher than overall tank height.", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, EnergyPlus::format("{} = {:.4R}", "tank_height", Tank.Height)); ShowContinueError(state, EnergyPlus::format("{} = {:.4R}", "use_side_inlet_height", Tank.UseInletHeight)); ErrorsFound = true; @@ -4003,9 +3981,8 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) // Defaults to 0.0 Tank.UseOutletHeight = state.dataInputProcessing->inputProcessor->getRealFieldValue(fields, schemaProps, "use_side_outlet_height"); if (Tank.UseOutletHeight > Tank.Height) { - ShowSevereError( - state, - EnergyPlus::format("{} = {}: Use outlet is located higher than overall tank height.", cCurrentModuleObject, thisObjectName)); + ShowSevereError(state, + std::format("{} = {}: Use outlet is located higher than overall tank height.", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, EnergyPlus::format("{} = {:.4R}", "tank_height", Tank.Height)); ShowContinueError(state, EnergyPlus::format("{} = {:.4R}", "use_side_outlet_height", Tank.UseOutletHeight)); ErrorsFound = true; @@ -4015,8 +3992,7 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) Tank.SourceInletHeight = state.dataInputProcessing->inputProcessor->getRealFieldValue(fields, schemaProps, "source_side_inlet_height"); if (Tank.SourceInletHeight > Tank.Height) { ShowSevereError( - state, - EnergyPlus::format("{} = {}: Source inlet is located higher than overall tank height.", cCurrentModuleObject, thisObjectName)); + state, std::format("{} = {}: Source inlet is located higher than overall tank height.", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, EnergyPlus::format("{} = {:.4R}", "tank_height", Tank.Height)); ShowContinueError(state, EnergyPlus::format("{} = {:.4R}", "source_side_inlet_height", Tank.SourceInletHeight)); ErrorsFound = true; @@ -4028,8 +4004,7 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) Tank.SourceOutletHeight = Tank.Height; } else if (Tank.SourceOutletHeight > Tank.Height) { ShowSevereError( - state, - EnergyPlus::format("{} = {}: Source outlet is located higher than overall tank height.", cCurrentModuleObject, thisObjectName)); + state, std::format("{} = {}: Source outlet is located higher than overall tank height.", cCurrentModuleObject, thisObjectName)); ShowContinueError(state, EnergyPlus::format("{} = {:.4R}", "tank_height", Tank.Height)); ShowContinueError(state, EnergyPlus::format("{} = {:.4R}", "source_side_outlet_height", Tank.SourceOutletHeight)); ErrorsFound = true; @@ -4137,7 +4112,7 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) Tank.AdditionalLossCoeff.allocate(Tank.Nodes); Tank.AdditionalLossCoeff = 0.0; for (int NodeNum = 1; NodeNum <= Tank.Nodes; ++NodeNum) { - auto const &AdditionalLossCoeffNode = fields.find(format("node_{}_additional_loss_coefficient", NodeNum)); + auto const &AdditionalLossCoeffNode = fields.find(EnergyPlus::format("node_{}_additional_loss_coefficient", NodeNum)); if (AdditionalLossCoeffNode != fields.end()) { Tank.AdditionalLossCoeff(NodeNum) = AdditionalLossCoeffNode.value(); } else { @@ -4145,13 +4120,12 @@ bool getWaterTankStratifiedInput(EnergyPlusData &state, std::string objectType) } } - if (fields.find(format("node_{}_additional_loss_coefficient", Tank.Nodes + 1)) != fields.end()) { + if (fields.find(EnergyPlus::format("node_{}_additional_loss_coefficient", Tank.Nodes + 1)) != fields.end()) { ShowWarningError( state, - EnergyPlus::format( - "{} = {}: More Additional Loss Coefficients were entered than the number of nodes; extra coefficients will not be used", - cCurrentModuleObject, - thisObjectName)); + std::format("{} = {}: More Additional Loss Coefficients were entered than the number of nodes; extra coefficients will not be used", + cCurrentModuleObject, + thisObjectName)); } Tank.SetupStratifiedNodes(state); @@ -4309,37 +4283,37 @@ void GetWaterThermalTankInput(EnergyPlusData &state) // verify Desuperheater/tank source node connections if (DesuperHtr.WaterInletNode != Tank.SourceOutletNode) { - ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, DesuperHtr.Name)); + ShowSevereError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, DesuperHtr.Name)); ShowContinueError(state, "Desuperheater inlet node name does not match thermal tank source outlet node name."); ShowContinueError(state, - EnergyPlus::format("Desuperheater water inlet and outlet node names = {} and {}", - DesuperHtr.InletNodeName1, - DesuperHtr.OutletNodeName1)); + std::format("Desuperheater water inlet and outlet node names = {} and {}", + DesuperHtr.InletNodeName1, + DesuperHtr.OutletNodeName1)); ShowContinueError(state, - EnergyPlus::format("Thermal tank source side inlet and outlet node names = {} and {}", - Tank.InletNodeName2, - Tank.OutletNodeName2)); + std::format("Thermal tank source side inlet and outlet node names = {} and {}", + Tank.InletNodeName2, + Tank.OutletNodeName2)); ErrorsFound = true; } if (DesuperHtr.WaterOutletNode != Tank.SourceInletNode) { - ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, DesuperHtr.Name)); + ShowSevereError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, DesuperHtr.Name)); ShowContinueError(state, "Desuperheater water outlet node name does not match thermal tank source inlet node name."); ShowContinueError(state, - EnergyPlus::format("Desuperheater water inlet and outlet node names = {} and {}", - DesuperHtr.InletNodeName1, - DesuperHtr.OutletNodeName1)); + std::format("Desuperheater water inlet and outlet node names = {} and {}", + DesuperHtr.InletNodeName1, + DesuperHtr.OutletNodeName1)); ShowContinueError(state, - EnergyPlus::format("Thermal tank source side inlet and outlet node names = {} and {}", - Tank.InletNodeName2, - Tank.OutletNodeName2)); + std::format("Thermal tank source side inlet and outlet node names = {} and {}", + Tank.InletNodeName2, + Tank.OutletNodeName2)); ErrorsFound = true; } } if (DesuperHtr.WaterHeaterTankNum == 0) { - ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, DesuperHtr.Name)); - ShowContinueError(state, EnergyPlus::format(" Water heater tank = {} not found.", DesuperHtr.TankName)); + ShowSevereError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, DesuperHtr.Name)); + ShowContinueError(state, std::format(" Water heater tank = {} not found.", DesuperHtr.TankName)); ErrorsFound = true; } } @@ -4386,8 +4360,8 @@ void GetWaterThermalTankInput(EnergyPlusData &state) HPWH.TankType = Tank.Type; HPWH.HPWHTankType = Tank.WaterThermalTankType; } else { - ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, EnergyPlus::format("Invalid water heater tank type = {}", Tank.Type)); + ShowSevereError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, std::format("Invalid water heater tank type = {}", Tank.Type)); ErrorsFound = true; } @@ -4411,8 +4385,8 @@ void GetWaterThermalTankInput(EnergyPlusData &state) // If WaterHeaterMixed: do not allow modulating control for HPWH's (i.e. modulating control usually used for tankless WH's) if ((Tank.WaterThermalTankType == DataPlant::PlantEquipmentType::WtrHeaterMixed) && (Tank.ControlType == HeaterControlMode::Modulate)) { - ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, EnergyPlus::format("Heater Control Type for {} = {} must be CYCLE.", Tank.Type, Tank.Name)); + ShowSevereError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, std::format("Heater Control Type for {} = {} must be CYCLE.", Tank.Type, Tank.Name)); ErrorsFound = true; } @@ -4423,21 +4397,20 @@ void GetWaterThermalTankInput(EnergyPlusData &state) if (Tank.DesuperheaterNum > 0) { ShowSevereError( state, - EnergyPlus::format( - "{} = {}and Coil:WaterHeating:Desuperheater = {}: cannot be connected to the same water heater tank = {}", - state.dataIPShortCut->cCurrentModuleObject, - HPWH.Name, - state.dataWaterThermalTanks->WaterHeaterDesuperheater(CheckWaterHeaterNum).Name, - Tank.Name)); + std::format("{} = {}and Coil:WaterHeating:Desuperheater = {}: cannot be connected to the same water heater tank = {}", + state.dataIPShortCut->cCurrentModuleObject, + HPWH.Name, + state.dataWaterThermalTanks->WaterHeaterDesuperheater(CheckWaterHeaterNum).Name, + Tank.Name)); } // check that water heater source side effectiveness is greater than 0 if (Tank.SourceEffectiveness <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{} = {}: Invalid source side effectiveness for heat pump water heater = {:.3T}", - state.dataIPShortCut->cCurrentModuleObject, - HPWH.Name, - Tank.SourceEffectiveness)); + std::format("{} = {}: Invalid source side effectiveness for heat pump water heater = {:.3f}", + state.dataIPShortCut->cCurrentModuleObject, + HPWH.Name, + Tank.SourceEffectiveness)); ShowContinueError(state, " water heater source effectiveness will default to 1.0 and simulation continues."); Tank.SourceEffectiveness = 1.0; } @@ -4445,11 +4418,10 @@ void GetWaterThermalTankInput(EnergyPlusData &state) // Set up the source side nodes for wrapped condensers if (HPWH.HPWHType == DataPlant::PlantEquipmentType::HeatPumpWtrHeaterWrapped) { if (Tank.SourceInletNode > 0 || Tank.SourceOutletNode > 0) { - ShowSevereError(state, EnergyPlus::format("{} = {} has a source inlet or outlet node specified,", Tank.Type, Tank.Name)); - ShowContinueError(state, - EnergyPlus::format("but it is attached to {} = {}, which doesn't permit source side connections.", - HPWH.Type, - HPWH.Name)); + ShowSevereError(state, std::format("{} = {} has a source inlet or outlet node specified,", Tank.Type, Tank.Name)); + ShowContinueError( + state, + std::format("but it is attached to {} = {}, which doesn't permit source side connections.", HPWH.Type, HPWH.Name)); ShowContinueError(state, "Please leave the source side inlet and outlet fields blank."); ErrorsFound = true; } else { @@ -4489,21 +4461,21 @@ void GetWaterThermalTankInput(EnergyPlusData &state) } if (HPWH.WHUseInletNode != Tank.UseInletNode || HPWH.WHUseOutletNode != Tank.UseOutletNode) { - ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError( state, - EnergyPlus::format("Heat pump water heater tank use side inlet and outlet node names must match the use side inlet and " - "outlet node names for water heater tank = {}: {}", - HPWH.TankType, - HPWH.TankName)); + std::format("Heat pump water heater tank use side inlet and outlet node names must match the use side inlet and " + "outlet node names for water heater tank = {}: {}", + HPWH.TankType, + HPWH.TankName)); ShowContinueError(state, - EnergyPlus::format("Heat pump water heater use side inlet and outlet node names = {} and {}", - HPWH.InletNodeName2, - HPWH.OutletNodeName2)); + std::format("Heat pump water heater use side inlet and outlet node names = {} and {}", + HPWH.InletNodeName2, + HPWH.OutletNodeName2)); ShowContinueError(state, - EnergyPlus::format("Water heater tank use side inlet and outlet node names = {} and {}", - Tank.InletNodeName1, - Tank.OutletNodeName1)); + std::format("Water heater tank use side inlet and outlet node names = {} and {}", + Tank.InletNodeName1, + Tank.OutletNodeName1)); ErrorsFound = true; } else { if (!HPWH.StandAlone) { @@ -4513,32 +4485,32 @@ void GetWaterThermalTankInput(EnergyPlusData &state) // verify HP/tank source node connections if (HPWH.CondWaterInletNode != Tank.SourceOutletNode) { - ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Heat Pump condenser water inlet node name does not match water heater tank source outlet node name."); ShowContinueError(state, - EnergyPlus::format("Heat pump condenser water inlet and outlet node names = {} and {}", - HPWH.InletNodeName1, - HPWH.OutletNodeName1)); + std::format("Heat pump condenser water inlet and outlet node names = {} and {}", + HPWH.InletNodeName1, + HPWH.OutletNodeName1)); ShowContinueError(state, - EnergyPlus::format("Water heater tank source side inlet and outlet node names = {} and {}", - Tank.InletNodeName2, - Tank.OutletNodeName2)); + std::format("Water heater tank source side inlet and outlet node names = {} and {}", + Tank.InletNodeName2, + Tank.OutletNodeName2)); ErrorsFound = true; } if (HPWH.CondWaterOutletNode != Tank.SourceInletNode) { - ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Heat Pump condenser water outlet node name does not match water heater tank source inlet node name."); ShowContinueError(state, - EnergyPlus::format("Heat pump condenser water inlet and outlet node names = {} and {}", - HPWH.InletNodeName1, - HPWH.OutletNodeName1)); + std::format("Heat pump condenser water inlet and outlet node names = {} and {}", + HPWH.InletNodeName1, + HPWH.OutletNodeName1)); ShowContinueError(state, - EnergyPlus::format("Water heater tank source side inlet and outlet node names = {} and {}", - Tank.InletNodeName2, - Tank.OutletNodeName2)); + std::format("Water heater tank source side inlet and outlet node names = {} and {}", + Tank.InletNodeName2, + Tank.OutletNodeName2)); ErrorsFound = true; } @@ -4546,7 +4518,7 @@ void GetWaterThermalTankInput(EnergyPlusData &state) if (HPWH.HPWHType == DataPlant::PlantEquipmentType::HeatPumpWtrHeaterWrapped) { // make sure the top of the condenser is not above the tank height. if (HPWH.WrappedCondenserTopLocation > Tank.Height) { - ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "The height of the top of the wrapped condenser is greater than the height of the tank."); ErrorsFound = true; } @@ -4572,7 +4544,7 @@ void GetWaterThermalTankInput(EnergyPlusData &state) break; } // EquipmentTypeNum if (!FoundTankInList) { - ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Heat pump water heater type and name must be listed in the correct " "ZoneHVAC:EquipmentList object when Inlet Air Configuration is equal to " @@ -4591,7 +4563,7 @@ void GetWaterThermalTankInput(EnergyPlusData &state) } } // EquipmentTypeNum if (TankNotLowestPriority && FoundTankInList) { - ShowWarningError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowWarningError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Heat pump water heaters should be simulated first, before other space " "conditioning equipment."); @@ -4600,7 +4572,7 @@ void GetWaterThermalTankInput(EnergyPlusData &state) "not 1 in the ZoneHVAC:EquipmentList."); } } else { - ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "ZoneHVAC:EquipmentList and ZoneHVAC:EquipmentConnections objects are required when Inlet Air " "Configuration is either ZoneAirOnly or ZoneAndOutdoorAir."); @@ -4613,7 +4585,7 @@ void GetWaterThermalTankInput(EnergyPlusData &state) // Nodal heat distribution fraction for stratified tank wrapped condensers if (HPWH.HPWHType == DataPlant::PlantEquipmentType::HeatPumpWtrHeaterWrapped) { if (Tank.Shape == TankShape::HorizCylinder) { - ShowWarningError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowWarningError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "A wrapped condenser HPWH model should not be used with a horizontal stratified tank."); ShowContinueError( state, "Ignoring condenser location and distributing heat evenly throughout the tank. Simulation continues."); @@ -4682,12 +4654,12 @@ void GetWaterThermalTankInput(EnergyPlusData &state) // Make sure the control sensor locations are in the tank if (HPWH.ControlSensor1Height < 0.0 || HPWH.ControlSensor1Height > TankHeight) { - ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Control Sensor 1 is located outside the tank."); ErrorsFound = true; } if (HPWH.ControlSensor2Height < 0.0 || HPWH.ControlSensor2Height > TankHeight) { - ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowSevereError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); ShowContinueError(state, "Control Sensor 2 is located outside the tank."); ErrorsFound = true; } @@ -4720,8 +4692,8 @@ void GetWaterThermalTankInput(EnergyPlusData &state) } // DO CheckWaterHeaterNum = 1, NumWaterHeater if (!HPWH.FoundTank) { - ShowSevereError(state, EnergyPlus::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); - ShowContinueError(state, EnergyPlus::format("Water heater tank object not found = {}, {}", HPWH.TankType, HPWH.TankName)); + ShowSevereError(state, std::format("{} = {}:", state.dataIPShortCut->cCurrentModuleObject, HPWH.Name)); + ShowContinueError(state, std::format("Water heater tank object not found = {}, {}", HPWH.TankType, HPWH.TankName)); ErrorsFound = true; } @@ -4753,9 +4725,9 @@ void GetWaterThermalTankInput(EnergyPlusData &state) if (WaterThermalTankNum == 0) { // did not match name throw warning. ShowSevereError(state, - EnergyPlus::format("{} object name: {} does not match any of the water heaters defined in the file", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{} object name: {} does not match any of the water heaters defined in the file", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; continue; } // we have a match @@ -4776,10 +4748,10 @@ void GetWaterThermalTankInput(EnergyPlusData &state) } else { // wrong design mode entered, throw error ShowSevereError(state, - EnergyPlus::format("{} object named: {} contains an incorrect Design Mode of: {}", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaArgs(2))); + std::format("{} object named: {} contains an incorrect Design Mode of: {}", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaArgs(2))); ErrorsFound = true; } @@ -4816,17 +4788,17 @@ void GetWaterThermalTankInput(EnergyPlusData &state) case SizingMode::PeakDraw: { // need to have entered a reasonable value for TankDrawTime if (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.TankDrawTime <= 0.0) { ShowSevereError(state, - EnergyPlus::format("{}, named {}, design mode set to Peak Draw but needs a positive value for tank draw time", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}, named {}, design mode set to Peak Draw but needs a positive value for tank draw time", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } // constrain crazy sizes by limiting to 10 years or 8760*10 if (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.TankDrawTime > 87600.0) { ShowWarningError(state, - EnergyPlus::format("{}, named {}, has input with an unreasonably large Tank Draw Time, more than 10 years", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}, named {}, has input with an unreasonably large Tank Draw Time, more than 10 years", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } // if both volume and demand side flow connections are autosized, must be a good NominalVolForSizingDemandSideFlow @@ -4835,9 +4807,9 @@ void GetWaterThermalTankInput(EnergyPlusData &state) (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).UseDesignVolFlowRateWasAutoSized)) { if (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.NominalVolForSizingDemandSideFlow <= 0.0) { ShowWarningError(state, - EnergyPlus::format("{}, named {} needs a value for Nominal Tank Volume for Autosizing Plant Connections", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}, named {} needs a value for Nominal Tank Volume for Autosizing Plant Connections", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -4846,9 +4818,9 @@ void GetWaterThermalTankInput(EnergyPlusData &state) (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).SourceDesignVolFlowRateWasAutoSized)) { if (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.NominalVolForSizingDemandSideFlow <= 0.0) { ShowWarningError(state, - EnergyPlus::format("{}, named {} needs a value for Nominal Tank Volume for Autosizing Plant Connections", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}, named {} needs a value for Nominal Tank Volume for Autosizing Plant Connections", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } } @@ -4859,16 +4831,16 @@ void GetWaterThermalTankInput(EnergyPlusData &state) // it would have to have at least on bedroom and any more than 10 is crazy for this mode if (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.NumberOfBedrooms < 1) { ShowSevereError(state, - EnergyPlus::format("{}, named {}, mode needs at least one bedroom", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}, named {}, mode needs at least one bedroom", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } if (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.NumberOfBedrooms > 10) { ShowWarningError(state, - EnergyPlus::format("{}, named {}, probably has too many bedrooms for the selected design mode", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}, named {}, probably has too many bedrooms for the selected design mode", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); } break; @@ -4878,18 +4850,18 @@ void GetWaterThermalTankInput(EnergyPlusData &state) if ((state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).VolumeWasAutoSized) && (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.TankCapacityPerPerson <= 0.0)) { ShowSevereError(state, - EnergyPlus::format("{}, named {}, PerPerson mode needs positive value input for storage capacity per person", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}, named {}, PerPerson mode needs positive value input for storage capacity per person", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } if ((state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).MaxCapacityWasAutoSized) && (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.RecoveryCapacityPerPerson <= 0.0)) { ShowSevereError(state, - EnergyPlus::format("{}, named {}, PerPerson mode needs positive value input for recovery capacity per person", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}, named {}, PerPerson mode needs positive value input for recovery capacity per person", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -4898,20 +4870,18 @@ void GetWaterThermalTankInput(EnergyPlusData &state) case SizingMode::PerFloorArea: { if ((state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).VolumeWasAutoSized) && (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.TankCapacityPerArea <= 0.0)) { - ShowSevereError( - state, - EnergyPlus::format("{}, named {}, PerArea mode needs positive value input for storage capacity per floor area", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + std::format("{}, named {}, PerArea mode needs positive value input for storage capacity per floor area", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } if ((state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).MaxCapacityWasAutoSized) && (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.RecoveryCapacityPerArea <= 0.0)) { - ShowSevereError( - state, - EnergyPlus::format("{}, named {}, PerArea mode needs positive value input for recovery capacity per floor area", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + ShowSevereError(state, + std::format("{}, named {}, PerArea mode needs positive value input for recovery capacity per floor area", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } @@ -4921,33 +4891,33 @@ void GetWaterThermalTankInput(EnergyPlusData &state) if ((state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).VolumeWasAutoSized) && (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.TankCapacityPerUnit <= 0.0)) { ShowSevereError(state, - EnergyPlus::format("{}, named {}, PerUnit mode needs positive value input for storage capacity per unit", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}, named {}, PerUnit mode needs positive value input for storage capacity per unit", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } if ((state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).VolumeWasAutoSized) && (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.NumberOfUnits <= 0.0)) { ShowSevereError(state, - EnergyPlus::format("{}, named {}, PerUnit mode needs positive value input for number of units", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}, named {}, PerUnit mode needs positive value input for number of units", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } if ((state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).MaxCapacityWasAutoSized) && (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.RecoveryCapacityPerUnit <= 0.0)) { ShowSevereError(state, - EnergyPlus::format("{}, named {}, PerUnit mode needs positive value input for recovery capacity per unit", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}, named {}, PerUnit mode needs positive value input for recovery capacity per unit", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } if ((state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).MaxCapacityWasAutoSized) && (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.NumberOfUnits <= 0.0)) { ShowSevereError(state, - EnergyPlus::format("{}, named {}, PerUnit mode needs positive value input for number of units", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}, named {}, PerUnit mode needs positive value input for number of units", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } break; @@ -4957,10 +4927,9 @@ void GetWaterThermalTankInput(EnergyPlusData &state) (state.dataWaterThermalTanks->WaterThermalTank(WaterThermalTankNum).Sizing.TankCapacityPerCollectorArea <= 0.0)) { ShowSevereError( state, - EnergyPlus::format( - "{}, named {}, PerSolarCollectorArea mode needs positive value input for storage capacity per collector area", - state.dataIPShortCut->cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("{}, named {}, PerSolarCollectorArea mode needs positive value input for storage capacity per collector area", + state.dataIPShortCut->cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } break; @@ -4982,27 +4951,25 @@ void GetWaterThermalTankInput(EnergyPlusData &state) if (Tank.Sizing.DesignMode == SizingMode::Invalid) { if (Tank.VolumeWasAutoSized) { - ShowSevereError( - state, - EnergyPlus::format("{}='{}' has tank volume set to Autosize but it is missing associated WaterHeater:Sizing object", - DataPlant::PlantEquipTypeNames[static_cast(Tank.WaterThermalTankType)], - Tank.Name)); + ShowSevereError(state, + std::format("{}='{}' has tank volume set to Autosize but it is missing associated WaterHeater:Sizing object", + DataPlant::PlantEquipTypeNames[static_cast(Tank.WaterThermalTankType)], + Tank.Name)); ErrorsFound = true; } if (Tank.MaxCapacityWasAutoSized) { ShowSevereError( state, - EnergyPlus::format("{}='{}' has heater capacity set to Autosize but it is missing associated WaterHeater:Sizing object", - DataPlant::PlantEquipTypeNames[static_cast(Tank.WaterThermalTankType)], - Tank.Name)); + std::format("{}='{}' has heater capacity set to Autosize but it is missing associated WaterHeater:Sizing object", + DataPlant::PlantEquipTypeNames[static_cast(Tank.WaterThermalTankType)], + Tank.Name)); ErrorsFound = true; } if (Tank.HeightWasAutoSized) { - ShowSevereError( - state, - EnergyPlus::format("{}='{}' has tank height set to Autosize but it is missing associated WaterHeater:Sizing object", - DataPlant::PlantEquipTypeNames[static_cast(Tank.WaterThermalTankType)], - Tank.Name)); + ShowSevereError(state, + std::format("{}='{}' has tank height set to Autosize but it is missing associated WaterHeater:Sizing object", + DataPlant::PlantEquipTypeNames[static_cast(Tank.WaterThermalTankType)], + Tank.Name)); ErrorsFound = true; } } @@ -5172,7 +5139,7 @@ void WaterThermalTankData::setupHotWaterTankOutputVars(EnergyPlusData &state) // currently only stratified tank for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, - EnergyPlus::format("Hot Water Thermal Storage Tank Temperature Node {}", NodeNum), + std::format("Hot Water Thermal Storage Tank Temperature Node {}", NodeNum), Constant::Units::C, this->Node(NodeNum).TempAvg, OutputProcessor::TimeStepType::System, @@ -5182,7 +5149,7 @@ void WaterThermalTankData::setupHotWaterTankOutputVars(EnergyPlusData &state) for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, - EnergyPlus::format("Hot Water Thermal Storage Tank Final Temperature Node {}", NodeNum), + std::format("Hot Water Thermal Storage Tank Final Temperature Node {}", NodeNum), Constant::Units::C, this->Node(NodeNum).Temp, OutputProcessor::TimeStepType::System, @@ -5192,7 +5159,7 @@ void WaterThermalTankData::setupHotWaterTankOutputVars(EnergyPlusData &state) for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { // fixme: change this chilled water term - static constexpr std::string_view Format_724("Hot Water Tank Stratified Node Information,{},{:.4T},{:.4T},{:.4T},{},{}\n"); + static constexpr std::string_view Format_724("Hot Water Tank Stratified Node Information,{},{:.4f},{:.4f},{:.4f},{},{}\n"); print(state.files.eio, Format_724, @@ -5371,7 +5338,7 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, - EnergyPlus::format("Chilled Water Thermal Storage Tank Temperature Node {}", NodeNum), + std::format("Chilled Water Thermal Storage Tank Temperature Node {}", NodeNum), Constant::Units::C, this->Node(NodeNum).TempAvg, OutputProcessor::TimeStepType::System, @@ -5381,7 +5348,7 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, - EnergyPlus::format("Chilled Water Thermal Storage Tank Final Temperature Node {}", NodeNum), + std::format("Chilled Water Thermal Storage Tank Final Temperature Node {}", NodeNum), Constant::Units::C, this->Node(NodeNum).Temp, OutputProcessor::TimeStepType::System, @@ -5391,7 +5358,7 @@ void WaterThermalTankData::setupChilledWaterTankOutputVars(EnergyPlusData &state for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { // fixme: change this chilled water term - static constexpr std::string_view Format_724("Chilled Water Tank Stratified Node Information,{},{:.4T},{:.4T},{:.4T},{},{}\n"); + static constexpr std::string_view Format_724("Chilled Water Tank Stratified Node Information,{},{:.4f},{:.4f},{:.4f},{},{}\n"); print(state.files.eio, Format_724, @@ -5696,14 +5663,14 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) this->Name); SetupOutputVariable(state, - EnergyPlus::format("Water Heater {} Rate", Constant::eFuelNames[static_cast(this->FuelType)]), + std::format("Water Heater {} Rate", Constant::eFuelNames[static_cast(this->FuelType)]), Constant::Units::W, this->FuelRate, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, this->Name); SetupOutputVariable(state, - EnergyPlus::format("Water Heater {} Energy", Constant::eFuelNames[static_cast(this->FuelType)]), + std::format("Water Heater {} Energy", Constant::eFuelNames[static_cast(this->FuelType)]), Constant::Units::J, this->FuelEnergy, OutputProcessor::TimeStepType::System, @@ -5714,47 +5681,43 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) OutputProcessor::EndUseCat::WaterSystem, // DHW this->EndUseSubcategoryName); - SetupOutputVariable( - state, - EnergyPlus::format("Water Heater Off Cycle Parasitic {} Rate", Constant::eFuelNames[static_cast(this->OffCycParaFuelType)]), - Constant::Units::W, - this->OffCycParaFuelRate, - OutputProcessor::TimeStepType::System, - OutputProcessor::StoreType::Average, - this->Name); - SetupOutputVariable( - state, - EnergyPlus::format("Water Heater Off Cycle Parasitic {} Energy", Constant::eFuelNames[static_cast(this->OffCycParaFuelType)]), - Constant::Units::J, - this->OffCycParaFuelEnergy, - OutputProcessor::TimeStepType::System, - OutputProcessor::StoreType::Sum, - this->Name, - Constant::eFuel2eResource[(int)this->OffCycParaFuelType], - OutputProcessor::Group::Plant, - OutputProcessor::EndUseCat::WaterSystem, // DHW - this->EndUseSubcategoryName); - - SetupOutputVariable( - state, - EnergyPlus::format("Water Heater On Cycle Parasitic {} Rate", Constant::eFuelNames[static_cast(this->OnCycParaFuelType)]), - Constant::Units::W, - this->OnCycParaFuelRate, - OutputProcessor::TimeStepType::System, - OutputProcessor::StoreType::Average, - this->Name); - SetupOutputVariable( - state, - EnergyPlus::format("Water Heater On Cycle Parasitic {} Energy", Constant::eFuelNames[static_cast(this->OnCycParaFuelType)]), - Constant::Units::J, - this->OnCycParaFuelEnergy, - OutputProcessor::TimeStepType::System, - OutputProcessor::StoreType::Sum, - this->Name, - Constant::eFuel2eResource[(int)this->OnCycParaFuelType], - OutputProcessor::Group::Plant, - OutputProcessor::EndUseCat::WaterSystem, // DHW - this->EndUseSubcategoryName); + SetupOutputVariable(state, + std::format("Water Heater Off Cycle Parasitic {} Rate", Constant::eFuelNames[static_cast(this->OffCycParaFuelType)]), + Constant::Units::W, + this->OffCycParaFuelRate, + OutputProcessor::TimeStepType::System, + OutputProcessor::StoreType::Average, + this->Name); + SetupOutputVariable(state, + std::format("Water Heater Off Cycle Parasitic {} Energy", Constant::eFuelNames[static_cast(this->OffCycParaFuelType)]), + Constant::Units::J, + this->OffCycParaFuelEnergy, + OutputProcessor::TimeStepType::System, + OutputProcessor::StoreType::Sum, + this->Name, + Constant::eFuel2eResource[(int)this->OffCycParaFuelType], + OutputProcessor::Group::Plant, + OutputProcessor::EndUseCat::WaterSystem, // DHW + this->EndUseSubcategoryName); + + SetupOutputVariable(state, + std::format("Water Heater On Cycle Parasitic {} Rate", Constant::eFuelNames[static_cast(this->OnCycParaFuelType)]), + Constant::Units::W, + this->OnCycParaFuelRate, + OutputProcessor::TimeStepType::System, + OutputProcessor::StoreType::Average, + this->Name); + SetupOutputVariable(state, + std::format("Water Heater On Cycle Parasitic {} Energy", Constant::eFuelNames[static_cast(this->OnCycParaFuelType)]), + Constant::Units::J, + this->OnCycParaFuelEnergy, + OutputProcessor::TimeStepType::System, + OutputProcessor::StoreType::Sum, + this->Name, + Constant::eFuel2eResource[(int)this->OnCycParaFuelType], + OutputProcessor::Group::Plant, + OutputProcessor::EndUseCat::WaterSystem, // DHW + this->EndUseSubcategoryName); SetupOutputVariable(state, "Water Heater Water Volume Flow Rate", @@ -6004,7 +5967,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, - EnergyPlus::format("Water Heater Temperature Node {}", NodeNum), + std::format("Water Heater Temperature Node {}", NodeNum), Constant::Units::C, this->Node(NodeNum).TempAvg, OutputProcessor::TimeStepType::System, @@ -6014,7 +5977,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { SetupOutputVariable(state, - EnergyPlus::format("Water Heater Final Temperature Node {}", NodeNum), + std::format("Water Heater Final Temperature Node {}", NodeNum), Constant::Units::C, this->Node(NodeNum).Temp, OutputProcessor::TimeStepType::System, @@ -6026,7 +5989,7 @@ void WaterThermalTankData::setupWaterHeaterOutputVars(EnergyPlusData &state) if (this->WaterThermalTankType == DataPlant::PlantEquipmentType::WtrHeaterStratified) { for (int NodeNum = 1; NodeNum <= this->Nodes; ++NodeNum) { - static constexpr std::string_view Format_723("Water Heater Stratified Node Information,{},{:.4T},{:.4T},{:.3T},{:.4T},{:.4T},{},{}\n"); + static constexpr std::string_view Format_723("Water Heater Stratified Node Information,{},{:.4f},{:.4e},{:.3f},{:.4f},{:.4f},{},{}\n"); print(state.files.eio, Format_723, NodeNum, @@ -6359,8 +6322,7 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA this->UseSidePlantSizNum = this->UseSidePlantLoc.loop->PlantSizNum; if ((this->UseDesignVolFlowRateWasAutoSized) && (this->UseSidePlantSizNum == 0)) { ShowSevereError( - state, - EnergyPlus::format("InitWaterThermalTank: Did not find Sizing:Plant object for use side of plant thermal tank = {}", this->Name)); + state, std::format("InitWaterThermalTank: Did not find Sizing:Plant object for use side of plant thermal tank = {}", this->Name)); ShowFatalError(state, "InitWaterThermalTank: Program terminated due to previous condition(s)."); } } @@ -6371,8 +6333,7 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA this->UseSidePlantSizNum = this->UseSidePlantLoc.loop->PlantSizNum; if ((this->UseDesignVolFlowRateWasAutoSized) && (this->UseSidePlantSizNum == 0)) { ShowSevereError( - state, - EnergyPlus::format("InitWaterThermalTank: Did not find Sizing:Plant object for use side of plant thermal tank = {}", this->Name)); + state, std::format("InitWaterThermalTank: Did not find Sizing:Plant object for use side of plant thermal tank = {}", this->Name)); ShowFatalError(state, "InitWaterThermalTank: Program terminated due to previous condition(s)."); } } @@ -6381,9 +6342,9 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA this->PlantSourceMassFlowRateMax = this->SourceDesignVolFlowRate * rho; this->SourceSidePlantSizNum = this->SrcSidePlantLoc.loop->PlantSizNum; if ((this->SourceDesignVolFlowRateWasAutoSized) && (this->SourceSidePlantSizNum == 0)) { - ShowSevereError(state, - EnergyPlus::format( - "InitWaterThermalTank: Did not find Sizing:Plant object for source side of plant thermal tank = {}", this->Name)); + ShowSevereError( + state, + std::format("InitWaterThermalTank: Did not find Sizing:Plant object for source side of plant thermal tank = {}", this->Name)); ShowFatalError(state, "InitWaterThermalTank: Program terminated due to previous condition(s)."); } } @@ -6424,7 +6385,7 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA Real64 TankChangeRateScale = this->Volume / MaxSideVolFlow; if (TankChangeRateScale < 60.0) { // nominal change over in less than one minute ShowSevereError(state, "InitWaterThermalTank: Detected problem for stratified tank model. Model cannot be applied."); - ShowContinueError(state, EnergyPlus::format("Occurs for stratified tank name = {}", this->Name)); + ShowContinueError(state, std::format("Occurs for stratified tank name = {}", this->Name)); ShowContinueError(state, EnergyPlus::format("Tank volume = {:.4R} [m3]", this->Volume)); ShowContinueError(state, EnergyPlus::format("Tank use side volume flow rate = {:.4R} [m3/s]", this->UseDesignVolFlowRate)); ShowContinueError(state, @@ -6611,14 +6572,12 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA if (this->ShowSetPointWarning) { ShowSevereError( state, - EnergyPlus::format( - "Water heater = {}: Water heater tank set point temperature is greater than the maximum tank temperature limit.", - this->Name)); - ShowContinueErrorTimeStamp( - state, - EnergyPlus::format("Water heater tank set point temperature is reset to Tank Temperature Limit minus 1 C " - "({:.2T}) and simulation continues.", - this->SetPointTemp)); + std::format("Water heater = {}: Water heater tank set point temperature is greater than the maximum tank temperature limit.", + this->Name)); + ShowContinueErrorTimeStamp(state, + std::format("Water heater tank set point temperature is reset to Tank Temperature Limit minus 1 C " + "({:.2f}) and simulation continues.", + this->SetPointTemp)); this->ShowSetPointWarning = false; } } @@ -6630,14 +6589,13 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA if (this->ShowSetPointWarning) { ShowSevereError( state, - EnergyPlus::format( + std::format( "Chilled Water Tank = {}: Water heater tank set point temperature is lower than the minimum tank temperature limit.", this->Name)); - ShowContinueErrorTimeStamp( - state, - EnergyPlus::format("Chilled water tank set point temperature is reset to Tank Temperature Limit plus 1 C " - "({:.2T}) and simulation continues.", - this->SetPointTemp)); + ShowContinueErrorTimeStamp(state, + std::format("Chilled water tank set point temperature is reset to Tank Temperature Limit plus 1 C " + "({:.2f}) and simulation continues.", + this->SetPointTemp)); this->ShowSetPointWarning = false; } } @@ -6686,14 +6644,13 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA if (state.dataWaterThermalTanks->HPWaterHeater(this->HeatPumpNum).ShowSetPointWarning) { ShowSevereError( state, - EnergyPlus::format("Heat Pump Water Heater = {}: Heat Pump water heater set point temperature is equal to or greater than " - "the maximum tank temperature limit.", - state.dataWaterThermalTanks->HPWaterHeater(this->HeatPumpNum).Name)); - ShowContinueErrorTimeStamp( - state, - EnergyPlus::format("Heat Pump water heater tank set point temperature is reset to Tank Temperature Limit " - "minus 1 C ({:.2T}) and simulation continues.", - state.dataWaterThermalTanks->HPWaterHeater(this->HeatPumpNum).SetPointTemp)); + std::format("Heat Pump Water Heater = {}: Heat Pump water heater set point temperature is equal to or greater than " + "the maximum tank temperature limit.", + state.dataWaterThermalTanks->HPWaterHeater(this->HeatPumpNum).Name)); + ShowContinueErrorTimeStamp(state, + std::format("Heat Pump water heater tank set point temperature is reset to Tank Temperature Limit " + "minus 1 C ({:.2f}) and simulation continues.", + state.dataWaterThermalTanks->HPWaterHeater(this->HeatPumpNum).SetPointTemp)); state.dataWaterThermalTanks->HPWaterHeater(this->HeatPumpNum).ShowSetPointWarning = false; } } @@ -7023,27 +6980,26 @@ void WaterThermalTankData::initialize(EnergyPlusData &state, bool const FirstHVA ShowWarningError( state, - EnergyPlus::format("InitWaterThermalTank: -air flow rate = {:.7T} in fan object is less than the MSHP system air flow rate " - "when waterheating is required({:.7T}).", - FanVolFlow, - state.dataWaterThermalTanks->HPWaterHeater(HPNum).HPWHAirVolFlowRate( - state.dataWaterThermalTanks->HPWaterHeater(HPNum).NumofSpeed))); + std::format("InitWaterThermalTank: -air flow rate = {:.7f} in fan object is less than the MSHP system air flow rate " + "when waterheating is required({:.7f}).", + FanVolFlow, + state.dataWaterThermalTanks->HPWaterHeater(HPNum).HPWHAirVolFlowRate( + state.dataWaterThermalTanks->HPWaterHeater(HPNum).NumofSpeed))); ShowContinueError(state, " The MSHP system flow rate when waterheating is required is reset to the" " fan flow rate and the simulation continues."); - ShowContinueError(state, EnergyPlus::format(" Occurs in {}", state.dataWaterThermalTanks->HPWaterHeater(HPNum).Name)); + ShowContinueError(state, std::format(" Occurs in {}", state.dataWaterThermalTanks->HPWaterHeater(HPNum).Name)); state.dataWaterThermalTanks->HPWaterHeater(HPNum).HPWHAirVolFlowRate(state.dataWaterThermalTanks->HPWaterHeater(HPNum).NumofSpeed) = FanVolFlow; // Check flow rates in other speeds and ensure flow rates are not above the max flow rate for (int Iter = state.dataWaterThermalTanks->HPWaterHeater(HPNum).NumofSpeed - 1; Iter >= 1; --Iter) { if (state.dataWaterThermalTanks->HPWaterHeater(HPNum).HPWHAirVolFlowRate(Iter) > state.dataWaterThermalTanks->HPWaterHeater(HPNum).HPWHAirVolFlowRate(Iter + 1)) { - ShowContinueError( - state, - EnergyPlus::format(" The MSHP system flow rate when waterheating is required is reset to the flow rate at higher " - "speed and the simulation continues at Speed{}.", - Iter)); - ShowContinueError(state, EnergyPlus::format(" Occurs in {}", state.dataWaterThermalTanks->HPWaterHeater(HPNum).Name)); + ShowContinueError(state, + std::format(" The MSHP system flow rate when waterheating is required is reset to the flow rate at higher " + "speed and the simulation continues at Speed{}.", + Iter)); + ShowContinueError(state, std::format(" Occurs in {}", state.dataWaterThermalTanks->HPWaterHeater(HPNum).Name)); state.dataWaterThermalTanks->HPWaterHeater(HPNum).HPWHAirVolFlowRate(Iter) = state.dataWaterThermalTanks->HPWaterHeater(HPNum).HPWHAirVolFlowRate(Iter + 1); } @@ -7608,8 +7564,8 @@ void WaterThermalTankData::CalcWaterThermalTankMixed(EnergyPlusData &state) // W if (!state.dataGlobal->WarmupFlag) { if (this->MaxCycleErrorIndex == 0) { - ShowWarningError( - state, EnergyPlus::format("WaterHeater:Mixed = {}: Heater is cycling on and off more than once per second.", this->Name)); + ShowWarningError(state, + std::format("WaterHeater:Mixed = {}: Heater is cycling on and off more than once per second.", this->Name)); ShowContinueError(state, "Try increasing Deadband Temperature Difference or Tank Volume"); ShowContinueErrorTimeStamp(state, ""); } @@ -9075,10 +9031,10 @@ void WaterThermalTankData::CalcDesuperheaterWaterHeater(EnergyPlusData &state, b if (DesupHtr.SetPointError < 5) { ShowWarningError( state, - EnergyPlus::format("{} \"{}\": Water heater tank set point temperature is greater than or equal to the cut-in temperature of " - "the desuperheater. Desuperheater will be disabled.", - DesupHtr.Type, - DesupHtr.Name)); + std::format("{} \"{}\": Water heater tank set point temperature is greater than or equal to the cut-in temperature of " + "the desuperheater. Desuperheater will be disabled.", + DesupHtr.Type, + DesupHtr.Name)); ShowContinueErrorTimeStamp(state, EnergyPlus::format(" ...Desuperheater cut-in temperature = {:.2R}", MinTemp)); } else { ShowRecurringWarningErrorAtEnd(state, @@ -9249,7 +9205,7 @@ void WaterThermalTankData::CalcDesuperheaterWaterHeater(EnergyPlusData &state, b if (!state.dataGlobal->WarmupFlag) { ++DesupHtr.IterLimitExceededNum1; if (DesupHtr.IterLimitExceededNum1 == 1) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", DesupHtr.Type, DesupHtr.Name)); + ShowWarningError(state, std::format("{} \"{}\"", DesupHtr.Type, DesupHtr.Name)); ShowContinueError(state, EnergyPlus::format("Iteration limit exceeded calculating desuperheater unit part-load ratio, " "maximum iterations = {}. Part-load ratio returned = {:.3R}", @@ -9274,7 +9230,7 @@ void WaterThermalTankData::CalcDesuperheaterWaterHeater(EnergyPlusData &state, b if (!state.dataGlobal->WarmupFlag) { ++DesupHtr.RegulaFalsiFailedNum1; if (DesupHtr.RegulaFalsiFailedNum1 == 1) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", DesupHtr.Type, DesupHtr.Name)); + ShowWarningError(state, std::format("{} \"{}\"", DesupHtr.Type, DesupHtr.Name)); ShowContinueError( state, EnergyPlus::format("Desuperheater unit part-load ratio calculation failed: PLR limits of 0 to 1 " @@ -9382,7 +9338,7 @@ void WaterThermalTankData::CalcDesuperheaterWaterHeater(EnergyPlusData &state, b if (!state.dataGlobal->WarmupFlag) { ++DesupHtr.IterLimitExceededNum2; if (DesupHtr.IterLimitExceededNum2 == 1) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", DesupHtr.Type, DesupHtr.Name)); + ShowWarningError(state, std::format("{} \"{}\"", DesupHtr.Type, DesupHtr.Name)); ShowContinueError( state, EnergyPlus::format("Iteration limit exceeded calculating desuperheater unit part-load ratio, " @@ -9406,7 +9362,7 @@ void WaterThermalTankData::CalcDesuperheaterWaterHeater(EnergyPlusData &state, b if (!state.dataGlobal->WarmupFlag) { ++DesupHtr.RegulaFalsiFailedNum2; if (DesupHtr.RegulaFalsiFailedNum2 == 1) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", DesupHtr.Type, DesupHtr.Name)); + ShowWarningError(state, std::format("{} \"{}\"", DesupHtr.Type, DesupHtr.Name)); ShowContinueError( state, EnergyPlus::format("Desuperheater unit part-load ratio calculation failed: PLR limits of 0 to " @@ -9441,10 +9397,10 @@ void WaterThermalTankData::CalcDesuperheaterWaterHeater(EnergyPlusData &state, b // should never get here, case is checked in GetWaterThermalTankInput } else { ShowFatalError(state, - EnergyPlus::format("Coil:WaterHeating:Desuperheater = {}: invalid water heater tank type and name entered = {}, {}", - state.dataWaterThermalTanks->WaterHeaterDesuperheater(DesuperheaterNum).Name, - state.dataWaterThermalTanks->WaterHeaterDesuperheater(DesuperheaterNum).TankType, - state.dataWaterThermalTanks->WaterHeaterDesuperheater(DesuperheaterNum).TankName)); + std::format("Coil:WaterHeating:Desuperheater = {}: invalid water heater tank type and name entered = {}, {}", + state.dataWaterThermalTanks->WaterHeaterDesuperheater(DesuperheaterNum).Name, + state.dataWaterThermalTanks->WaterHeaterDesuperheater(DesuperheaterNum).TankType, + state.dataWaterThermalTanks->WaterHeaterDesuperheater(DesuperheaterNum).TankName)); } } @@ -9758,11 +9714,11 @@ void WaterThermalTankData::CalcHeatPumpWaterHeater(EnergyPlusData &state, bool c if (HeatPump.HPSetPointError == 1) { ShowWarningError( state, - EnergyPlus::format("{} \"{}: Water heater tank set point temperature is greater than or equal to the cut-in temperature of " - "the heat pump water heater. Heat Pump will be disabled and simulation continues.", - HeatPump.Type, - HeatPump.Name)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format(" ...Heat Pump cut-in temperature={}", HPMinTempChar)); + std::format("{} \"{}: Water heater tank set point temperature is greater than or equal to the cut-in temperature of " + "the heat pump water heater. Heat Pump will be disabled and simulation continues.", + HeatPump.Type, + HeatPump.Name)); + ShowContinueErrorTimeStamp(state, std::format(" ...Heat Pump cut-in temperature={}", HPMinTempChar)); } else { ShowRecurringWarningErrorAtEnd(state, HeatPump.Type + " \"" + HeatPump.Name + @@ -10077,7 +10033,7 @@ void WaterThermalTankData::CalcHeatPumpWaterHeater(EnergyPlusData &state, bool c if (!state.dataGlobal->WarmupFlag) { ++HeatPump.IterLimitExceededNum2; if (HeatPump.IterLimitExceededNum2 == 1) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", HeatPump.Type, HeatPump.Name)); + ShowWarningError(state, std::format("{} \"{}\"", HeatPump.Type, HeatPump.Name)); ShowContinueError( state, EnergyPlus::format("Iteration limit exceeded calculating heat pump water heater compressor part-load ratio, " @@ -10101,7 +10057,7 @@ void WaterThermalTankData::CalcHeatPumpWaterHeater(EnergyPlusData &state, bool c if (!state.dataGlobal->WarmupFlag) { ++HeatPump.RegulaFalsiFailedNum2; if (HeatPump.RegulaFalsiFailedNum2 == 1) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", HeatPump.Type, HeatPump.Name)); + ShowWarningError(state, std::format("{} \"{}\"", HeatPump.Type, HeatPump.Name)); ShowContinueError( state, EnergyPlus::format("Heat pump water heater compressor part-load ratio calculation failed: PLR limits of 0 to 1 " @@ -10254,7 +10210,7 @@ void WaterThermalTankData::CalcHeatPumpWaterHeater(EnergyPlusData &state, bool c if (!state.dataGlobal->WarmupFlag) { ++HeatPump.IterLimitExceededNum1; if (HeatPump.IterLimitExceededNum1 == 1) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", HeatPump.Type, HeatPump.Name)); + ShowWarningError(state, std::format("{} \"{}\"", HeatPump.Type, HeatPump.Name)); ShowContinueError( state, EnergyPlus::format("Iteration limit exceeded calculating heat pump water heater speed speed ratio ratio, " @@ -10277,7 +10233,7 @@ void WaterThermalTankData::CalcHeatPumpWaterHeater(EnergyPlusData &state, bool c if (!state.dataGlobal->WarmupFlag) { ++HeatPump.RegulaFalsiFailedNum1; if (HeatPump.RegulaFalsiFailedNum1 == 1) { - ShowWarningError(state, EnergyPlus::format("{} \"{}\"", HeatPump.Type, HeatPump.Name)); + ShowWarningError(state, std::format("{} \"{}\"", HeatPump.Type, HeatPump.Name)); ShowContinueError( state, EnergyPlus::format("Heat pump water heater speed ratio calculation failed: speed ratio limits of 0 to 1 " @@ -11198,9 +11154,9 @@ void WaterThermalTankData::MinePlantStructForInfo(EnergyPlusData &state) if ((this->UseDesignVolFlowRateWasAutoSized) && (this->UseSidePlantSizNum == 0)) { ShowSevereError(state, - EnergyPlus::format("Water heater = {} for autosizing Use side flow rate, did not find Sizing:Plant object {}", - this->Name, - this->UseSidePlantLoc.loop->Name)); + std::format("Water heater = {} for autosizing Use side flow rate, did not find Sizing:Plant object {}", + this->Name, + this->UseSidePlantLoc.loop->Name)); ErrorsFound = true; } // Is this wh Use side plumbed in series (default) or are there other branches in parallel? @@ -11218,9 +11174,9 @@ void WaterThermalTankData::MinePlantStructForInfo(EnergyPlusData &state) if ((this->SourceDesignVolFlowRateWasAutoSized) && (this->SourceSidePlantSizNum == 0) && (this->DesuperheaterNum == 0) && (this->HeatPumpNum == 0)) { ShowSevereError(state, - EnergyPlus::format("Water heater = {}for autosizing Source side flow rate, did not find Sizing:Plant object {}", - this->Name, - this->SrcSidePlantLoc.loop->Name)); + std::format("Water heater = {}for autosizing Source side flow rate, did not find Sizing:Plant object {}", + this->Name, + this->SrcSidePlantLoc.loop->Name)); ErrorsFound = true; } // Is this wh Source side plumbed in series (default) or are there other branches in parallel? @@ -11874,9 +11830,9 @@ void WaterThermalTankData::SizeTankForSupplySide(EnergyPlusData &state) tmpMaxCapacity = (this->Volume * rho * Cp * (Tfinish - Tstart)) / (this->Sizing.RecoveryTime * Constant::rSecsInHour); // m3 | kg/m3 | J/Kg/K | K | seconds } else { - ShowFatalError(state, - EnergyPlus::format( - "{}: Tank=\"{}\", requested sizing for max capacity but entered Recovery Time is zero.", RoutineName, this->Name)); + ShowFatalError( + state, + std::format("{}: Tank=\"{}\", requested sizing for max capacity but entered Recovery Time is zero.", RoutineName, this->Name)); } } @@ -11908,10 +11864,10 @@ void WaterThermalTankData::SizeTankForSupplySide(EnergyPlusData &state) tmpTankVolume = this->Sizing.TotalSolarCollectorArea * this->Sizing.TankCapacityPerCollectorArea; } else { ShowFatalError(state, - EnergyPlus::format("{}: Tank=\"{}\", requested sizing for volume with PerSolarCollectorArea but total found " - "area of Collectors is zero.", - RoutineName, - this->Name)); + std::format("{}: Tank=\"{}\", requested sizing for volume with PerSolarCollectorArea but total found " + "area of Collectors is zero.", + RoutineName, + this->Name)); } } if (this->MaxCapacityWasAutoSized) { @@ -12034,13 +11990,13 @@ void WaterThermalTankData::SizeDemandSidePlantConnections(EnergyPlusData &state) ShowSevereError(state, "Autosizing of Use side water heater design flow rate requires Sizing:Plant object to have an exit " "temperature >= 58C"); - ShowContinueError(state, EnergyPlus::format("Occurs for water heater object={}", this->Name)); + ShowContinueError(state, std::format("Occurs for water heater object={}", this->Name)); } else { // plant sizing object design temperature is set too hi throw warning. ShowSevereError(state, "Autosizing of Use side chilled water tank design flow rate requires Sizing:Plant object to have an " "exit temperature <= 8C"); - ShowContinueError(state, EnergyPlus::format("Occurs for chilled water storage tank object={}", this->Name)); + ShowContinueError(state, std::format("Occurs for chilled water storage tank object={}", this->Name)); } ErrorsFound = true; } @@ -12114,13 +12070,13 @@ void WaterThermalTankData::SizeDemandSidePlantConnections(EnergyPlusData &state) ShowSevereError(state, "Autosizing of Source side water heater design flow rate requires Sizing:Plant object to have an " "exit temperature >= 58C"); - ShowContinueError(state, EnergyPlus::format("Occurs for WaterHeater:Mixed object={}", this->Name)); + ShowContinueError(state, std::format("Occurs for WaterHeater:Mixed object={}", this->Name)); } else { // plant sizing object design temperature is set too hi throw warning. ShowSevereError(state, "Autosizing of Source side chilled water tank design flow rate requires Sizing:Plant object to have " "an exit temperature <= 8C"); - ShowContinueError(state, EnergyPlus::format("Occurs for chilled water storage tank object={}", this->Name)); + ShowContinueError(state, std::format("Occurs for chilled water storage tank object={}", this->Name)); } ErrorsFound = true; } @@ -12215,9 +12171,9 @@ void WaterThermalTankData::SizeStandAloneWaterHeater(EnergyPlusData &state) (this->Sizing.RecoveryTime * Constant::rSecsInHour); // m3 | kg/m3 | J/Kg/K | K | seconds } else { ShowFatalError(state, - EnergyPlus::format("{}: Tank=\"{}\", requested sizing for max capacity but entered Recovery Time is zero.", - routineName, - this->Name)); + std::format("{}: Tank=\"{}\", requested sizing for max capacity but entered Recovery Time is zero.", + routineName, + this->Name)); } this->MaxCapacity = tmpMaxCapacity; BaseSizer::reportSizerOutput(state, this->Type, this->Name, "Maximum Heater Capacity [W]", this->MaxCapacity); @@ -12555,10 +12511,10 @@ void WaterThermalTankData::SizeStandAloneWaterHeater(EnergyPlusData &state) tmpTankVolume = this->Sizing.TotalSolarCollectorArea * this->Sizing.TankCapacityPerCollectorArea; } else { ShowFatalError(state, - EnergyPlus::format("{}: Tank=\"{}\", requested sizing for volume with PerSolarCollectorArea but total found " - "area of Collectors is zero.", - routineName, - this->Name)); + std::format("{}: Tank=\"{}\", requested sizing for volume with PerSolarCollectorArea but total found " + "area of Collectors is zero.", + routineName, + this->Name)); } } if (this->MaxCapacityWasAutoSized) { @@ -12997,7 +12953,7 @@ void WaterThermalTankData::CalcStandardRatings(EnergyPlusData &state) if ((this->HeatPumpNum == 0) || !state.dataWaterThermalTanks->HPWaterHeater(this->HeatPumpNum).bIsIHP) { ShowWarningError( state, - EnergyPlus::format( + std::format( "Water heater = {}: Recovery Efficiency and Energy Factor could not be calculated during the test for standard ratings", this->Name)); ShowContinueError(state, "Setpoint was never recovered and/or heater never turned on"); @@ -13087,10 +13043,10 @@ void WaterThermalTankData::CalcStandardRatings(EnergyPlusData &state) MaxCapacity_loc = this->MaxCapacity; } - static constexpr std::string_view Format_720("Water Heater Information,{},{},{:.4T},{:.1T},{:.3T},{:.4T}\n"); + static constexpr std::string_view Format_720("Water Heater Information,{},{},{:.4e},{:.1f},{:.3f},{:.4f}\n"); print(state.files.eio, Format_720, this->Type, this->Name, this->Volume, MaxCapacity_loc, RecoveryEfficiency, EnergyFactor); } else { - static constexpr std::string_view Format_721("Heat Pump Water Heater Information,{},{},{:.4T},{:.1T},{:.3T},{:.4T},{:.0T}\n"); + static constexpr std::string_view Format_721("Heat Pump Water Heater Information,{},{},{:.4e},{:.1f},{:.3f},{:.4f},{:.0f}\n"); print(state.files.eio, Format_721, state.dataWaterThermalTanks->HPWaterHeater(this->HeatPumpNum).Type, @@ -13126,7 +13082,7 @@ void WaterThermalTankData::ReportCWTankInits(EnergyPlusData &state) return; } - static constexpr std::string_view Format_728("Chilled Water Tank Information,{},{},{:.4T},{:.4T},{:.4T}\n"); + static constexpr std::string_view Format_728("Chilled Water Tank Information,{},{},{:.4f},{:.4e},{:.4e}\n"); print(state.files.eio, Format_728, this->Type, this->Name, this->Volume, this->UseDesignVolFlowRate, this->SourceDesignVolFlowRate); this->AlreadyReported = true; diff --git a/src/EnergyPlus/WaterToAirHeatPumpSimple.cc b/src/EnergyPlus/WaterToAirHeatPumpSimple.cc index a4ed5d13b64..33d35f71f77 100644 --- a/src/EnergyPlus/WaterToAirHeatPumpSimple.cc +++ b/src/EnergyPlus/WaterToAirHeatPumpSimple.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -1520,9 +1521,9 @@ namespace WaterToAirHeatPumpSimple { ShowSevereError(state, "Autosizing of total cooling capacity requires a loop Sizing:Plant object"); ShowContinueError(state, "Autosizing also requires physical connection to a plant or condenser loop."); ShowContinueError(state, - EnergyPlus::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", - WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], - simpleWAHP.Name)); + std::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", + WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], + simpleWAHP.Name)); ratioTS = 0.0; // Clang complains it is used uninitialized if you don't give it a value ErrorsFound = true; } @@ -1633,9 +1634,9 @@ namespace WaterToAirHeatPumpSimple { ShowSevereError(state, "Autosizing of total cooling capacity requires a loop Sizing:Plant object"); ShowContinueError(state, "Autosizing also requires physical connection to a plant or condenser loop."); ShowContinueError(state, - EnergyPlus::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", - WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], - simpleWAHP.Name)); + std::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", + WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], + simpleWAHP.Name)); ratioTS = 0.0; // Clang complains it is used uninitialized if you don't give it a value ErrorsFound = true; } @@ -1750,9 +1751,9 @@ namespace WaterToAirHeatPumpSimple { ShowSevereError(state, "Autosizing of sensible cooling capacity requires a loop Sizing:Plant object"); ShowContinueError(state, "Autosizing also requires physical connection to a plant or condenser loop."); ShowContinueError(state, - EnergyPlus::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", - WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], - simpleWAHP.Name)); + std::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", + WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], + simpleWAHP.Name)); ErrorsFound = true; } // calculate temperatue ratio at rated conditions @@ -1845,9 +1846,9 @@ namespace WaterToAirHeatPumpSimple { ShowSevereError(state, "Autosizing of sensible cooling capacity requires a loop Sizing:Plant object"); ShowContinueError(state, "Autosizing also requires physical connection to a plant or condenser loop."); ShowContinueError(state, - EnergyPlus::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", - WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], - simpleWAHP.Name)); + std::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", + WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], + simpleWAHP.Name)); ErrorsFound = true; } // calculate temperatue ratio at rated conditions @@ -1962,28 +1963,28 @@ namespace WaterToAirHeatPumpSimple { simpleWAHP.RatedPowerCool = simpleWAHP.RatedCapCoolTotal / simpleWAHP.RatedCOPCoolAtRatedCdts; if ((std::abs(RatedCapCoolTotalDes - RatedCapCoolTotalUser) / RatedCapCoolTotalUser) > state.dataSize->AutoVsHardSizingThreshold) { - BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", - WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)]), - simpleWAHP.Name, - "Design Size Rated Total Cooling Capacity [W]", - RatedCapCoolTotalDes, - "User-Specified Rated Total Cooling Capacity [W]", - RatedCapCoolTotalUser); + BaseSizer::reportSizerOutput( + state, + std::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)]), + simpleWAHP.Name, + "Design Size Rated Total Cooling Capacity [W]", + RatedCapCoolTotalDes, + "User-Specified Rated Total Cooling Capacity [W]", + RatedCapCoolTotalUser); } else { - BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", - WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)]), - simpleWAHP.Name, - "User-Specified Rated Total Cooling Capacity [W]", - RatedCapCoolTotalUser); + BaseSizer::reportSizerOutput( + state, + std::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)]), + simpleWAHP.Name, + "User-Specified Rated Total Cooling Capacity [W]", + RatedCapCoolTotalUser); } if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(RatedCapCoolTotalDes - RatedCapCoolTotalUser) / RatedCapCoolTotalUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage( state, - EnergyPlus::format( + std::format( "SizeHVACWaterToAir: Potential issue with equipment sizing for coil {}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], simpleWAHP.Name)); @@ -2062,28 +2063,28 @@ namespace WaterToAirHeatPumpSimple { RatedCapCoolSensUser = simpleWAHP.RatedCapCoolSens; if ((std::abs(RatedCapCoolSensDes - RatedCapCoolSensUser) / RatedCapCoolSensUser) > state.dataSize->AutoVsHardSizingThreshold) { - BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", - WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)]), - simpleWAHP.Name, - "Design Size Rated Sensible Cooling Capacity [W]", - RatedCapCoolSensDes, - "User-Specified Rated Sensible Cooling Capacity [W]", - RatedCapCoolSensUser); + BaseSizer::reportSizerOutput( + state, + std::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)]), + simpleWAHP.Name, + "Design Size Rated Sensible Cooling Capacity [W]", + RatedCapCoolSensDes, + "User-Specified Rated Sensible Cooling Capacity [W]", + RatedCapCoolSensUser); } else { - BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", - WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)]), - simpleWAHP.Name, - "User-Specified Rated Sensible Cooling Capacity [W]", - RatedCapCoolSensUser); + BaseSizer::reportSizerOutput( + state, + std::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)]), + simpleWAHP.Name, + "User-Specified Rated Sensible Cooling Capacity [W]", + RatedCapCoolSensUser); } if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(RatedCapCoolSensDes - RatedCapCoolSensUser) / RatedCapCoolSensUser) > state.dataSize->AutoVsHardSizingThreshold) { ShowMessage( state, - EnergyPlus::format( + std::format( "SizeHVACWaterToAir: Potential issue with equipment sizing for coil {}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], simpleWAHP.Name)); @@ -2118,39 +2119,36 @@ namespace WaterToAirHeatPumpSimple { if ((RatedCapCoolSensAutoSized && RatedCapCoolTotalAutoSized) || RatedCapCoolSensAutoSized) { if (simpleWAHP.RatedCapCoolSensDesAtRatedCdts > simpleWAHP.RatedCapCoolAtRatedCdts) { ShowWarningError(state, - EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT \"{}\"", - WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], - simpleWAHP.Name)); - ShowContinueError(state, EnergyPlus::format("{}: Rated Sensible Cooling Capacity > Rated Total Cooling Capacity", RoutineName)); + std::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT \"{}\"", + WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], + simpleWAHP.Name)); + ShowContinueError(state, std::format("{}: Rated Sensible Cooling Capacity > Rated Total Cooling Capacity", RoutineName)); ShowContinueError(state, "Both of these capacity inputs have been autosized."); - ShowContinueError(state, - EnergyPlus::format("Rated Sensible Cooling Capacity at Rated Conditions = {:.2T} W", - simpleWAHP.RatedCapCoolSensDesAtRatedCdts)); ShowContinueError( state, - EnergyPlus::format("Rated Total Cooling Capacity at Rated Conditions = {:.2T} W", simpleWAHP.RatedCapCoolAtRatedCdts)); + std::format("Rated Sensible Cooling Capacity at Rated Conditions = {:.2f} W", simpleWAHP.RatedCapCoolSensDesAtRatedCdts)); + ShowContinueError( + state, std::format("Rated Total Cooling Capacity at Rated Conditions = {:.2f} W", simpleWAHP.RatedCapCoolAtRatedCdts)); ShowContinueError(state, "See eio file for further details."); ShowContinueError(state, "Check Total and Sensible Cooling Capacity coefficients in curves to ensure they are accurate."); ShowContinueError(state, "Check Zone and System Sizing objects to verify sizing inputs."); ShowContinueError(state, "Sizing statistics:"); - ShowContinueError(state, EnergyPlus::format("Rated entering Air Wet-Bulb Temperature = {:.3T} C", RatedMixWetBulb)); - ShowContinueError(state, EnergyPlus::format("Peak entering Air Wet-Bulb Temperature = {:.3T} C", MixWetBulb)); - ShowContinueError(state, EnergyPlus::format("Entering Water Temperature used = {:.3T} C", simpleWAHP.RatedEntWaterTemp)); + ShowContinueError(state, std::format("Rated entering Air Wet-Bulb Temperature = {:.3f} C", RatedMixWetBulb)); + ShowContinueError(state, std::format("Peak entering Air Wet-Bulb Temperature = {:.3f} C", MixWetBulb)); + ShowContinueError(state, std::format("Entering Water Temperature used = {:.3f} C", simpleWAHP.RatedEntWaterTemp)); ShowContinueError(state, "Design air and water flow rates = 1.0"); ShowContinueError( - state, - EnergyPlus::format("Rated ratio of load-side air wet-bulb temperature to 283.15 C (Rated ratioTWB) = {:.3T}", RatedratioTWB)); - ShowContinueError( - state, - EnergyPlus::format("Rated ratio of source-side inlet water temperature to 283.15 C (Rated ratioTS) = {:.3T}", RatedratioTS)); - ShowContinueError( - state, EnergyPlus::format("Peak ratio of load-side air wet-bulb temperature to 283.15 C (Peak ratioTWB) = {:.3T}", ratioTWB)); + state, std::format("Rated ratio of load-side air wet-bulb temperature to 283.15 C (Rated ratioTWB) = {:.3f}", RatedratioTWB)); ShowContinueError( - state, EnergyPlus::format("Peak ratio of source-side inlet water temperature to 283.15 C (Peak ratioTS) = {:.3T}", ratioTS)); - ShowContinueError(state, EnergyPlus::format("Rated Total Cooling Capacity Modifier = {:.5T}", RatedTotCapTempModFac)); - ShowContinueError(state, EnergyPlus::format("Peak Design Total Cooling Capacity Modifier = {:.5T}", PeakTotCapTempModFac)); - ShowContinueError(state, EnergyPlus::format("Rated Sensible Cooling Capacity Modifier = {:.5T}", RatedSensCapTempModFac)); - ShowContinueError(state, EnergyPlus::format("Peak Design Sensible Cooling Capacity Modifier = {:.5T}", PeakSensCapTempModFac)); + state, std::format("Rated ratio of source-side inlet water temperature to 283.15 C (Rated ratioTS) = {:.3f}", RatedratioTS)); + ShowContinueError(state, + std::format("Peak ratio of load-side air wet-bulb temperature to 283.15 C (Peak ratioTWB) = {:.3f}", ratioTWB)); + ShowContinueError(state, + std::format("Peak ratio of source-side inlet water temperature to 283.15 C (Peak ratioTS) = {:.3f}", ratioTS)); + ShowContinueError(state, std::format("Rated Total Cooling Capacity Modifier = {:.5f}", RatedTotCapTempModFac)); + ShowContinueError(state, std::format("Peak Design Total Cooling Capacity Modifier = {:.5f}", PeakTotCapTempModFac)); + ShowContinueError(state, std::format("Rated Sensible Cooling Capacity Modifier = {:.5f}", RatedSensCapTempModFac)); + ShowContinueError(state, std::format("Peak Design Sensible Cooling Capacity Modifier = {:.5f}", PeakSensCapTempModFac)); ShowContinueError(state, "...Rated Total Cooling Capacity at Rated Conditions = Total Peak Design Load * Rated Total " "Cooling Capacity Modifier / " @@ -2165,34 +2163,31 @@ namespace WaterToAirHeatPumpSimple { } else if (RatedCapCoolTotalAutoSized) { if (simpleWAHP.RatedCapCoolSensDesAtRatedCdts > simpleWAHP.RatedCapCoolAtRatedCdts) { ShowWarningError(state, - EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT \"{}\"", - WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], - simpleWAHP.Name)); - ShowContinueError(state, EnergyPlus::format("{}: Rated Sensible Cooling Capacity > Rated Total Cooling Capacity", RoutineName)); + std::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT \"{}\"", + WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], + simpleWAHP.Name)); + ShowContinueError(state, std::format("{}: Rated Sensible Cooling Capacity > Rated Total Cooling Capacity", RoutineName)); ShowContinueError(state, "Only the Rated total capacity input is autosized, consider autosizing both inputs."); - ShowContinueError(state, - EnergyPlus::format("Rated Sensible Cooling Capacity = {:.2T} W", simpleWAHP.RatedCapCoolSensDesAtRatedCdts)); - ShowContinueError(state, EnergyPlus::format("Rated Total Cooling Capacity = {:.2T} W", simpleWAHP.RatedCapCoolAtRatedCdts)); + ShowContinueError(state, std::format("Rated Sensible Cooling Capacity = {:.2f} W", simpleWAHP.RatedCapCoolSensDesAtRatedCdts)); + ShowContinueError(state, std::format("Rated Total Cooling Capacity = {:.2f} W", simpleWAHP.RatedCapCoolAtRatedCdts)); ShowContinueError(state, "See eio file for further details."); ShowContinueError(state, "Check Total and Sensible Cooling Capacity coefficients in curves to ensure they are accurate."); ShowContinueError(state, "Check Zone and System Sizing objects to verify sizing inputs."); ShowContinueError(state, "Sizing statistics for Total Cooling Capacity:"); - ShowContinueError(state, EnergyPlus::format("Rated entering Air Wet-Bulb Temperature = {:.3T} C", RatedMixWetBulb)); - ShowContinueError(state, EnergyPlus::format("Peak entering Air Wet-Bulb Temperature = {:.3T} C", MixWetBulb)); - ShowContinueError(state, EnergyPlus::format("Entering Water Temperature used = {:.3T} C", simpleWAHP.RatedEntWaterTemp)); + ShowContinueError(state, std::format("Rated entering Air Wet-Bulb Temperature = {:.3f} C", RatedMixWetBulb)); + ShowContinueError(state, std::format("Peak entering Air Wet-Bulb Temperature = {:.3f} C", MixWetBulb)); + ShowContinueError(state, std::format("Entering Water Temperature used = {:.3f} C", simpleWAHP.RatedEntWaterTemp)); ShowContinueError(state, "Design air and water flow rates = 1.0"); ShowContinueError( - state, - EnergyPlus::format("Rated ratio of load-side air wet-bulb temperature to 283.15 C (Rated ratioTWB) = {:.3T}", RatedratioTWB)); - ShowContinueError( - state, - EnergyPlus::format("Rated ratio of source-side inlet water temperature to 283.15 C (Rated ratioTS) = {:.3T}", RatedratioTS)); - ShowContinueError( - state, EnergyPlus::format("Peak ratio of load-side air wet-bulb temperature to 283.15 C (Peak ratioTWB) = {:.3T}", ratioTWB)); + state, std::format("Rated ratio of load-side air wet-bulb temperature to 283.15 C (Rated ratioTWB) = {:.3f}", RatedratioTWB)); ShowContinueError( - state, EnergyPlus::format("Peak ratio of source-side inlet water temperature to 283.15 C (Peak ratioTS) = {:.3T}", ratioTS)); - ShowContinueError(state, EnergyPlus::format("Rated Total Cooling Capacity Modifier = {:.5T}", RatedTotCapTempModFac)); - ShowContinueError(state, EnergyPlus::format("Peak Design Total Cooling Capacity Modifier = {:.5T}", PeakTotCapTempModFac)); + state, std::format("Rated ratio of source-side inlet water temperature to 283.15 C (Rated ratioTS) = {:.3f}", RatedratioTS)); + ShowContinueError(state, + std::format("Peak ratio of load-side air wet-bulb temperature to 283.15 C (Peak ratioTWB) = {:.3f}", ratioTWB)); + ShowContinueError(state, + std::format("Peak ratio of source-side inlet water temperature to 283.15 C (Peak ratioTS) = {:.3f}", ratioTS)); + ShowContinueError(state, std::format("Rated Total Cooling Capacity Modifier = {:.5f}", RatedTotCapTempModFac)); + ShowContinueError(state, std::format("Peak Design Total Cooling Capacity Modifier = {:.5f}", PeakTotCapTempModFac)); ShowContinueError(state, "...Rated Total Cooling Capacity at Rated Conditions = Total Peak Design Load * Rated Total " "Cooling Capacity Modifier / " @@ -2294,9 +2289,9 @@ namespace WaterToAirHeatPumpSimple { ShowSevereError(state, "Autosizing of heating capacity requires a loop Sizing:Plant object"); ShowContinueError(state, "Autosizing also requires physical connection to a plant or condenser loop."); ShowContinueError(state, - EnergyPlus::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", - WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], - simpleWAHP.Name)); + std::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", + WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], + simpleWAHP.Name)); HeatratioTS = 0.0; // Clang complains it is used uninitialized if you don't give it a value ErrorsFound = true; } @@ -2311,12 +2306,12 @@ namespace WaterToAirHeatPumpSimple { // Check curve output when rated mixed air wetbulb is the design mixed air wetbulb if (RatedHeatMixDryBulb == HeatMixTemp) { if (RatedHeatCapTempModFac > 1.02 || RatedHeatCapTempModFac < 0.98) { - ShowWarningError( - state, EnergyPlus::format("{} Coil:Heating:WaterToAirHeatPump:EquationFit={}", RoutineName, simpleWAHP.Name)); + ShowWarningError(state, + std::format("{} Coil:Heating:WaterToAirHeatPump:EquationFit={}", RoutineName, simpleWAHP.Name)); ShowContinueError(state, "Heating capacity as a function of temperature curve output is not equal to 1.0 (+ or - 2%) " "at rated conditions."); - ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedHeatCapTempModFac)); + ShowContinueError(state, std::format("Curve output at rated conditions = {:.3f}", RatedHeatCapTempModFac)); } } // calculate the rated capacity based on peak conditions @@ -2389,9 +2384,9 @@ namespace WaterToAirHeatPumpSimple { ShowSevereError(state, "Autosizing of heating capacity requires a loop Sizing:Plant object"); ShowContinueError(state, "Autosizing also requires physical connection to a plant or condenser loop."); ShowContinueError(state, - EnergyPlus::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", - WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], - simpleWAHP.Name)); + std::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", + WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], + simpleWAHP.Name)); HeatratioTS = 0.0; // Clang complains it is used uninitialized if you don't give it a value ErrorsFound = true; } @@ -2407,20 +2402,20 @@ namespace WaterToAirHeatPumpSimple { // Check curve output when rated mixed air wetbulb is the design mixed air wetbulb if (RatedHeatMixDryBulb == HeatMixTemp) { if (RatedHeatCapTempModFac > 1.02 || RatedHeatCapTempModFac < 0.98) { - ShowWarningError( - state, EnergyPlus::format("{} Coil:Heating:WaterToAirHeatPump:EquationFit={}", RoutineName, simpleWAHP.Name)); + ShowWarningError(state, + std::format("{} Coil:Heating:WaterToAirHeatPump:EquationFit={}", RoutineName, simpleWAHP.Name)); ShowContinueError(state, "Heating capacity as a function of temperature curve output is not equal to 1.0 (+ or - 2%) " "at rated conditions."); - ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedHeatCapTempModFac)); + ShowContinueError(state, std::format("Curve output at rated conditions = {:.3f}", RatedHeatCapTempModFac)); } if (RatedHeatPowerTempModFac > 1.02 || RatedHeatPowerTempModFac < 0.98) { - ShowWarningError( - state, EnergyPlus::format("{} Coil:Heating:WaterToAirHeatPump:EquationFit={}", RoutineName, simpleWAHP.Name)); + ShowWarningError(state, + std::format("{} Coil:Heating:WaterToAirHeatPump:EquationFit={}", RoutineName, simpleWAHP.Name)); ShowContinueError(state, "Heating power consumption as a function of temperature curve output is not equal to " "1.0 (+ or - 2%) at rated conditions."); - ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedHeatPowerTempModFac)); + ShowContinueError(state, std::format("Curve output at rated conditions = {:.3f}", RatedHeatPowerTempModFac)); } } // calculate the rated capacity based on peak conditions @@ -2503,14 +2498,14 @@ namespace WaterToAirHeatPumpSimple { OutputReportPredefined::PreDefTableEntry( state, state.dataOutRptPredefined->pdchCoolCoilTotCap, companionCoolingCoil.Name, RatedCapCoolTotalDes); BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", - WatertoAirHPNamesUC[static_cast(companionCoolingCoil.WAHPType)]), + std::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(companionCoolingCoil.WAHPType)]), companionCoolingCoil.Name, "Design Size Rated Total Cooling Capacity [W]", companionCoolingCoil.RatedCapCoolTotal); BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", - WatertoAirHPNamesUC[static_cast(companionCoolingCoil.WAHPType)]), + std::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(companionCoolingCoil.WAHPType)]), companionCoolingCoil.Name, "Design Size Rated Sensible Cooling Capacity [W]", companionCoolingCoil.RatedCapCoolSens); @@ -2562,9 +2557,9 @@ namespace WaterToAirHeatPumpSimple { } if (state.dataGlobal->DisplayExtraWarnings) { if ((std::abs(RatedCapHeatDes - RatedCapHeatUser) / RatedCapHeatUser) > state.dataSize->AutoVsHardSizingThreshold) { - ShowMessage(state, - EnergyPlus::format( - "SizeHVACWaterToAir: Potential issue with equipment sizing for coil {}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", + ShowMessage( + state, + std::format("SizeHVACWaterToAir: Potential issue with equipment sizing for coil {}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], simpleWAHP.Name)); ShowContinueError(state, EnergyPlus::format("User-Specified Rated Heating Capacity of {:.2R} [W]", RatedCapHeatUser)); @@ -2594,16 +2589,16 @@ namespace WaterToAirHeatPumpSimple { if (std::abs(companionCoolingCoil.RatedCapCoolTotal - simpleWAHP.RatedCapHeat) / companionCoolingCoil.RatedCapCoolTotal > 0.2) { ShowWarningError(state, - EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", - WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], - simpleWAHP.Name)); + std::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", + WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], + simpleWAHP.Name)); ShowContinueError(state, EnergyPlus::format("...used with COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT {}", companionCoolingCoil.WAHPType, companionCoolingCoil.Name)); ShowContinueError(state, "...heating capacity is disproportionate (> 20% different) to total cooling capacity"); - ShowContinueError(state, EnergyPlus::format("...heating capacity = {:.3T} W", simpleWAHP.RatedCapHeat)); - ShowContinueError(state, EnergyPlus::format("...cooling capacity = {:.3T} W", companionCoolingCoil.RatedCapCoolTotal)); + ShowContinueError(state, std::format("...heating capacity = {:.3f} W", simpleWAHP.RatedCapHeat)); + ShowContinueError(state, std::format("...cooling capacity = {:.3f} W", companionCoolingCoil.RatedCapCoolTotal)); } } } @@ -2706,15 +2701,15 @@ namespace WaterToAirHeatPumpSimple { auto const &companionCoolingCoil = state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(simpleWAHP.CompanionCoolingCoilNum); if (companionCoolingCoil.RatedCapCoolTotal != DataSizing::AutoSize) { int PltSizNumCompanionCoil = 0; - PltSizNumCompanionCoil = PlantUtilities::MyPlantSizingIndex( - state, - EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", - WatertoAirHPNamesUC[static_cast(companionCoolingCoil.WAHPType)]), - companionCoolingCoil.Name, - companionCoolingCoil.WaterInletNodeNum, - companionCoolingCoil.WaterOutletNodeNum, - ErrorsFound, - false); + PltSizNumCompanionCoil = + PlantUtilities::MyPlantSizingIndex(state, + std::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", + WatertoAirHPNamesUC[static_cast(companionCoolingCoil.WAHPType)]), + companionCoolingCoil.Name, + companionCoolingCoil.WaterInletNodeNum, + companionCoolingCoil.WaterOutletNodeNum, + ErrorsFound, + false); if (PltSizNumCompanionCoil > 0) { RatedWaterVolFlowRateDes = max(RatedWaterVolFlowRateDes, (1 + 1 / RatedCoolCOP) * companionCoolingCoil.RatedCapCoolTotal / @@ -2743,9 +2738,9 @@ namespace WaterToAirHeatPumpSimple { ShowSevereError(state, "Autosizing of water flow requires a loop Sizing:Plant object"); ShowContinueError(state, "Autosizing also requires physical connection to a plant or condenser loop."); ShowContinueError(state, - EnergyPlus::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", - WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], - simpleWAHP.Name)); + std::format("Occurs in COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT Object={}", + WatertoAirHPNamesUC[static_cast(simpleWAHP.WAHPType)], + simpleWAHP.Name)); } if (SystemCapacity != DataSizing::AutoSize) { @@ -2754,21 +2749,21 @@ namespace WaterToAirHeatPumpSimple { if (simpleWAHP.WAHPType == WatertoAirHP::Heating && simpleWAHP.CompanionCoolingCoilNum > 0) { auto &companionCoolingCoil(state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(simpleWAHP.CompanionCoolingCoilNum)); companionCoolingCoil.RatedWaterVolFlowRate = RatedWaterVolFlowRateDes; - BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", - WatertoAirHPNamesUC[static_cast(companionCoolingCoil.WAHPType)]), - companionCoolingCoil.Name, - "Design Size Rated Water Flow Rate [m3/s]", - RatedWaterVolFlowRateDes); + BaseSizer::reportSizerOutput( + state, + std::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(companionCoolingCoil.WAHPType)]), + companionCoolingCoil.Name, + "Design Size Rated Water Flow Rate [m3/s]", + RatedWaterVolFlowRateDes); } else if (simpleWAHP.WAHPType == WatertoAirHP::Cooling && simpleWAHP.CompanionHeatingCoilNum > 0) { auto &companionHeatingCoil(state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP(simpleWAHP.CompanionHeatingCoilNum)); companionHeatingCoil.RatedWaterVolFlowRate = RatedWaterVolFlowRateDes; - BaseSizer::reportSizerOutput(state, - EnergyPlus::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", - WatertoAirHPNamesUC[static_cast(companionHeatingCoil.WAHPType)]), - companionHeatingCoil.Name, - "Design Size Rated Water Flow Rate [m3/s]", - RatedWaterVolFlowRateDes); + BaseSizer::reportSizerOutput( + state, + std::format("COIL:{}:WATERTOAIRHEATPUMP:EQUATIONFIT", WatertoAirHPNamesUC[static_cast(companionHeatingCoil.WAHPType)]), + companionHeatingCoil.Name, + "Design Size Rated Water Flow Rate [m3/s]", + RatedWaterVolFlowRateDes); } } } else { @@ -3604,7 +3599,7 @@ namespace WaterToAirHeatPumpSimple { IndexNum = Util::FindItemInList(CoilName, state.dataWaterToAirHeatPumpSimple->SimpleWatertoAirHP); if (IndexNum == 0) { - ShowSevereError(state, EnergyPlus::format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, std::format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; } @@ -3666,7 +3661,7 @@ namespace WaterToAirHeatPumpSimple { } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, std::format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; CoilCapacity = -1000.0; } @@ -3713,7 +3708,7 @@ namespace WaterToAirHeatPumpSimple { } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, std::format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; CoilAirFlowRate = -1000.0; } @@ -3755,7 +3750,7 @@ namespace WaterToAirHeatPumpSimple { } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, std::format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -3797,7 +3792,7 @@ namespace WaterToAirHeatPumpSimple { } if (WhichCoil == 0) { - ShowSevereError(state, EnergyPlus::format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); + ShowSevereError(state, std::format(R"(Could not find CoilType="{}" with Name="{}")", CoilType, CoilName)); ErrorsFound = true; NodeNumber = 0; } @@ -3830,9 +3825,9 @@ namespace WaterToAirHeatPumpSimple { if (SimpleWSHPNum <= 0 || SimpleWSHPNum > state.dataWaterToAirHeatPumpSimple->NumWatertoAirHPs) { ShowSevereError(state, - EnergyPlus::format("SetSimpleWSHPData: called with WSHP Coil Number out of range={} should be >0 and <{}", - SimpleWSHPNum, - state.dataWaterToAirHeatPumpSimple->NumWatertoAirHPs)); + std::format("SetSimpleWSHPData: called with WSHP Coil Number out of range={} should be >0 and <{}", + SimpleWSHPNum, + state.dataWaterToAirHeatPumpSimple->NumWatertoAirHPs)); ErrorsFound = true; return; } @@ -3870,18 +3865,18 @@ namespace WaterToAirHeatPumpSimple { Real64 RatedTotCapTempModFac = wahp.TotalCoolCapCurve->value(state, RatedratioTWB, RatedratioTS, 1.0, 1.0); Real64 RatedCoolPowerTempModFac = wahp.CoolPowCurve->value(state, RatedratioTWB, RatedratioTS, 1.0, 1.0); if (RatedTotCapTempModFac > 1.02 || RatedTotCapTempModFac < 0.98) { - ShowWarningError(state, EnergyPlus::format("{}: Coil:Cooling:WaterToAirHeatPump:EquationFit=\"{}\"", RoutineName, wahp.Name)); + ShowWarningError(state, std::format("{}: Coil:Cooling:WaterToAirHeatPump:EquationFit=\"{}\"", RoutineName, wahp.Name)); ShowContinueError(state, "Total cooling capacity as a function of temperature curve output is not equal to 1.0 (+ or - 2%) " "at rated conditions."); - ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedTotCapTempModFac)); + ShowContinueError(state, std::format("Curve output at rated conditions = {:.3f}", RatedTotCapTempModFac)); } if (RatedCoolPowerTempModFac > 1.02 || RatedCoolPowerTempModFac < 0.98) { - ShowWarningError(state, EnergyPlus::format("{}: Coil:Cooling:WaterToAirHeatPump:EquationFit=\"{}\"", RoutineName, wahp.Name)); + ShowWarningError(state, std::format("{}: Coil:Cooling:WaterToAirHeatPump:EquationFit=\"{}\"", RoutineName, wahp.Name)); ShowContinueError(state, "Cooling power consumption as a function of temperature curve output is not equal to 1.0 (+ or - 2%) " "at rated conditions."); - ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedCoolPowerTempModFac)); + ShowContinueError(state, std::format("Curve output at rated conditions = {:.3f}", RatedCoolPowerTempModFac)); } } @@ -3892,11 +3887,11 @@ namespace WaterToAirHeatPumpSimple { Real64 RatedSensCapTempModFac = wahp.SensCoolCapCurve->value(state, RatedratioTDB, RatedratioTWB, RatedratioTS, 1.0, 1.0); if (RatedSensCapTempModFac > 1.02 || RatedSensCapTempModFac < 0.98) { - ShowWarningError(state, EnergyPlus::format("{}: Coil:Cooling:WaterToAirHeatPump:EquationFit=\"{}\"", RoutineName, wahp.Name)); + ShowWarningError(state, std::format("{}: Coil:Cooling:WaterToAirHeatPump:EquationFit=\"{}\"", RoutineName, wahp.Name)); ShowContinueError(state, "Sensible cooling capacity as a function of temperature curve output is not equal to 1.0 (+ or - 2%) " "at rated conditions."); - ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedSensCapTempModFac)); + ShowContinueError(state, std::format("Curve output at rated conditions = {:.3f}", RatedSensCapTempModFac)); } } @@ -3907,17 +3902,17 @@ namespace WaterToAirHeatPumpSimple { Real64 RatedHeatCapTempModFac = wahp.HeatCapCurve->value(state, RatedHeatratioTDB, RatedHeatratioTS, 1.0, 1.0); Real64 RatedHeatPowerTempModFac = wahp.HeatPowCurve->value(state, RatedHeatratioTDB, RatedHeatratioTS, 1.0, 1.0); if (RatedHeatCapTempModFac > 1.02 || RatedHeatCapTempModFac < 0.98) { - ShowWarningError(state, EnergyPlus::format("{}: Coil:Heating:WaterToAirHeatPump:EquationFit=\"{}\"", RoutineName, wahp.Name)); + ShowWarningError(state, std::format("{}: Coil:Heating:WaterToAirHeatPump:EquationFit=\"{}\"", RoutineName, wahp.Name)); ShowContinueError( state, "Heating capacity as a function of temperature curve output is not equal to 1.0 (+ or - 2%) at rated conditions."); - ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedHeatCapTempModFac)); + ShowContinueError(state, std::format("Curve output at rated conditions = {:.3f}", RatedHeatCapTempModFac)); } if (RatedHeatPowerTempModFac > 1.02 || RatedHeatPowerTempModFac < 0.98) { - ShowWarningError(state, EnergyPlus::format("{}: Coil:Heating:WaterToAirHeatPump:EquationFit=\"{}\"", RoutineName, wahp.Name)); + ShowWarningError(state, std::format("{}: Coil:Heating:WaterToAirHeatPump:EquationFit=\"{}\"", RoutineName, wahp.Name)); ShowContinueError(state, "Heating power consumption as a function of temperature curve output is not equal to 1.0 (+ or - 2%) at " "rated conditions."); - ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", RatedHeatPowerTempModFac)); + ShowContinueError(state, std::format("Curve output at rated conditions = {:.3f}", RatedHeatPowerTempModFac)); } } } diff --git a/src/EnergyPlus/WeatherManager.cc b/src/EnergyPlus/WeatherManager.cc index c577d875b1f..b284f1981c8 100644 --- a/src/EnergyPlus/WeatherManager.cc +++ b/src/EnergyPlus/WeatherManager.cc @@ -49,6 +49,7 @@ #include #include #include +#include #include // ObjexxFCL Headers @@ -715,8 +716,8 @@ namespace Weather { if (state.dataWeather->NumIntervalsPerHour != state.dataGlobal->TimeStepsInHour) { ShowSevereError( state, - EnergyPlus::format("{}Number of intervals per hour on Weather file does not match specified number of Time Steps Per Hour", - RoutineName)); + std::format("{}Number of intervals per hour on Weather file does not match specified number of Time Steps Per Hour", + RoutineName)); ErrorsFound = true; } } @@ -730,25 +731,24 @@ namespace Weather { CheckWeatherFileValidity(state); } if (ErrorsFound) { - ShowSevereError(state, EnergyPlus::format("{}No location specified, program will terminate.", RoutineName)); + ShowSevereError(state, std::format("{}No location specified, program will terminate.", RoutineName)); } } else { ErrorsFound = true; - ShowSevereError(state, EnergyPlus::format("{}No Design Days or Run Period(s) specified, program will terminate.", RoutineName)); + ShowSevereError(state, std::format("{}No Design Days or Run Period(s) specified, program will terminate.", RoutineName)); } if (state.dataSysVars->DDOnly && state.dataEnvrn->TotDesDays == 0) { ErrorsFound = true; ShowSevereError( state, - EnergyPlus::format( - "{}Requested Design Days only (DataSystemVariables::DDOnly) but no Design Days specified, program will terminate.", - RoutineName)); + std::format("{}Requested Design Days only (DataSystemVariables::DDOnly) but no Design Days specified, program will terminate.", + RoutineName)); } if (state.dataSysVars->ReverseDD && state.dataEnvrn->TotDesDays == 1) { ErrorsFound = true; ShowSevereError( state, - EnergyPlus::format( + std::format( "{}Requested Reverse Design Days (DataSystemVariables::ReverseDD) but only 1 Design Day specified, program will terminate.", RoutineName)); } @@ -756,7 +756,7 @@ namespace Weather { // Throw a Fatal now that we have said it'll terminate if (ErrorsFound) { CloseWeatherFile(state); // will only close if opened. - ShowFatalError(state, EnergyPlus::format("{}Errors found in Weather Data Input. Program terminates.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in Weather Data Input. Program terminates.", RoutineName)); } state.dataEnvrn->CurrentOverallSimDay = 0; @@ -792,7 +792,7 @@ namespace Weather { (state.dataHeatBal->AdaptiveComfortRequested_ASH55 || state.dataHeatBal->AdaptiveComfortRequested_CEN15251)) { if (state.dataGlobal->KindOfSim == Constant::KindOfSim::DesignDay) { if (state.dataGlobal->DoDesDaySim) { - ShowWarningError(state, EnergyPlus::format("{}Adaptive Comfort being reported during design day.", RoutineName)); + ShowWarningError(state, std::format("{}Adaptive Comfort being reported during design day.", RoutineName)); Real64 GrossApproxAvgDryBulb = (state.dataWeather->DesDayInput(state.dataWeather->Envrn).MaxDryBulb + (state.dataWeather->DesDayInput(state.dataWeather->Envrn).MaxDryBulb - state.dataWeather->DesDayInput(state.dataWeather->Envrn).DailyDBRange)) / @@ -891,10 +891,10 @@ namespace Weather { continue; } - ShowSevereError( - state, - EnergyPlus::format( - "{}Weatherfile does not support leap years but runperiod includes a leap year ({})", RoutineName, year)); + ShowSevereError(state, + std::format("{}Weatherfile does not support leap years but runperiod includes a leap year ({})", + RoutineName, + year)); missingLeap = true; } } @@ -909,9 +909,9 @@ namespace Weather { if (!dataperiod.HasYearData) { ShowSevereError( state, - EnergyPlus::format("{}Actual weather runperiod has been entered but weatherfile DATA PERIOD does not have " - "year included in start/end date.", - RoutineName)); + std::format("{}Actual weather runperiod has been entered but weatherfile DATA PERIOD does not have " + "year included in start/end date.", + RoutineName)); ShowContinueError(state, "...to match the RunPeriod, the DATA PERIOD should be mm/dd/yyyy for both, or"); ShowContinueError(state, "(...set \"Treat Weather as Actual\" to \"No\".)"); } @@ -954,54 +954,53 @@ namespace Weather { EnDate = EnergyPlus::format(DateFormat, envCurr.EndMonth, envCurr.EndDay); ShowSevereError( state, - EnergyPlus::format("{}Runperiod [mm/dd] (Start={},End={}) requested not within Data Period(s) from Weather File", - RoutineName, - StDate, - EnDate)); + std::format("{}Runperiod [mm/dd] (Start={},End={}) requested not within Data Period(s) from Weather File", + RoutineName, + StDate, + EnDate)); } else { StDate = EnergyPlus::format(DateFormatWithYear, envCurr.StartMonth, envCurr.StartDay, envCurr.StartYear); EnDate = EnergyPlus::format(DateFormatWithYear, envCurr.EndMonth, envCurr.EndDay, envCurr.EndYear); ShowSevereError( state, - EnergyPlus::format( - "{}Runperiod [mm/dd/yyyy] (Start={},End={}) requested not within Data Period(s) from Weather File", - RoutineName, - StDate, - EnDate)); + std::format("{}Runperiod [mm/dd/yyyy] (Start={},End={}) requested not within Data Period(s) from Weather File", + RoutineName, + StDate, + EnDate)); } auto const &dataPeriod1 = state.dataWeather->DataPeriods(1); StDate = EnergyPlus::format(DateFormat, dataPeriod1.StMon, dataPeriod1.StDay); EnDate = EnergyPlus::format(DateFormat, dataPeriod1.EnMon, dataPeriod1.EnDay); if (dataPeriod1.StYear > 0) { - StDate += EnergyPlus::format("/{}", dataPeriod1.StYear); + StDate += std::format("/{}", dataPeriod1.StYear); } else { StDate += "/"; } if (dataPeriod1.EnYear > 0) { - EnDate += EnergyPlus::format("/{}", dataPeriod1.EnYear); + EnDate += std::format("/{}", dataPeriod1.EnYear); } else { EnDate += "/"; } if (state.dataWeather->NumDataPeriods == 1) { - ShowContinueError(state, EnergyPlus::format("Weather Data Period (Start={},End={})", StDate, EnDate)); + ShowContinueError(state, std::format("Weather Data Period (Start={},End={})", StDate, EnDate)); } else { - ShowContinueError(state, EnergyPlus::format("Multiple Weather Data Periods 1st (Start={},End={})", StDate, EnDate)); + ShowContinueError(state, std::format("Multiple Weather Data Periods 1st (Start={},End={})", StDate, EnDate)); } - ShowFatalError(state, EnergyPlus::format("{}Program terminates due to preceding condition.", RoutineName)); + ShowFatalError(state, std::format("{}Program terminates due to preceding condition.", RoutineName)); } if (missingLeap) { // Bail out now if we still need to - ShowFatalError(state, EnergyPlus::format("{}Program terminates due to preceding condition.", RoutineName)); + ShowFatalError(state, std::format("{}Program terminates due to preceding condition.", RoutineName)); } // Following builds Environment start/end for ASHRAE 55 warnings StDate = EnergyPlus::format(DateFormat, envCurr.StartMonth, envCurr.StartDay); EnDate = EnergyPlus::format(DateFormat, envCurr.EndMonth, envCurr.EndDay); if (envCurr.KindOfEnvrn == Constant::KindOfSim::RunPeriodWeather) { - StDate += EnergyPlus::format("/{}", envCurr.StartYear); - EnDate += EnergyPlus::format("/{}", envCurr.EndYear); + StDate += std::format("/{}", envCurr.StartYear); + EnDate += std::format("/{}", envCurr.EndYear); } state.dataEnvrn->EnvironmentStartEnd = StDate + " - " + EnDate; state.dataEnvrn->StartYear = envCurr.StartYear; @@ -1038,17 +1037,16 @@ namespace Weather { (state.dataGlobal->KindOfSim == Constant::KindOfSim::RunPeriodWeather && state.dataGlobal->DoWeathSim) && (state.dataHeatBal->AdaptiveComfortRequested_ASH55 || state.dataHeatBal->AdaptiveComfortRequested_CEN15251)) { if (state.dataWeather->WFAllowsLeapYears) { - ShowSevereError( - state, - EnergyPlus::format("{}AdaptiveComfort Reporting does not work correctly with leap years in weather files.", - RoutineName)); + ShowSevereError(state, + std::format("{}AdaptiveComfort Reporting does not work correctly with leap years in weather files.", + RoutineName)); ErrorsFound = true; } if (state.dataWeather->NumDataPeriods != 1) { - ShowSevereError(state, - EnergyPlus::format( - "{}AdaptiveComfort Reporting does not work correctly with multiple dataperiods in weather files.", - RoutineName)); + ShowSevereError( + state, + std::format("{}AdaptiveComfort Reporting does not work correctly with multiple dataperiods in weather files.", + RoutineName)); ErrorsFound = true; } auto const &dataPeriod1 = state.dataWeather->DataPeriods(1); @@ -1056,26 +1054,24 @@ namespace Weather { int RunStJDay = General::OrdinalDay(dataPeriod1.StMon, dataPeriod1.StDay, state.dataWeather->LeapYearAdd); int RunEnJDay = General::OrdinalDay(dataPeriod1.EnMon, dataPeriod1.EnDay, state.dataWeather->LeapYearAdd); if (RunEnJDay - RunStJDay + 1 != 365) { - ShowSevereError( - state, - EnergyPlus::format("{}AdaptiveComfort Reporting does not work correctly with weather files that do " - "not contain 365 days.", - RoutineName)); + ShowSevereError(state, + std::format("{}AdaptiveComfort Reporting does not work correctly with weather files that do " + "not contain 365 days.", + RoutineName)); ErrorsFound = true; } } else { - ShowSevereError( - state, - EnergyPlus::format("{}AdaptiveComfort Reporting does not work correctly with weather files that do not " - "start on 1 January.", - RoutineName)); + ShowSevereError(state, + std::format("{}AdaptiveComfort Reporting does not work correctly with weather files that do not " + "start on 1 January.", + RoutineName)); ErrorsFound = true; } if (state.dataWeather->NumIntervalsPerHour != 1) { ShowSevereError(state, - EnergyPlus::format("{}AdaptiveComfort Reporting does not work correctly with weather files that have " - "multiple interval records per hour.", - RoutineName)); + std::format("{}AdaptiveComfort Reporting does not work correctly with weather files that have " + "multiple interval records per hour.", + RoutineName)); ErrorsFound = true; } } // if @@ -1207,7 +1203,7 @@ namespace Weather { } if (ErrorsFound && !state.dataGlobal->DoingSizing && !state.dataGlobal->KickOffSimulation) { - ShowSevereError(state, EnergyPlus::format("{}Errors found in getting a new environment", RoutineName)); + ShowSevereError(state, std::format("{}Errors found in getting a new environment", RoutineName)); Available = false; } else if (ErrorsFound) { Available = false; @@ -1228,7 +1224,7 @@ namespace Weather { envNew = envBase; // copy over seed data from current array element envNew.SeedEnvrnNum = i; envNew.KindOfEnvrn = Constant::KindOfSim::HVACSizeDesignDay; - envNew.Title = EnergyPlus::format("{} HVAC Sizing Pass {}", envBase.Title, HVACSizingIterCount); + envNew.Title = std::format("{} HVAC Sizing Pass {}", envBase.Title, HVACSizingIterCount); envNew.HVACSizingIterationNum = HVACSizingIterCount; } else if (state.dataWeather->Environment(i).KindOfEnvrn == Constant::KindOfSim::RunPeriodDesign) { state.dataWeather->Environment.redimension(++state.dataWeather->NumOfEnvrn); @@ -1237,7 +1233,7 @@ namespace Weather { envNew = envBase; // copy over seed data envNew.SeedEnvrnNum = i; envNew.KindOfEnvrn = Constant::KindOfSim::HVACSizeRunPeriodDesign; - envNew.Title = EnergyPlus::format("{} HVAC Sizing Pass {}", envBase.Title, HVACSizingIterCount); + envNew.Title = std::format("{} HVAC Sizing Pass {}", envBase.Title, HVACSizingIterCount); envNew.HVACSizingIterationNum = HVACSizingIterCount; } } // for each loop over Environment data structure @@ -1561,7 +1557,7 @@ namespace Weather { } ThisDay += 7 * (state.dataWeather->DST.StDay - 1); if (ThisDay > state.dataWeather->EndDayOfMonthWithLeapDay(state.dataWeather->DST.StMon)) { - ShowSevereError(state, EnergyPlus::format("{}Determining DST: DST Start Date, Nth Day of Month, not enough Nths", RoutineName)); + ShowSevereError(state, std::format("{}Determining DST: DST Start Date, Nth Day of Month, not enough Nths", RoutineName)); ErrorsFound = true; } else { ActStartMonth = state.dataWeather->DST.StMon; @@ -1588,7 +1584,7 @@ namespace Weather { if ((ThisDay >> state.dataWeather->EndDayOfMonthWithLeapDay(state.dataWeather->DST.EnMon)) != 0) { ActEndMonth = 0; // Suppress uninitialized warning ActEndDay = 0; // Suppress uninitialized warning - ShowSevereError(state, EnergyPlus::format("{}Determining DST: DST End Date, Nth Day of Month, not enough Nths", RoutineName)); + ShowSevereError(state, std::format("{}Determining DST: DST End Date, Nth Day of Month, not enough Nths", RoutineName)); ErrorsFound = true; } else { ActEndMonth = state.dataWeather->DST.EnMon; @@ -1604,7 +1600,7 @@ namespace Weather { } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Program terminates due to preceding condition(s).", RoutineName)); + ShowFatalError(state, std::format("{}Program terminates due to preceding condition(s).", RoutineName)); } if (present(DSTActStMon)) { @@ -1677,8 +1673,7 @@ namespace Weather { ThisDay += 7 * (specialDay.Day - 1); if (ThisDay > state.dataWeather->EndDayOfMonthWithLeapDay(specialDay.Month)) { ShowSevereError( - state, - EnergyPlus::format("{}Special Day Date, Nth Day of Month, not enough Nths, for SpecialDay={}", RoutineName, specialDay.Name)); + state, std::format("{}Special Day Date, Nth Day of Month, not enough Nths, for SpecialDay={}", RoutineName, specialDay.Name)); ErrorsFound = true; continue; } @@ -1695,10 +1690,9 @@ namespace Weather { JDay = General::OrdinalDay(specialDay.Month, ThisDay, state.dataWeather->LeapYearAdd); } if (state.dataWeather->SpecialDayTypes(JDay) != 0) { - ShowWarningError(state, - EnergyPlus::format("{}Special Day definition ({}) is overwriting previously entered special day period", - RoutineName, - specialDay.Name)); + ShowWarningError( + state, + std::format("{}Special Day definition ({}) is overwriting previously entered special day period", RoutineName, specialDay.Name)); if (state.dataWeather->UseSpecialDays) { ShowContinueError(state, "...This could be caused by definitions on the Weather File."); } @@ -1718,7 +1712,7 @@ namespace Weather { } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Program terminates due to preceding condition(s).", RoutineName)); + ShowFatalError(state, std::format("{}Program terminates due to preceding condition(s).", RoutineName)); } } @@ -2078,11 +2072,11 @@ namespace Weather { Sched::UpdateScheduleVals(state); - state.dataEnvrn->CurMnDyHr = EnergyPlus::format( + state.dataEnvrn->CurMnDyHr = std::format( "{:02d}/{:02d} {:02d}", state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, (unsigned short)(state.dataGlobal->HourOfDay - 1)); - state.dataEnvrn->CurMnDy = EnergyPlus::format("{:02d}/{:02d}", state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth); + state.dataEnvrn->CurMnDy = std::format("{:02d}/{:02d}", state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth); state.dataEnvrn->CurMnDyYr = - EnergyPlus::format("{:02d}/{:02d}/{:04d}", state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->CalendarYear); + std::format("{:02d}/{:02d}/{:04d}", state.dataEnvrn->Month, state.dataEnvrn->DayOfMonth, state.dataGlobal->CalendarYear); state.dataGlobal->WeightNow = state.dataWeather->Interpolation(state.dataGlobal->TimeStep); state.dataGlobal->WeightPreviousHour = 1.0 - state.dataGlobal->WeightNow; @@ -2108,8 +2102,7 @@ namespace Weather { // Determine if Sun is up or down, set Solar Cosine values for time step. DetermineSunUpDown(state, state.dataEnvrn->SOLCOS); if (state.dataEnvrn->SunIsUp && state.dataWeather->SolarAltitudeAngle < 0.0) { - ShowFatalError(state, - EnergyPlus::format("SetCurrentWeather: At {} Sun is Up but Solar Altitude Angle is < 0.0", state.dataEnvrn->CurMnDyHr)); + ShowFatalError(state, std::format("SetCurrentWeather: At {} Sun is Up but Solar Altitude Angle is < 0.0", state.dataEnvrn->CurMnDyHr)); } auto const &today = state.dataWeather->wvarsHrTsToday(state.dataGlobal->TimeStep, state.dataGlobal->HourOfDay); @@ -2411,7 +2404,7 @@ namespace Weather { if (thisEnviron.MatchYear) { date += '/' + fmt::to_string(thisEnviron.StartYear); } - ShowSevereError(state, EnergyPlus::format("Multiple rewinds on EPW while searching for first day {}", date)); + ShowSevereError(state, std::format("Multiple rewinds on EPW while searching for first day {}", date)); } else { state.files.inputWeatherFile.rewind(); ++NumRewinds; @@ -2458,13 +2451,13 @@ namespace Weather { } if (!WeatherDataLine.good) { ShowFatalError(state, - EnergyPlus::format("Error occurred on EPW while searching for first day, stopped at {}/{}/{} {}:{} IO Error='{}'", - WYear, - WMonth, - WDay, - WHour, - WMinute, - state.files.inputWeatherFile.error_state_to_string()), + std::format("Error occurred on EPW while searching for first day, stopped at {}/{}/{} {}:{} IO Error='{}'", + WYear, + WMonth, + WDay, + WHour, + WMinute, + state.files.inputWeatherFile.error_state_to_string()), OptionalOutputFileRef{state.files.eso}); } if (state.dataWeather->CurDayOfWeek <= 7) { @@ -2482,49 +2475,49 @@ namespace Weather { // Do the range checks on the first set of fields -- no others. bool ErrorsFound = false; if (DryBulb < 99.9 && (DryBulb < -90.0 || DryBulb > 70.0)) { - ShowSevereError(state, EnergyPlus::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); + ShowSevereError(state, std::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); ShowContinueError(state, EnergyPlus::format("DryBulb Temperature ({:.2R}) is out of range [-90.0, 70.0]", DryBulb)); ErrorsFound = true; } if (DewPoint < 99.9 && (DewPoint < -90.0 || DewPoint > 70.0)) { - ShowSevereError(state, EnergyPlus::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); + ShowSevereError(state, std::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); ShowContinueError(state, EnergyPlus::format("DewPoint Temperature ({:.2R}) is out of range [-90.0, 70.0]", DewPoint)); ErrorsFound = true; } if (RelHum < 999.0 && (RelHum < 0.0 || RelHum > 110.0)) { - ShowSevereError(state, EnergyPlus::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); + ShowSevereError(state, std::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); ShowContinueError(state, EnergyPlus::format("Relative Humidity ({:.2R}) is out of range [0.0, 100.0]", RelHum)); ErrorsFound = true; } if (AtmPress < 999999.0 && (AtmPress <= 31000.0 || AtmPress > 120000.0)) { - ShowSevereError(state, EnergyPlus::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); + ShowSevereError(state, std::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); ShowContinueError(state, EnergyPlus::format("Atmospheric Pressure ({:.0R}) is out of range [31000, 120000]", AtmPress)); ErrorsFound = true; } if (DirectRad < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); + ShowSevereError(state, std::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); ShowContinueError(state, EnergyPlus::format("Direct Radiation ({:.2R}) is out of range [0.0, -]", DirectRad)); ErrorsFound = true; } if (DiffuseRad < 0.0) { - ShowSevereError(state, EnergyPlus::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); + ShowSevereError(state, std::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); ShowContinueError(state, EnergyPlus::format("Diffuse Radiation ({:.2R}) is out of range [0.0, -]", DiffuseRad)); ErrorsFound = true; } if (WindDir < 999.0 && (WindDir < 0.0 || WindDir > 360.0)) { - ShowSevereError(state, EnergyPlus::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); + ShowSevereError(state, std::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); ShowContinueError(state, EnergyPlus::format("Wind Direction ({:.2R}) is out of range [0.0, 360.0]", WindDir)); ErrorsFound = true; } if (WindSpeed < 999.0 && (WindSpeed < 0.0 || WindSpeed > 40.0)) { - ShowSevereError(state, EnergyPlus::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); + ShowSevereError(state, std::format("{}: {}", routineName, state.dataEnvrn->WeatherFileLocationTitle)); ShowContinueError(state, EnergyPlus::format("Wind Speed ({:.2R}) is out of range [0.0, 40.0]", WindSpeed)); ErrorsFound = true; } @@ -2538,32 +2531,30 @@ namespace Weather { WeatherDataLine.update(state.files.inputWeatherFile.readLine()); if (!WeatherDataLine.good) { readList(WeatherDataLine.data, WYear, WMonth, WDay, WHour, WMinute); - ShowFatalError( - state, - EnergyPlus::format("Error occurred on EPW while searching for first day, stopped at {}/{}/{} {}:{} IO Error='{}'", - WYear, - WMonth, - WDay, - WHour, - WMinute, - state.files.inputWeatherFile.error_state_to_string()), - OptionalOutputFileRef{state.files.eso}); + ShowFatalError(state, + std::format("Error occurred on EPW while searching for first day, stopped at {}/{}/{} {}:{} IO Error='{}'", + WYear, + WMonth, + WDay, + WHour, + WMinute, + state.files.inputWeatherFile.error_state_to_string()), + OptionalOutputFileRef{state.files.eso}); } } for (int i = 1; i <= 23 * state.dataWeather->NumIntervalsPerHour; ++i) { WeatherDataLine.update(state.files.inputWeatherFile.readLine()); if (!WeatherDataLine.good) { readList(WeatherDataLine.data, WYear, WMonth, WDay, WHour, WMinute); - ShowFatalError( - state, - EnergyPlus::format("Error occurred on EPW while searching for first day, stopped at {}/{}/{} {}:{} IO Error='{}'", - WYear, - WMonth, - WDay, - WHour, - WMinute, - state.files.inputWeatherFile.error_state_to_string()), - OptionalOutputFileRef{state.files.eso}); + ShowFatalError(state, + std::format("Error occurred on EPW while searching for first day, stopped at {}/{}/{} {}:{} IO Error='{}'", + WYear, + WMonth, + WDay, + WHour, + WMinute, + state.files.inputWeatherFile.error_state_to_string()), + OptionalOutputFileRef{state.files.eso}); } } } @@ -2704,34 +2695,34 @@ namespace Weather { } else { ShowFatalError( state, - EnergyPlus::format("End-of-File encountered after {}/{}/{} {}:{}, starting from first day of Weather File would " - "not be \"next day\"", + std::format("End-of-File encountered after {}/{}/{} {}:{}, starting from first day of Weather File would " + "not be \"next day\"", + WYear, + WMonth, + WDay, + WHour, + WMinute)); + } + } else { + ShowFatalError(state, + std::format("Unexpected error condition in middle of reading EPW file, stopped at {}/{}/{} {}:{}", WYear, WMonth, WDay, WHour, - WMinute)); - } - } else { - ShowFatalError(state, - EnergyPlus::format("Unexpected error condition in middle of reading EPW file, stopped at {}/{}/{} {}:{}", - WYear, - WMonth, - WDay, - WHour, - WMinute), + WMinute), OptionalOutputFileRef{state.files.eso}); } } if (hour != WHour) { ShowFatalError(state, - EnergyPlus::format("Unexpected error condition in middle of reading EPW file, stopped at {}/{}/{} {}:{}", - WYear, - WMonth, - WDay, - WHour, - WMinute), + std::format("Unexpected error condition in middle of reading EPW file, stopped at {}/{}/{} {}:{}", + WYear, + WMonth, + WDay, + WHour, + WMinute), OptionalOutputFileRef{state.files.eso}); } @@ -3257,9 +3248,9 @@ namespace Weather { std::string_view SaveLine, std::string_view Line) { - ShowSevereError(state, fmt::format("Invalid Weather Line at date={:4}/{:2}/{:2} Hour#={:2} Min#={:2}", WYear, WMonth, WDay, WHour, WMinute)); - ShowContinueError(state, fmt::format("Full Data Line={}", SaveLine)); - ShowContinueError(state, fmt::format("Remainder of line={}", Line)); + ShowSevereError(state, std::format("Invalid Weather Line at date={:4}/{:2}/{:2} Hour#={:2} Min#={:2}", WYear, WMonth, WDay, WHour, WMinute)); + ShowContinueError(state, std::format("Full Data Line={}", SaveLine)); + ShowContinueError(state, std::format("Remainder of line={}", Line)); ShowFatalError(state, "Error in Reading Weather Data"); } @@ -3330,7 +3321,7 @@ namespace Weather { const bool succeeded = readList(current_line.substr(pos, (nth_pos - 1) - pos), WYear, WMonth, WDay, WHour, WMinute); if (!succeeded) { ShowSevereError(state, "Invalid Date info in Weather Line"); - ShowContinueError(state, fmt::format("Entire Data Line={}", Line)); + ShowContinueError(state, std::format("Entire Data Line={}", Line)); ShowFatalError(state, "Error in Reading Weather Data"); } } @@ -3350,17 +3341,17 @@ namespace Weather { } if (DateInError) { - ShowSevereError(state, EnergyPlus::format("Reading Weather Data Line, Invalid Date, Year={}, Month={}, Day={}", WYear, WMonth, WDay)); + ShowSevereError(state, std::format("Reading Weather Data Line, Invalid Date, Year={}, Month={}, Day={}", WYear, WMonth, WDay)); ShowFatalError(state, "Program terminates due to previous condition."); } // index, unlike nth_occurrence returns the position of the search char, not the position after it pos = index(Line, ','); // WYear if (pos == std::string::npos) { - ShowSevereError(state, - EnergyPlus::format( - "Invalid Weather Line (no commas) at date={:4}/{:2}/{:2} Hour#={:2} Min#={:2}", WYear, WMonth, WDay, WHour, WMinute)); - ShowContinueError(state, fmt::format("Full Data Line={}", Line)); + ShowSevereError( + state, + std::format("Invalid Weather Line (no commas) at date={:4}/{:2}/{:2} Hour#={:2} Min#={:2}", WYear, WMonth, WDay, WHour, WMinute)); + ShowContinueError(state, std::format("Full Data Line={}", Line)); ShowFatalError(state, "Error in Reading Weather Data"); } current_line.remove_prefix(nth_occurrence(Line, ',', 6)); // remove WYear,WMonth,WDay,WHour,WMinute,Data Source/Integrity @@ -3569,9 +3560,9 @@ namespace Weather { "Barometric Pressure={:.0R}.", desDayInput.PressBarom, state.dataEnvrn->StdBaroPress)); - ShowContinueError(state, - EnergyPlus::format("...occurs in DesignDay={}, Standard Pressure (based on elevation) will be used.", - state.dataEnvrn->EnvironmentName)); + ShowContinueError( + state, + std::format("...occurs in DesignDay={}, Standard Pressure (based on elevation) will be used.", state.dataEnvrn->EnvironmentName)); desDayInput.PressBarom = state.dataEnvrn->StdBaroPress; } } else { @@ -3720,7 +3711,7 @@ namespace Weather { } break; default: { ShowSevereError(state, "SetUpDesignDay: Invalid Humidity Indicator type"); - ShowContinueError(state, EnergyPlus::format("Occurred in Design Day={}", desDayInput.Title)); + ShowContinueError(state, std::format("Occurred in Design Day={}", desDayInput.Title)); } break; } // switch @@ -4384,7 +4375,7 @@ namespace Weather { if (Line.eof) { ShowFatalError( state, - EnergyPlus::format( + std::format( "OpenWeatherFile: Unexpected End-of-File on EPW Weather file, while reading header information, looking for header={}", epwHeaders[typeNum]), OptionalOutputFileRef(state.files.eso)); @@ -4441,8 +4432,8 @@ namespace Weather { std::abs(state.dataEnvrn->Elevation - state.dataWeather->WeatherFileElevation) / max(state.dataEnvrn->Elevation, 1.0) > 0.10) { ShowWarningError(state, "Weather file location will be used rather than entered (IDF) Location object."); - ShowContinueError(state, EnergyPlus::format("..Location object={}", state.dataWeather->LocationTitle)); - ShowContinueError(state, EnergyPlus::format("..Weather File Location={}", state.dataEnvrn->WeatherFileLocationTitle)); + ShowContinueError(state, std::format("..Location object={}", state.dataWeather->LocationTitle)); + ShowContinueError(state, std::format("..Weather File Location={}", state.dataEnvrn->WeatherFileLocationTitle)); ShowContinueError( state, EnergyPlus::format( @@ -4934,27 +4925,27 @@ namespace Weather { if (reportPeriodInput.startYear == 0) { if (reportPeriodInput.endYear != 0) { // Have to have an input start year to input an end year ShowSevereError(state, - EnergyPlus::format("{}: object={}, end year cannot be specified if the start year is not.", - ipsc->cCurrentModuleObject, - reportPeriodInput.title)); + std::format("{}: object={}, end year cannot be specified if the start year is not.", + ipsc->cCurrentModuleObject, + reportPeriodInput.title)); ErrorsFound = true; } } else if (reportPeriodInput.startYear < 1583) { // Bail on the proleptic Gregorian calendar ShowSevereError(state, - EnergyPlus::format("{}: object={}, start year ({}) is too early, please choose a date after 1582.", - ipsc->cCurrentModuleObject, - reportPeriodInput.title, - reportPeriodInput.startYear)); + std::format("{}: object={}, start year ({}) is too early, please choose a date after 1582.", + ipsc->cCurrentModuleObject, + reportPeriodInput.title, + reportPeriodInput.startYear)); ErrorsFound = true; } if (reportPeriodInput.endYear != 0 && reportPeriodInput.startYear > reportPeriodInput.endYear) { ShowSevereError(state, - EnergyPlus::format("{}: object={}, start year ({}) is after the end year ({}).", - ipsc->cCurrentModuleObject, - reportPeriodInput.title, - reportPeriodInput.startYear, - reportPeriodInput.endYear)); + std::format("{}: object={}, start year ({}) is after the end year ({}).", + ipsc->cCurrentModuleObject, + reportPeriodInput.title, + reportPeriodInput.startYear, + reportPeriodInput.endYear)); ErrorsFound = true; } @@ -5092,27 +5083,27 @@ namespace Weather { if (runPeriodInput.startYear == 0) { if (runPeriodInput.endYear != 0) { // Have to have an input start year to input an end year ShowSevereError(state, - EnergyPlus::format("{}: object={}, end year cannot be specified if the start year is not.", - ipsc->cCurrentModuleObject, - runPeriodInput.title)); + std::format("{}: object={}, end year cannot be specified if the start year is not.", + ipsc->cCurrentModuleObject, + runPeriodInput.title)); ErrorsFound = true; } } else if (runPeriodInput.startYear < 1583) { // Bail on the proleptic Gregorian calendar ShowSevereError(state, - EnergyPlus::format("{}: object={}, start year ({}) is too early, please choose a date after 1582.", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startYear)); + std::format("{}: object={}, start year ({}) is too early, please choose a date after 1582.", + ipsc->cCurrentModuleObject, + runPeriodInput.title, + runPeriodInput.startYear)); ErrorsFound = true; } if (runPeriodInput.endYear != 0 && runPeriodInput.startYear > runPeriodInput.endYear) { ShowSevereError(state, - EnergyPlus::format("{}: object={}, start year ({}) is after the end year ({}).", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startYear, - runPeriodInput.endYear)); + std::format("{}: object={}, start year ({}) is after the end year ({}).", + ipsc->cCurrentModuleObject, + runPeriodInput.title, + runPeriodInput.startYear, + runPeriodInput.endYear)); ErrorsFound = true; } @@ -5122,11 +5113,11 @@ namespace Weather { int dayType = getEnumValue(Sched::dayTypeNamesUC, state.dataIPShortCut->cAlphaArgs(2)); if (dayType < 1) { ShowWarningError(state, - EnergyPlus::format("{}: object={}{} invalid (Day of Week) [{}] for Start is not valid, Sunday will be used.", - state.dataIPShortCut->cCurrentModuleObject, - state.dataWeather->RunPeriodInput(i).title, - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2))); + std::format("{}: object={}{} invalid (Day of Week) [{}] for Start is not valid, Sunday will be used.", + state.dataIPShortCut->cCurrentModuleObject, + state.dataWeather->RunPeriodInput(i).title, + state.dataIPShortCut->cAlphaFieldNames(2), + state.dataIPShortCut->cAlphaArgs(2))); runPeriodInput.startWeekDay = Sched::DayType::Sunday; } else { runPeriodInput.startWeekDay = static_cast(dayType); @@ -5152,24 +5143,23 @@ namespace Weather { } else { // Have an input start year if (!isLeapYear(runPeriodInput.startYear)) { // Start year is not a leap year ShowSevereError(state, - EnergyPlus::format("{}: object={}, start year ({}) is not a leap year but the requested start date is 2/29.", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startYear)); + std::format("{}: object={}, start year ({}) is not a leap year but the requested start date is 2/29.", + ipsc->cCurrentModuleObject, + runPeriodInput.title, + runPeriodInput.startYear)); ErrorsFound = true; } else { // Start year is a leap year Sched::DayType weekday = calculateDayOfWeek(state, runPeriodInput.startYear, runPeriodInput.startMonth, runPeriodInput.startDay); if (inputWeekday) { // Check for correctness of input if (weekday != runPeriodInput.startWeekDay) { - ShowWarningError( - state, - EnergyPlus::format("{}: object={}, start weekday ({}) does not match the start year ({}), corrected to {}.", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - ipsc->cAlphaArgs(2), - runPeriodInput.startYear, - Sched::dayTypeNamesUC[static_cast(weekday)])); + ShowWarningError(state, + std::format("{}: object={}, start weekday ({}) does not match the start year ({}), corrected to {}.", + ipsc->cCurrentModuleObject, + runPeriodInput.title, + ipsc->cAlphaArgs(2), + runPeriodInput.startYear, + Sched::dayTypeNamesUC[static_cast(weekday)])); runPeriodInput.startWeekDay = weekday; } } else { // Set the weekday if it was not input @@ -5181,11 +5171,11 @@ namespace Weather { // Non leap-day start date if (!validMonthDay(runPeriodInput.startMonth, runPeriodInput.startDay)) { ShowSevereError(state, - EnergyPlus::format("{}: object={}, Invalid input start month/day ({}/{})", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startMonth, - runPeriodInput.startDay)); + std::format("{}: object={}, Invalid input start month/day ({}/{})", + ipsc->cCurrentModuleObject, + runPeriodInput.title, + runPeriodInput.startMonth, + runPeriodInput.startDay)); ErrorsFound = true; } else { // Month/day is valid if (runPeriodInput.startYear == 0) { // No input starting year @@ -5203,14 +5193,13 @@ namespace Weather { calculateDayOfWeek(state, runPeriodInput.startYear, runPeriodInput.startMonth, runPeriodInput.startDay); if (inputWeekday) { // Check for correctness of input if (weekday != runPeriodInput.startWeekDay) { - ShowWarningError( - state, - EnergyPlus::format("{}: object={}, start weekday ({}) does not match the start year ({}), corrected to {}.", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - ipsc->cAlphaArgs(2), - runPeriodInput.startYear, - Sched::dayTypeNamesUC[static_cast(weekday)])); + ShowWarningError(state, + std::format("{}: object={}, start weekday ({}) does not match the start year ({}), corrected to {}.", + ipsc->cCurrentModuleObject, + runPeriodInput.title, + ipsc->cAlphaArgs(2), + runPeriodInput.startYear, + Sched::dayTypeNamesUC[static_cast(weekday)])); runPeriodInput.startWeekDay = weekday; } } else { // Set the weekday if it was not input @@ -5242,20 +5231,20 @@ namespace Weather { } else { // Have an input end year if (!isLeapYear(runPeriodInput.endYear)) { // End year is not a leap year ShowSevereError(state, - EnergyPlus::format("{}: object={}, end year ({}) is not a leap year but the requested end date is 2/29.", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startYear)); + std::format("{}: object={}, end year ({}) is not a leap year but the requested end date is 2/29.", + ipsc->cCurrentModuleObject, + runPeriodInput.title, + runPeriodInput.startYear)); ErrorsFound = true; } else { runPeriodInput.endJulianDate = computeJulianDate(runPeriodInput.endYear, runPeriodInput.endMonth, runPeriodInput.endDay); if (runPeriodInput.startJulianDate > runPeriodInput.endJulianDate) { ShowSevereError(state, - EnergyPlus::format("{}: object={}, start Julian date ({}) is after the end Julian date ({}).", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startJulianDate, - runPeriodInput.endJulianDate)); + std::format("{}: object={}, start Julian date ({}) is after the end Julian date ({}).", + ipsc->cCurrentModuleObject, + runPeriodInput.title, + runPeriodInput.startJulianDate, + runPeriodInput.endJulianDate)); ErrorsFound = true; } } @@ -5264,11 +5253,11 @@ namespace Weather { // Non leap-day end date if (!validMonthDay(runPeriodInput.endMonth, runPeriodInput.endDay)) { ShowSevereError(state, - EnergyPlus::format("{}: object={}, Invalid input end month/day ({}/{})", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startMonth, - runPeriodInput.startDay)); + std::format("{}: object={}, Invalid input end month/day ({}/{})", + ipsc->cCurrentModuleObject, + runPeriodInput.title, + runPeriodInput.startMonth, + runPeriodInput.startDay)); ErrorsFound = true; } else { // Month/day is valid if (runPeriodInput.endYear == 0) { // No input end year @@ -5283,11 +5272,11 @@ namespace Weather { runPeriodInput.endJulianDate = computeJulianDate(runPeriodInput.endYear, runPeriodInput.endMonth, runPeriodInput.endDay); if (runPeriodInput.startJulianDate > runPeriodInput.endJulianDate) { ShowSevereError(state, - EnergyPlus::format("{}: object={}, start Julian date ({}) is after the end Julian date ({}).", - ipsc->cCurrentModuleObject, - runPeriodInput.title, - runPeriodInput.startJulianDate, - runPeriodInput.endJulianDate)); + std::format("{}: object={}, start Julian date ({}) is after the end Julian date ({}).", + ipsc->cCurrentModuleObject, + runPeriodInput.title, + runPeriodInput.startJulianDate, + runPeriodInput.endJulianDate)); ErrorsFound = true; } } @@ -5471,11 +5460,11 @@ namespace Weather { case 12: { if (runPerDesInput.startDay > 31) { ShowSevereError(state, - EnergyPlus::format("{}: object={} {} invalid (Day of Month) [{}]", - ipsc->cCurrentModuleObject, - runPerDesInput.title, - ipsc->cNumericFieldNames(2), - runPerDesInput.startDay)); + std::format("{}: object={} {} invalid (Day of Month) [{}]", + ipsc->cCurrentModuleObject, + runPerDesInput.title, + ipsc->cNumericFieldNames(2), + runPerDesInput.startDay)); ErrorsFound = true; } } break; @@ -5485,32 +5474,32 @@ namespace Weather { case 11: { if (runPerDesInput.startDay > 30) { ShowSevereError(state, - EnergyPlus::format("{}: object={} {} invalid (Day of Month) [{}]", - ipsc->cCurrentModuleObject, - runPerDesInput.title, - ipsc->cNumericFieldNames(2), - runPerDesInput.startDay)); + std::format("{}: object={} {} invalid (Day of Month) [{}]", + ipsc->cCurrentModuleObject, + runPerDesInput.title, + ipsc->cNumericFieldNames(2), + runPerDesInput.startDay)); ErrorsFound = true; } } break; case 2: { if (runPerDesInput.startDay > 28 + state.dataWeather->LeapYearAdd) { ShowSevereError(state, - EnergyPlus::format("{}: object={} {} invalid (Day of Month) [{}]", - ipsc->cCurrentModuleObject, - runPerDesInput.title, - ipsc->cNumericFieldNames(2), - runPerDesInput.startDay)); + std::format("{}: object={} {} invalid (Day of Month) [{}]", + ipsc->cCurrentModuleObject, + runPerDesInput.title, + ipsc->cNumericFieldNames(2), + runPerDesInput.startDay)); ErrorsFound = true; } } break; default: { ShowSevereError(state, - EnergyPlus::format("{}: object={} {} invalid (Month) [{}]", - ipsc->cCurrentModuleObject, - runPerDesInput.title, - ipsc->cNumericFieldNames(1), - runPerDesInput.startMonth)); + std::format("{}: object={} {} invalid (Month) [{}]", + ipsc->cCurrentModuleObject, + runPerDesInput.title, + ipsc->cNumericFieldNames(1), + runPerDesInput.startMonth)); ErrorsFound = true; } break; } // switch @@ -5521,11 +5510,11 @@ namespace Weather { runPerDesInput.dayOfWeek = getEnumValue(Sched::dayTypeNamesUC, ipsc->cAlphaArgs(2)); if (runPerDesInput.dayOfWeek < 1 || runPerDesInput.dayOfWeek == 8) { ShowWarningError(state, - EnergyPlus::format("{}: object={} {} invalid (Day of Week) [{} for Start is not Valid, Monday will be Used.", - ipsc->cCurrentModuleObject, - runPerDesInput.title, - ipsc->cAlphaFieldNames(1), - ipsc->cAlphaArgs(1))); + std::format("{}: object={} {} invalid (Day of Week) [{} for Start is not Valid, Monday will be Used.", + ipsc->cCurrentModuleObject, + runPerDesInput.title, + ipsc->cAlphaFieldNames(1), + ipsc->cAlphaArgs(1))); runPerDesInput.dayOfWeek = (int)Sched::DayType::Monday; // Defaults to Monday } } @@ -5618,21 +5607,21 @@ namespace Weather { WhichPeriod = Util::FindItem(ipsc->cAlphaArgs(2), state.dataWeather->TypicalExtremePeriods, &TypicalExtremeData::MatchValue2); if (WhichPeriod != 0) { ShowWarningError(state, - EnergyPlus::format("{}: object={} {}={} matched to {}", - ipsc->cCurrentModuleObject, - runPerDesInput.title, - ipsc->cAlphaFieldNames(2), - ipsc->cAlphaArgs(2), - state.dataWeather->TypicalExtremePeriods(WhichPeriod).MatchValue2)); + std::format("{}: object={} {}={} matched to {}", + ipsc->cCurrentModuleObject, + runPerDesInput.title, + ipsc->cAlphaFieldNames(2), + ipsc->cAlphaArgs(2), + state.dataWeather->TypicalExtremePeriods(WhichPeriod).MatchValue2)); } } if (WhichPeriod == 0) { ShowSevereError(state, - EnergyPlus::format("{}: object={} {} invalid (not on Weather File)={}", - ipsc->cCurrentModuleObject, - runPerDesInput.title, - ipsc->cAlphaFieldNames(2), - ipsc->cAlphaArgs(2))); + std::format("{}: object={} {} invalid (not on Weather File)={}", + ipsc->cCurrentModuleObject, + runPerDesInput.title, + ipsc->cAlphaFieldNames(2), + ipsc->cAlphaArgs(2))); ErrorsFound = true; } else { auto const &typicalExtPer = state.dataWeather->TypicalExtremePeriods(WhichPeriod); @@ -5784,9 +5773,9 @@ namespace Weather { if (Duration(1) > 0) { specialDay.Duration = int(Duration(1)); } else { - ShowSevereError(state, - EnergyPlus::format( - "{}: {} Invalid {}={:.0T}", ipsc->cCurrentModuleObject, AlphArray(1), ipsc->cNumericFieldNames(1), Duration(1))); + ShowSevereError( + state, + std::format("{}: {} Invalid {}={:.0f}", ipsc->cCurrentModuleObject, AlphArray(1), ipsc->cNumericFieldNames(1), Duration(1))); ErrorsFound = true; } @@ -5829,11 +5818,10 @@ namespace Weather { for (int j = 1; j <= specialDay.Duration; ++j) { ++JDay; if (JDay > 366) { - ShowWarningError(state, - EnergyPlus::format("SpecialDay={} causes index of more than 366, ignoring those beyond 366", specialDay.Name)); + ShowWarningError(state, std::format("SpecialDay={} causes index of more than 366, ignoring those beyond 366", specialDay.Name)); } else { if (state.dataWeather->SpecialDayTypes(JDay) != 0 && Warn == 0) { - ShowWarningError(state, EnergyPlus::format("SpecialDay={} attempted overwrite of previous set special day", specialDay.Name)); + ShowWarningError(state, std::format("SpecialDay={} attempted overwrite of previous set special day", specialDay.Name)); Warn = 1; } else if (state.dataWeather->SpecialDayTypes(JDay) == 0) { state.dataWeather->SpecialDayTypes(JDay) = specialDay.DayType; @@ -5900,7 +5888,7 @@ namespace Weather { ErrorObjectHeader eoh{routineName, ipsc->cCurrentModuleObject, ipsc->cAlphaArgs(1)}; if (NumAlphas != 2) { - ShowSevereError(state, EnergyPlus::format("{}: Insufficient fields, must have Start AND End Dates", ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("{}: Insufficient fields, must have Start AND End Dates", ipsc->cCurrentModuleObject)); ErrorsFound = true; } else { // Correct number of arguments General::ProcessDateString(state, @@ -5928,7 +5916,7 @@ namespace Weather { state.dataWeather->IDFDaylightSaving = true; } } else if (NumFound > 1) { - ShowSevereError(state, EnergyPlus::format("{}: Too many objects in Input File, only one allowed.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("{}: Too many objects in Input File, only one allowed.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } } @@ -6152,7 +6140,7 @@ namespace Weather { desDayInput.dryBulbRangeType != DesDayDryBulbRangeType::Profile) { Real64 testval = desDayInput.MaxDryBulb - desDayInput.DailyDBRange; if (testval < -90.0 || testval > 70.0) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowSevereError(state, std::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); ShowContinueError(state, EnergyPlus::format("{} ({:.2R}) is out of range [-90.0, 70.0]", ipsc->cAlphaFieldNames(3), testval)); ErrorsFound = true; } @@ -6225,10 +6213,10 @@ namespace Weather { if (desDayInput.dryBulbRangeType == DesDayDryBulbRangeType::Profile) { if (MaxDryBulbEntered) { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\", data override.", ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowWarningError(state, std::format("{}=\"{}\", data override.", ipsc->cCurrentModuleObject, desDayInput.Title)); ShowContinueError( state, EnergyPlus::format("..{}=[{:.2R}] will be overwritten.", ipsc->cNumericFieldNames(3), desDayInput.MaxDryBulb)); - ShowContinueError(state, EnergyPlus::format("..{}=\"{}\".", ipsc->cAlphaFieldNames(3), ipsc->cAlphaArgs(3))); + ShowContinueError(state, std::format("..{}=\"{}\".", ipsc->cAlphaFieldNames(3), ipsc->cAlphaArgs(3))); ShowContinueError(state, EnergyPlus::format("..with max value=[{:.2R}].", testval)); } desDayInput.MaxDryBulb = testval; @@ -6236,7 +6224,7 @@ namespace Weather { testval = desDayInput.MaxDryBulb - testval; if (testval < -90.0 || testval > 70.0) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowSevereError(state, std::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); // should this be cNumericFieldNames? ShowContinueError(state, EnergyPlus::format("{} = ({:.2R}) is out of range [-90.0, 70.0]", ipsc->cAlphaFieldNames(4), testval)); ErrorsFound = true; @@ -6257,7 +6245,7 @@ namespace Weather { } if (desDayInput.HumIndValue < -90.0 || desDayInput.HumIndValue > 70.0) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowSevereError(state, std::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); ShowContinueError(state, EnergyPlus::format("{} = {:.2R} is out of range [-90.0, 70.0]", ipsc->cAlphaFieldNames(5) + " - WetBulb", @@ -6275,7 +6263,7 @@ namespace Weather { } if (desDayInput.HumIndValue < -90.0 || desDayInput.HumIndValue > 70.0) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowSevereError(state, std::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); ShowContinueError(state, EnergyPlus::format("{} = {:.2R} is out of range [-90.0, 70.0]", ipsc->cAlphaFieldNames(5) + " - DewPoint", @@ -6294,7 +6282,7 @@ namespace Weather { } if (desDayInput.HumIndValue < 0.0 || desDayInput.HumIndValue > 0.03) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowSevereError(state, std::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); ShowContinueError(state, EnergyPlus::format("{} = {:.2R} is out of range [0.0, 0.03]", ipsc->cAlphaFieldNames(5) + " - Humidity-Ratio", @@ -6314,7 +6302,7 @@ namespace Weather { desDayInput.HumIndType = DesDayHumIndType::Enthalpy; if (desDayInput.HumIndValue < 0.0 || desDayInput.HumIndValue > 130000.0) { - ShowSevereError(state, EnergyPlus::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowSevereError(state, std::format("{}: {} = {}", routineName, ipsc->cCurrentModuleObject, desDayInput.Title)); ShowContinueError(state, EnergyPlus::format("{} = {.0R} is out of range [0.0, 130000.0]", ipsc->cAlphaFieldNames(5) + " - Enthalpy", @@ -6360,8 +6348,8 @@ namespace Weather { } break; default: { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); - ShowContinueError(state, EnergyPlus::format("..invalid field: {}=\"{}\".", ipsc->cAlphaFieldNames(5), ipsc->cAlphaArgs(5))); + ShowWarningError(state, std::format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowContinueError(state, std::format("..invalid field: {}=\"{}\".", ipsc->cAlphaFieldNames(5), ipsc->cAlphaArgs(5))); ShowContinueError(state, "WetBulb will be used. Maximum Dry Bulb will be used as WetBulb at Maximum Dry Bulb."); desDayInput.HumIndType = DesDayHumIndType::WetBulb; desDayInput.HumIndValue = ipsc->rNumericArgs(3); @@ -6449,12 +6437,12 @@ namespace Weather { desDayInput.HumIndType == DesDayHumIndType::WBProfMul || desDayInput.HumIndType == DesDayHumIndType::WBProfDef || desDayInput.HumIndType == DesDayHumIndType::WBProfDif) { if (desDayInput.HumIndValue > desDayInput.MaxDryBulb) { - ShowWarningError(state, EnergyPlus::format("{}=\"{}\", range check data.", ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowWarningError(state, std::format("{}=\"{}\", range check data.", ipsc->cCurrentModuleObject, desDayInput.Title)); ShowContinueError(state, EnergyPlus::format("..Humidity Indicator Temperature at Max Temperature={:.1R} > Max DryBulb={:.1R}", desDayInput.HumIndValue, desDayInput.MaxDryBulb)); - ShowContinueError(state, EnergyPlus::format("..{}=\"{}\".", ipsc->cAlphaFieldNames(5), ipsc->cAlphaArgs(5))); + ShowContinueError(state, std::format("..{}=\"{}\".", ipsc->cAlphaFieldNames(5), ipsc->cAlphaArgs(5))); ShowContinueError(state, "..Conditions for day will be set to Relative Humidity = 100%"); if (desDayInput.HumIndType == DesDayHumIndType::DewPoint) { desDayInput.DewPointNeedsSet = true; @@ -6569,10 +6557,10 @@ namespace Weather { case 10: case 12: { if (desDayInput.DayOfMonth > 31) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); ShowContinueError( state, - EnergyPlus::format( + std::format( ".. invalid field: {}=[{}], Month=[{}].", ipsc->cNumericFieldNames(2), desDayInput.DayOfMonth, desDayInput.Month)); ErrorsFound = true; } @@ -6582,25 +6570,25 @@ namespace Weather { case 9: case 11: { if (desDayInput.DayOfMonth > 30) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); - ShowContinueError(state, - EnergyPlus::format( - ".. invalid {}=[{}], Month=[{}].", ipsc->cNumericFieldNames(2), desDayInput.DayOfMonth, desDayInput.Month)); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowContinueError( + state, + std::format(".. invalid {}=[{}], Month=[{}].", ipsc->cNumericFieldNames(2), desDayInput.DayOfMonth, desDayInput.Month)); ErrorsFound = true; } } break; case 2: { if (desDayInput.DayOfMonth > 28) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); - ShowContinueError(state, - EnergyPlus::format( - ".. invalid {}=[{}], Month=[{}].", ipsc->cNumericFieldNames(2), desDayInput.DayOfMonth, desDayInput.Month)); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowContinueError( + state, + std::format(".. invalid {}=[{}], Month=[{}].", ipsc->cNumericFieldNames(2), desDayInput.DayOfMonth, desDayInput.Month)); ErrorsFound = true; } } break; default: { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); - ShowContinueError(state, EnergyPlus::format(".. invalid {} invalid (Month) [{}].", ipsc->cNumericFieldNames(1), desDayInput.Month)); + ShowSevereError(state, std::format("{}=\"{}\", invalid data.", ipsc->cCurrentModuleObject, desDayInput.Title)); + ShowContinueError(state, std::format(".. invalid {} invalid (Month) [{}].", ipsc->cNumericFieldNames(1), desDayInput.Month)); ErrorsFound = true; } break; } // switch (desDayInput.Month) @@ -6670,7 +6658,7 @@ namespace Weather { int const NumLocations = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, ipsc->cCurrentModuleObject); if (NumLocations > 1) { - ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -6766,21 +6754,21 @@ namespace Weather { } if (environJ.WP_Type1 != 0) { ShowSevereError(state, - EnergyPlus::format("{}: {}=\"{}\", indicated Environment Name already assigned.", - routineName, - ipsc->cCurrentModuleObject, - ipsc->cAlphaArgs(1))); + std::format("{}: {}=\"{}\", indicated Environment Name already assigned.", + routineName, + ipsc->cCurrentModuleObject, + ipsc->cAlphaArgs(1))); if (!environJ.Title.empty()) { ShowContinueError(state, - EnergyPlus::format("...Environment=\"{}\", already using {}=\"{}\".", - environJ.Title, - ipsc->cCurrentModuleObject, - state.dataWeather->WPSkyTemperature(environJ.WP_Type1).Name)); + std::format("...Environment=\"{}\", already using {}=\"{}\".", + environJ.Title, + ipsc->cCurrentModuleObject, + state.dataWeather->WPSkyTemperature(environJ.WP_Type1).Name)); } else { ShowContinueError(state, - EnergyPlus::format("... Runperiod Environment, already using {}=\"{}\".", - ipsc->cCurrentModuleObject, - state.dataWeather->WPSkyTemperature(environJ.WP_Type1).Name)); + std::format("... Runperiod Environment, already using {}=\"{}\".", + ipsc->cCurrentModuleObject, + state.dataWeather->WPSkyTemperature(environJ.WP_Type1).Name)); } ErrorsFound = true; } else { @@ -6805,15 +6793,15 @@ namespace Weather { auto &envrnFound = state.dataWeather->Environment(Found); if (envrnFound.WP_Type1 != 0) { ShowSevereError(state, - EnergyPlus::format("{}:{}=\"{}\", indicated Environment Name already assigned.", - routineName, - ipsc->cCurrentModuleObject, - ipsc->cAlphaArgs(1))); + std::format("{}:{}=\"{}\", indicated Environment Name already assigned.", + routineName, + ipsc->cCurrentModuleObject, + ipsc->cAlphaArgs(1))); ShowContinueError(state, - EnergyPlus::format("...Environment=\"{}\", already using {}=\"{}\".", - envrnFound.Title, - ipsc->cCurrentModuleObject, - state.dataWeather->WPSkyTemperature(envrnFound.WP_Type1).Name)); + std::format("...Environment=\"{}\", already using {}=\"{}\".", + envrnFound.Title, + ipsc->cCurrentModuleObject, + state.dataWeather->WPSkyTemperature(envrnFound.WP_Type1).Name)); ErrorsFound = true; } else { state.dataWeather->Environment(Found).WP_Type1 = i; @@ -6957,7 +6945,7 @@ namespace Weather { state, ipsc->cCurrentModuleObject, 1, GndAlphas, GndNumAlpha, GndProps, GndNumProp, IOStat); if (GndNumProp < 12) { - ShowSevereError(state, EnergyPlus::format("{}: Less than 12 values entered.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("{}: Less than 12 values entered.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -6965,7 +6953,7 @@ namespace Weather { state.dataWeather->GroundReflectances({1, 12}) = GndProps({1, 12}); } else { - ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } } @@ -7015,7 +7003,7 @@ namespace Weather { state.dataWeather->SnowGndRefModifierForDayltg = GndProps(2); } else { - ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } } @@ -7104,11 +7092,10 @@ namespace Weather { case WaterMainsTempCalcMethod::Correlation: { if (NumNums == 0) { - ShowSevereError(state, - EnergyPlus::format("{}: Missing Annual Average and Maximum Difference fields.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("{}: Missing Annual Average and Maximum Difference fields.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } else if (NumNums == 1) { - ShowSevereError(state, EnergyPlus::format("{}: Missing Maximum Difference field.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("{}: Missing Maximum Difference field.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } else { state.dataWeather->WaterMainsTempsAnnualAvgAirTemp = NumArray(1); @@ -7128,7 +7115,7 @@ namespace Weather { state.dataWeather->WaterMainsTempsOffset = NumArray(4); } else if (NumObjects > 1) { - ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } } @@ -7273,7 +7260,7 @@ namespace Weather { } } else if (NumObjects > 1) { - ShowSevereError(state, EnergyPlus::format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("{}: Too many objects entered. Only one allowed.", ipsc->cCurrentModuleObject)); ErrorsFound = true; } @@ -7504,7 +7491,7 @@ namespace Weather { std::string::size_type Pos = index(Line, ','); if ((Pos == std::string::npos) && !((headerType == EpwHeaderType::Comments1) || (headerType == EpwHeaderType::Comments2))) { ShowSevereError(state, "Invalid Header line in in.epw -- no commas"); - ShowContinueError(state, EnergyPlus::format("Line={}", Line)); + ShowContinueError(state, std::format("Line={}", Line)); ShowFatalError(state, "Previous conditions cause termination."); } if (Pos != std::string::npos) { @@ -7573,7 +7560,7 @@ namespace Weather { } } break; default: - ShowSevereError(state, EnergyPlus::format("GetEPWHeader:LOCATION, invalid numeric={}", Line.substr(0, Pos))); + ShowSevereError(state, std::format("GetEPWHeader:LOCATION, invalid numeric={}", Line.substr(0, Pos))); ErrorsFound = true; break; } @@ -7607,9 +7594,9 @@ namespace Weather { state.dataWeather->TypicalExtremePeriods(i).Title = Line.substr(0, Pos); Line.erase(0, Pos + 1); } else { - ShowWarningError( - state, EnergyPlus::format("ProcessEPWHeader: Invalid Typical/Extreme Periods Header(WeatherFile)={}", Line.substr(0, Pos))); - ShowContinueError(state, EnergyPlus::format("...on processing Typical/Extreme period #{}", i)); + ShowWarningError(state, + std::format("ProcessEPWHeader: Invalid Typical/Extreme Periods Header(WeatherFile)={}", Line.substr(0, Pos))); + ShowContinueError(state, std::format("...on processing Typical/Extreme period #{}", i)); state.dataWeather->NumEPWTypExtSets = i - 1; break; } @@ -7685,10 +7672,10 @@ namespace Weather { } } else { ShowWarningError(state, - EnergyPlus::format("ProcessEPWHeader: Invalid Typical/Extreme Periods Header(WeatherFile)={} {}", - state.dataWeather->TypicalExtremePeriods(i).Title, - Line.substr(0, Pos))); - ShowContinueError(state, EnergyPlus::format("...on processing Typical/Extreme period #{}", i)); + std::format("ProcessEPWHeader: Invalid Typical/Extreme Periods Header(WeatherFile)={} {}", + state.dataWeather->TypicalExtremePeriods(i).Title, + Line.substr(0, Pos))); + ShowContinueError(state, std::format("...on processing Typical/Extreme period #{}", i)); state.dataWeather->NumEPWTypExtSets = i - 1; break; } @@ -7706,10 +7693,10 @@ namespace Weather { state.dataWeather->TypicalExtremePeriods(i).StartDay = PDay; } } else { - ShowSevereError(state, - EnergyPlus::format("ProcessEPWHeader: Invalid Typical/Extreme Periods Start Date Field(WeatherFile)={}", - Line.substr(0, Pos))); - ShowContinueError(state, EnergyPlus::format("...on processing Typical/Extreme period #{}", i)); + ShowSevereError( + state, + std::format("ProcessEPWHeader: Invalid Typical/Extreme Periods Start Date Field(WeatherFile)={}", Line.substr(0, Pos))); + ShowContinueError(state, std::format("...on processing Typical/Extreme period #{}", i)); ErrorsFound = true; } Line.erase(0, Pos + 1); @@ -7725,10 +7712,10 @@ namespace Weather { state.dataWeather->TypicalExtremePeriods(i).EndDay = PDay; } } else { - ShowSevereError(state, - EnergyPlus::format("ProcessEPWHeader: Invalid Typical/Extreme Periods End Date Field(WeatherFile)={}", - Line.substr(0, Pos))); - ShowContinueError(state, EnergyPlus::format("...on processing Typical/Extreme period #{}", i)); + ShowSevereError( + state, + std::format("ProcessEPWHeader: Invalid Typical/Extreme Periods End Date Field(WeatherFile)={}", Line.substr(0, Pos))); + ShowContinueError(state, std::format("...on processing Typical/Extreme period #{}", i)); ErrorsFound = true; } Line.erase(0, Pos + 1); @@ -7741,9 +7728,9 @@ namespace Weather { state.dataWeather->TypicalExtremePeriods(i).EndDay = PDay; } } else { - ShowSevereError(state, - EnergyPlus::format("ProcessEPWHeader: Invalid Typical/Extreme Periods End Date Field(WeatherFile)={}", - Line.substr(0, Pos))); + ShowSevereError( + state, + std::format("ProcessEPWHeader: Invalid Typical/Extreme Periods End Date Field(WeatherFile)={}", Line.substr(0, Pos))); ErrorsFound = true; } } @@ -7922,10 +7909,10 @@ namespace Weather { } } else { // ErrorsFound is untouched - ShowContinueError(state, - EnergyPlus::format("ProcessEPWHeader: Invalid Daylight Saving Period Start Date Field(WeatherFile)={}", - Line.substr(0, Pos))); - ShowContinueError(state, EnergyPlus::format("...invalid header={}", epwHeaders[static_cast(headerType)])); + ShowContinueError( + state, + std::format("ProcessEPWHeader: Invalid Daylight Saving Period Start Date Field(WeatherFile)={}", Line.substr(0, Pos))); + ShowContinueError(state, std::format("...invalid header={}", epwHeaders[static_cast(headerType)])); ShowContinueError(state, "...Setting Weather File DST to false."); state.dataWeather->EPWDaylightSaving = false; } @@ -7939,9 +7926,9 @@ namespace Weather { state.dataWeather->EPWDST.EnDay = PDay; state.dataWeather->EPWDST.EnWeekDay = PWeekDay; } else { - ShowWarningError(state, - EnergyPlus::format("ProcessEPWHeader: Invalid Daylight Saving Period End Date Field(WeatherFile)={}", - Line.substr(0, Pos))); + ShowWarningError( + state, + std::format("ProcessEPWHeader: Invalid Daylight Saving Period End Date Field(WeatherFile)={}", Line.substr(0, Pos))); ShowContinueError(state, "...Setting Weather File DST to false."); state.dataWeather->EPWDaylightSaving = false; } @@ -7989,7 +7976,7 @@ namespace Weather { specialDay.DayType = 1; specialDay.WthrFile = true; } else { - ShowSevereError(state, EnergyPlus::format("Invalid SpecialDay Date Field(WeatherFile)={}", Line.substr(0, Pos))); + ShowSevereError(state, std::format("Invalid SpecialDay Date Field(WeatherFile)={}", Line.substr(0, Pos))); ErrorsFound = true; } } @@ -8086,7 +8073,7 @@ namespace Weather { dataPeriod.WeekDay = getEnumValue(Sched::dayTypeNamesUC, dataPeriod.DayOfWeek); if (dataPeriod.WeekDay < 1 || dataPeriod.WeekDay > 7) { ShowSevereError(state, - fmt::format("Weather File -- Invalid Start Day of Week for Data Period #{}, Invalid day={}", + std::format("Weather File -- Invalid Start Day of Week for Data Period #{}, Invalid day={}", CurCount, dataPeriod.DayOfWeek)); ErrorsFound = true; @@ -8106,10 +8093,9 @@ namespace Weather { dataPeriod.HasYearData = true; } } else { - ShowSevereError( - state, - EnergyPlus::format("Data Periods must be of the form or (WeatherFile), found={}", - Line.substr(0, Pos))); + ShowSevereError(state, + std::format("Data Periods must be of the form or (WeatherFile), found={}", + Line.substr(0, Pos))); ErrorsFound = true; } } @@ -8128,10 +8114,9 @@ namespace Weather { dataPeriod.EnYear = dataPeriod.StYear; } } else { - ShowSevereError( - state, - EnergyPlus::format("Data Periods must be of the form or , (WeatherFile) found={}", - Line.substr(0, Pos))); + ShowSevereError(state, + std::format("Data Periods must be of the form or , (WeatherFile) found={}", + Line.substr(0, Pos))); ErrorsFound = true; } } @@ -8190,7 +8175,7 @@ namespace Weather { if (Line.eof) { ShowFatalError( state, - EnergyPlus::format("Unexpected End-of-File on EPW Weather file, while reading header information, looking for header={}", Header), + std::format("Unexpected End-of-File on EPW Weather file, while reading header information, looking for header={}", Header), OptionalOutputFileRef{state.files.eso}); } uppercase(Line.data); @@ -8695,7 +8680,7 @@ namespace Weather { auto statFile = state.files.inStatFilePath.try_open(); if (!statFile.good()) { ShowSevereError( - state, EnergyPlus::format("CalcAnnualAndMonthlyDryBulbTemp: Could not open file {} for input (read).", statFile.filePath)); + state, std::format("CalcAnnualAndMonthlyDryBulbTemp: Could not open file {} for input (read).", statFile.filePath.string())); ShowContinueError(state, "Water Mains Temperature will be set to a fixed default value of 10.0 C."); return; } @@ -8712,19 +8697,18 @@ namespace Weather { } } if (lineAvg.empty()) { - ShowSevereError(state, - EnergyPlus::format( - "CalcAnnualAndMonthlyDryBulbTemp: Stat file '{}' does not have Monthly Statistics for Dry Bulb temperatures.", - statFile.filePath)); + ShowSevereError( + state, + std::format("CalcAnnualAndMonthlyDryBulbTemp: Stat file '{}' does not have Monthly Statistics for Dry Bulb temperatures.", + statFile.filePath.string())); ShowContinueError(state, "Water Mains Temperature will be set to a fixed default value of 10.0 C."); return; } if (lineAvg.find("Daily Avg") == std::string::npos) { - ShowSevereError( - state, - EnergyPlus::format("CalcAnnualAndMonthlyDryBulbTemp: Stat file '{}' does not have the 'Daily Avg' line in the Monthly " - "Statistics for Dry Bulb temperatures.", - statFile.filePath)); + ShowSevereError(state, + std::format("CalcAnnualAndMonthlyDryBulbTemp: Stat file '{}' does not have the 'Daily Avg' line in the Monthly " + "Statistics for Dry Bulb temperatures.", + statFile.filePath.string())); ShowContinueError(state, "Water Mains Temperature will be set to a fixed default value of 10.0 C."); return; } @@ -8746,7 +8730,7 @@ namespace Weather { bool epwHasLeapYear(false); if (!epwFile.good()) { ShowSevereError( - state, EnergyPlus::format("CalcAnnualAndMonthlyDryBulbTemp: Could not open file {} for input (read).", epwFile.filePath)); + state, std::format("CalcAnnualAndMonthlyDryBulbTemp: Could not open file {} for input (read).", epwFile.filePath.string())); ShowContinueError(state, "Water Mains Temperature will be set to a fixed default value of 10.0 C."); return; } @@ -8805,8 +8789,8 @@ namespace Weather { this->OADryBulbWeatherDataProcessed = true; } else { ShowSevereError(state, "CalcAnnualAndMonthlyDryBulbTemp: weather file or stat file does not exist."); - ShowContinueError(state, EnergyPlus::format("Weather file: {}.", state.files.inputWeatherFilePath.filePath)); - ShowContinueError(state, EnergyPlus::format("Stat file: {}.", state.files.inStatFilePath.filePath)); + ShowContinueError(state, std::format("Weather file: {}.", state.files.inputWeatherFilePath.filePath.string())); + ShowContinueError(state, std::format("Stat file: {}.", state.files.inStatFilePath.filePath.string())); ShowContinueError(state, "Water Mains Monthly Temperature cannot be calculated using CorrelationFromWeatherFile method."); ShowContinueError(state, "Instead a fixed default value of 10.0 C will be used."); } diff --git a/src/EnergyPlus/WindTurbine.cc b/src/EnergyPlus/WindTurbine.cc index 710789a0255..b8a6d668f06 100644 --- a/src/EnergyPlus/WindTurbine.cc +++ b/src/EnergyPlus/WindTurbine.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // ObjexxFCL Headers #include @@ -609,10 +610,10 @@ namespace WindTurbine { if (windTurbine.rotorType == RotorType::VerticalAxis && windTurbine.LiftCoeff == 0.0) { if (lNumericBlanks(16)) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {} is required but input is blank.", - CurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - cNumericFields(16))); + std::format("{}=\"{}\" invalid {} is required but input is blank.", + CurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + cNumericFields(16))); } else { ShowSevereError(state, EnergyPlus::format("{}=\"{}\" invalid {}=[{:.2R}] must be greater than zero.", @@ -658,7 +659,7 @@ namespace WindTurbine { lNumericBlanks.deallocate(); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{} errors occurred in input. Program terminates.", CurrentModuleObject)); + ShowFatalError(state, std::format("{} errors occurred in input. Program terminates.", CurrentModuleObject)); } for (WindTurbineNum = 1; WindTurbineNum <= NumWindTurbines; ++WindTurbineNum) { @@ -811,9 +812,9 @@ namespace WindTurbine { if (!warningShown) { ShowWarningError( state, - EnergyPlus::format("InitWindTurbine: read from {} file shows <365 days in weather file. Annual average " - "wind speed used will be inaccurate.", - state.files.inStatFilePath.filePath)); + std::format("InitWindTurbine: read from {} file shows <365 days in weather file. Annual average " + "wind speed used will be inaccurate.", + state.files.inStatFilePath.filePath.string())); lineIn.data.erase(0, lnPtr + 1); warningShown = true; } @@ -822,9 +823,9 @@ namespace WindTurbine { if (!warningShown) { ShowWarningError( state, - EnergyPlus::format("InitWindTurbine: read from {} file shows <365 days in weather file. Annual average wind " - "speed used will be inaccurate.", - state.files.inStatFilePath.filePath)); + std::format("InitWindTurbine: read from {} file shows <365 days in weather file. Annual average wind " + "speed used will be inaccurate.", + state.files.inStatFilePath.filePath.string())); lineIn.data.erase(0, lnPtr + 1); warningShown = true; } diff --git a/src/EnergyPlus/WindowAC.cc b/src/EnergyPlus/WindowAC.cc index 448cb4e0cc7..d3c60d182dc 100644 --- a/src/EnergyPlus/WindowAC.cc +++ b/src/EnergyPlus/WindowAC.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -367,8 +368,8 @@ namespace WindowAC { if (FanVolFlow != AutoSize) { if (FanVolFlow < windAC.MaxAirVolFlow) { ShowWarningError(state, - EnergyPlus::format("Air flow rate = {:.7T} in fan object {} is less than the maximum supply air flow " - "rate ({:.7T}) in the {} object.", + EnergyPlus::format("Air flow rate = {:.7f} in fan object {} is less than the maximum supply air flow " + "rate ({:.7f}) in the {} object.", FanVolFlow, windAC.FanName, windAC.MaxAirVolFlow, @@ -738,11 +739,10 @@ namespace WindowAC { state.dataWindowAC->WindAC(Loop).Name)) { continue; } - ShowSevereError( - state, - EnergyPlus::format("InitWindowAC: Window AC Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - state.dataWindowAC->cWindowAC_UnitTypes(state.dataWindowAC->WindAC(Loop).UnitType), - state.dataWindowAC->WindAC(Loop).Name)); + ShowSevereError(state, + std::format("InitWindowAC: Window AC Unit=[{},{}] is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + state.dataWindowAC->cWindowAC_UnitTypes(state.dataWindowAC->WindAC(Loop).UnitType), + state.dataWindowAC->WindAC(Loop).Name)); } } @@ -1330,12 +1330,11 @@ namespace WindowAC { } if (Iter > MaxIter) { if (windAC.MaxIterIndex1 == 0) { - ShowWarningMessage( - state, - EnergyPlus::format("ZoneHVAC:WindowAirConditioner=\"{}\" -- Exceeded max iterations while adjusting compressor sensible " - "runtime to meet the zone load within the cooling convergence tolerance.", - windAC.Name)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("Iterations={}", MaxIter)); + ShowWarningMessage(state, + std::format("ZoneHVAC:WindowAirConditioner=\"{}\" -- Exceeded max iterations while adjusting compressor sensible " + "runtime to meet the zone load within the cooling convergence tolerance.", + windAC.Name)); + ShowContinueErrorTimeStamp(state, std::format("Iterations={}", MaxIter)); } ShowRecurringWarningErrorAtEnd(state, "ZoneHVAC:WindowAirConditioner=\"" + windAC.Name + @@ -1380,10 +1379,10 @@ namespace WindowAC { if (windAC.MaxIterIndex2 == 0) { ShowWarningMessage( state, - EnergyPlus::format("ZoneHVAC:WindowAirConditioner=\"{}\" -- Exceeded max iterations while adjusting compressor latent " - "runtime to meet the zone load within the cooling convergence tolerance.", - windAC.Name)); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("Iterations={}", MaxIter)); + std::format("ZoneHVAC:WindowAirConditioner=\"{}\" -- Exceeded max iterations while adjusting compressor latent " + "runtime to meet the zone load within the cooling convergence tolerance.", + windAC.Name)); + ShowContinueErrorTimeStamp(state, std::format("Iterations={}", MaxIter)); } ShowRecurringWarningErrorAtEnd(state, "ZoneHVAC:WindowAirConditioner=\"" + windAC.Name + diff --git a/src/EnergyPlus/WindowEquivalentLayer.cc b/src/EnergyPlus/WindowEquivalentLayer.cc index d25189a4661..0b23a20dc09 100644 --- a/src/EnergyPlus/WindowEquivalentLayer.cc +++ b/src/EnergyPlus/WindowEquivalentLayer.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include @@ -492,7 +493,7 @@ void CalcEQLWindowUvalue(EnergyPlusData &state, } if (!CFSURated) { ShowWarningMessage(state, EnergyPlus::format("{}Fenestration U-Value calculation failed for {}", RoutineName, FS.Name)); - ShowContinueError(state, EnergyPlus::format("...Calculated U-value = {:.4T}", U)); + ShowContinueError(state, EnergyPlus::format("...Calculated U-value = {:.4f}", U)); ShowContinueError(state, "...Check consistency of inputs"); } UNFRC = U; @@ -599,8 +600,8 @@ void CalcEQLWindowSHGCAndTransNormal(EnergyPlusData &state, if (!CFSSHGC) { ShowWarningMessage(state, EnergyPlus::format("{}Solar heat gain coefficient calculation failed for {}", RoutineName, FS.Name)); - ShowContinueError(state, EnergyPlus::format("...Calculated SHGC = {:.4T}", SHGC)); - ShowContinueError(state, EnergyPlus::format("...Calculated U-Value = {:.4T}", UCG)); + ShowContinueError(state, EnergyPlus::format("...Calculated SHGC = {:.4f}", SHGC)); + ShowContinueError(state, EnergyPlus::format("...Calculated U-Value = {:.4f}", UCG)); ShowContinueError(state, "...Check consistency of inputs."); return; } @@ -911,7 +912,7 @@ Real64 P01(EnergyPlusData &state, if (P < -0.05 || P > 1.05) { ShowWarningMessage(state, EnergyPlus::format("{}property value should have been between 0 and 1", RoutineName)); - ShowContinueError(state, EnergyPlus::format("{}=: property value is ={:.4T}", WHAT, P)); + ShowContinueError(state, EnergyPlus::format("{}=: property value is ={:.4f}", WHAT, P)); if (P < 0.0) { ShowContinueError(state, "property value is reset to 0.0"); } else if (P > 1.0) { @@ -1026,9 +1027,9 @@ void RB_DIFF(EnergyPlusData &state, if (RHO_DD + TAU_DD > 1.0) { SumRefAndTran = RHO_DD + TAU_DD; ShowWarningMessage(state, EnergyPlus::format("{}Roller blind diffuse-diffuse properties are inconsistent", RoutineName)); - ShowContinueError(state, EnergyPlus::format("...The diffuse-diffuse reflectance = {:.4T}", RHO_DD)); - ShowContinueError(state, EnergyPlus::format("...The diffuse-diffuse transmittance = {:.4T}", TAU_DD)); - ShowContinueError(state, EnergyPlus::format("...Sum of diffuse reflectance and transmittance = {:.4T}", SumRefAndTran)); + ShowContinueError(state, EnergyPlus::format("...The diffuse-diffuse reflectance = {:.4f}", RHO_DD)); + ShowContinueError(state, EnergyPlus::format("...The diffuse-diffuse transmittance = {:.4f}", TAU_DD)); + ShowContinueError(state, EnergyPlus::format("...Sum of diffuse reflectance and transmittance = {:.4f}", SumRefAndTran)); ShowContinueError(state, "...This sum cannot be > 1.0. Transmittance will be reset to 1 minus reflectance"); TAU_DD = 1.0 - RHO_DD; } @@ -1160,9 +1161,9 @@ void IS_DIFF(EnergyPlusData &state, if (RHO_DD + TAU_DD > 1.0) { SumRefAndTran = RHO_DD + TAU_DD; ShowWarningMessage(state, EnergyPlus::format("{}Calculated insect screen diffuse-diffuse properties are inconsistent", RoutineName)); - ShowContinueError(state, EnergyPlus::format("...The diffuse-diffuse reflectance = {:.4T}", RHO_DD)); - ShowContinueError(state, EnergyPlus::format("...The diffuse-diffuse transmittance = {:.4T}", TAU_DD)); - ShowContinueError(state, EnergyPlus::format("...Sum of diffuse reflectance and transmittance = {:.4T}", SumRefAndTran)); + ShowContinueError(state, EnergyPlus::format("...The diffuse-diffuse reflectance = {:.4f}", RHO_DD)); + ShowContinueError(state, EnergyPlus::format("...The diffuse-diffuse transmittance = {:.4f}", TAU_DD)); + ShowContinueError(state, EnergyPlus::format("...Sum of diffuse reflectance and transmittance = {:.4f}", SumRefAndTran)); ShowContinueError(state, "...This sum cannot be > 1.0. Transmittance will be reset to 1 minus reflectance"); TAU_DD = 1.0 - RHO_DD; } @@ -1331,9 +1332,9 @@ void FM_DIFF(EnergyPlusData &state, if (RHO_DD + TAU_DD > 1.0) { SumRefAndTran = RHO_DD + TAU_DD; ShowWarningMessage(state, EnergyPlus::format("{}Calculated drape fabric diffuse-diffuse properties are inconsistent", RoutineName)); - ShowContinueError(state, EnergyPlus::format("...The diffuse-diffuse reflectance = {:.4T}", RHO_DD)); - ShowContinueError(state, EnergyPlus::format("...The diffuse-diffuse transmittance = {:.4T}", TAU_DD)); - ShowContinueError(state, EnergyPlus::format("...Sum of diffuse reflectance and transmittance = {:.4T}", SumRefAndTran)); + ShowContinueError(state, EnergyPlus::format("...The diffuse-diffuse reflectance = {:.4f}", RHO_DD)); + ShowContinueError(state, EnergyPlus::format("...The diffuse-diffuse transmittance = {:.4f}", TAU_DD)); + ShowContinueError(state, std::format("...Sum of diffuse reflectance and transmittance = {:.4f}", SumRefAndTran)); ShowContinueError(state, "...This sum cannot be > 1.0. Transmittance will be reset to 1 minus reflectance"); TAU_DD = 1.0 - RHO_DD; } @@ -4634,10 +4635,10 @@ void ASHWAT_ThermalCalc(EnergyPlusData &state, if (FS.WEQLSolverErrorIndex < 1) { ++FS.WEQLSolverErrorIndex; - ShowSevereError(state, EnergyPlus::format("CONSTRUCTION:WINDOWEQUIVALENTLAYER = \"{}\"", FS.Name)); - ShowContinueError(state, EnergyPlus::format("{}Net radiation analysis did not converge", RoutineName)); - ShowContinueError(state, EnergyPlus::format("...Maximum error is = {:.6T}", MAXERR)); - ShowContinueError(state, EnergyPlus::format("...Convergence tolerance is = {:.6T}", TOL)); + ShowSevereError(state, std::format("CONSTRUCTION:WINDOWEQUIVALENTLAYER = \"{}\"", FS.Name)); + ShowContinueError(state, std::format("{}Net radiation analysis did not converge", RoutineName)); + ShowContinueError(state, std::format("...Maximum error is = {:.6f}", MAXERR)); + ShowContinueError(state, std::format("...Convergence tolerance is = {:.6f}", TOL)); ShowContinueErrorTimeStamp(state, ""); } else { ShowRecurringWarningErrorAtEnd(state, @@ -5121,8 +5122,8 @@ bool ASHWAT_ThermalRatings(EnergyPlusData &state, // ++FS.WEQLSolverErrorIndex; // ShowSevereError(state, format("CONSTRUCTION:WINDOWEQUIVALENTLAYER = \"{}\"", FS.Name)); // ShowContinueError(state, format("{}Net radiation analysis did not converge", RoutineName)); - // ShowContinueError(state, format("...Maximum error is = {:.6T}", MAXERR)); - // ShowContinueError(state, format("...Convergence tolerance is = {:.6T}", TOL)); + // ShowContinueError(state, format("...Maximum error is = {:.6f}", MAXERR)); + // ShowContinueError(state, format("...Convergence tolerance is = {:.6f}", TOL)); // ShowContinueErrorTimeStamp(state, ""); // } else { // ShowRecurringWarningErrorAtEnd(state, "CONSTRUCTION:WINDOWEQUIVALENTLAYER = \"" + FS.Name + "\"; " + std::string{RoutineName} + @@ -7604,7 +7605,7 @@ void BuildGap(EnergyPlusData &state, static constexpr std::string_view RoutineName("BuildGap: "); if (TAS < GapThickMin) { - ShowSevereError(state, EnergyPlus::format("{}{}", RoutineName, G.Name)); + ShowSevereError(state, std::format("{}{}", RoutineName, G.Name)); ShowContinueError(state, "...specified gap thickness is < 0.0001 m. Reset to 0.00001 m"); TAS = GapThickMin; } @@ -7758,7 +7759,7 @@ void FillDefaultsSWP(EnergyPlusData &state, } else if (L.LTYPE == LayerType::NONE || L.LTYPE == LayerType::ROOM) { // none or room: do nothing } else { - ShowSevereError(state, EnergyPlus::format("{}{}.", RoutineName, L.Name)); + ShowSevereError(state, std::format("{}{}.", RoutineName, L.Name)); ShowContinueError(state, "...invalid layer type specified."); } } @@ -7783,7 +7784,7 @@ void FinalizeCFS(EnergyPlusData &state, CFSTY &FS) if (!IsVBLayer(FS.L(iL))) { LVBPREV = false; } else if (LVBPREV) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}\", illegal.", CurrentModuleObject, FS.Name)); + ShowSevereError(state, std::format("{}=\"{}\", illegal.", CurrentModuleObject, FS.Name)); ShowContinueError(state, "...adjacent VB layers are specified."); ErrorsFound = true; } else { @@ -7798,19 +7799,19 @@ void FinalizeCFS(EnergyPlusData &state, CFSTY &FS) if (iL < FS.NL) { int gType = FS.G(iL).GTYPE; if (gType == state.dataWindowEquivalentLayer->gtyOPENout && iL != 1) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}", CurrentModuleObject, FS.Name)); - ShowContinueError(state, EnergyPlus::format("...invalid EquivalentLayer window gap type specified ={}.", FS.G(iL).Name)); + ShowSevereError(state, std::format("{}=\"{}", CurrentModuleObject, FS.Name)); + ShowContinueError(state, std::format("...invalid EquivalentLayer window gap type specified ={}.", FS.G(iL).Name)); ShowContinueError(state, "...VentedOutDoor gap is not outermost."); } if (gType == state.dataWindowEquivalentLayer->gtyOPENin && iL != FS.NL - 1) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}", CurrentModuleObject, FS.Name)); - ShowContinueError(state, EnergyPlus::format("...invalid EquivalentLayer window gap type specified ={}.", FS.G(iL).Name)); + ShowSevereError(state, std::format("{}=\"{}", CurrentModuleObject, FS.Name)); + ShowContinueError(state, std::format("...invalid EquivalentLayer window gap type specified ={}.", FS.G(iL).Name)); ShowContinueError(state, "...VentedIndoor gap is not innermost."); } } } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Program terminates for preceding reason(s).", RoutineName)); + ShowFatalError(state, std::format("{}Program terminates for preceding reason(s).", RoutineName)); } } diff --git a/src/EnergyPlus/WindowManager.cc b/src/EnergyPlus/WindowManager.cc index 2d92bc292f1..adf98f7ec56 100644 --- a/src/EnergyPlus/WindowManager.cc +++ b/src/EnergyPlus/WindowManager.cc @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -8357,9 +8358,9 @@ namespace Window { // overwrite the default solar spectrum if (NumNumbers > 2 * nume) { ShowSevereError(state, - EnergyPlus::format("Solar spectrum data pair is more than 107 - {} - {}", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Solar spectrum data pair is more than 107 - {} - {}", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else { // Step 3 - overwrite default solar spectrum data @@ -8379,9 +8380,9 @@ namespace Window { // overwrite the default solar spectrum if (NumNumbers > 2 * numt3) { ShowSevereError(state, - EnergyPlus::format("Visible spectrum data pair is more than 81 - {} - {}", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1))); + std::format("Visible spectrum data pair is more than 81 - {} - {}", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1))); ErrorsFound = true; } else { // Step 3 - overwrite default visible spectrum data diff --git a/src/EnergyPlus/WindowManagerExteriorData.cc b/src/EnergyPlus/WindowManagerExteriorData.cc index 51648900ba7..efa3286603d 100644 --- a/src/EnergyPlus/WindowManagerExteriorData.cc +++ b/src/EnergyPlus/WindowManagerExteriorData.cc @@ -45,8 +45,13 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers #include +// Third Party Headers +#include + +// EnergyPlus Headers #include #include #include @@ -55,8 +60,6 @@ #include #include -#include - namespace EnergyPlus { using namespace DataSurfaces; diff --git a/src/EnergyPlus/WindowManagerExteriorOptical.cc b/src/EnergyPlus/WindowManagerExteriorOptical.cc index fe2abc830fe..ddd80d448e3 100644 --- a/src/EnergyPlus/WindowManagerExteriorOptical.cc +++ b/src/EnergyPlus/WindowManagerExteriorOptical.cc @@ -45,9 +45,13 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers #include -// EnergyPlus headers +// Third Party Headers +#include + +// EnergyPlus Headers #include #include #include @@ -56,9 +60,7 @@ #include #include -// Windows library headers -#include - +// Local Headers #include "WindowManagerExteriorData.hh" #include "WindowManagerExteriorOptical.hh" diff --git a/src/EnergyPlus/WindowManagerExteriorThermal.cc b/src/EnergyPlus/WindowManagerExteriorThermal.cc index 3d220b84ec8..b95425cf8cd 100644 --- a/src/EnergyPlus/WindowManagerExteriorThermal.cc +++ b/src/EnergyPlus/WindowManagerExteriorThermal.cc @@ -45,7 +45,11 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -// EnergyPlus headers +// Third Party Headers +#include +#include + +// EnergyPlus Headers #include #include #include @@ -56,12 +60,6 @@ #include #include #include - -// Windows library headers -#include -#include - -// EnergyPlus headers #include namespace EnergyPlus { diff --git a/src/EnergyPlus/WindowModel.cc b/src/EnergyPlus/WindowModel.cc index 7f8ebecb958..9a6597b7910 100644 --- a/src/EnergyPlus/WindowModel.cc +++ b/src/EnergyPlus/WindowModel.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc index 84c8388df46..13d1c478cfb 100644 --- a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc +++ b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc @@ -47,14 +47,17 @@ // C++ Headers #include +#include // ObjexxFCL Headers #include #include -// EnergyPlus Headers +// Third Party Headers #include #include + +// EnergyPlus Headers #include #include #include @@ -935,11 +938,11 @@ void GetZoneContaminanInputs(EnergyPlusData &state) if (IHGNumbers(1) < 0.0) { ShowSevereError(state, - EnergyPlus::format("{}Negative values are not allowed for {} in {} = {}", - RoutineName, - state.dataIPShortCut->cNumericFieldNames(1), - CurrentModuleObject, - AlphaName(1))); + std::format("{}Negative values are not allowed for {} in {} = {}", + RoutineName, + state.dataIPShortCut->cNumericFieldNames(1), + CurrentModuleObject, + AlphaName(1))); ShowContinueError(state, EnergyPlus::format("The input value is {:.2R}", IHGNumbers(1))); ErrorsFound = true; } @@ -1062,11 +1065,11 @@ void GetZoneContaminanSetPoints(EnergyPlusData &state) controlledZone.ActualZoneNum = Util::FindItemInList(state.dataIPShortCut->cAlphaArgs(2), state.dataHeatBal->Zone); if (controlledZone.ActualZoneNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", - cCurrentModuleObject, - state.dataIPShortCut->cAlphaArgs(1), - state.dataIPShortCut->cAlphaFieldNames(2), - state.dataIPShortCut->cAlphaArgs(2))); + std::format("{}=\"{}\" invalid {}=\"{}\" not found.", + cCurrentModuleObject, + state.dataIPShortCut->cAlphaArgs(1), + state.dataIPShortCut->cAlphaFieldNames(2), + state.dataIPShortCut->cAlphaArgs(2))); ErrorsFound = true; } else { // Zone(ContaminantControlledZone(ContControlledZoneNum)%ActualZoneNum)%TempControlledZoneIndex = ContControlledZoneNum @@ -1411,8 +1414,8 @@ void InitZoneContSetPoints(EnergyPlusData &state) } else { ShowSevereError( state, - EnergyPlus::format("ZoneControl:ContaminantController: a corresponding AirLoopHVAC is not found for the controlled zone ={}", - state.dataHeatBal->Zone(ZoneNum).Name)); + std::format("ZoneControl:ContaminantController: a corresponding AirLoopHVAC is not found for the controlled zone ={}", + state.dataHeatBal->Zone(ZoneNum).Name)); ErrorsFound = true; } } diff --git a/src/EnergyPlus/ZoneDehumidifier.cc b/src/EnergyPlus/ZoneDehumidifier.cc index 6e00c05b6e0..c8058a0f953 100644 --- a/src/EnergyPlus/ZoneDehumidifier.cc +++ b/src/EnergyPlus/ZoneDehumidifier.cc @@ -47,6 +47,7 @@ // C++ Headers #include +#include // EnergyPlus Headers #include @@ -271,7 +272,7 @@ namespace ZoneDehumidifier { dehumid.RatedWaterRemoval = inputProcessor->getRealFieldValue(dehumidFields, objectSchemaProps, "rated_water_removal"); if (dehumid.RatedWaterRemoval <= 0.0) { ShowSevereError(state, "Rated Water Removal must be greater than zero."); - ShowContinueError(state, EnergyPlus::format("Value specified = {:.5T}", dehumid.RatedWaterRemoval)); + ShowContinueError(state, EnergyPlus::format("Value specified = {:.5f}", dehumid.RatedWaterRemoval)); ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, dehumid.Name)); ErrorsFound = true; } @@ -280,7 +281,7 @@ namespace ZoneDehumidifier { dehumid.RatedEnergyFactor = inputProcessor->getRealFieldValue(dehumidFields, objectSchemaProps, "rated_energy_factor"); if (dehumid.RatedEnergyFactor <= 0.0) { ShowSevereError(state, "Rated Energy Factor must be greater than zero."); - ShowContinueError(state, EnergyPlus::format("Value specified = {:.5T}", dehumid.RatedEnergyFactor)); + ShowContinueError(state, EnergyPlus::format("Value specified = {:.5f}", dehumid.RatedEnergyFactor)); ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, dehumid.Name)); ErrorsFound = true; } @@ -289,7 +290,7 @@ namespace ZoneDehumidifier { dehumid.RatedAirVolFlow = inputProcessor->getRealFieldValue(dehumidFields, objectSchemaProps, "rated_air_flow_rate"); if (dehumid.RatedAirVolFlow <= 0.0) { ShowSevereError(state, "Rated Air Flow Rate must be greater than zero."); - ShowContinueError(state, EnergyPlus::format("Value specified = {:.5T}", dehumid.RatedAirVolFlow)); + ShowContinueError(state, EnergyPlus::format("Value specified = {:.5f}", dehumid.RatedAirVolFlow)); ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, dehumid.Name)); ErrorsFound = true; } @@ -310,7 +311,7 @@ namespace ZoneDehumidifier { if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, "Water Removal Curve Name output is not equal to 1.0"); ShowContinueError(state, EnergyPlus::format("(+ or -10%) at rated conditions for {} = {}", CurrentModuleObject, dehumidName)); - ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", CurveVal)); + ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3f}", CurveVal)); } } @@ -330,7 +331,7 @@ namespace ZoneDehumidifier { if (CurveVal > 1.10 || CurveVal < 0.90) { ShowWarningError(state, "Energy Factor Curve Name output is not equal to 1.0"); ShowContinueError(state, EnergyPlus::format("(+ or -10%) at rated conditions for {} = {}", CurrentModuleObject, dehumidName)); - ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3T}", CurveVal)); + ShowContinueError(state, EnergyPlus::format("Curve output at rated conditions = {:.3f}", CurveVal)); } } @@ -363,11 +364,11 @@ namespace ZoneDehumidifier { "Maximum Dry-Bulb Temperature for Dehumidifier Operation must be greater than Minimum Dry-Bulb Temperature for " "Dehumidifier Operation"); ShowContinueError(state, - EnergyPlus::format("{} specified = {:.1T}", + EnergyPlus::format("{} specified = {:.1f}", "Maximum Dry-Bulb Temperature for Dehumidifier Operation", dehumid.MaxInletAirTemp)); ShowContinueError(state, - EnergyPlus::format("{} specified = {:.1T}", + EnergyPlus::format("{} specified = {:.1f}", "Minimum Dry-Bulb Temperature for Dehumidifier Operation", dehumid.MinInletAirTemp)); ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, dehumid.Name)); @@ -380,7 +381,7 @@ namespace ZoneDehumidifier { if (dehumid.OffCycleParasiticLoad < 0.0) { ShowSevereError(state, "Off-Cycle Parasitic Electric Load must be >= zero."); - ShowContinueError(state, EnergyPlus::format("Value specified = {:.2T}", dehumid.OffCycleParasiticLoad)); + ShowContinueError(state, EnergyPlus::format("Value specified = {:.2f}", dehumid.OffCycleParasiticLoad)); ShowContinueError(state, EnergyPlus::format("Occurs in {} = {}", CurrentModuleObject, dehumid.Name)); ErrorsFound = true; } @@ -406,7 +407,7 @@ namespace ZoneDehumidifier { } if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}:{}: Errors found in input.", routineName, CurrentModuleObject)); + ShowFatalError(state, std::format("{}:{}: Errors found in input.", routineName, CurrentModuleObject)); } for (ZoneDehumidIndex = 1; ZoneDehumidIndex <= NumDehumidifiers; ++ZoneDehumidIndex) { @@ -551,10 +552,9 @@ namespace ZoneDehumidifier { if (!CheckZoneEquipmentList(state, dehumid.UnitType, dehumid.Name)) { ShowSevereError( state, - EnergyPlus::format( - "InitZoneDehumidifier: Zone Dehumidifier=\"{},{}\" is not on any ZoneHVAC:EquipmentList. It will not be simulated.", - dehumid.UnitType, - dehumid.Name)); + std::format("InitZoneDehumidifier: Zone Dehumidifier=\"{},{}\" is not on any ZoneHVAC:EquipmentList. It will not be simulated.", + dehumid.UnitType, + dehumid.Name)); } } @@ -697,12 +697,12 @@ namespace ZoneDehumidifier { if (WaterRemovalRateFactor <= 0.0) { if (dehumid.WaterRemovalCurveErrorCount < 1) { ++dehumid.WaterRemovalCurveErrorCount; - ShowWarningError(state, EnergyPlus::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); - ShowContinueError(state, EnergyPlus::format(" Water Removal Rate Curve output is <= 0.0 ({:.5T}).", WaterRemovalRateFactor)); + ShowWarningError(state, std::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); + ShowContinueError(state, std::format(" Water Removal Rate Curve output is <= 0.0 ({:.5f}).", WaterRemovalRateFactor)); ShowContinueError( state, - EnergyPlus::format( - " Negative value occurs using an inlet air dry-bulb temperature of {:.2T} and an inlet air relative humidity of {:.1T}.", + std::format( + " Negative value occurs using an inlet air dry-bulb temperature of {:.2f} and an inlet air relative humidity of {:.1f}.", InletAirTemp, InletAirRH)); ShowContinueErrorTimeStamp(state, " Dehumidifier turned off for this time step but simulation continues."); @@ -736,12 +736,12 @@ namespace ZoneDehumidifier { if (EnergyFactorAdjFactor <= 0.0) { if (dehumid.EnergyFactorCurveErrorCount < 1) { ++dehumid.EnergyFactorCurveErrorCount; - ShowWarningError(state, EnergyPlus::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); - ShowContinueError(state, EnergyPlus::format(" Energy Factor Curve output is <= 0.0 ({:.5T}).", EnergyFactorAdjFactor)); + ShowWarningError(state, std::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); + ShowContinueError(state, std::format(" Energy Factor Curve output is <= 0.0 ({:.5f}).", EnergyFactorAdjFactor)); ShowContinueError( state, - EnergyPlus::format( - " Negative value occurs using an inlet air dry-bulb temperature of {:.2T} and an inlet air relative humidity of {:.1T}.", + std::format( + " Negative value occurs using an inlet air dry-bulb temperature of {:.2f} and an inlet air relative humidity of {:.1f}.", InletAirTemp, InletAirRH)); ShowContinueErrorTimeStamp(state, " Dehumidifier turned off for this time step but simulation continues."); @@ -769,10 +769,10 @@ namespace ZoneDehumidifier { if (PLF < 0.7) { if (dehumid.LowPLFErrorCount < 1) { ++dehumid.LowPLFErrorCount; - ShowWarningError(state, EnergyPlus::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); - ShowContinueError(state, - EnergyPlus::format( - " The Part Load Fraction Correlation Curve output is ({:.2T}) at a part-load ratio ={:.3T}", PLF, PLR)); + ShowWarningError(state, std::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); + ShowContinueError( + state, + std::format(" The Part Load Fraction Correlation Curve output is ({:.2f}) at a part-load ratio ={:.3f}", PLF, PLR)); ShowContinueErrorTimeStamp(state, " PLF curve values must be >= 0.7. PLF has been reset to 0.7 and simulation is continuing."); } else { @@ -789,16 +789,16 @@ namespace ZoneDehumidifier { if (PLF > 1.0) { if (dehumid.HighPLFErrorCount < 1) { ++dehumid.HighPLFErrorCount; - ShowWarningError(state, EnergyPlus::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); - ShowContinueError(state, - EnergyPlus::format( - " The Part Load Fraction Correlation Curve output is ({:.2T}) at a part-load ratio ={:.3T}", PLF, PLR)); + ShowWarningError(state, std::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); + ShowContinueError( + state, + std::format(" The Part Load Fraction Correlation Curve output is ({:.2f}) at a part-load ratio ={:.3f}", PLF, PLR)); ShowContinueErrorTimeStamp(state, " PLF curve values must be < 1.0. PLF has been reset to 1.0 and simulation is continuing."); } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format( + std::format( "{} \"{}\": Part Load Fraction Correlation Curve output > 1.0 warning continues...", dehumid.UnitType, dehumid.Name), dehumid.HighPLFErrorIndex, PLF, @@ -812,11 +812,11 @@ namespace ZoneDehumidifier { } else { if (dehumid.PLFPLRErrorCount < 1) { ++dehumid.PLFPLRErrorCount; - ShowWarningError(state, EnergyPlus::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); + ShowWarningError(state, std::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); ShowContinueError( state, - EnergyPlus::format( - "The part load fraction was less than the part load ratio calculated for this time step [PLR={:.4T}, PLF={:.4T}].", + std::format( + "The part load fraction was less than the part load ratio calculated for this time step [PLR={:.4f}, PLF={:.4f}].", PLR, PLF)); ShowContinueError(state, "Runtime fraction reset to 1 and the simulation will continue."); @@ -833,9 +833,9 @@ namespace ZoneDehumidifier { if (RunTimeFraction > 1.0 && std::abs(RunTimeFraction - 1.0) > 0.001) { if (dehumid.HighRTFErrorCount < 1) { ++dehumid.HighRTFErrorCount; - ShowWarningError(state, EnergyPlus::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); - ShowContinueError( - state, EnergyPlus::format("The runtime fraction for this zone dehumidifier exceeded 1.0 [{:.4T}].", RunTimeFraction)); + ShowWarningError(state, std::format("{} \"{}\":", dehumid.UnitType, dehumid.Name)); + ShowContinueError(state, + std::format("The runtime fraction for this zone dehumidifier exceeded 1.0 [{:.4f}].", RunTimeFraction)); ShowContinueError(state, "Runtime fraction reset to 1 and the simulation will continue."); ShowContinueErrorTimeStamp(state, ""); } else { diff --git a/src/EnergyPlus/ZoneEquipmentManager.cc b/src/EnergyPlus/ZoneEquipmentManager.cc index 941b5d6df9a..eb67616ccf2 100644 --- a/src/EnergyPlus/ZoneEquipmentManager.cc +++ b/src/EnergyPlus/ZoneEquipmentManager.cc @@ -48,13 +48,16 @@ // C++ Headers #include #include +#include #include // ObjexxFCL Headers #include -// EnergyPlus Headers +// Local Headers #include + +// EnergyPlus Headers #include #include #include @@ -3033,10 +3036,9 @@ void updateZoneSizingEndZoneSizingCalc7(EnergyPlusData &state, // initialize sizing conditions if they have not been set (i.e., no corresponding load) to zone condition // issue 6006, heating coils sizing to 0 when no heating load in zone if (zoneSizingF.DesCoolSetPtSeq.empty()) { - ShowSevereError(state, - EnergyPlus::format("{}: Thermostat cooling set point temperatures are not initialized for Zone = {}", - RoutineName, - zsFinalSizing.ZoneName)); + ShowSevereError( + state, + std::format("{}: Thermostat cooling set point temperatures are not initialized for Zone = {}", RoutineName, zsFinalSizing.ZoneName)); ShowFatalError(state, "Please send your input file to the EnergyPlus support/development team for further investigation."); } else { zsFinalSizing.ZoneTempAtCoolPeak = *std::min_element(zoneSizingF.DesCoolSetPtSeq.begin(), zoneSizingF.DesCoolSetPtSeq.end()); @@ -3183,9 +3185,9 @@ void updateZoneSizingEndZoneSizingCalc7(EnergyPlusData &state, // initialize sizing conditions if they have not been set (i.e., no corresponding load) to zone condition // issue 6006, heating coils sizing to 0 when no heating load in zone if (zoneSizingDDF.DesHeatSetPtSeq.empty()) { - ShowSevereError(state, - EnergyPlus::format( - "{}: Thermostat heating set point temperatures not initialized for Zone = {}", RoutineName, zsFinalSizing.ZoneName)); + ShowSevereError( + state, + std::format("{}: Thermostat heating set point temperatures not initialized for Zone = {}", RoutineName, zsFinalSizing.ZoneName)); ShowFatalError(state, "Please send your input file to the EnergyPlus support/development team for further investigation."); } else { zsFinalSizing.ZoneTempAtHeatPeak = *std::max_element(zoneSizingDDF.DesHeatSetPtSeq.begin(), zoneSizingDDF.DesHeatSetPtSeq.end()); @@ -3607,11 +3609,10 @@ void SimZoneEquipment(EnergyPlusData &state, bool const FirstHVACIteration, bool break; } default: { - ShowSevereError(state, - EnergyPlus::format("Error found in Supply Air Path={}", state.dataZoneEquip->SupplyAirPath(SupplyAirPathNum).Name)); - ShowContinueError(state, - EnergyPlus::format("Invalid Supply Air Path Component={}", - state.dataZoneEquip->SupplyAirPath(SupplyAirPathNum).ComponentType(CompNum))); + ShowSevereError(state, std::format("Error found in Supply Air Path={}", state.dataZoneEquip->SupplyAirPath(SupplyAirPathNum).Name)); + ShowContinueError( + state, + std::format("Invalid Supply Air Path Component={}", state.dataZoneEquip->SupplyAirPath(SupplyAirPathNum).ComponentType(CompNum))); ShowFatalError(state, "Preceding condition causes termination."); break; @@ -4162,11 +4163,10 @@ void SimZoneEquipment(EnergyPlusData &state, bool const FirstHVACIteration, bool } break; default: { - ShowSevereError(state, - EnergyPlus::format("Error found in Supply Air Path={}", state.dataZoneEquip->SupplyAirPath(SupplyAirPathNum).Name)); - ShowContinueError(state, - EnergyPlus::format("Invalid Supply Air Path Component={}", - state.dataZoneEquip->SupplyAirPath(SupplyAirPathNum).ComponentType(CompNum))); + ShowSevereError(state, std::format("Error found in Supply Air Path={}", state.dataZoneEquip->SupplyAirPath(SupplyAirPathNum).Name)); + ShowContinueError( + state, + std::format("Invalid Supply Air Path Component={}", state.dataZoneEquip->SupplyAirPath(SupplyAirPathNum).ComponentType(CompNum))); ShowFatalError(state, "Preceding condition causes termination."); } break; } @@ -5228,10 +5228,9 @@ void CalcZoneMassBalance(EnergyPlusData &state, bool const FirstHVACIteration) Real64 sysUnbalancedVolFlow = sysUnbalancedFlow / state.dataEnvrn->StdRhoAir; Real64 unbalancedVolFlow = max(0.0, sysUnbalancedVolFlow - incomingVolFlow); if (unbalancedVolFlow > HVAC::SmallAirVolFlow) { - ShowWarningError( - state, - EnergyPlus::format("In zone {} there is unbalanced air flow. Load due to induced outdoor air is neglected.", - thisZoneEquip.ZoneName)); + ShowWarningError(state, + std::format("In zone {} there is unbalanced air flow. Load due to induced outdoor air is neglected.", + thisZoneEquip.ZoneName)); ShowContinueErrorTimeStamp(state, ""); ShowContinueError(state, EnergyPlus::format(" Flows [m3/s]: Inlets: {:.6R} Unbalanced exhausts: {:.6R} Returns: {:.6R}", @@ -5773,11 +5772,10 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (hybridControlVentilation.MinIndoorTemperature > hybridControlVentilation.MaxIndoorTemperature) { ++hybridControlVentilation.IndoorTempErrCount; if (hybridControlVentilation.IndoorTempErrCount < 2) { - ShowWarningError( - state, - EnergyPlus::format("Ventilation indoor temperature control: The minimum indoor temperature is above the maximum indoor " - "temperature in {}", - hybridControlVentilation.Name)); + ShowWarningError(state, + std::format("Ventilation indoor temperature control: The minimum indoor temperature is above the maximum indoor " + "temperature in {}", + hybridControlVentilation.Name)); ShowContinueError(state, "The minimum indoor temperature is set to the maximum indoor temperature. Simulation continues."); ShowContinueErrorTimeStamp(state, " Occurrence info:"); } else { @@ -5801,11 +5799,10 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (hybridControlVentilation.MinOutdoorTemperature > hybridControlVentilation.MaxOutdoorTemperature) { ++hybridControlVentilation.OutdoorTempErrCount; if (hybridControlVentilation.OutdoorTempErrCount < 2) { - ShowWarningError( - state, - EnergyPlus::format("Ventilation outdoor temperature control: The minimum outdoor temperature is above the maximum " - "outdoor temperature in {}", - hybridControlVentilation.Name)); + ShowWarningError(state, + std::format("Ventilation outdoor temperature control: The minimum outdoor temperature is above the maximum " + "outdoor temperature in {}", + hybridControlVentilation.Name)); ShowContinueError(state, "The minimum outdoor temperature is set to the maximum outdoor temperature. Simulation continues."); ShowContinueErrorTimeStamp(state, " Occurrence info:"); } else { @@ -6118,9 +6115,8 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (thisMixing.IndoorTempErrCount < 2) { ShowWarningError( state, - EnergyPlus::format( - "Mixing zone temperature control: The minimum zone temperature is above the maximum zone temperature in {}", - thisMixing.Name)); + std::format("Mixing zone temperature control: The minimum zone temperature is above the maximum zone temperature in {}", + thisMixing.Name)); ShowContinueError(state, "The minimum zone temperature is set to the maximum zone temperature. Simulation continues."); ShowContinueErrorTimeStamp(state, " Occurrence info:"); } else { @@ -6156,7 +6152,7 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (thisMixing.SourceTempErrCount < 2) { ShowWarningError( state, - EnergyPlus::format( + std::format( "Mixing source temperature control: The minimum source temperature is above the maximum source temperature in {}", thisMixing.Name)); ShowContinueError(state, "The minimum source temperature is set to the maximum source temperature. Simulation continues."); @@ -6193,11 +6189,10 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (MixingTmin > MixingTmax) { ++thisMixing.OutdoorTempErrCount; if (thisMixing.OutdoorTempErrCount < 2) { - ShowWarningError( - state, - EnergyPlus::format("Mixing outdoor temperature control: The minimum outdoor temperature is above the maximum " - "outdoor temperature in {}", - thisMixing.Name)); + ShowWarningError(state, + std::format("Mixing outdoor temperature control: The minimum outdoor temperature is above the maximum " + "outdoor temperature in {}", + thisMixing.Name)); ShowContinueError(state, "The minimum outdoor temperature is set to the maximum source temperature. Simulation continues."); ShowContinueErrorTimeStamp(state, " Occurrence info:"); } else { @@ -6390,7 +6385,7 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (thisCrossMixing.IndoorTempErrCount < 2) { ShowWarningError( state, - EnergyPlus::format( + std::format( "CrossMixing zone temperature control: The minimum zone temperature is above the maximum zone temperature in {}", thisCrossMixing.Name)); ShowContinueError(state, "The minimum zone temperature is set to the maximum zone temperature. Simulation continues."); @@ -6428,9 +6423,9 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (thisCrossMixing.SourceTempErrCount < 2) { ShowWarningError( state, - EnergyPlus::format("CrossMixing source temperature control: The minimum source temperature is above the maximum source " - "temperature in {}", - thisCrossMixing.Name)); + std::format("CrossMixing source temperature control: The minimum source temperature is above the maximum source " + "temperature in {}", + thisCrossMixing.Name)); ShowContinueError(state, "The minimum source temperature is set to the maximum source temperature. Simulation continues."); ShowContinueErrorTimeStamp(state, " Occurrence info:"); } else { @@ -6465,11 +6460,10 @@ void CalcAirFlowSimple(EnergyPlusData &state, if (MixingTmin > MixingTmax) { ++thisCrossMixing.OutdoorTempErrCount; if (thisCrossMixing.OutdoorTempErrCount < 2) { - ShowWarningError( - state, - EnergyPlus::format("CrossMixing outdoor temperature control: The minimum outdoor temperature is above the maximum " - "outdoor temperature in {}", - state.dataHeatBal->Mixing(j).Name)); + ShowWarningError(state, + std::format("CrossMixing outdoor temperature control: The minimum outdoor temperature is above the maximum " + "outdoor temperature in {}", + state.dataHeatBal->Mixing(j).Name)); ShowContinueError(state, "The minimum outdoor temperature is set to the maximum source temperature. Simulation continues."); ShowContinueErrorTimeStamp(state, " Occurrence info:"); } else { @@ -7067,7 +7061,7 @@ void AutoCalcDOASControlStrategy(EnergyPlusData &state) headerAlreadyPrinted); } if (zoneSizingInput.DOASLowSetpoint > zoneSizingInput.DOASHighSetpoint) { - ShowSevereError(state, EnergyPlus::format("For Sizing:Zone = {}", zoneSizingInput.ZoneName)); + ShowSevereError(state, std::format("For Sizing:Zone = {}", zoneSizingInput.ZoneName)); ShowContinueError(state, "... Dedicated Outside Air Low Setpoint for Design must be less than the High Setpoint"); ErrorsFound = true; } diff --git a/src/EnergyPlus/ZonePlenum.cc b/src/EnergyPlus/ZonePlenum.cc index a1099f724e8..16011745da2 100644 --- a/src/EnergyPlus/ZonePlenum.cc +++ b/src/EnergyPlus/ZonePlenum.cc @@ -48,6 +48,7 @@ // C++ Headers #include #include +#include // EnergyPlus Headers #include @@ -509,9 +510,8 @@ void GetZonePlenumInput(EnergyPlusData &state) AlphArray(2), CurrentModuleObject)); ShowContinueError( - state, - EnergyPlus::format("..Only one {} or AirLoopHVAC:ReturnPlenum object may be connected to a given zone.", CurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("..occurs in {} = {}", CurrentModuleObject, AlphArray(1))); + state, std::format("..Only one {} or AirLoopHVAC:ReturnPlenum object may be connected to a given zone.", CurrentModuleObject)); + ShowContinueError(state, std::format("..occurs in {} = {}", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -533,12 +533,12 @@ void GetZonePlenumInput(EnergyPlusData &state) ZoneEquipConfigLoop = Util::FindItemInList(AlphArray(2), state.dataZoneEquip->ZoneEquipConfig, &EquipConfiguration::ZoneName); if (ZoneEquipConfigLoop != 0) { ShowSevereError(state, - EnergyPlus::format("{}{} \"{}\" is a controlled zone. It cannot be used as a {} or AirLoopHVAC:ReturnPlenum.", - RoutineName, - cAlphaFields(2), - AlphArray(2), - CurrentModuleObject)); - ShowContinueError(state, EnergyPlus::format("..occurs in {} = {}", CurrentModuleObject, AlphArray(1))); + std::format("{}{} \"{}\" is a controlled zone. It cannot be used as a {} or AirLoopHVAC:ReturnPlenum.", + RoutineName, + cAlphaFields(2), + AlphArray(2), + CurrentModuleObject)); + ShowContinueError(state, std::format("..occurs in {} = {}", CurrentModuleObject, AlphArray(1))); ErrorsFound = true; } } @@ -640,7 +640,7 @@ void GetZonePlenumInput(EnergyPlusData &state) NodeNums.deallocate(); if (ErrorsFound) { - ShowFatalError(state, EnergyPlus::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); + ShowFatalError(state, std::format("{}Errors found in input. Preceding condition(s) cause termination.", RoutineName)); } } @@ -721,9 +721,9 @@ void InitAirZoneReturnPlenum(EnergyPlusData &state, int const ZonePlenumNum) // TODO: the first half of this IF condition was a duplicated OR, if issues around this code, might want to check the history of this line if (thisADU.DownStreamLeak && (thisADU.RetPlenumNum == 0)) { ShowWarningError(state, - EnergyPlus::format("No return plenum found for simple duct leakage for ZoneHVAC:AirDistributionUnit={} in Zone={}", - thisADU.Name, - state.dataZoneEquip->ZoneEquipConfig(thisADU.ZoneEqNum).ZoneName)); + std::format("No return plenum found for simple duct leakage for ZoneHVAC:AirDistributionUnit={} in Zone={}", + thisADU.Name, + state.dataZoneEquip->ZoneEquipConfig(thisADU.ZoneEqNum).ZoneName)); ShowContinueError(state, "Leakage will be ignored for this ADU."); thisADU.UpStreamLeak = false; thisADU.DownStreamLeak = false; diff --git a/src/EnergyPlus/ZoneTempPredictorCorrector.cc b/src/EnergyPlus/ZoneTempPredictorCorrector.cc index d8f88549133..cb0246b9987 100644 --- a/src/EnergyPlus/ZoneTempPredictorCorrector.cc +++ b/src/EnergyPlus/ZoneTempPredictorCorrector.cc @@ -47,15 +47,18 @@ // C++ Headers #include +#include #include #include // ObjexxFCL Headers #include -// EnergyPlus Headers +// Local Headers #include #include + +// EnergyPlus Headers #include #include #include @@ -496,7 +499,7 @@ void GetZoneAirSetPoints(EnergyPlusData &state) } } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{} invalid {}=[{:.0T}].", + EnergyPlus::format("{}=\"{} invalid {}=[{:.0f}].", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1), s_ipsc->cNumericFieldNames(1), @@ -796,10 +799,10 @@ void GetZoneAirSetPoints(EnergyPlusData &state) continue; } ShowWarningError(state, EnergyPlus::format("Schedule={}", tempZone.setptTypeSched->Name)); - ShowContinueError( - state, EnergyPlus::format("...should include control type {} ({}) but does not.", (int)setptType, setptTypeNames[(int)setptType])); - ShowContinueError(state, EnergyPlus::format("..reference {}={}", cZControlTypes((int)ZoneControlTypes::TStat), tempZone.Name)); - ShowContinueError(state, EnergyPlus::format("..reference ZONE={}", tempZone.ZoneName)); + ShowContinueError(state, + std::format("...should include control type {} ({}) but does not.", (int)setptType, setptTypeNames[(int)setptType])); + ShowContinueError(state, std::format("..reference {}={}", cZControlTypes((int)ZoneControlTypes::TStat), tempZone.Name)); + ShowContinueError(state, std::format("..reference ZONE={}", tempZone.ZoneName)); } } @@ -844,11 +847,11 @@ void GetZoneAirSetPoints(EnergyPlusData &state) humidControlledZone.ActualZoneNum = Util::FindItem(s_ipsc->cAlphaArgs(2), Zone); if (humidControlledZone.ActualZoneNum == 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{} invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{} invalid {}=\"{}\" not found.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } else { state.dataHeatBal->Zone(humidControlledZone.ActualZoneNum).humidityControlZoneIndex = HumidControlledZoneNum; @@ -918,18 +921,18 @@ void GetZoneAirSetPoints(EnergyPlusData &state) ComfortTStatObjects(Item).ZoneOrZoneListPtr = ZLItem; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\" invalid {}=\"{}\" not found.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); errFlag = true; ErrorsFound = true; } } if (errFlag) { - ShowSevereError(state, EnergyPlus::format("GetZoneAirSetpoints: Errors with invalid names in {} objects.", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("GetZoneAirSetpoints: Errors with invalid names in {} objects.", s_ipsc->cCurrentModuleObject)); ShowContinueError(state, "...These will not be read in. Other errors may occur."); state.dataZoneCtrls->NumComfortControlledZones = 0; } @@ -1003,11 +1006,11 @@ void GetZoneAirSetPoints(EnergyPlusData &state) // Could not find a people object for this particular zone if (IZoneCount == 0 && comfortZone.ActualZoneNum > 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{} no PEOPLE in {}=\"{}\" - cannot use Comfort Control.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{} no PEOPLE in {}=\"{}\" - cannot use Comfort Control.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } @@ -1045,42 +1048,41 @@ void GetZoneAirSetPoints(EnergyPlusData &state) // Check activity level if (people.activityLevelSched == nullptr) { - ShowSevereError(state, EnergyPlus::format("GetPeople Activity Level: Activity level schedule is not found={}", people.Name)); + ShowSevereError(state, std::format("GetPeople Activity Level: Activity level schedule is not found={}", people.Name)); ShowContinueError(state, "Required when the zone has Thermal Comfort Controls."); ErrorsFound = true; } else if (!people.activityLevelSched->checkMinMaxVals(state, Clusive::In, 72.0, Clusive::In, 909.0)) { ShowSevereError(state, "GetPeople Activity Level: Invalid activity level values entered for thermal comfort calculation"); - ShowContinueError(state, EnergyPlus::format("Outside of range values [72,909], Reference object={}", people.Name)); + ShowContinueError(state, std::format("Outside of range values [72,909], Reference object={}", people.Name)); } // Check Work Efficiency if (people.workEffSched == nullptr) { - ShowSevereError(state, - EnergyPlus::format("GetPeople work efficiency: Work efficiency schedule is not found={}", people.Name)); + ShowSevereError(state, std::format("GetPeople work efficiency: Work efficiency schedule is not found={}", people.Name)); ShowContinueError(state, "Required when the zone has Thermal Comfort Controls."); ErrorsFound = true; } else if (!people.workEffSched->checkMinMaxVals(state, Clusive::In, 0.0, Clusive::In, 1.0)) { ShowSevereError(state, "GetPeople work efficiency: Invalid work efficiency values entered for thermal comfort calculation"); - ShowContinueError(state, EnergyPlus::format("Outside of range values [0,1], Reference object={}", people.Name)); + ShowContinueError(state, std::format("Outside of range values [0,1], Reference object={}", people.Name)); ErrorsFound = true; } // Check Clothing Insulation if (people.clothingSched == nullptr) { - ShowSevereError( - state, EnergyPlus::format("GetPeople Clothing Insulation: Clothing Insulation schedule is not found={}", people.Name)); + ShowSevereError(state, + std::format("GetPeople Clothing Insulation: Clothing Insulation schedule is not found={}", people.Name)); ShowContinueError(state, "Required when the zone has Thermal Comfort Controls."); ErrorsFound = true; } else if (!people.clothingSched->checkMinMaxVals(state, Clusive::In, 0.0, Clusive::In, 2.0)) { ShowSevereError(state, "GetPeople Clothing Insulation: Invalid Clothing Insulation values entered for thermal comfort calculation"); - ShowContinueError(state, EnergyPlus::format("Outside of range values [0.0,2.0], Reference object={}", people.Name)); + ShowContinueError(state, std::format("Outside of range values [0.0,2.0], Reference object={}", people.Name)); ErrorsFound = true; } // Check Air velocity if (people.airVelocitySched == nullptr) { - ShowSevereError(state, EnergyPlus::format("GetPeople Air Velocity: Air velocity schedule is not found={}", people.Name)); + ShowSevereError(state, std::format("GetPeople Air Velocity: Air velocity schedule is not found={}", people.Name)); ShowContinueError(state, "Required when the zone has Thermal Comfort Controls."); ErrorsFound = true; } @@ -1091,11 +1093,11 @@ void GetZoneAirSetPoints(EnergyPlusData &state) comfortZone.TdbMinSetPoint = s_ipsc->rNumericArgs(1); if (s_ipsc->rNumericArgs(1) > 50 || s_ipsc->rNumericArgs(1) < 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{} invalid {}=[{:.0T}].", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(1), - s_ipsc->rNumericArgs(1))); + std::format("{}=\"{} invalid {}=[{:.0f}].", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(1), + s_ipsc->rNumericArgs(1))); ShowContinueError(state, "..Allowable values must be between 0 C and 50 C"); ErrorsFound = true; } @@ -1104,26 +1106,26 @@ void GetZoneAirSetPoints(EnergyPlusData &state) comfortZone.TdbMaxSetPoint = s_ipsc->rNumericArgs(2); if (s_ipsc->rNumericArgs(2) > 50 || s_ipsc->rNumericArgs(2) < 0) { ShowSevereError(state, - EnergyPlus::format("{}=\"{} invalid {}=[{:.0T}].", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cNumericFieldNames(2), - s_ipsc->rNumericArgs(2))); + std::format("{}=\"{} invalid {}=[{:.0f}].", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cNumericFieldNames(2), + s_ipsc->rNumericArgs(2))); ShowContinueError(state, "..Allowable values must be between 0 C and 50 C"); ErrorsFound = true; } } // Ensure MaxTemp >= MinTemp if (comfortZone.TdbMinSetPoint > comfortZone.TdbMaxSetPoint) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("..{} > {}", s_ipsc->cNumericFieldNames(1), s_ipsc->cNumericFieldNames(2))); - ShowContinueError(state, EnergyPlus::format("..[{:.0T}] > [{:.0T}].", s_ipsc->rNumericArgs(1), s_ipsc->rNumericArgs(2))); + ShowSevereError(state, std::format("{}=\"{}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("..{} > {}", s_ipsc->cNumericFieldNames(1), s_ipsc->cNumericFieldNames(2))); + ShowContinueError(state, std::format("..[{:.0f}] > [{:.0f}].", s_ipsc->rNumericArgs(1), s_ipsc->rNumericArgs(2))); ErrorsFound = true; } // If MaxTemp = MinTemp, no thermal comfort control if (comfortZone.TdbMinSetPoint == comfortZone.TdbMaxSetPoint) { - ShowSevereError(state, EnergyPlus::format("{}=\"{}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); - ShowContinueError(state, EnergyPlus::format("..{} = {}", s_ipsc->cNumericFieldNames(1), s_ipsc->cNumericFieldNames(2))); + ShowSevereError(state, std::format("{}=\"{}", s_ipsc->cCurrentModuleObject, s_ipsc->cAlphaArgs(1))); + ShowContinueError(state, std::format("..{} = {}", s_ipsc->cNumericFieldNames(1), s_ipsc->cNumericFieldNames(2))); ShowContinueError(state, "The zone will be controlled using this dry-bulb temperature setpoint."); } @@ -1374,7 +1376,7 @@ void GetZoneAirSetPoints(EnergyPlusData &state) if (SchedMin == (int)HVAC::SetptType::Uncontrolled && SchedMax == (int)HVAC::SetptType::Uncontrolled) { if (FindNumberInList(comfortZone.setptTypeSched->Num, CCmSchedMapToControlledZone, state.dataZoneCtrls->NumComfortControlledZones) == 0) { - ShowWarningError(state, EnergyPlus::format("Control Type Schedule={}", comfortZone.setptTypeSched->Name)); + ShowWarningError(state, std::format("Control Type Schedule={}", comfortZone.setptTypeSched->Name)); ShowContinueError(state, "..specifies control type 0 for all entries."); ShowContinueError(state, "All zones using this Control Type Schedule have no thermal comfort control."); } @@ -1393,13 +1395,12 @@ void GetZoneAirSetPoints(EnergyPlusData &state) (setptType == HVAC::SetptType::SingleHeat || setptType == HVAC::SetptType::SingleHeatCool || setptType == HVAC::SetptType::DualHeatCool) && comfortZone.setptTypeSched->hasVal(state, (int)setptType)) { - ShowSevereError(state, EnergyPlus::format("Control Type Schedule={}", comfortZone.setptTypeSched->Name)); - ShowContinueError(state, - EnergyPlus::format("..specifies {} ({}) as the control type. Not valid for this zone.", - (int)setptType, - setptTypeNames[(int)setptType])); - ShowContinueError(state, EnergyPlus::format("..reference {}={}", cZControlTypes((int)ZoneControlTypes::TStat), comfortZone.Name)); - ShowContinueError(state, EnergyPlus::format("..reference ZONE={}", comfortZone.ZoneName)); + ShowSevereError(state, std::format("Control Type Schedule={}", comfortZone.setptTypeSched->Name)); + ShowContinueError( + state, + std::format("..specifies {} ({}) as the control type. Not valid for this zone.", (int)setptType, setptTypeNames[(int)setptType])); + ShowContinueError(state, std::format("..reference {}={}", cZControlTypes((int)ZoneControlTypes::TStat), comfortZone.Name)); + ShowContinueError(state, std::format("..reference ZONE={}", comfortZone.ZoneName)); ErrorsFound = true; } @@ -1407,13 +1408,12 @@ void GetZoneAirSetPoints(EnergyPlusData &state) (setptType == HVAC::SetptType::SingleCool || setptType == HVAC::SetptType::SingleHeatCool || setptType == HVAC::SetptType::DualHeatCool) && comfortZone.setptTypeSched->hasVal(state, (int)setptType)) { - ShowSevereError(state, EnergyPlus::format("Control Type Schedule={}", comfortZone.setptTypeSched->Name)); - ShowContinueError(state, - EnergyPlus::format("..specifies {} ({}) as the control type. Not valid for this zone.", - (int)setptType, - setptTypeNames[(int)setptType])); - ShowContinueError(state, EnergyPlus::format("..reference {}={}", cZControlTypes((int)ZoneControlTypes::TStat), comfortZone.Name)); - ShowContinueError(state, EnergyPlus::format("..reference ZONE={}", comfortZone.ZoneName)); + ShowSevereError(state, std::format("Control Type Schedule={}", comfortZone.setptTypeSched->Name)); + ShowContinueError( + state, + std::format("..specifies {} ({}) as the control type. Not valid for this zone.", (int)setptType, setptTypeNames[(int)setptType])); + ShowContinueError(state, std::format("..reference {}={}", cZControlTypes((int)ZoneControlTypes::TStat), comfortZone.Name)); + ShowContinueError(state, std::format("..reference ZONE={}", comfortZone.ZoneName)); ErrorsFound = true; } } // for (setptType) @@ -1437,12 +1437,11 @@ void GetZoneAirSetPoints(EnergyPlusData &state) continue; } - ShowWarningError(state, EnergyPlus::format("Schedule={}", comfortZone.setptTypeSched->Name)); + ShowWarningError(state, std::format("Schedule={}", comfortZone.setptTypeSched->Name)); ShowContinueError( - state, - EnergyPlus::format("...should include control type {} ({}) but does not.", (int)setptType, comfortSetptTypeNames[(int)setptType])); - ShowContinueError(state, EnergyPlus::format("..reference {}={}", cZControlTypes((int)ZoneControlTypes::TCTStat), comfortZone.Name)); - ShowContinueError(state, EnergyPlus::format("...reference ZONE={}", comfortZone.ZoneName)); + state, std::format("...should include control type {} ({}) but does not.", (int)setptType, comfortSetptTypeNames[(int)setptType])); + ShowContinueError(state, std::format("..reference {}={}", cZControlTypes((int)ZoneControlTypes::TCTStat), comfortZone.Name)); + ShowContinueError(state, std::format("...reference ZONE={}", comfortZone.ZoneName)); } } @@ -1523,11 +1522,11 @@ void GetZoneAirSetPoints(EnergyPlusData &state) } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\" invalid {}=\"{}\" not found.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } } @@ -1750,10 +1749,10 @@ void GetZoneAirSetPoints(EnergyPlusData &state) // throw error } else { ShowSevereError(state, - EnergyPlus::format("{}={} invalid {} reference not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - cZControlTypes(static_cast(ZoneControlTypes::TStat)))); + std::format("{}={} invalid {} reference not found.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + cZControlTypes(static_cast(ZoneControlTypes::TStat)))); ErrorsFound = true; } } // loop over NumOpTempControlledZones @@ -1788,10 +1787,10 @@ void GetZoneAirSetPoints(EnergyPlusData &state) found = Util::FindItem(s_ipsc->cAlphaArgs(1), state.dataZoneCtrls->TempControlledZone); if (found == 0) { // throw error ShowSevereError(state, - EnergyPlus::format("{}={} invalid {} reference not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - cZControlTypes(static_cast(ZoneControlTypes::TStat)))); + std::format("{}={} invalid {} reference not found.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + cZControlTypes(static_cast(ZoneControlTypes::TStat)))); ErrorsFound = true; } else { TempControlledZoneNum = found; @@ -1963,17 +1962,17 @@ void GetZoneAirSetPoints(EnergyPlusData &state) state.dataZoneCtrls->StagedTStatObjects(Item).ZoneOrZoneListPtr = ZLItem; } else { ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" not found.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); + std::format("{}=\"{}\" invalid {}=\"{}\" not found.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); ErrorsFound = true; } } if (ErrorsFound) { - ShowSevereError(state, EnergyPlus::format("GetStagedDualSetpoint: Errors with invalid names in {} objects.", s_ipsc->cCurrentModuleObject)); + ShowSevereError(state, std::format("GetStagedDualSetpoint: Errors with invalid names in {} objects.", s_ipsc->cCurrentModuleObject)); ShowContinueError(state, "...These will not be read in. Other errors may occur."); s_ztpc->NumStageCtrZone = 0; } @@ -2025,14 +2024,14 @@ void GetZoneAirSetPoints(EnergyPlusData &state) } else { stageZone.ZoneName = s_ipsc->cAlphaArgs(2); // for continuity ShowSevereError(state, - EnergyPlus::format("{}=\"{}\" invalid {}=\"{}\" zone previously assigned.", - s_ipsc->cCurrentModuleObject, - s_ipsc->cAlphaArgs(1), - s_ipsc->cAlphaFieldNames(2), - s_ipsc->cAlphaArgs(2))); - ShowContinueError(state, - EnergyPlus::format("...Zone was previously assigned to Setpt=\"{}\".", - state.dataZoneCtrls->StageControlledZone(ZoneAssigned).Name)); + std::format("{}=\"{}\" invalid {}=\"{}\" zone previously assigned.", + s_ipsc->cCurrentModuleObject, + s_ipsc->cAlphaArgs(1), + s_ipsc->cAlphaFieldNames(2), + s_ipsc->cAlphaArgs(2))); + ShowContinueError( + state, + std::format("...Zone was previously assigned to Setpt=\"{}\".", state.dataZoneCtrls->StageControlledZone(ZoneAssigned).Name)); ErrorsFound = true; continue; } @@ -2163,8 +2162,7 @@ void GetZoneAirSetPoints(EnergyPlusData &state) (s_ip->getNumObjectsFound(state, "SetpointManager:SingleZone:OneStageCooling") == 0) && (s_ip->getNumObjectsFound(state, "SetpointManager:SingleZone:OneStageHeating") == 0)) { ShowWarningError( - state, - EnergyPlus::format("{} is applicable to only selected HVAC objects which are missing from input.", s_ipsc->cCurrentModuleObject)); + state, std::format("{} is applicable to only selected HVAC objects which are missing from input.", s_ipsc->cCurrentModuleObject)); ShowContinueError(state, "Model should include one or more of the following objects: "); ShowContinueError(state, "AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed, AirLoopHVAC:UnitarySystem, "); ShowContinueError( @@ -2273,8 +2271,8 @@ void CalculateMonthlyRunningAverageDryBulb(EnergyPlusData &state, Array1DSurfTAirRef(SurfNum) != TRefFlag) { ShowWarningError(state, - EnergyPlus::format("Different reference air temperatures for difference surfaces encountered in zone {}", - state.dataHeatBal->Zone(zoneNum).Name)); + std::format("Different reference air temperatures for difference surfaces encountered in zone {}", + state.dataHeatBal->Zone(zoneNum).Name)); } } } @@ -2686,10 +2684,9 @@ void InitZoneAirSetPoints(EnergyPlusData &state) auto &tempZone = state.dataZoneCtrls->TempControlledZone(Loop); if (state.dataZoneEquip->ZoneEquipInputsFilled && !s_ztpc->ControlledZonesChecked) { if (!VerifyControlledZoneForThermostat(state, tempZone.ZoneName)) { - ShowSevereError(state, - EnergyPlus::format("{}Zone=\"{}\" has specified a Thermostatic control but is not a controlled zone.", - RoutineName, - tempZone.ZoneName)); + ShowSevereError( + state, + std::format("{}Zone=\"{}\" has specified a Thermostatic control but is not a controlled zone.", RoutineName, tempZone.ZoneName)); ShowContinueError(state, "...must have a ZoneHVAC:EquipmentConnections specification for this zone."); s_ztpc->ErrorsFound = true; } @@ -2748,10 +2745,9 @@ void InitZoneAirSetPoints(EnergyPlusData &state) auto const &comfortZone = state.dataZoneCtrls->ComfortControlledZone(Loop); if (state.dataZoneEquip->ZoneEquipInputsFilled && !s_ztpc->ControlledZonesChecked) { if (!VerifyControlledZoneForThermostat(state, comfortZone.ZoneName)) { - ShowSevereError(state, - EnergyPlus::format("{}Zone=\"{}\" has specified a Comfort control but is not a controlled zone.", - RoutineName, - comfortZone.ZoneName)); + ShowSevereError( + state, + std::format("{}Zone=\"{}\" has specified a Comfort control but is not a controlled zone.", RoutineName, comfortZone.ZoneName)); ShowContinueError(state, "...must have a ZoneHVAC:EquipmentConnections specification for this zone."); s_ztpc->ErrorsFound = true; } @@ -2842,28 +2838,28 @@ void ZoneSpaceHeatBalanceData::beginEnvironmentInit(EnergyPlusData &state) void ZoneSpaceHeatBalanceData::setUpOutputVars(EnergyPlusData &state, std::string_view prefix, std::string const &name) { SetupOutputVariable(state, - EnergyPlus::format("{} Air Temperature", prefix), + std::format("{} Air Temperature", prefix), Constant::Units::C, this->ZT, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - EnergyPlus::format("{} Air Humidity Ratio", prefix), + std::format("{} Air Humidity Ratio", prefix), Constant::Units::None, this->airHumRat, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - EnergyPlus::format("{} Air Relative Humidity", prefix), + std::format("{} Air Relative Humidity", prefix), Constant::Units::Perc, this->airRelHum, OutputProcessor::TimeStepType::System, OutputProcessor::StoreType::Average, name); SetupOutputVariable(state, - EnergyPlus::format("{} Mean Radiant Temperature", prefix), + std::format("{} Mean Radiant Temperature", prefix), Constant::Units::C, this->MRT, OutputProcessor::TimeStepType::Zone, @@ -2934,9 +2930,8 @@ void PredictSystemLoads(EnergyPlusData &state, if (thisStageControlZone.StageErrCount < 2) { ShowWarningError( state, - EnergyPlus::format( - "ZoneControl:Thermostat:StagedDualSetpoint: The heating setpoint is equal to or above the cooling setpoint in {}", - thisStageControlZone.Name)); + std::format("ZoneControl:Thermostat:StagedDualSetpoint: The heating setpoint is equal to or above the cooling setpoint in {}", + thisStageControlZone.Name)); ShowContinueError(state, "The zone heating setpoint is set to the cooling setpoint - 0.1C."); ShowContinueErrorTimeStamp(state, "Occurrence info:"); } else { @@ -3101,7 +3096,7 @@ void PredictSystemLoads(EnergyPlusData &state, "DualSetPointWithDeadBand: When Temperature Difference Between Cutout And Setpoint is applied, the heating " "setpoint is greater than the cooling setpoint. "); ShowContinueErrorTimeStamp( - state, EnergyPlus::format("occurs in Zone={}", state.dataHeatBal->Zone(thisTempControlledZone.ActualZoneNum).Name)); + state, std::format("occurs in Zone={}", state.dataHeatBal->Zone(thisTempControlledZone.ActualZoneNum).Name)); ShowContinueError(state, EnergyPlus::format("Zone Heating ThermostatSetPoint={:.2R}", zoneTstatSetpt.setptLo)); ShowContinueError(state, EnergyPlus::format("Zone Cooling ThermostatSetPoint={:.2R}", zoneTstatSetpt.setptHi)); ShowFatalError(state, "Program terminates due to above conditions."); @@ -3566,11 +3561,11 @@ void ZoneSpaceHeatBalanceData::calcPredictedHumidityRatio(EnergyPlusData &state, // The FaultsThermostatOffset specified in the FaultHumidistatOffset is not found if (!IsThermostatFound) { - ShowSevereError(state, - EnergyPlus::format( - "FaultModel:HumidistatOffset = \"{}\" invalid Reference Humidistat Offset Name = \"{}\" not found.", - state.dataFaultsMgr->FaultsHumidistatOffset(iFault).Name, - state.dataFaultsMgr->FaultsHumidistatOffset(iFault).FaultyThermostatName)); + ShowSevereError( + state, + std::format("FaultModel:HumidistatOffset = \"{}\" invalid Reference Humidistat Offset Name = \"{}\" not found.", + state.dataFaultsMgr->FaultsHumidistatOffset(iFault).Name, + state.dataFaultsMgr->FaultsHumidistatOffset(iFault).FaultyThermostatName)); ShowFatalError(state, "Errors getting FaultModel input data. Preceding condition(s) cause termination."); } @@ -3629,9 +3624,9 @@ void ZoneSpaceHeatBalanceData::calcPredictedHumidityRatio(EnergyPlusData &state, // Run-time error check if (ZoneRHHumidifyingSetPoint > ZoneRHDehumidifyingSetPoint) { if (humidityControlZone.ErrorIndex == 0) { - ShowWarningMessage(state, - EnergyPlus::format("HUMIDISTAT: The humidifying setpoint is above the dehumidifying setpoint in {}", - humidityControlZone.ControlName)); + ShowWarningMessage( + state, + std::format("HUMIDISTAT: The humidifying setpoint is above the dehumidifying setpoint in {}", humidityControlZone.ControlName)); ShowContinueError(state, "The zone humidifying setpoint is set to the dehumidifying setpoint."); ShowContinueErrorTimeStamp(state, "Occurrence info:"); } @@ -3798,7 +3793,7 @@ void ZoneSpaceHeatBalanceData::calcPredictedHumidityRatio(EnergyPlusData &state, } else { // this should never occur! ShowSevereError( state, "Humidistat: Unanticipated combination of humidifying and dehumidifying loads - report to EnergyPlus Development Team"); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("occurs in Zone = {}", thisZone.Name)); + ShowContinueErrorTimeStamp(state, std::format("occurs in Zone = {}", thisZone.Name)); ShowContinueError(state, EnergyPlus::format("LoadToHumidifySetPoint={:.5R}, LoadToDehumidifySetPoint={:.5R}", LoadToHumidifySetPoint, @@ -4990,7 +4985,7 @@ void processInverseModelMultpHM(EnergyPlusData &state, multiplierHM = minHMMultValue; } else if (multiplierHM > maxHMMultValue) { // as per suggestions in Defect #10508, only warn if greater than the max if (thisZoneHB.hmThermalMassMultErrIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("Hybrid model thermal mass multiplier higher than the limit for {}", zone.Name)); + ShowWarningMessage(state, std::format("Hybrid model thermal mass multiplier higher than the limit for {}", zone.Name)); ShowContinueError(state, "This means that the ratio of the zone air heat capacity for the current time step to the"); ShowContinueError(state, EnergyPlus::format("zone air heat storage is higher than the maximum limit of {:.1R}.", maxHMMultValue)); } @@ -5409,8 +5404,7 @@ SumHATOutput SpaceHeatBalanceData::calcSumHAT(EnergyPlusData &state, int const z // check whether this zone is a controlled zone or not if (!thisZone.IsControlled) { ShowFatalError( - state, - EnergyPlus::format("Zones must be controlled for Ceiling-Diffuser Convection model. No system serves zone {}", thisZone.Name)); + state, std::format("Zones must be controlled for Ceiling-Diffuser Convection model. No system serves zone {}", thisZone.Name)); return results; } // determine supply air temperature as a weighted average of the inlet temperatures. @@ -5676,7 +5670,7 @@ void CalcZoneComponentLoadSums(EnergyPlusData &state, if ((std::abs(thisAirRpt.imBalance) > Threshold) && (!state.dataGlobal->WarmupFlag) && (!state.dataGlobal->DoingSizing)) { // air balance is out by more than threshold if (thisZone.AirHBimBalanceErrIndex == 0) { - ShowWarningMessage(state, EnergyPlus::format("Zone Air Heat Balance is out of balance for zone named {}", thisZone.Name)); + ShowWarningMessage(state, std::format("Zone Air Heat Balance is out of balance for zone named {}", thisZone.Name)); ShowContinueError(state, EnergyPlus::format("Zone Air Heat Balance Deviation Rate is more than {:.1R} {{W}}", Threshold)); if (state.dataHVACGlobal->TurnFansOn) { ShowContinueError(state, "Night cycle fan operation may be causing above error"); @@ -5685,7 +5679,7 @@ void CalcZoneComponentLoadSums(EnergyPlusData &state, ShowContinueErrorTimeStamp(state, " Occurrence info:"); } ShowRecurringWarningErrorAtEnd(state, - EnergyPlus::format("Zone Air Heat Balance is out of balance ... zone named {}", thisZone.Name), + std::format("Zone Air Heat Balance is out of balance ... zone named {}", thisZone.Name), thisZone.AirHBimBalanceErrIndex, std::abs(thisAirRpt.imBalance) - Threshold, std::abs(thisAirRpt.imBalance) - Threshold, @@ -6052,11 +6046,10 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) if (zoneComfortControlsFanger.LowPMV > zoneComfortControlsFanger.HighPMV) { ++zoneComfortControlsFanger.DualPMVErrCount; if (zoneComfortControlsFanger.DualPMVErrCount < 2) { - ShowWarningError( - state, - EnergyPlus::format("ThermostatSetpoint:ThermalComfort:Fanger:DualSetpoint: The heating PMV setpoint is above the " - "cooling PMV setpoint in {}", - comfortZone.setpts[(int)HVAC::SetptType::DualHeatCool].Name)); + ShowWarningError(state, + std::format("ThermostatSetpoint:ThermalComfort:Fanger:DualSetpoint: The heating PMV setpoint is above the " + "cooling PMV setpoint in {}", + comfortZone.setpts[(int)HVAC::SetptType::DualHeatCool].Name)); ShowContinueError(state, "The zone dual heating PMV setpoint is set to the dual cooling PMV setpoint."); ShowContinueErrorTimeStamp(state, "Occurrence info:"); } else { @@ -6071,12 +6064,11 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) } break; default: { - ShowSevereError( - state, - EnergyPlus::format("CalcZoneAirTempSetpoints: Illegal thermal control control type for Zone={}, Found value={}, in Schedule={}", - zone.Name, - s_hbfs->ComfortControlTypeRpt(ActualZoneNum), - comfortZone.setptTypeSched->Name)); + ShowSevereError(state, + std::format("CalcZoneAirTempSetpoints: Illegal thermal control control type for Zone={}, Found value={}, in Schedule={}", + zone.Name, + s_hbfs->ComfortControlTypeRpt(ActualZoneNum), + comfortZone.setptTypeSched->Name)); } break; } // switch @@ -6153,9 +6145,9 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) if (comfortZone.PeopleAverageErrIndex == 0) { ShowWarningMessage( state, - EnergyPlus::format("ZoneControl:Thermostat:ThermalComfort: The total number of people in Zone = {} is zero. The People " - "Average option is not used.", - zone.Name)); + std::format("ZoneControl:Thermostat:ThermalComfort: The total number of people in Zone = {} is zero. The People " + "Average option is not used.", + zone.Name)); ShowContinueError(state, "The Object Average option is used instead. Simulation continues ....."); ShowContinueErrorTimeStamp(state, "Occurrence info:"); } @@ -6209,11 +6201,10 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) if (SetPointLo < comfortZone.TdbMinSetPoint) { SetPointLo = comfortZone.TdbMinSetPoint; if (comfortZone.TdbMinErrIndex < 2) { - ShowWarningMessage( - state, - EnergyPlus::format("ThermostatSetpoint:ThermalComfort:Fanger:SingleHeating temperature is below the Minimum dry-bulb " - "temperature setpoint {}", - comfortZone.Name)); + ShowWarningMessage(state, + std::format("ThermostatSetpoint:ThermalComfort:Fanger:SingleHeating temperature is below the Minimum dry-bulb " + "temperature setpoint {}", + comfortZone.Name)); ShowContinueError(state, "The zone heating setpoint is set to the Minimum dry-bulb temperature setpoint"); ShowContinueErrorTimeStamp(state, "Occurrence info:"); } @@ -6234,11 +6225,10 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) if (SetPointLo > comfortZone.TdbMaxSetPoint) { SetPointLo = comfortZone.TdbMaxSetPoint; if (comfortZone.TdbMaxErrIndex == 0) { - ShowWarningMessage( - state, - EnergyPlus::format("ThermostatSetpoint:ThermalComfort:Fanger:SingleCooling temperature is above the Maximum dry-bulb " - "temperature setpoint {}", - comfortZone.Name)); + ShowWarningMessage(state, + std::format("ThermostatSetpoint:ThermalComfort:Fanger:SingleCooling temperature is above the Maximum dry-bulb " + "temperature setpoint {}", + comfortZone.Name)); ShowContinueError(state, "The zone cooling setpoint is set to the Maximum dry-bulb temperature setpoint"); ShowContinueErrorTimeStamp(state, "Occurrence info:"); } @@ -6269,9 +6259,9 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) if (comfortZone.TdbHCErrIndex == 0) { ShowWarningMessage( state, - EnergyPlus::format("ThermostatSetpoint:ThermalComfort:Fanger:SingleHeatingOrCooling temperature is above the Maximum or " - "below the Minimum dry-bulb temperature setpoint {}", - comfortZone.Name)); + std::format("ThermostatSetpoint:ThermalComfort:Fanger:SingleHeatingOrCooling temperature is above the Maximum or " + "below the Minimum dry-bulb temperature setpoint {}", + comfortZone.Name)); ShowContinueError(state, "The zone setpoint is set to the Maximum dry-bulb temperature setpoint if above or the Minimum " "dry-bulb temperature setpoint if below"); @@ -6296,11 +6286,10 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) SetPointLo = comfortZone.TdbMinSetPoint; if (comfortZone.TdbDualMinErrIndex == 0) { - ShowWarningMessage( - state, - EnergyPlus::format("ThermostatSetpoint:ThermalComfort:Fanger:DualSetpoint temperature is below the Minimum dry-bulb " - "temperature setpoint {}", - comfortZone.Name)); + ShowWarningMessage(state, + std::format("ThermostatSetpoint:ThermalComfort:Fanger:DualSetpoint temperature is below the Minimum dry-bulb " + "temperature setpoint {}", + comfortZone.Name)); ShowContinueError(state, "The zone dual heating setpoint is set to the Minimum dry-bulb temperature setpoint"); ShowContinueErrorTimeStamp(state, "Occurrence info:"); } @@ -6314,11 +6303,10 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) if (SetPointHi > comfortZone.TdbMaxSetPoint) { SetPointHi = comfortZone.TdbMaxSetPoint; if (comfortZone.TdbDualMaxErrIndex == 0) { - ShowWarningMessage( - state, - EnergyPlus::format("ThermostatSetpoint:ThermalComfort:Fanger:DualSetpoint temperature is above the Maximum dry-bulb " - "temperature setpoint in zone = {}", - comfortZone.Name)); + ShowWarningMessage(state, + std::format("ThermostatSetpoint:ThermalComfort:Fanger:DualSetpoint temperature is above the Maximum dry-bulb " + "temperature setpoint in zone = {}", + comfortZone.Name)); ShowContinueError(state, "The zone dual cooling setpoint is set to the Maximum dry-bulb temperature setpoint"); ShowContinueErrorTimeStamp(state, "Occurrence info:"); } @@ -6339,10 +6327,10 @@ void CalcZoneAirComfortSetPoints(EnergyPlusData &state) default: { ShowSevereError( state, - EnergyPlus::format("CalcZoneAirComfortSetpoints: Illegal thermal control control type for Zone={}, Found value={}, in Schedule={}", - zone.Name, - s_hbfs->ComfortControlTypeRpt(ActualZoneNum), - comfortZone.setptTypeSched->Name)); + std::format("CalcZoneAirComfortSetpoints: Illegal thermal control control type for Zone={}, Found value={}, in Schedule={}", + zone.Name, + s_hbfs->ComfortControlTypeRpt(ActualZoneNum), + comfortZone.setptTypeSched->Name)); } break; } // switch () } @@ -6398,9 +6386,8 @@ void GetComfortSetPoints(EnergyPlusData &state, if (s_ztpc->IterLimitExceededNum1 == 1) { ShowWarningError( state, - EnergyPlus::format( - "{}: Iteration limit exceeded calculating thermal comfort Fanger setpoint and non-converged setpoint is used", - comfortControlledZone.Name)); + std::format("{}: Iteration limit exceeded calculating thermal comfort Fanger setpoint and non-converged setpoint is used", + comfortControlledZone.Name)); } else { ShowRecurringWarningErrorAtEnd(state, comfortControlledZone.Name + ": Iteration limit exceeded calculating thermal comfort setpoint.", @@ -6413,14 +6400,14 @@ void GetComfortSetPoints(EnergyPlusData &state, if (!state.dataGlobal->WarmupFlag) { ++s_ztpc->IterLimitExceededNum2; if (s_ztpc->IterLimitExceededNum2 == 1) { - ShowWarningError(state, - EnergyPlus::format( - "{}: Solution is not found in calculating thermal comfort Fanger setpoint and the minimum setpoint is used", - comfortControlledZone.Name)); + ShowWarningError( + state, + std::format("{}: Solution is not found in calculating thermal comfort Fanger setpoint and the minimum setpoint is used", + comfortControlledZone.Name)); } else { ShowRecurringWarningErrorAtEnd( state, - EnergyPlus::format("{}: Solution is not found in calculating thermal comfort Fanger setpoint.", comfortControlledZone.Name), + std::format("{}: Solution is not found in calculating thermal comfort Fanger setpoint.", comfortControlledZone.Name), s_ztpc->IterLimitErrIndex2, Tset, Tset); @@ -7013,7 +7000,7 @@ void ZoneSpaceHeatBalanceData::calcPredictedSystemLoad(EnergyPlusData &state, Re ShowSevereError(state, "HVAC::SetptType::SingleHeatCool: Effective heating set-point higher than effective cooling set-point - use " "DualSetPointWithDeadBand if using unmixed air model"); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("occurs in Zone={}", thisZone.Name)); + ShowContinueErrorTimeStamp(state, std::format("occurs in Zone={}", thisZone.Name)); ShowContinueError( state, EnergyPlus::format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", LoadToHeatingSetPoint, LoadToCoolingSetPoint)); @@ -7038,7 +7025,7 @@ void ZoneSpaceHeatBalanceData::calcPredictedSystemLoad(EnergyPlusData &state, Re } else { // this should never occur! ShowSevereError(state, "SingleHeatCoolSetPoint: Unanticipated combination of heating and cooling loads - report to EnergyPlus Development Team"); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("occurs in Zone={}", thisZone.Name)); + ShowContinueErrorTimeStamp(state, std::format("occurs in Zone={}", thisZone.Name)); ShowContinueError( state, EnergyPlus::format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", LoadToHeatingSetPoint, LoadToCoolingSetPoint)); @@ -7099,7 +7086,7 @@ void ZoneSpaceHeatBalanceData::calcPredictedSystemLoad(EnergyPlusData &state, Re ShowSevereError(state, "DualSetPointWithDeadBand: Effective heating set-point higher than effective cooling set-point - increase " "deadband if using unmixed air model"); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("occurs in Zone={}", thisZone.Name)); + ShowContinueErrorTimeStamp(state, std::format("occurs in Zone={}", thisZone.Name)); ShowContinueError( state, EnergyPlus::format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", LoadToHeatingSetPoint, LoadToCoolingSetPoint)); @@ -7128,7 +7115,7 @@ void ZoneSpaceHeatBalanceData::calcPredictedSystemLoad(EnergyPlusData &state, Re } else { // this should never occur! ShowSevereError( state, "DualSetPointWithDeadBand: Unanticipated combination of heating and cooling loads - report to EnergyPlus Development Team"); - ShowContinueErrorTimeStamp(state, EnergyPlus::format("occurs in Zone={}", thisZone.Name)); + ShowContinueErrorTimeStamp(state, std::format("occurs in Zone={}", thisZone.Name)); ShowContinueError( state, EnergyPlus::format("LoadToHeatingSetPoint={:.3R}, LoadToCoolingSetPoint={:.3R}", LoadToHeatingSetPoint, LoadToCoolingSetPoint)); diff --git a/src/EnergyPlus/api/EnergyPlusPgm.cc b/src/EnergyPlus/api/EnergyPlusPgm.cc index 3f864c79a1d..f994901d0ef 100644 --- a/src/EnergyPlus/api/EnergyPlusPgm.cc +++ b/src/EnergyPlus/api/EnergyPlusPgm.cc @@ -178,6 +178,7 @@ // C++ Headers #include +#include #include #include #include @@ -200,14 +201,11 @@ #include #include #include -#include #include #include #include #include -#include #include -#include #include #include #include @@ -232,7 +230,7 @@ int EnergyPlusPgm(const std::vector &args, std::string const &filep std::string datestring; // supposedly returns blank when no date available. date_and_time(datestring, _, _, value); if (!datestring.empty()) { - state.dataStrGlobals->CurrentDateTime = fmt::format(" YMD={:4}.{:02}.{:02} {:02}:{:02}", value(1), value(2), value(3), value(5), value(6)); + state.dataStrGlobals->CurrentDateTime = std::format(" YMD={:4}.{:02}.{:02} {:02}:{:02}", value(1), value(2), value(3), value(5), value(6)); } else { state.dataStrGlobals->CurrentDateTime = " unknown date/time"; } @@ -524,7 +522,7 @@ std::string CreateCurrentDateTimeString() date_and_time(datestring, _, _, value); if (!datestring.empty()) { - return EnergyPlus::format(" YMD={:4}.{:02}.{:02} {:02}:{:02}", value(1), value(2), value(3), value(5), value(6)); + return std::format(" YMD={:4}.{:02}.{:02} {:02}:{:02}", value(1), value(2), value(3), value(5), value(6)); } return " unknown date/time"; } diff --git a/src/EnergyPlus/api/datatransfer.cc b/src/EnergyPlus/api/datatransfer.cc index 2a1e6f94bb0..e5f39d092af 100644 --- a/src/EnergyPlus/api/datatransfer.cc +++ b/src/EnergyPlus/api/datatransfer.cc @@ -45,11 +45,15 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers #include +#include +// ObjexxFCL Headers #include #include +// EnergyPlus Headers #include #include #include @@ -62,7 +66,6 @@ #include #include #include -#include #include #include #include @@ -362,7 +365,7 @@ Real64 getVariableValue(EnergyPlusState state, const int handle) } else { // must be running from python plugin, need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return zero - ShowSevereError(*thisState, fmt::format("Data Exchange API: Error in getVariableValue; received handle: {}", handle)); + ShowSevereError(*thisState, EnergyPlus::format("Data Exchange API: Error in getVariableValue; received handle: {}", handle)); ShowContinueError(*thisState, "The getVariableValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); } @@ -375,7 +378,7 @@ Real64 getVariableValue(EnergyPlusState state, const int handle) } else { // must be running from python plugin, need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return zero - ShowSevereError(*thisState, fmt::format("Data Exchange API: Index error in getVariableValue; received handle: {}", handle)); + ShowSevereError(*thisState, EnergyPlus::format("Data Exchange API: Index error in getVariableValue; received handle: {}", handle)); ShowContinueError(*thisState, "The getVariableValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); } @@ -401,7 +404,7 @@ Real64 getMeterValue(EnergyPlusState state, int handle) } else { // must be running from python plugin, need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return zero - ShowSevereError(*thisState, fmt::format("Data Exchange API: Index error in getMeterValue; received handle: {}", handle)); + ShowSevereError(*thisState, EnergyPlus::format("Data Exchange API: Index error in getMeterValue; received handle: {}", handle)); ShowContinueError(*thisState, "The getMeterValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); } thisState->dataPluginManager->apiErrorFlag = true; @@ -440,23 +443,25 @@ int getActuatorHandle(EnergyPlusState state, const char *componentType, const ch "Data Exchange API: An EnergyManagementSystem:Actuator seems to be already defined in the EnergyPlus File and named '" + usedActuator.Name + "'."); ShowContinueError( - *thisState, fmt::format("Occurred for componentType='{}', controlType='{}', uniqueKey='{}'.", typeUC, controlUC, keyUC)); + *thisState, + EnergyPlus::format("Occurred for componentType='{}', controlType='{}', uniqueKey='{}'.", typeUC, controlUC, keyUC)); ShowContinueError(*thisState, - fmt::format("The getActuatorHandle function will still return the handle (= {}) but caller " - "should take note that there is a risk of overwriting.", - handle)); + EnergyPlus::format("The getActuatorHandle function will still return the handle (= {}) but caller " + "should take note that there is a risk of overwriting.", + handle)); foundActuator = true; break; } } if (!foundActuator) { ShowWarningError(*thisState, "Data Exchange API: You seem to already have tried to get an Actuator Handle on this one."); + ShowContinueError( + *thisState, + EnergyPlus::format("Occurred for componentType='{}', controlType='{}', uniqueKey='{}'.", typeUC, controlUC, keyUC)); ShowContinueError(*thisState, - fmt::format("Occurred for componentType='{}', controlType='{}', uniqueKey='{}'.", typeUC, controlUC, keyUC)); - ShowContinueError(*thisState, - fmt::format("The getActuatorHandle function will still return the handle (= {}) but caller should " - "take note that there is a risk of overwriting.", - handle)); + EnergyPlus::format("The getActuatorHandle function will still return the handle (= {}) but caller should " + "take note that there is a risk of overwriting.", + handle)); } } ++availActuator.handleCount; @@ -480,7 +485,7 @@ void resetActuator(EnergyPlusState state, int handle) } else { // must be running from python plugin, need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - ShowSevereError(*thisState, fmt::format("Data Exchange API: index error in resetActuator; received handle: {}", handle)); + ShowSevereError(*thisState, EnergyPlus::format("Data Exchange API: index error in resetActuator; received handle: {}", handle)); ShowContinueError(*thisState, "The resetActuator function will return to allow the plugin to finish, then EnergyPlus will abort"); } thisState->dataPluginManager->apiErrorFlag = true; @@ -509,7 +514,7 @@ void setActuatorValue(EnergyPlusState state, const int handle, const Real64 valu } else { // must be running from python plugin, need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return - ShowSevereError(*thisState, fmt::format("Data Exchange API: index error in setActuatorValue; received handle: {}", handle)); + ShowSevereError(*thisState, EnergyPlus::format("Data Exchange API: index error in setActuatorValue; received handle: {}", handle)); ShowContinueError(*thisState, "The setActuatorValue function will return to allow the plugin to finish, then EnergyPlus will abort"); } thisState->dataPluginManager->apiErrorFlag = true; @@ -539,7 +544,7 @@ Real64 getActuatorValue(EnergyPlusState state, const int handle) } else { // must be running from python plugin, need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return 0 - ShowSevereError(*thisState, fmt::format("Data Exchange API: index error in getActuatorValue; received handle: {}", handle)); + ShowSevereError(*thisState, EnergyPlus::format("Data Exchange API: index error in getActuatorValue; received handle: {}", handle)); ShowContinueError(*thisState, "The getActuatorValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); } @@ -589,7 +594,7 @@ Real64 getInternalVariableValue(EnergyPlusState state, int handle) } else { // must be running from python plugin, need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return 0 - ShowSevereError(*thisState, fmt::format("Data Exchange API: index error in getInternalVariableValue; received handle: {}", handle)); + ShowSevereError(*thisState, EnergyPlus::format("Data Exchange API: index error in getInternalVariableValue; received handle: {}", handle)); ShowContinueError(*thisState, "The getInternalVariableValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); } @@ -622,7 +627,7 @@ Real64 getEMSGlobalVariableValue(EnergyPlusState state, int handle) // need to fatal out once the process is done // throw an error, set the fatal flag, and then return 0 EnergyPlus::ShowSevereError( - *thisState, fmt::format("Data Exchange API: Problem -- index error in getEMSGlobalVariableValue; received handle: {}", handle)); + *thisState, EnergyPlus::format("Data Exchange API: Problem -- index error in getEMSGlobalVariableValue; received handle: {}", handle)); EnergyPlus::ShowContinueError( *thisState, "The getEMSGlobalVariableValue function will return 0 for now to allow the process to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; @@ -640,7 +645,7 @@ void setEMSGlobalVariableValue(EnergyPlusState state, int handle, Real64 value) // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return EnergyPlus::ShowSevereError( - *thisState, fmt::format("Data Exchange API: Problem -- index error in setEMSGlobalVariableValue; received handle: {}", handle)); + *thisState, EnergyPlus::format("Data Exchange API: Problem -- index error in setEMSGlobalVariableValue; received handle: {}", handle)); EnergyPlus::ShowContinueError(*thisState, "The setEMSGlobalVariableValue function will return to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; @@ -661,7 +666,7 @@ Real64 getPluginGlobalVariableValue(EnergyPlusState state, int handle) // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return 0 ShowSevereError(*thisState, - fmt::format("Data Exchange API: Problem -- index error in getPluginGlobalVariableValue; received handle: {}", handle)); + EnergyPlus::format("Data Exchange API: Problem -- index error in getPluginGlobalVariableValue; received handle: {}", handle)); ShowContinueError( *thisState, "The getPluginGlobalVariableValue function will return 0 for now to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; @@ -677,7 +682,7 @@ void setPluginGlobalVariableValue(EnergyPlusState state, int handle, Real64 valu // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return ShowSevereError(*thisState, - fmt::format("Data Exchange API: Problem -- index error in setPluginGlobalVariableValue; received handle: {}", handle)); + std::format("Data Exchange API: Problem -- index error in setPluginGlobalVariableValue; received handle: {}", handle)); ShowContinueError(*thisState, "The getPluginGlobalVariableValue function will return to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; @@ -698,7 +703,7 @@ Real64 getPluginTrendVariableValue(EnergyPlusState state, int handle, int timeIn // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return ShowSevereError(*thisState, - fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableValue; received handle: {}", handle)); + std::format("Data Exchange API: Problem -- index error in getPluginTrendVariableValue; received handle: {}", handle)); ShowContinueError(*thisState, "The getPluginTrendVariableValue function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; @@ -709,7 +714,7 @@ Real64 getPluginTrendVariableValue(EnergyPlusState state, int handle, int timeIn // throw an error, set the fatal flag, and then return ShowSevereError( *thisState, - fmt::format("Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableValue; received value: {}", + std::format("Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableValue; received value: {}", timeIndex)); ShowContinueError(*thisState, "The getPluginTrendVariableValue function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); @@ -726,7 +731,7 @@ Real64 getPluginTrendVariableAverage(EnergyPlusState state, int handle, int coun // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return ShowSevereError(*thisState, - fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableAverage; received handle: {}", handle)); + std::format("Data Exchange API: Problem -- index error in getPluginTrendVariableAverage; received handle: {}", handle)); ShowContinueError(*thisState, "The getPluginTrendVariableAverage function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; @@ -737,7 +742,7 @@ Real64 getPluginTrendVariableAverage(EnergyPlusState state, int handle, int coun // throw an error, set the fatal flag, and then return ShowSevereError( *thisState, - fmt::format( + std::format( "Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableAverage; received value: {}", count)); ShowContinueError(*thisState, @@ -755,7 +760,7 @@ Real64 getPluginTrendVariableMin(EnergyPlusState state, int handle, int count) // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return ShowSevereError(*thisState, - fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableMin; received handle: {}", handle)); + std::format("Data Exchange API: Problem -- index error in getPluginTrendVariableMin; received handle: {}", handle)); ShowContinueError(*thisState, "The getPluginTrendVariableMin function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; @@ -766,7 +771,7 @@ Real64 getPluginTrendVariableMin(EnergyPlusState state, int handle, int count) // throw an error, set the fatal flag, and then return ShowSevereError( *thisState, - fmt::format("Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableMin; received value: {}", + std::format("Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableMin; received value: {}", count)); ShowContinueError(*thisState, "The getPluginTrendVariableMin function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); @@ -783,7 +788,7 @@ Real64 getPluginTrendVariableMax(EnergyPlusState state, int handle, int count) // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return ShowSevereError(*thisState, - fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableMax; received handle: {}", handle)); + std::format("Data Exchange API: Problem -- index error in getPluginTrendVariableMax; received handle: {}", handle)); ShowContinueError(*thisState, "The getPluginTrendVariableMax function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; @@ -794,7 +799,7 @@ Real64 getPluginTrendVariableMax(EnergyPlusState state, int handle, int count) // throw an error, set the fatal flag, and then return ShowSevereError( *thisState, - fmt::format("Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableMax; received value: {}", + std::format("Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableMax; received value: {}", count)); ShowContinueError(*thisState, "The getPluginTrendVariableMax function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); @@ -811,7 +816,7 @@ Real64 getPluginTrendVariableSum(EnergyPlusState state, int handle, int count) // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return ShowSevereError(*thisState, - fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableSum; received handle: {}", handle)); + std::format("Data Exchange API: Problem -- index error in getPluginTrendVariableSum; received handle: {}", handle)); ShowContinueError(*thisState, "The getPluginTrendVariableSum function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; @@ -822,7 +827,7 @@ Real64 getPluginTrendVariableSum(EnergyPlusState state, int handle, int count) // throw an error, set the fatal flag, and then return ShowSevereError( *thisState, - fmt::format("Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableSum; received value: {}", + std::format("Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableSum; received value: {}", count)); ShowContinueError(*thisState, "The getPluginTrendVariableSum function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); @@ -839,7 +844,7 @@ Real64 getPluginTrendVariableDirection(EnergyPlusState state, int handle, int co // need to fatal out once the plugin is done // throw an error, set the fatal flag, and then return ShowSevereError(*thisState, - fmt::format("Data Exchange API: Problem -- index error in getPluginTrendVariableDirection; received handle: {}", handle)); + std::format("Data Exchange API: Problem -- index error in getPluginTrendVariableDirection; received handle: {}", handle)); ShowContinueError(*thisState, "The getPluginTrendVariableDirection function will return 0 to allow the plugin to finish, then EnergyPlus will abort"); thisState->dataPluginManager->apiErrorFlag = true; @@ -850,7 +855,7 @@ Real64 getPluginTrendVariableDirection(EnergyPlusState state, int handle, int co // throw an error, set the fatal flag, and then return ShowSevereError( *thisState, - fmt::format( + std::format( "Data Exchange API: Problem -- trend history count argument out of range in getPluginTrendVariableDirection; received value: {}", count)); ShowContinueError(*thisState, diff --git a/src/EnergyPlus/api/func.cc b/src/EnergyPlus/api/func.cc index 60b674bd5c1..9edf7374e65 100644 --- a/src/EnergyPlus/api/func.cc +++ b/src/EnergyPlus/api/func.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include diff --git a/src/EnergyPlus/api/runtime.cc b/src/EnergyPlus/api/runtime.cc index 64eed86016d..334cbb426ce 100644 --- a/src/EnergyPlus/api/runtime.cc +++ b/src/EnergyPlus/api/runtime.cc @@ -45,6 +45,7 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// EnergyPlus Headers #include #include #include @@ -52,7 +53,6 @@ #include #include -// disabling "maybe unused" warnings for all the API functions so the IDE isn't lit up with messages #pragma clang diagnostic push #pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection" diff --git a/src/EnergyPlus/api/state.cc b/src/EnergyPlus/api/state.cc index 5911c8d8d63..a1837213a75 100644 --- a/src/EnergyPlus/api/state.cc +++ b/src/EnergyPlus/api/state.cc @@ -45,13 +45,13 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#include - +// EnergyPlus Headers #include #include #include #include #include +#include EnergyPlusState stateNew() { diff --git a/src/EnergyPlus/main.cc b/src/EnergyPlus/main.cc index 407e78dde23..ccda47e4eed 100644 --- a/src/EnergyPlus/main.cc +++ b/src/EnergyPlus/main.cc @@ -45,11 +45,12 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// Third Party Headers +#include + // EnergyPlus Headers #include -#include - int main(int argc, char **argv) { #ifdef _WIN32 diff --git a/src/EnergyPlus/test_ep_as_library.cc b/src/EnergyPlus/test_ep_as_library.cc index e5b09dd5030..2ff837352da 100644 --- a/src/EnergyPlus/test_ep_as_library.cc +++ b/src/EnergyPlus/test_ep_as_library.cc @@ -45,9 +45,12 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +// C++ Headers +#include + +// EnergyPlus Headers #include #include -#include void message_callback_handler(std::string const &message) { diff --git a/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc b/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc index eba8bccc334..f7ceb178971 100644 --- a/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc +++ b/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc @@ -59,6 +59,7 @@ #include #include #include +#include #include "Fixtures/EnergyPlusFixture.hh" @@ -220,10 +221,10 @@ TEST_F(EnergyPlusFixture, ExhAbsorption_GetInput_Test) " Capstone C65 ExhTemp_vs_Inlet_Temp, !- Exhaust Air Temperature Function of Temperature Curve Name ", " Capstone C65 ExhTemp_vs_PLR; !- Exhaust Air Temperature Function of Part Load Ratio Curve Name ", " ", - " OutdoorAir:Node, ", - " Capstone C65 Combustion Air Inlet Node, !- Name ", - " -1; !- Height Above Ground {m} ", - " ", + " OutdoorAir:Node, ", + " Capstone C65 Combustion Air Inlet Node, !- Name ", + " -1; !- Height Above Ground {m} ", + " ", " Curve:Quadratic, ", " Capstone C65 ExhTemp_vs_Inlet_Temp, !- Name ", " 1.0, !- Coefficient1 Constant ", diff --git a/tst/EnergyPlus/unit/HighTempRadiantSystem.unit.cc b/tst/EnergyPlus/unit/HighTempRadiantSystem.unit.cc index 1579c5e1ab0..536ffcfd2c6 100644 --- a/tst/EnergyPlus/unit/HighTempRadiantSystem.unit.cc +++ b/tst/EnergyPlus/unit/HighTempRadiantSystem.unit.cc @@ -50,8 +50,10 @@ // Google Test Headers #include -// EnergyPlus Headers +// Fixture Headers #include "Fixtures/EnergyPlusFixture.hh" + +// EnergyPlus Headers #include #include #include @@ -115,7 +117,7 @@ TEST_F(EnergyPlusFixture, HighTempRadiantSystemTest_GetHighTempRadiantSystem) " ** Severe ** Fraction of radiation distributed to surfaces and people sums up to less than 1 for ZONERADHEATER", " ** ~~~ ** This would result in some of the radiant energy delivered by the high temp radiant heater being lost.", " ** ~~~ ** The sum of all radiation fractions to surfaces = 0.80000", - " ** ~~~ ** The radiant fraction to people = 4.00000E-002", + " ** ~~~ ** The radiant fraction to people = 0.04000", " ** ~~~ ** So, all radiant fractions including surfaces and people = 0.84000", " ** ~~~ ** This means that the fraction of radiant energy that would be lost from the high temperature radiant " "heater would be = 0.16000", diff --git a/tst/EnergyPlus/unit/OutputFiles.unit.cc b/tst/EnergyPlus/unit/OutputFiles.unit.cc index ea30019edfc..320eb80a1e4 100644 --- a/tst/EnergyPlus/unit/OutputFiles.unit.cc +++ b/tst/EnergyPlus/unit/OutputFiles.unit.cc @@ -48,140 +48,117 @@ // Google Test Headers #include +// Fixture Headers #include "Fixtures/EnergyPlusFixture.hh" // EnergyPlus Headers -#include "EnergyPlus/InputProcessing/InputProcessor.hh" #include #include +#include namespace EnergyPlus { TEST_F(EnergyPlusFixture, OutputFiles_Expected_Formatting_Tests) { // EXPECT_EQ(format("{:#12.{}F}", 123.456, 0), " 123."); // valid for fmt <=7.0.0 but not >=7.1.3, changed sometime in between - EXPECT_EQ(format("{:#11.{}F}", 123.456, 0), " 123."); - EXPECT_EQ(format("{:#12.{}F}", 0.85505055394102414, 3), " 0.855"); - EXPECT_EQ(format("{:#12.{}F}", 18229.761511696095, 2), " 18229.76"); - EXPECT_EQ(format("{:12}", 4), " 4"); + EXPECT_EQ(EnergyPlus::format("{:#11.{}F}", 123.456, 0), " 123."); + EXPECT_EQ(EnergyPlus::format("{:#12.{}F}", 0.85505055394102414, 3), " 0.855"); + EXPECT_EQ(EnergyPlus::format("{:#12.{}F}", 18229.761511696095, 2), " 18229.76"); + EXPECT_EQ(EnergyPlus::format("{:12}", 4), " 4"); // R syntax, which replicates the "RoundSigDigits" function // by rounding and displaying 3 digits in the exponent and chooses between // fixed and E notation depending on magnitude - EXPECT_EQ(format("{:.4R}", 8.4138E-02), "8.4138E-002"); - EXPECT_EQ(format("{:.4R}", 8.41385E-02), "8.4139E-002"); + EXPECT_EQ(EnergyPlus::format("{:.4R}", 8.4138E-02), "8.4138E-002"); + EXPECT_EQ(EnergyPlus::format("{:.4R}", 8.41385E-02), "8.4139E-002"); - EXPECT_EQ(format("{:.4R}", 0.1518), "0.1518"); - EXPECT_EQ(format("{:.4R}", 0.15185), "0.1519"); - EXPECT_EQ(format("{:.2R}", 42.7350), "42.74"); + EXPECT_EQ(EnergyPlus::format("{:.4R}", 0.1518), "0.1518"); + EXPECT_EQ(EnergyPlus::format("{:.4R}", 0.15185), "0.1519"); + EXPECT_EQ(EnergyPlus::format("{:.2R}", 42.7350), "42.74"); // This edge case is rounding up from the old formatting routines and // wants to round down with 'R' format // // These are specific cases that have come up while testing E+ with regression diffs - EXPECT_EQ(format("{:.2R}", 42.73499999999999232614), "42.74"); - EXPECT_EQ(format("{:.2R}", 42.734), "42.73"); + EXPECT_EQ(EnergyPlus::format("{:.2R}", 42.73499999999999232614), "42.74"); + EXPECT_EQ(EnergyPlus::format("{:.2R}", 42.734), "42.73"); - EXPECT_EQ(format("{:.10R}", 0.14227301774935188772), "0.1422730177"); - EXPECT_EQ(format("{:.10R}", 9.90178849143378697617E-02), "9.9017884914E-002"); + EXPECT_EQ(EnergyPlus::format("{:.10R}", 0.14227301774935188772), "0.1422730177"); + EXPECT_EQ(EnergyPlus::format("{:.10R}", 9.90178849143378697617E-02), "9.9017884914E-002"); - EXPECT_EQ(format("{:.10R}", 0.15991370194912388203), "0.1599137019"); + EXPECT_EQ(EnergyPlus::format("{:.10R}", 0.15991370194912388203), "0.1599137019"); - EXPECT_EQ(format("{:.3R}", 4.71499999999999974687E-02), "4.715E-002"); - EXPECT_EQ(format("{:.3R}", 2.58370321661460875667E-04), "2.584E-004"); - EXPECT_EQ(format("{:.3R}", 2.35749999999999978670E-03), "2.358E-003"); - EXPECT_EQ(format("{:.3R}", 0.37915258851937216900), "0.379"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 4.71499999999999974687E-02), "4.715E-002"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 2.58370321661460875667E-04), "2.584E-004"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 2.35749999999999978670E-03), "2.358E-003"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 0.37915258851937216900), "0.379"); - EXPECT_EQ(format("{:.3R}", 0.10589999999999999414), "0.106"); - EXPECT_EQ(format("{:.3R}", 1.09763681592039800961E-03), "1.098E-003"); - EXPECT_EQ(format("{:.3R}", 9.62727272727272737063E-03), "9.627E-003"); - EXPECT_EQ(format("{:.3R}", 1.59349720571666519930), "1.593"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 0.10589999999999999414), "0.106"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 1.09763681592039800961E-03), "1.098E-003"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 9.62727272727272737063E-03), "9.627E-003"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 1.59349720571666519930), "1.593"); - EXPECT_EQ(format("{:.10R}", 0.11686688704901793123), "0.1168668870"); - EXPECT_EQ(format("{:.10R}", 0.14602401770121714586), "0.1460240177"); + EXPECT_EQ(EnergyPlus::format("{:.10R}", 0.11686688704901793123), "0.1168668870"); + EXPECT_EQ(EnergyPlus::format("{:.10R}", 0.14602401770121714586), "0.1460240177"); - EXPECT_EQ(format("{:.10R}", 9.12850042469573067808E-016), "9.1285004247E-016"); - EXPECT_EQ(format("{:.10R}", 1.60782525664980535959E-015), "1.6078252566E-015"); + EXPECT_EQ(EnergyPlus::format("{:.10R}", 9.12850042469573067808E-016), "9.1285004247E-016"); + EXPECT_EQ(EnergyPlus::format("{:.10R}", 1.60782525664980535959E-015), "1.6078252566E-015"); - EXPECT_EQ(format("{:.10R}", 0.10797418337603230387), "0.1079741834"); - EXPECT_EQ(format("{:.10R}", 0.14820485805540076218), "0.1482048581"); - EXPECT_EQ(format("{:.10R}", 3.08684514533120978041E-002), "3.0868451453E-002"); + EXPECT_EQ(EnergyPlus::format("{:.10R}", 0.10797418337603230387), "0.1079741834"); + EXPECT_EQ(EnergyPlus::format("{:.10R}", 0.14820485805540076218), "0.1482048581"); + EXPECT_EQ(EnergyPlus::format("{:.10R}", 3.08684514533120978041E-002), "3.0868451453E-002"); - EXPECT_EQ(format("{:.3R}", 7.63142731775999418747E-003), "7.631E-003"); - EXPECT_EQ(format("{:.3R}", 1.28349999999999948505E-004), "1.283E-004"); - EXPECT_EQ(format("{:.3R}", 2.56700000000000005430E-004), "2.567E-004"); - EXPECT_EQ(format("{:.3R}", 0.15159450340364988286), "0.152"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 7.63142731775999418747E-003), "7.631E-003"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 1.28349999999999948505E-004), "1.283E-004"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 2.56700000000000005430E-004), "2.567E-004"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 0.15159450340364988286), "0.152"); - EXPECT_EQ(format("{:.3R}", 2.14633893312000043063E-002), "2.146E-002"); - EXPECT_EQ(format("{:.3R}", 8.55666666666666278192E-005), "8.557E-005"); - EXPECT_EQ(format("{:.3R}", 6.41749999999999878051E-005), "6.418E-005"); - EXPECT_EQ(format("{:.3R}", 0.10106298657208269420), "0.101"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 2.14633893312000043063E-002), "2.146E-002"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 8.55666666666666278192E-005), "8.557E-005"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 6.41749999999999878051E-005), "6.418E-005"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 0.10106298657208269420), "0.101"); - EXPECT_EQ(format("{:.3R}", 5.72357048832000323002E-003), "5.724E-003"); - EXPECT_EQ(format("{:.3R}", 8.55666666666666142667E-005), "8.557E-005"); - EXPECT_EQ(format("{:.3R}", 6.41749999999999742525E-005), "6.417E-005"); - EXPECT_EQ(format("{:.3R}", 0.10106298987671752387), "0.101"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 5.72357048832000323002E-003), "5.724E-003"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 8.55666666666666142667E-005), "8.557E-005"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 6.41749999999999742525E-005), "6.417E-005"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 0.10106298987671752387), "0.101"); - EXPECT_EQ(format("{:.3R}", 7.86990942144000400760E-003), "7.870E-003"); - EXPECT_EQ(format("{:.3R}", 8.55666666666666007142E-005), "8.557E-005"); - EXPECT_EQ(format("{:.3R}", 6.41749999999999607000E-005), "6.417E-005"); - EXPECT_EQ(format("{:.3R}", 0.10106298537039738739), "0.101"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 7.86990942144000400760E-003), "7.870E-003"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 8.55666666666666007142E-005), "8.557E-005"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 6.41749999999999607000E-005), "6.417E-005"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 0.10106298537039738739), "0.101"); - EXPECT_EQ(format("{:.3R}", 2.14633893312000077758E-002), "2.146E-002"); - EXPECT_EQ(format("{:.3R}", 8.55666666666666413717E-005), "8.557E-005"); - EXPECT_EQ(format("{:.3R}", 0.10106298657208269420), "0.101"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 2.14633893312000077758E-002), "2.146E-002"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 8.55666666666666413717E-005), "8.557E-005"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 0.10106298657208269420), "0.101"); - EXPECT_EQ(format("{:.8R}", 3299120.2346041048876941), "3299120.23460410"); + EXPECT_EQ(EnergyPlus::format("{:.8R}", 3299120.2346041048876941), "3299120.23460410"); - EXPECT_EQ(format("{:.5R}", 8678.2915949994276161), "8678.29159"); - EXPECT_EQ(format("{:.5R}", 1000000000000000.00000), "1000000000000000."); - EXPECT_EQ(format("{:.5R}", 2070.8390649997299988), "2070.83906"); + EXPECT_EQ(EnergyPlus::format("{:.5R}", 8678.2915949994276161), "8678.29159"); + EXPECT_EQ(EnergyPlus::format("{:.5R}", 1000000000000000.00000), "1000000000000000."); + EXPECT_EQ(EnergyPlus::format("{:.5R}", 2070.8390649997299988), "2070.83906"); - EXPECT_EQ(format("{:.2R}", 166.60499927514288743), "166.60"); - EXPECT_EQ(format("{:.5R}", 245.90393499959708379), "245.90393"); + EXPECT_EQ(EnergyPlus::format("{:.2R}", 166.60499927514288743), "166.60"); + EXPECT_EQ(EnergyPlus::format("{:.5R}", 245.90393499959708379), "245.90393"); - EXPECT_EQ(format("{:.3R}", 0.16149998966664602662), "0.161"); - EXPECT_EQ(format("{:.3R}", 23.989999896666461154), "23.990"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 0.16149998966664602662), "0.161"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 23.989999896666461154), "23.990"); - EXPECT_EQ(format("{:.2R}", 42.734999999999985221), "42.74"); + EXPECT_EQ(EnergyPlus::format("{:.2R}", 42.734999999999985221), "42.74"); - EXPECT_EQ(format("{:.3R}", 14391.882499999999709), "14391.883"); + EXPECT_EQ(EnergyPlus::format("{:.3R}", 14391.882499999999709), "14391.883"); - EXPECT_EQ(format("{:.2R}", -3.04999999999999760192), "-3.05"); - EXPECT_EQ(format("{:.2R}", -2.28500000000000058620), "-2.29"); - EXPECT_EQ(format("{:.2R}", -6.09999999999999609201), "-6.10"); - EXPECT_EQ(format("{:.2R}", -4.57000017199999675199), "-4.57"); + EXPECT_EQ(EnergyPlus::format("{:.2R}", -3.04999999999999760192), "-3.05"); + EXPECT_EQ(EnergyPlus::format("{:.2R}", -2.28500000000000058620), "-2.29"); + EXPECT_EQ(EnergyPlus::format("{:.2R}", -6.09999999999999609201), "-6.10"); + EXPECT_EQ(EnergyPlus::format("{:.2R}", -4.57000017199999675199), "-4.57"); - EXPECT_EQ(format("{:.2R}", -0.0), "0.00"); + EXPECT_EQ(EnergyPlus::format("{:.2R}", -0.0), "0.00"); // kept in the code for the sake of documentation // code is expected to not round up with the old version, but clearly it should // EXPECT_EQ(format("{:.3R}", 6.41750000000000013576E-005), "6.417E-005"); // this code should round up as well to match behavior of others // EXPECT_EQ(format("{:.5R}", 0.059576949999999996577), "5.95769E-002"); - - // T formatting is like R, but it trims instead of rounding - EXPECT_EQ(format("{:.3T}", 7.63142731775999418747E-003), "7.631E-003"); - EXPECT_EQ(format("{:.3T}", 1.28349999999999948505E-004), "1.283E-004"); - EXPECT_EQ(format("{:.3T}", 2.56700000000000005430E-004), "2.567E-004"); - EXPECT_EQ(format("{:.3T}", 0.15159450340364988286), "0.151"); - EXPECT_EQ(format("{:.3T}", 0.0), "0.000"); - - EXPECT_EQ(format("{:.3T}", 2.14633893312000043063E-002), "2.146E-002"); - EXPECT_EQ(format("{:.3T}", 8.55666666666666278192E-005), "8.556E-005"); - EXPECT_EQ(format("{:.3T}", 6.41749999999999878051E-005), "6.417E-005"); - EXPECT_EQ(format("{:.3T}", 0.10106298657208269420), "0.101"); - - EXPECT_EQ(format("{:.4T}", 0.14999999999999999445), "0.1500"); - EXPECT_EQ(format("{:.3T}", 4500.0), "4500.000"); - EXPECT_EQ(format("{:.4T}", 7.1846416734478406596), "7.1846"); - EXPECT_EQ(format("{:.4T}", 1.1846416734478406596), "1.1846"); - EXPECT_EQ(format("{:.4T}", 6.2565195738294026029), "6.2565"); - EXPECT_EQ(format("{:.4T}", 0.25651957382940215879), "0.2565"); - - // kept in the code for the sake of documentation - // code is expected to round down with the old version, but clearly it should not - // for the case of "Trim" - // EXPECT_EQ(format("{:.4T}", 0.096970000000000000639), "9.6969E-002"); } TEST_F(EnergyPlusFixture, OutputControlFiles) diff --git a/tst/EnergyPlus/unit/PlantPipingSystemsManager.unit.cc b/tst/EnergyPlus/unit/PlantPipingSystemsManager.unit.cc index 52cd664f4ab..a29ff984843 100644 --- a/tst/EnergyPlus/unit/PlantPipingSystemsManager.unit.cc +++ b/tst/EnergyPlus/unit/PlantPipingSystemsManager.unit.cc @@ -50,7 +50,10 @@ // Google Test Headers #include +// Fixture Headers #include "Fixtures/EnergyPlusFixture.hh" + +// EnergyPlus Headers #include #include #include @@ -1914,9 +1917,9 @@ TEST_F(EnergyPlusFixture, PipingSystem_Check_Correct_Pipe_Diameters) EXPECT_TRUE(ErrorsFound); std::string error_string = delimited_string({ - R"( ** Severe ** ReadPipeCircuitInputs:PipingSystem:Underground:PipeCircuit="MY PIPE CIRCUIT", invalid Pipe Outer Diameter="1.200E-002", Condition: Outer diameter must be greater than inner diameter.)", + R"( ** Severe ** ReadPipeCircuitInputs:PipingSystem:Underground:PipeCircuit="MY PIPE CIRCUIT", invalid Pipe Outer Diameter="0.012", Condition: Outer diameter must be greater than inner diameter.)", R"( ** Severe ** ReadPipeCircuitInputs: GroundHeatExchanger:HorizontalTrench="GHX HORIZONTAL TRENCH" has invalid pipe diameters.)", - R"( ** ~~~ ** Outer diameter [1.100E-002] must be greater than inner diameter [1.500E-002].)", + R"( ** ~~~ ** Outer diameter [0.011] must be greater than inner diameter [0.015].)", }); EXPECT_TRUE(compare_err_stream(error_string, true)); } diff --git a/tst/EnergyPlus/unit/Pumps.unit.cc b/tst/EnergyPlus/unit/Pumps.unit.cc index 62c9e6335b4..a1b5479f199 100644 --- a/tst/EnergyPlus/unit/Pumps.unit.cc +++ b/tst/EnergyPlus/unit/Pumps.unit.cc @@ -50,8 +50,10 @@ // Google Test Headers #include -// EnergyPlus Headers +// Fixture Headers #include "Fixtures/EnergyPlusFixture.hh" + +// EnergyPlus Headers #include #include #include @@ -669,7 +671,7 @@ TEST_F(EnergyPlusFixture, VariableSpeedPump_MinFlowGreaterThanMax) std::string const error_string = delimited_string({ " ** Warning ** GetPumpInput: Pump:VariableSpeed=\"SUPPLY INLET PUMP\", Invalid 'Design Minimum Flow Rate'", - " ** ~~~ ** Entered Value=[2.00000E-003] is above or too close (equal) to the Design Maximum Flow Rate=[1.00000E-003].", + " ** ~~~ ** Entered Value=[0.00200] is above or too close (equal) to the Design Maximum Flow Rate=[0.00100].", " ** ~~~ ** Resetting value of 'Design Minimum Flow Rate' to the value of 99% of 'Design Maximum Flow Rate'.", }); @@ -721,7 +723,7 @@ TEST_F(EnergyPlusFixture, VariableSpeedPump_MinFlowEqualToMax) std::string const error_string = delimited_string({ " ** Warning ** GetPumpInput: Pump:VariableSpeed=\"SUPPLY INLET PUMP\", Invalid 'Design Minimum Flow Rate'", - " ** ~~~ ** Entered Value=[9.95000E-004] is above or too close (equal) to the Design Maximum Flow Rate=[1.00000E-003].", + " ** ~~~ ** Entered Value=[0.00100] is above or too close (equal) to the Design Maximum Flow Rate=[0.00100].", " ** ~~~ ** Resetting value of 'Design Minimum Flow Rate' to the value of 99% of 'Design Maximum Flow Rate'.", }); diff --git a/tst/EnergyPlus/unit/WaterCoils.unit.cc b/tst/EnergyPlus/unit/WaterCoils.unit.cc index 3a5d4e49b2b..994b0ea894c 100644 --- a/tst/EnergyPlus/unit/WaterCoils.unit.cc +++ b/tst/EnergyPlus/unit/WaterCoils.unit.cc @@ -57,9 +57,15 @@ // The water coil should size to use sizing data or Data* globals. After a coil is sized, the Data* variables should all be reset. // Defect file showed a second coil in the input that autosized the same as the first (incorrect based on zone flow rates). +// C++ Headers +#include + // Google Test Headers #include +// Fixture Headers +#include "Fixtures/EnergyPlusFixture.hh" + // EnergyPlus Headers #include #include @@ -88,8 +94,6 @@ #include #include -#include "Fixtures/EnergyPlusFixture.hh" - using namespace EnergyPlus; using namespace DataAirLoop; using namespace DataAirSystems; @@ -1166,10 +1170,9 @@ TEST_F(WaterCoilsTest, CoilCoolingWaterDetailed_WarningMath) EnergyPlus::format(" ** Warning ** Version: missing in IDF, processing for EnergyPlus version=\"{}\"", DataStringGlobals::MatchVersion), " ** Warning ** Coil:Cooling:Water:DetailedGeometry in Coil =Test Detailed Water Cooling Coil", " ** ~~~ ** Air Flow Rate Velocity has greatly exceeded upper design guidelines of ~2.5 m/s", - EnergyPlus::format(" ** ~~~ ** Air Mass Flow Rate[kg/s]={:.6T}", waterCoil1.InletAirMassFlowRate), - EnergyPlus::format(" ** ~~~ ** Air Face Velocity[m/s]={:.6T}", AirMassFlow / (waterCoil1.MinAirFlowArea * AirDensity)), - EnergyPlus::format(" ** ~~~ ** Approximate Mass Flow Rate limit for Face Area[kg/s]={:.6T}", - 2.5 * waterCoil1.MinAirFlowArea * AirDensity), + std::format(" ** ~~~ ** Air Mass Flow Rate[kg/s]={:.6f}", waterCoil1.InletAirMassFlowRate), + std::format(" ** ~~~ ** Air Face Velocity[m/s]={:.6f}", AirMassFlow / (waterCoil1.MinAirFlowArea * AirDensity)), + std::format(" ** ~~~ ** Approximate Mass Flow Rate limit for Face Area[kg/s]={:.6f}", 2.5 * waterCoil1.MinAirFlowArea * AirDensity), " ** ~~~ ** Coil:Cooling:Water:DetailedGeometry could be resized/autosized to handle capacity", }); @@ -1189,10 +1192,9 @@ TEST_F(WaterCoilsTest, CoilCoolingWaterDetailed_WarningMath) std::string expected_fatal_error = delimited_string({ " ** Severe ** Coil:Cooling:Water:DetailedGeometry in Coil =Test Detailed Water Cooling Coil", " ** ~~~ ** Air Flow Rate Velocity is > 100MPH (44.7m/s) and simulation cannot continue", - EnergyPlus::format(" ** ~~~ ** Air Mass Flow Rate[kg/s]={:.6T}", waterCoil1.InletAirMassFlowRate), - EnergyPlus::format(" ** ~~~ ** Air Face Velocity[m/s]={:.6T}", AirMassFlow / (waterCoil1.MinAirFlowArea * AirDensity)), - EnergyPlus::format(" ** ~~~ ** Approximate Mass Flow Rate limit for Face Area[kg/s]={:.6T}", - 44.7 * waterCoil1.MinAirFlowArea * AirDensity), + std::format(" ** ~~~ ** Air Mass Flow Rate[kg/s]={:.6f}", waterCoil1.InletAirMassFlowRate), + std::format(" ** ~~~ ** Air Face Velocity[m/s]={:.6f}", AirMassFlow / (waterCoil1.MinAirFlowArea * AirDensity)), + std::format(" ** ~~~ ** Approximate Mass Flow Rate limit for Face Area[kg/s]={:.6f}", 44.7 * waterCoil1.MinAirFlowArea * AirDensity), " ** Fatal ** Coil:Cooling:Water:DetailedGeometry needs to be resized/autosized to handle capacity", " ...Summary of Errors that led to program termination:", " ..... Reference severe error count=1", diff --git a/tst/EnergyPlus/unit/WaterToAirHeatPumpSimple.unit.cc b/tst/EnergyPlus/unit/WaterToAirHeatPumpSimple.unit.cc index 1a7747f0310..7c52b963475 100644 --- a/tst/EnergyPlus/unit/WaterToAirHeatPumpSimple.unit.cc +++ b/tst/EnergyPlus/unit/WaterToAirHeatPumpSimple.unit.cc @@ -50,6 +50,7 @@ // Google Test Headers #include +// Fixture Headers #include "Fixtures/EnergyPlusFixture.hh" // EnergyPlus Headers @@ -214,9 +215,9 @@ TEST_F(EnergyPlusFixture, WaterToAirHeatPumpSimpleTest_SizeHVACWaterToAir) EXPECT_GE(wahpSimple1.RatedCapCoolTotal, wahpSimple1.RatedCapCoolSens); if (wahpSimple1.RatedCapCoolTotal != 0.0) { - ShowMessage( - *state, - format("SizeHVACWaterToAir: Rated Sensible Heat Ratio = {:.2R} [-]", wahpSimple1.RatedCapCoolSens / wahpSimple1.RatedCapCoolTotal)); + ShowMessage(*state, + EnergyPlus::format("SizeHVACWaterToAir: Rated Sensible Heat Ratio = {:.2R} [-]", + wahpSimple1.RatedCapCoolSens / wahpSimple1.RatedCapCoolTotal)); } EXPECT_TRUE(compare_eio_stream_substring("Design Size Rated Air Flow Rate", false)); EXPECT_TRUE(compare_eio_stream_substring("Design Size Rated Total Cooling Capacity", false)); @@ -1118,10 +1119,10 @@ TEST_F(EnergyPlusFixture, WaterToAirHeatPumpSimpleTest_CheckSimpleWAHPRatedCurve "rated conditions = 0.404\n ** Warning ** CheckSimpleWAHPRatedCurvesOutputs: Coil:Cooling:WaterToAirHeatPump:EquationFit=\"WAHP 2\"\n " "** " " ~~~ ** Cooling power consumption as a function of temperature curve output is not equal to 1.0 (+ or - 2%) at rated conditions.\n ** " - " ~~~ ** Curve output at rated conditions = 0.742\n ** Warning ** " + " ~~~ ** Curve output at rated conditions = 0.743\n ** Warning ** " "CheckSimpleWAHPRatedCurvesOutputs: Coil:Cooling:WaterToAirHeatPump:EquationFit=\"WAHP 2\"\n ** ~~~ ** Sensible cooling capacity as a " "function of temperature curve output is not equal to 1.0 (+ or - 2%) at rated conditions.\n ** ~~~ ** Curve output at rated " - "conditions = 0.454"}); + "conditions = 0.455"}); EXPECT_TRUE(compare_err_stream(error_string, true)); }